in reply to Re^2: When 1e-298L != 1e-298L
in thread When 1e-298L != 1e-298L

Is "r80test" readily available ? (Could be handy.)

It's written in D, which has a native 80-bit FP type available. The code looks like this:

import std.stdio; import std.format; void main( string[] args ) { real r; ubyte *ubp = cast(ubyte*)&r; foreach( line; stdin.byLine ) { formattedRead( line, " %f ", &r ); writef( "%20.18g : ", r ); for( int i = r.sizeof -1; i >= 0; --i ) { writef( "%08.8b ", ubp[i] ); } writeln(); } }

If you don't want to be bothered with installing/learning D, I can send you the executable?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^4: When 1e-298L != 1e-298L
by syphilis (Archbishop) on Oct 25, 2013 at 01:41 UTC
    If you don't want to be bothered with installing/learning D, I can send you the executable?

    Send it over would be great !! (I'll /msg you the address.)
    Having another tool that outputs this info would be handy. I'm currently using a "print_binary" function from tests/tmpfr_set_ld.c (in the mpfr source) but it purports to show me the actual value I pass it, not the correct value ... and it's starting to look like the 2 can differ.

    At some point I might like to give D a try. I see that there's a GCC variant (gcd), but I gather that it's the one provided by Digital Mars (dmd, version 2) that would normally be recommended ?

    Cheers,
    Rob