Don't include that on Pis.
Spacing.
whitespace.
Remove a needless exp.
Remove some exp2's.
Remove explicit use of nans and just use sane sentinel values.
There, make that really round.
Remove some constants.
Remove some calls to floor