Class: Danica::Operator::Power
Instance Method Summary
collapse
#==
#*, #**, #+, #-, #-@, #/
#calculate, #initialize, #variables=
Methods included from Common
#content, #formatted, #gnu, #tex, #to, #valued?
Instance Method Details
#to_f ⇒ Object
8
9
10
|
# File 'lib/danica/operator/power.rb', line 8
def to_f
base.to_f**exponent.to_f
end
|
#to_gnu(**options) ⇒ Object
16
17
18
|
# File 'lib/danica/operator/power.rb', line 16
def to_gnu(**options)
"#{wrap_as_group(base).to_gnu(options)}**(#{exponent.to_gnu(options)})"
end
|
#to_tex(**options) ⇒ Object
12
13
14
|
# File 'lib/danica/operator/power.rb', line 12
def to_tex(**options)
"#{wrap_as_group(base).to_tex(options)}^{#{exponent.to_tex(options)}}"
end
|