3 ms·
You need to enable floating point trapping. It's trivial, but it's not on by default. Although, in that case, this function would still be pure as far as Haske
by light_hue_1 4y ago
You need to enable floating point trapping. It's trivial, but it's not on by default.
Although, in that case, this function would still be pure as far as Haskell is concerned. Because its output only depends on its input. Interrupts/exceptions are outside of the scope of the type system as far as an individual function goes.