You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate impls using some kind of compile-time calculation: custom derive, build.rs, const fn? Currently all conversion factors go through f64 which may have run-time costs and causes imprecision issues where the conversion factor can be exactly represented as Self::T but not as f64. Also see #40 regarding conversion factors that can't be represented.
For example the Conversion<V> implementation for primitive integer and BigInt types uses Self::T::from_f64:
Generate impls using some kind of compile-time calculation: custom derive,
build.rs
,const fn
? Currently all conversion factors go throughf64
which may have run-time costs and causes imprecision issues where the conversion factor can be exactly represented asSelf::T
but not asf64
. Also see #40 regarding conversion factors that can't be represented.For example the
Conversion<V>
implementation for primitive integer andBigInt
types usesSelf::T::from_f64
:Ideally the method should be generated to return a pre-calculated literal for each type:
The text was updated successfully, but these errors were encountered: