Hacker Newsnew | past | comments | ask | show | jobs | submit | mjcohen's commentslogin

Trump is clearly winning his war on America.

Not if the ratio between the largest and smallest floats is very large (2^(2^n)) where n is the number of bits in the exponent.

I think you either haven't thought about this or you did your math wrong.

You need (2^e)+m+1 bits. That is more bits than would fit in the cheap machine integer type you just have lying around, but it's not that many in real terms.

Let's do a tiny one to see though first, the "half-precision" or f16 type, 5 bits of exponent, 10 bits of fraction, 1 sign bit. We need 43 bits. This will actually fit in the 64-bit signed integer type on a modern CPU.

Now lets try f64, the big daddy, 11 exponent, 52 fraction, 1 sign bit so total 2048 + 52 + 1 = 2101 bits. As I said it doesn't fit in our machine integer types but it's much smaller than a kilobyte of RAM.

Edited: I can't count, though it doesn't make a huge difference.


You also need some extra bits at the top so that it doesn't overflow (e.g., on an adversarial input filled with copies of the max finite value, followed by just as many copies of its negation, so that it sums to 0). The exact number will depend on the maximum input length, but for arrays stored in addressible memory it will add up to no more than 64 or so.

Thanks, you're right there for accumulating excess, I don't think you can actually get to 64 extra bits but sure, lets say 64 extra bits if you want a general purpose in memory algorithm, it's not cheap but we shouldn't be surprised it can be done.

Like the old saying:

Military justice is to justice as military music is to music


(I saw this on a math department bulletin board about 1960)

A theorem both deep and profound States that every circle is round But in a paper by Erdos Written in Kurdish A counterexample is found


I suspect there is a great joke embedded in here, but sadly it went over my head. Any help?


Erdős rhymes with Kurdish.

EDIT: Oh and Erdős was the great collaborator. There is an Erdős number (Bacon and Ozzie too) which defines how close you are to him. eg if you co-authored a paper with Erdős you have a Erdős number of one. If you co-auth a paper with someone with an Erdős number of one, then you have an Erdős number of two etc.

I think that the Bacon (Kevin Bacon) number was the original and there is also a Black Sabbath number which is related to Ozzie (MHRiP).

I also gather that a very few people have managed a minimum measure of all three numbers. Feynman might be one of them (its too late to check).


Did you use the regular version or the one with multiple-precision values?


I used the regular version. Actually, I don't even know what is multiple-precision values -- will look it up.


Clif bars recently went from 6 bars per box to 5. They write the 5 on the box as if it is something improved, not reduced.


The government is in the hands of D&F players.


Only because the politics of most common idiot id the cheapest for monied interests to manufacture.

Business is much worse at the same scale.

Infact, you probably cant find any org at large scale that functions in rational, logic driven capacity.

So theres just a bogeyman, not a useful critique of government.


As Disney almost wrote:

Everybody wants to be a bat Cause noone but a bat really knows where it's at


They will never own their mistakes. That's the point of lack of democracy.


Make sure that is legal where you are and, if needed, you have their permission.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: