Function reference
Macro related
NiceNumbers.nice
— Functionnice(x)
If x
is an expression it replaces all occuring numbers by NiceNumber
s.
If x
is a number it turns it into a NiceNumber
.
If x
is the symbol :im
it turns it into NiceNumber(im)
.
Otherwise it does nothing.
NiceNumbers.@nice
— Macro@nice
Return equivalent expression with all numbers converted to NiceNumber
s.
Miscellaneous Helper Functions
NiceNumbers.isrational
— Functionisrational(n::NiceNumber)
Whether n
is purely rational, i.e. has no square root portion.
NiceNumbers.reduce_root
— Functionreduce_root(coeff, radicand)
Simplifies the expression $\textrm{coeff}\cdot\sqrt{\textrm{radicand}}$ by factoring all remaining squares in radicand
into coeff
.
NiceNumbers.nthroot
— Functionnthroot(m::NiceNumber, n)
Returns the nth root of m
. Works by repeatedly determining the square root and thus only for powers of two.