typo in unboxed types section + feature request
Simon Marlow
simonmar at microsoft.com
Fri Sep 27 04:39:09 EDT 2002
> First off, in section 7.2.7 "Primitive-Double and Float
> operations" there's a typo. It says "minux" instead of "minux" on the
> line reading: "{plus,minux,times,divide}Float# :: ...".
>
> For the feature request, could we get the rest of the trig functions,
> namely:
>
> asinhFloat#, acoshFloat#, atanhFloat# and the Double# versions
>
> as well as the corresponding function to the
>
> isInfinite :: (RealFloat a) => a -> Bool
>
> function on Float# and Double#? I suggest the following names:
>
> isInfiniteFloat#, isInfiniteDouble#
>
> :)
You can use the FFI for all these operations, just import the C
versions. You can even use unboxed types if you really want (mostly it
shouldn't be necessary, though).
For isInfinite, just use:
foreign import ccall unsafe "isDoubleInfinite"
isDoubleInfinite# :: Double# -> Int#
and similarly for Float#.
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list