boost units and single-precision floats
From compiler explorer I see the following assembly instructions: https://godbolt.org/z/Gnjr54dn6 cvtss2sd - Converts a single-precision floating-point value in the “convert-from” source operand to a double-precision floating-point value in
Hi,
I have aliases for radians and degrees that use float as the storage type.
When I convert between these two units I see the assembly promote
the values to doubles and then back to floats.
How can I make sure that all operations and conversions stay in floats?
PS: I would not be surprised if I have defined my aliases or/and my
conversion functions incorrectly.
My Code:
===
using radians_f = boost::units::quantity
participants (1)
-
Carel Combrink