Earlier quoted context omitted.
That's not right. 1 is different to half the sum of 0 and infinity. Another way to look at it is that infinity minus one is larger than one minus zero (which can be easily proven using the basic definitions used to define the surreals). Moreover, what is at the right side of {0|} is not infinity, but the empty set.
> Moreover, what is at the right side of {0|} is not infinity, but the empty set. But { 0 | ω } = 1, right?
1.5 is the midpoint between 0 and infinity in Ruby
121–125 of 125 posts
Re: 1.5 is the midpoint between 0 and infinity in Ruby
#122Like every blog post or article that talks about something weird related to IEEE floats, this absolutely needs to find a way to link to "What Every Computer Scientist Should Know About Floating-Point Arithmetic", over on https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.h... , because that's mandatory reading if you're programming.
Shorter and at a level the simple masses of programmers will likely work at - https://docs.python.org/3/tutorial/floatingpoint.html#tut-fp...
https://blogs.mathworks.com/cleve/2014/07/07/floating-point-...
Re: 1.5 is the midpoint between 0 and infinity in Ruby
#123Earlier quoted context omitted.
Infinitesimals tautologically exist in any finite representation of numbers. For floats, it's the smallest representable positive number. For integers of any type, it's 1. As for how common they are, we learn about them in any introductory calculus course when defining derivatives. You come across the idea whenever discussing limits, if somewhat obliquely. If I learned about it in high school math, and again in "real…
I've never heard of that, and your definition of 1 as infinitesimal is incompatible withbits properties (infinitesimal + infinitesimal + infinitesimal is greater than a non-infinitesimal 2?!) and I don't see a mention on Wikipedia, and it goes against the plain read it of "in-finite-simal". Also, you seem to be conflating "common" with "standard". "standard" is a mathematical term. Infinitesimal are handwavy in stand…
There are other instances where I've had a need for such a smallest positive number, where logic is simplified as opposed to checking for 0 in a special way. Whether there's an agreed upon term for that, I know where I've found value in programming tasks.
When I need such a thing, it is almost invariably in comparisons, so I am not doing arithmetic with multiple instances of that smallest representable positive number.
Re: 1.5 is the midpoint between 0 and infinity in Ruby
#124Earlier quoted context omitted.
When does this problem crop up when only dealing with pure ints?
Doing integer/rational arithmetic gives you a choice: either never do any rounding and require exponentially growing precision that makes even the simplest algorithms impractically expensive (not to mention giving up entirely on the many common computations which cannot be represented whatsoever in an exact rational arithmetic system), or allow rounding/approximation of some kind and end up with roughly the same prob…
Re: 1.5 is the midpoint between 0 and infinity in Ruby
#125Earlier quoted context omitted.
Shorter and at a level the simple masses of programmers will likely work at - https://docs.python.org/3/tutorial/floatingpoint.html#tut-fp...
Having the actual explanation of why floats work the way they do, by explaining how the various kinds of numbers map to the various IEEE defined bit patterns, is crucial in understanding , rather than just having read some text. This python article skips over that entirely, making it yet another tutorial about the fact "that" floats are approximations instead of "why" floats are approximations. Spend the time up from…