Closed ckaran closed 2 years ago
f64::to_be_bytes seems to use f64::to_bits internally and that has some comments on portability: https://doc.rust-lang.org/std/primitive.f64.html#method.from_bits
I think this sounds ok so if you create a PR, I'll merge it. We should probably add some documentation for the portability concerns though.
OK, thank you. Work has suddenly gotten hot again, so it may be a while before I'm able to get to this. If you get to it before I do, then thank you! If not, whenever I have time again, I'll submit another PR.
ok no worries, I released version 2.1.0 with your i128/u128 changes in the meantime.
rustfmt
).
I'm not sure if this is truly possible, but have you considered support for
f32
andf64
? I know that IEEE 754 is supposed to be a standard, but I don't know for certain that every bit pattern is fully specified within the standard, which is why I'm hesitant suggesting using the builtin conversion methods; the bit patterns might not transfer across platforms the way that integers will.