in reply to Infinity and platforms

The issue is not so much the platform, as the compiler (more particularly, the maths runtime library) that was used to create the Perl interpreter.


Perl is environmentally friendly - it saves trees

Replies are listed 'Best First'.
Re^2: Infinity and platforms
by andreas1234567 (Vicar) on Jan 18, 2008 at 06:51 UTC
    Is there an overview somewhere of the possible variants of infinity? I want to test functions that are expected to return infinity, independently of architectures, compilers and libraries.
    --
    Andreas
      SUSv3 says "infinity shall be converted in one of the styles "[-]inf" or "[-]infinity" ; which style is implementation-defined." Unfortunately, MS can't change their broken, made up garbage without breaking their compatibility with folk who have coded to it. I'm rather surprised that Solaris is broken, though.

      You could check the standards document for C, and cross-check the IEEE arithmetic standard, which I think is IEEE 754.

      This could work, especially if you can be reasonably sure that the C-compiler being used is actually standards-compliant, and the standard doesn't say something like "it's up to the compiler builder," which it almost certainly does, so the likely short answer to your question is "No." You may (probably will) have to take this up with members of the numerical analysis community, where they deal with this sort of issue all the time.


      emc

      Information about American English usage here and here.

      Any Northeastern US area jobs? I'm currently unemployed.