floating point stuff in std.math
jmh530
john.michael.hall at gmail.com
Tue Mar 30 17:14:09 UTC 2021
On Tuesday, 30 March 2021 at 15:04:28 UTC, Berni44 wrote:
> We are currently at splitting std.math into sub modules [1].
> There the question arose, how to handle the floating point
> stuff, that's in there: Functions like feqrel, nextDown,
> isClose but also IeeeFlags and FloatingPointControl.
>
> Some ideas:
>
> a) IeeeFlags and FloatingPointControl goes into
> std.math.hardware and all else into std.math.floats.
>
> b) The same, but std.math.floats is split into two modules,
> e.g. std.math.comparison (feqrel, isClose, ...) and
> std.math.floatmanip (nextDown, ilogb, ...)
>
> c) Moving everything out of std.math and into it's own module,
> e.g. std.floats.
>
> Any opinions or ideas on this?
>
> [1] https://github.com/dlang/phobos/pull/7924
You might find interesting mir-core's structure [1].It has
mir.math.common, mir.math.constant, and mir.math.ieee.
mir-algorithm [2] has some other math functions.
[1] http://mir-core.libmir.org/mir_math.html
[2] http://mir-algorithm.libmir.org/
More information about the Digitalmars-d
mailing list