summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-07-17 14:58:19 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2016-07-17 14:58:19 +0300
commit6ce229987d0f9e304395547fb10685bb677a7e5c (patch)
treea490afd1b43451952f03c0552676265c64cf7f81 /perl.h
parent60d5033292df238895c866316ce2f72eb76e3bb9 (diff)
downloadperl-6ce229987d0f9e304395547fb10685bb677a7e5c.tar.gz
VAX: further docs about the VAX fp formats
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/perl.h b/perl.h
index c6c18db49e..4a6c4f1738 100644
--- a/perl.h
+++ b/perl.h
@@ -6779,9 +6779,20 @@ extern void moncontrol(int);
* The ordering of the parts in VAX floats is quite vexing.
* In the below the fraction_n are the mantissa bits.
* The fraction_1 is the most significant (numbering as by DEC/Digital),
- * and the rightmost bit in each fraction is the least significant.
- * This means for example that both the the most and least significant
- * bits are in the middle of the floats, not at either end.
+ * while the rightmost bit in each fraction is the least significant:
+ * in other words, big-endian bit order within the fractions.
+ * The fraction segments themselves would be big-endianly, except that
+ * within 32 bit segments the less significant comes first, the more
+ * significant after, except that in the format H (used for long doubles)
+ * the first fraction segment is on its own. As promised, vexing.
+ * This means for example that both the most and the least significant
+ * bits can be in the middle of the floats, not at either end.
+ *
+ * References:
+ * http://nssdc.gsfc.nasa.gov/nssdc/formats/VAXFloatingPoint.htm
+ * http://www.quadibloc.com/comp/cp0201.htm
+ * http://h71000.www7.hp.com/doc/82final/6443/6443pro_028.html
+ * (somebody at HP should be fired for the URLs)
*
* F fraction_2:16 sign:1 exp:7 fraction_1:7
* (exponent bias 128)
@@ -6790,7 +6801,7 @@ extern void moncontrol(int);
* fraction_4:16 fraction_3:16
* (exponent bias 128)
*
- * G fraction_2:16 sign:1 exp:11 fraction_1:7
+ * G fraction_2:16 sign:1 exp:11 fraction_1:4
* fraction_4:16 fraction_3:16
* (exponent bias 1024)
*