std.math: №1, change protection#3011
std.math: №1, change protection#3011DmitryOlshansky merged 1 commit intodlang:masterfrom 9il:float-traits
Conversation
Attribute changed for `RealFormat`, `floatTraits`, `floorImpl`. This suff is usefull in other modules like `std.numeric` and `std.mathspecial`.
|
Hmm. This is exposing implementation details, aka enlarging the module's public interface for increased coupling. I guess the newly exposed code needs to be reviewed here. This is not a one line change. ;) |
|
@9il Perhaps you can limit the changes to only add RealFormat and floatTraits to the public interface? (i.e. keep floorImpl and MANTISSA_LSB private) |
|
@JohanEngelen float floor(float x) @trusted pure nothrow @nogc
{
// Special cases.
if (isNaN(x) || isInfinity(x) || x == 0.0)
return x;
return floorImpl(x);
} |
|
ping Is there anything else to do before merging this? |
|
looks like nothing |
|
Can we only expose |
|
I think conceptually all this stuff may be |
|
For example we need |
|
|
|
Auto-merge toggled on |
|
Thanks! |
std.math: №1, change protection
Attribute was changed for
RealFormat,floatTraits,floorImpl. Thissuff is usefull (#3045) in other modules like
std.numericandstd.mathspecial.