haskell / math-functions

Special mathematical functions
http://hackage.haskell.org/package/math-functions
BSD 2-Clause "Simplified" License
41 stars 28 forks source link

Problem on windows with `_expm1` #51

Closed ggreif closed 8 years ago

ggreif commented 8 years ago

I'll just leave this here: cchalmers/plots#22

Strangely math-functions-0.2.0.2 compiles nicely, but cannot be loaded!?

Shimuuar commented 8 years ago

it's because compilation fails during linking. Can you compile simple console program which uses math-functions? Something like:

main = print $ expm1 1
ggreif commented 8 years ago

I cannot reproduce now, because I have math-functions-0.1.7.0 installed, and cannot upgrade. But looking at

Could one make a CPP trick to detect it? Or a cabal install flag to fall back to exp(x) - 1 or such?

Shimuuar commented 8 years ago

Fallback to exp x - 1 goes contrary to purpose of expm1 so I guess only way forward is to implement expm1 in haskell

Surely windows is divine punishments for something

ggreif commented 8 years ago

@Shimuuar yep, I think reimplementing expm1 in Haskell when the library does not provide it is the way to go.

Shimuuar commented 8 years ago

Fixed in 0.2.1.0 (I hope). It would be nice if you would test it on windows.

Changes in 0.2.1.0

ggreif commented 8 years ago

@Shimuuar confirmed on windows, thanks!