struct BigFloat

Overview

A `BigFloat` can represent arbitrarily large floats.

It is implemented under the hood with GMP.

big.cr
big/big_float.cr

Instance Method Summary

, , , , ,

, , , , ,

, , , , ,

Instance methods inherited from struct `Float`

, , , , , , , , , , , , , , , , , , , , , ,

, , , , ,

, , , , ,

, , , , ,

Instance methods inherited from struct `Number`

, , , , , , , , , , , , , , , , , , ,

, , , , ,

, , , , ,

,

Instance methods inherited from class `Object`

, , , , , , , , , , , , , , , , , , ,

,

Constructor Detail

def self.new(num : Float, precision : Int) #

def self.new(str : String) #

def self.new(num : BigInt) #

def self.new(num : BigRational) #

def self.new(num : BigFloat) #

def self.new(num : Int8 | Int16 | Int32) #

def self.new(num : UInt8 | UInt16 | UInt32) #

def self.new(num : Int64) #

def self.new(num : UInt64) #

def self.new(num : Number) #

def self.new(mpf : LibGMP::MPF) #

def self.new #

def self.new(&block) #

Class Method Detail

def self.default_precision #

def self.default_precision=(prec : Int) #

Instance Method Detail

def *(other : Number) #

def **(other : Int) #

def +(other : Number) #

def -(other : Number) #

def - #

def /(other : Number) #

def <=>(other : BigFloat) #

def <=>(other : BigInt) #

def <=>(other : Float32 | Float64) #

def <=>(other : Number) #

def abs #

def ceil #

def clone #

def floor #

def hash(hasher) #

TODO improve this

def inspect(io) #

def to_big_f #

def to_f #

def to_f32 #

def to_f64 #

def to_i #

def to_i16 #

def to_i32 #

def to_i64 #

def to_i8 #

def to_s(io : IO) #

def to_u #

def to_u16 #

def to_u32 #

def to_u64 #

def to_u8 #

def to_unsafe #

def trunc #