in reply to Re^2: [OT] Endianness and extended precision (80-bit) long doubles
in thread [OT] Endianness and extended precision (80-bit) long doubles
If Perl source code of:
works? I am also unsure about what will happen on a different architecture. My main machine is Intel (little endian). I have a Raspberry PI which I think is big endian, but I have a lot of hardware cables to screw around with to get it working. Sorry.$ perl -le 'print unpack "h*", pack "D", sqrt 2;' 4846ed9f333f405bfff3000000000000
D A float of long-double precision in native format. (Long doubles are available only if your system supports long double values _and_ if Perl has been compiled to support those. Raises an exception otherwise. Note that there are different long double formats.) h A hex string (low nybble first). H A hex string (high nybble first).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: [OT] Endianness and extended precision (80-bit) long doubles
by AnomalousMonk (Archbishop) on Aug 25, 2019 at 01:57 UTC | |
by syphilis (Archbishop) on Aug 26, 2019 at 06:20 UTC | |
by Marshall (Canon) on Aug 26, 2019 at 16:06 UTC | |
by AnomalousMonk (Archbishop) on Aug 26, 2019 at 21:34 UTC | |
by choroba (Cardinal) on Aug 28, 2019 at 16:00 UTC |