pryrt / Data-IEEE754-Tools

perl module for converting the internal IEEE-754 floating point values into a human-readable interpretation of the underlying data
Other
1 stars 2 forks source link

Handle 32bit and 128bit floats, not just 64bit floats #7

Open pryrt opened 8 years ago

pryrt commented 8 years ago

as of v0.014, still only handles 64bit double-floats. It would be nice to also handle 32bit single-floats and 128bit floats ("quad"?).

pryrt commented 8 years ago

If I did this, I'd probably then introduce a naming convention of some sort.

IEEE Std 754™-2008 uses <format>-camelCase, which of course wouldn't work in Perl.

My thought: use <format>_camelCase instead: name the per-size functions single_camelCase, double_camelCase, quad_camelCase, and use the %Config{nvsize} to pick the correct alias for the raw camelCase.

Though, perhaps I should instead use the actual 754™ format names: binary32, binary64, binary128.