Explicitly casts the input to a real value.
A scalar, series or table.
A real value.
returns the value 1.0.
castreal(0.2 + 8i)
returns the value 0.2.
CASTREAL is helpful when writing SPL functions that require an explicit real input and the type of the variable passed into the function may not be a real.
If the input to CASTREAL is a series, it will only operate on the first point of the series.
If the input to CASTREAL is a table, it will only operate on the first point in the first column of the table.