Perseus
Preparing search index...
@khanacademy/kas
Float
Class Float
Hierarchy (
View Summary
)
Num
Float
Index
Constructors
constructor
Properties
func
hints
n
Methods
abs
add
add
Hint
args
as
Mul
as
Positive
Factor
as
Rational
as
Tex
codegen
collect
compare
compile
complete
Parse
construct
equals
eval
expand
expr
Args
factor
find
GCD
get
Consts
get
Decimal
Places
get
Denominator
get
Units
get
Vars
has
is
is
Divide
is
Negative
is
Positive
is
Root
is
Simple
is
Simplified
is
Subtract
mul
name
needs
Explicit
Mul
negate
normalize
partial
Eval
print
raise
To
The
recurse
repr
same
Form
simplify
strip
tex
create
find
GCD
max
min
negative
One
to
Decimal
Places
Constructors
constructor
new
Float
(
number
:
number
)
:
Float
Parameters
number
:
number
Returns
Float
Properties
func
func
:
typeof
Float
= Float
hints
hints
:
Hints
n
n
:
number
Methods
abs
abs
()
:
Float
Returns
Float
add
add
(
num
:
Num
,
options
?:
{
preciseFloats
:
boolean
}
)
:
Num
Parameters
num
:
Num
Optional
options
:
{
preciseFloats
:
boolean
}
Returns
Num
add
Hint
addHint
(
hint
:
keyof
Hints
)
:
any
Parameters
hint
:
keyof
Hints
Returns
any
args
args
()
:
number
[]
Returns
number
[]
as
Mul
asMul
()
:
Mul
Returns
Mul
as
Positive
Factor
asPositiveFactor
()
:
Num
Returns
Num
as
Rational
asRational
()
:
Rational
Returns
Rational
as
Tex
asTex
(
options
:
any
)
:
string
Parameters
options
:
any
Returns
string
codegen
codegen
()
:
string
Returns
string
collect
collect
(
options
?:
Options
)
:
Float
Parameters
Optional
options
:
Options
Returns
Float
compare
compare
(
other
:
Expr
)
:
boolean
Parameters
other
:
Expr
Returns
boolean
compile
compile
()
:
(
vars
:
Expr
[]
)
=>
string
Returns
(
vars
:
Expr
[]
)
=>
string
complete
Parse
completeParse
()
:
Expr
Returns
Expr
construct
construct
(
args
:
any
[]
)
:
any
Parameters
args
:
any
[]
Returns
any
equals
equals
(
other
:
Expr
)
:
boolean
Parameters
other
:
Expr
Returns
boolean
eval
eval
()
:
number
Returns
number
expand
expand
()
:
Expr
Returns
Expr
expr
Args
exprArgs
()
:
Expr
[]
Returns
Expr
[]
factor
factor
(
options
:
any
)
:
Expr
Parameters
options
:
any
Returns
Expr
find
GCD
findGCD
(
factor
:
Expr
)
:
Expr
Parameters
factor
:
Expr
Returns
Expr
get
Consts
getConsts
()
:
any
[]
Returns
any
[]
get
Decimal
Places
getDecimalPlaces
()
:
number
Returns
number
get
Denominator
getDenominator
()
:
Int
Returns
Int
get
Units
getUnits
()
:
any
[]
Returns
any
[]
get
Vars
getVars
(
excludeFunc
?:
boolean
)
:
any
[]
Parameters
Optional
excludeFunc
:
boolean
Returns
any
[]
has
has
(
func
:
any
)
:
boolean
Parameters
func
:
any
Returns
boolean
is
is
(
func
:
any
)
:
boolean
Parameters
func
:
any
Returns
boolean
is
Divide
isDivide
()
:
boolean
Returns
boolean
is
Negative
isNegative
()
:
boolean
Returns
boolean
is
Positive
isPositive
()
:
boolean
Returns
boolean
is
Root
isRoot
()
:
boolean
Returns
boolean
is
Simple
isSimple
()
:
boolean
Returns
boolean
is
Simplified
isSimplified
()
:
boolean
Returns
boolean
is
Subtract
isSubtract
()
:
boolean
Returns
boolean
mul
mul
(
num
:
Num
,
options
?:
{
preciseFloats
:
boolean
}
)
:
Num
Parameters
num
:
Num
Optional
options
:
{
preciseFloats
:
boolean
}
Returns
Num
name
name
()
:
string
Returns
string
needs
Explicit
Mul
needsExplicitMul
()
:
boolean
Returns
boolean
negate
negate
()
:
Float
Returns
Float
normalize
normalize
()
:
Expr
Returns
Expr
partial
Eval
partialEval
(
vars
:
Vars
)
:
Expr
Parameters
vars
:
Vars
Returns
Expr
print
print
()
:
string
Returns
string
raise
To
The
raiseToThe
(
exp
:
Expr
,
options
?:
{
preciseFloats
?:
boolean
}
)
:
Float
Parameters
exp
:
Expr
Optional
options
:
{
preciseFloats
?:
boolean
}
Returns
Float
recurse
recurse
()
:
Float
Returns
Float
repr
repr
()
:
string
Returns
string
same
Form
sameForm
(
other
:
Expr
)
:
boolean
Parameters
other
:
Expr
Returns
boolean
simplify
simplify
(
options
?:
Options
)
:
any
Parameters
Optional
options
:
Options
Returns
any
strip
strip
()
:
Num
Returns
Num
tex
tex
()
:
string
Returns
string
Static
create
create
(
n
:
any
)
:
any
Parameters
n
:
any
Returns
any
Static
find
GCD
findGCD
(
a
:
any
,
b
:
any
)
:
any
Parameters
a
:
any
b
:
any
Returns
any
Static
max
max
(
...
args
:
Expr
[]
)
:
number
|
Expr
Parameters
...
args
:
Expr
[]
Returns
number
|
Expr
Static
min
min
(
...
args
:
Expr
[]
)
:
number
|
Expr
Parameters
...
args
:
Expr
[]
Returns
number
|
Expr
Static
negative
One
negativeOne
(
hint
:
any
)
:
any
Parameters
hint
:
any
Returns
any
Static
to
Decimal
Places
toDecimalPlaces
(
n
:
any
,
places
:
any
)
:
Float
Parameters
n
:
any
places
:
any
Returns
Float
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
func
hints
n
Methods
abs
add
add
Hint
args
as
Mul
as
Positive
Factor
as
Rational
as
Tex
codegen
collect
compare
compile
complete
Parse
construct
equals
eval
expand
expr
Args
factor
find
GCD
get
Consts
get
Decimal
Places
get
Denominator
get
Units
get
Vars
has
is
is
Divide
is
Negative
is
Positive
is
Root
is
Simple
is
Simplified
is
Subtract
mul
name
needs
Explicit
Mul
negate
normalize
partial
Eval
print
raise
To
The
recurse
repr
same
Form
simplify
strip
tex
create
find
GCD
max
min
negative
One
to
Decimal
Places
Perseus
Loading...