Page 2 of 2
Posted: Thu Aug 23, 2007 4:43 am
by bluecode
As pcmattman more or less said: A polynomial is a function like f(x) = a_n * x^n + a_(n-1) * x^(n-1) + ... + a_1 * x^1 + a_0 (Write it down on a paper and this might actually look prettier
). You can insert a value in this function and get a value in return. Now you are searching the x's (this is not only one x, there are more in this case) for which the return value is 0. They are seeking the smallest x for which f(x) is 0.
The "real" means "real number" in contrast to e.g. complex number (which would make the question just more anoying
, but then the number of x for which f(x) is 0 would be more predictable *g*).
Posted: Thu Aug 23, 2007 4:48 am
by Zacariaz
k, i still dont understand the polymonatunvndf... whatever, but i do now understand the solution to the problem and thats what matters i guess, thanks.
Posted: Thu Aug 23, 2007 4:54 am
by AJ
http://en.wikipedia.org/wiki/Polynomial
Alternative definition: A numerate parrot
(shamelessly copied from the 'Polygon' joke)
Posted: Thu Aug 23, 2007 8:17 am
by JamesM
For random numbers, you can use LFSR's. Linear feedback shift registers can be implemented in hardware or software. Essentially you start out with your 'seed', which is x bits long. every iteration you shift the seed one bit, take the bit that just fell off the end, XOR it with some of the other bit positions (this is statically defined, there are set patterns to get true pseudorandomness), and feed that back in as the MSB. This has been proven to be pseudorandom in the average case, and is dead easy to implement.
I implemented it in hardware and interfaced it to a Z80 system no problems. I had it clocking at 2MHz, more than enough to get some decent random numbers.
Posted: Thu Aug 23, 2007 8:21 am
by JamesM
A function is a polynomial
'in x' if it can be written as a sum, each term of which is of the form:
Where a, n are constants.
So, for example:
Is a polynomial.
JamesM
Posted: Thu Aug 23, 2007 12:22 pm
by inflater
Oh the horror, these complicated mathematical equations would meet me too in OSdev?
If you want to get random 16-bit number, you can use this:
Code: Select all
mov al,0
out 43h,al
in al,40h
mov ah,al
in al,40h
Untested, but should work.
Regards
inflater
Posted: Thu Aug 23, 2007 4:22 pm
by binutils
Posted: Fri Aug 24, 2007 2:30 am
by JamesM
Oh the horror, these complicated mathematical equations would meet me too in OSdev? Crying or Very sad
Errrr, I studied polynomials when I was 14 (at school)...
And no, they probably won't.
Posted: Sat Aug 25, 2007 4:55 am
by Combuster
inflater wrote:If you want to get random 16-bit number, you can use this:
Code: Select all
mov al,0
out 43h,al
in al,40h
mov ah,al
in al,40h
It wouldn't be random. If you asked for a series of random numbers you get a linearly ascending function, which is quite predictable.
In other words, a timer isn't a source of entropy, thus it can not be used as a source for truly random numbers.
The timer can however be used for
converting entropy from another source - keyboard and mouse interrupts are unpredictable because they are generated by a human source, with minor variances. by looking up the pit counter each interrupt and taking the bottom bits you can change the temporal entropy generated by the computer user into a binary one.
binutils wrote:noise -> computer
Good one for everybody who has an AM receiver in their computers. Not standard issue though
Posted: Sat Sep 01, 2007 4:39 am
by inflater
Reincarnation, I've missed this one:
JamesM wrote:Errrr, I studied polynomials when I was 14 (at school)...
Of course I did too
But when I see some big equations I always say "that must be hard"... even if it isn't
Regards
inflater
Posted: Sat Sep 01, 2007 9:23 am
by Alboin
inflater wrote:
JamesM wrote:Errrr, I studied polynomials when I was 14 (at school)...
Of course I did too
But when I see some big equations I always say "that must be hard"... even if it isn't
I really like the mathematical\theoretical side of computer science. I'm currently looking into boolean algebra a bit, along with some linear algebra.