Yeah it was pretty weird.
[Comment removed by author]
If you need 32-bit floats (say, for WebGL interop), you use typed arrays.
Does haskell have an algebraic type?
Not in the standard library. That sort of representation is hard to implement. In a quick search of Hackage I turned up some algebra packages, but they don’t appear to come with implementations of Num or be intended for that kind of use. Performance would be bad, also…