News for hackers. Stuff that matters.
Re:Exposing Floating Point by Dylan16807 on Tuesday June 27, 2023 @08:52PM (#36500855)
It depends on what math you're doing. Very often you're likely to find that a base number of 1e-6 makes you less likely to hit your exponent limits than a base number of 1.

1 is special in that half the positive floats are above it and half are below. That doesn't mean your use case wants half.

Re:Exposing Floating Point by turtledragonfly on Tuesday June 27, 2023 @09:08PM (#36500984)
Then would it be fair to say that if you don't know what calculations might be coming, all other things being equal, 1 is a good choice since it is "unbiased" in this sense?
Re:Exposing Floating Point by Dylan16807 on Tuesday June 27, 2023 @09:36PM (#36501193)
It's perfectly fine, but because addition is very common it's unlikely to be optimal.