Closed dschrempf closed 7 months ago
The difference would mostly be in speed and in handling of NaNs and the performance you mentioned. realToFrac
usually eats NaNs in a bad way: it also pays to do a division.
ghci> realToFrac (0/0) :: Double -Infinity
Also auto
can be used on non Fractional
data types like syntax trees and the like.
Many times, I can embed
Double
constants into functions to be derived byad
by just usingrealToFrac
. As an example, I userealToFrac
on the example usingauto
:Is there a difference between using
realToFrac
, and usingauto
? I can't see any difference in the results, but maybe there is a difference in speed? Thank you!