Real contagion coerces integer forms to real, by wrapping them in exact->inexact, when they occur in real contexts. Real contexts include:

- the inputs to: log exp sqrt sin cos tan asin acos make-point unary-atan random-real expt / random-real
- the inputs to the following functions if the entire form (or, equivalently, either input) is real: abs - + * min max guaranteed-divide
- the inputs to the following functions if any input is real: < > <= >=
- the value returned from one branch of a binary-if, if the form as a whole returns a real value
- a value being passed to an external function, in a position where the external function expects a real

The following functions are simplified when the input is an integer, because they have no effect: floor ceiling round truncate.

Real-contagion requires that type inference has been done and that type markings are still present. It introduces the following new function: make-missing-real

Ownership, Maintenance and Disclaimers

Last modified