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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: When 1e-298L != 1e-298L
by syphilis (Archbishop) on Oct 25, 2013 at 01:41 UTC |