As suggested by Micah, there are some problems with the common interface
for numeric types:
1. corner cases for transforming special floating point values, like NaN,
inf, etc.
2. loss of precision when transforming long to double.
Instead, we provide a common interface for float4 & float8 values.
Hi Micah,
Thanks for the good points.
I agree with you that we should improve the efficiency of algorithms.
This is related to another improvement: reduce the if/switch statements in
the code.
To account for the edge cases, can we remove the set methods, and leaving
only the get method?
This is
Hi Liya Fan,
I'm not sure if this is a good idea. First, floating point operations have
more edge cases than integer arithmetic (e.g. dealing with NaNs). Second,
and I apologize that I've been remiss in thinking this through on reviews,
but I think we should be thinking about how to make algorith