July 2015
Intermediate to advanced
410 pages
8h 22m
English
Now we will consider how to handle real and complex numbers in Julia and also introduce an alternate representation of fixed-point reals as a fraction comprising two integers, the Rational datatype.
Further we will discuss the use of the Big() function to handle integers and real numbers which are too large to be represented by the primitive Julia numeric types.
We have met real numbers a few times already. The generic type is FloatingPoint which is sub-classed from Real:
abstract Real <: Number abstract FloatingPoint <: Real bitstype 16 Float16 <: FloatingPoint bitstype 32 Float32 <: FloatingPoint bitstype 64 Float64 <: FloatingPoint
A float can be defined as x = 100.0 or x = 1e2 or x = 1f2; all represent ...
Read now
Unlock full access