Download (+) Description

Transcript
18.36 Problems with trunc
Official Description
6.6.6.3 For trunc(x), the value of trunc(x) is such that if x is positive or zero then 0<=x-trunc(x)<1;
otherwise -1<x-trunc(x)<=0. It is an error if such a value does not exist.
Simplified Description
In other words, it is an error to use the trunc function to convert a value of real type into a value of
integral type, if the real value is outside the range of integral values supported by Irie Pascal. For example
trunc(1.0e16)
is an error.
Error Handling
This error is never reported.
18.37 Problems with round
Official Description
6.6.6.3 For round(x), if x is positive or zero then round(x) is equivalent to trunc(x+0.5), otherwise
round(x) is equivalent to trunc(x-0.5). It is an error if such a value does not exist.
Simplified Description
In other words, it is an error to use the round function to convert a value of real type into a value of
integral type, if the real value is outside the range of integral values supported by Irie Pascal. For example
round(1.0e16)
is an error.
Error Handling
This error is never reported.