Fix compilation error after recent commit
Cycles: correct math wrappers

include the parens around value before cast,
in some cases was causing double/float promotion by only casting the left value.
Cycles: reduce float/double conversions
Fix more issues after recent context commit