next up previous contents index
Next: Characters Up: Numbers Previous: Integers

Floating-point numbers

In single-float.cecil:


extend single_float isa float; 
method = (l@:single_float, r@:single_float):bool; 
method < (l@:single_float, r@:single_float):bool;
method <= (l@:single_float, r@:single_float):bool;
method > (l@:single_float, r@:single_float):bool;
method >= (l@:single_float, r@:single_float):bool;
method != (l@:single_float, r@:single_float):bool;
method + (l@:single_float, r@:single_float):single_float; 
method - (l@:single_float, r@:single_float):single_float;
method * (l@:single_float, r@:single_float):single_float; 
method / (l@:single_float, r@:single_float):single_float; 
method as_single_float(f@:single_float):single_float; 
method as_double_float(f@:single_float):double_float; 
method as_int(f@:single_float):int; 
method sin(f@:single_float):single_float; 
method cos(f@:single_float):single_float; 
method tan(f@:single_float):single_float; 
method asin(f@:single_float):single_float; 
method acos(f@:single_float):single_float; 
method atan(f@:single_float):single_float; 
method exp(f@:single_float):single_float; 
method log(f@:single_float):single_float; 
method sqrt(f@:single_float):single_float; 
method round_as_int(f@:single_float):int; 
method round(f@:single_float):single_float; 
method round_towards_zero(f@:single_float):single_float; 
method ceiling(f@:single_float):single_float; 
method floor(f@:single_float):single_float; 
method print_string(f@:single_float):string; 
method print_string(f@:single_float, num_decimal_places@:int):string; 
method print_string_full(f@:single_float):string; 
let pi:float; 
       In double-float.cecil:


extend double_float isa float; 
method = (l@:double_float, r@:double_float):bool; 
method < (l@:double_float, r@:double_float):bool;
method <= (l@:double_float, r@:double_float):bool;
method > (l@:double_float, r@:double_float):bool;
method >= (l@:double_float, r@:double_float):bool;
method != (l@:double_float, r@:double_float):bool;
method + (l@:double_float, r@:double_float):double_float; 
method - (l@:double_float, r@:double_float):double_float;
method * (l@:double_float, r@:double_float):double_float; 
method / (l@:double_float, r@:double_float):double_float; 
method as_double_float(f@:double_float):double_float; 
method as_single_float(f@:double_float):single_float; 
method as_int(f@:double_float):int; 
method sin(f@:double_float):double_float; 
method cos(f@:double_float):double_float; 
method tan(f@:double_float):double_float; 
method asin(f@:double_float):double_float; 
method acos(f@:double_float):double_float; 
method atan(f@:double_float):double_float; 
method exp(f@:double_float):double_float; 
method log(f@:double_float):double_float; 
method sqrt(f@:double_float):double_float; 
method round_as_int(f@:double_float):int; 
method round(f@:double_float):double_float; 
method round_towards_zero(f@:double_float):double_float; 
method ceiling(f@:double_float):double_float;
- round towards positive infinity 
method floor(f@:double_float):double_float;
- round towards negative infinity 
method print_string(f@:double_float):string; 
method print_string(f@:double_float, num_decimal_places@:int):string; 
method print_string_full(f@:double_float):string; 
      


next up previous contents index
Next: Characters Up: Numbers Previous: Integers

The Cecil project