Re: C2124 is most disrespectful of IEEE floating point arithmetic

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Abdo Haji-Ali wrote:

"Dr Pizza" <DrPizza@xxxxxxxxxxxxxxxxx> wrote in message
news:xn0eqk4re2h581y00a@xxxxxxxxxxxxxxxxxxxxxxx

Erm, if that is your interpretation then that part of the standard
has no meaning. There is not one single "mathematics". For
example, the mathematics of integers has different properties from
the mathematics of reals (consider how for example things like
division behave differently with integers as compared to reals).
There are a number of peculiarities to the mathematics used for
various types; the arithmetics for the three kinds basic numeric
types (signed integers, unsigned integers, floating point) are all
different.
Give me the name of the book that says 1.0/0.0 is defined under any
"mathmatics"...
It's not a book as such, but IEC 559 clearly states that 1.0 / 0.0 is
defined to be +inf. And IEC 559 governs this situation because
is_iec559 is true for both float and double.

It's undefined in every math science
In pure math, 1.0/0.0 is undefined. However, 1.0/n when n tends to
0.0 (n != 0.0) is infinity
In real arithmetic there's no inexactness of representation either.
Nor is there any concept of overflow or underflow. Reals are dense
unlike floats which are not. In floats, the identity x = x does not
hold true; it does for reals. Yet you accept these peculiar properties
of floats without question.

The mathematics of reals is irrelevant, because floating point numbers
are not real numbers. Floating point numbers are an approximation to
real numbers, and that approximation has different numerical
properties. And those properties are the ones laid out in IEC 559.

IEEE is not a math science, it can't define what isn't defined in
math, nor it can put any math rules. IEEE is simply a representation
of float numbers in digital systems
IEC 559 is not merely a representation. It also describes the
behaviour, as I've already quoted elsewhere in the thread. IEC 559
defines what occurs when a floating point division by zero is performed.

It is unreasonable to use any system of mathematics when evaluating
these expressions other than the one defined by IEC 559, just as it
is unreasonable to use any system other than modulo integer
arithmetic when considering unsigned integral expressions, or an
appropriate signed arithmetic when considering signed integral
expressions.
is_iec559 is simply a flag that tells you how the CPU is treating the
type. It's not a flag from the compiler but from the C++ library. You
can't blame the compiler for its value
The compiler ships with the library, and Microsoft bundle them all
together; VC++ is a hosted environment. If the library is lying (i.e.
does not properly describe the environment) then MS's implementation is
faulty. The library and the compiler go together; if you maintain that
the compiler is correct then the library is incorrect and there is
still a problem.


--

.



Relevant Pages

  • Re: Skolems Paradox and why is math the way it is?
    ... This is not a job the axioms were ever meant to do. ... It's actually a problem with language generally, not just mathematics. ... just procrastinated the problem of interpretation for one step. ... Consider for example the set of reals you considered in another posting, ...
    (sci.math)
  • Re: Cantorian pseudomathematics
    ... distribution on the naturals" as "a function from the naturals, ... not to create abstract mathematics unrelated to anything. ... >> properties of the reals, inherent in their definition, to show that ... I know some modern probability theory too :-) ...
    (sci.math)
  • Re: Cantorian pseudomathematics
    ... infinite number of naturals: you couldn't in real life compute frequencies on an infinite number of objects. ... basic idea was to make the real world more understandable, not to create abstract mathematics unrelated to anything. ... phrase (or the equally ambiguous terms "random", or "probability") as part of a mathematical argument without first defining it results in a non-mathematical argument. ... What would change in theorems, if we only care about computable reals? ...
    (sci.math)
  • Re: Why real numbers and points cant model continuum
    ... "The arrow does not stand still" is the assertion that there exists ... Then you are in agreement with physics as it is currently practiced, ... reality and our physical models using the usual mathematics of the ... reals: after all, Zeno's arrow /does/ actually reach the target, just ...
    (sci.math)
  • Re: Cantorian pseudomathematics
    ... There exists some kind of limiting process to check that the number - the abstraction - sqrtis the diagonal of the square - another abstraction. ... the basic way of linking real life measure and mathematics, and I'd be very happy not to be forced to reject it - or to let it become an insignificant model after the abstract construction has been done. ... there is no function which is a uniform distribution on the naturals". ... naturals to the interval in the reals, obeying certain explicit properties. ...
    (sci.math)