(FPCore () :precision binary64 (- (exp (* (log (+ 1.0 0.3)) 0.6180339887498949)) 1.0))
double code() { return exp((log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0; }
real(8) function code() code = exp((log((1.0d0 + 0.3d0)) * 0.6180339887498949d0)) - 1.0d0 end function
public static double code() { return Math.exp((Math.log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0; }
def code(): return math.exp((math.log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0
function code() return Float64(exp(Float64(log(Float64(1.0 + 0.3)) * 0.6180339887498949)) - 1.0) end
function tmp = code() tmp = exp((log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0; end
code[] := N[(N[Exp[N[(N[Log[N[(1.0 + 0.3), $MachinePrecision]], $MachinePrecision] * 0.6180339887498949), $MachinePrecision]], $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l} \\ e^{\log \left(1 + 0.3\right) \cdot 0.6180339887498949} - 1 \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore () :precision binary64 (- (exp (* (log (+ 1.0 0.3)) 0.6180339887498949)) 1.0))
double code() { return exp((log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0; }
real(8) function code() code = exp((log((1.0d0 + 0.3d0)) * 0.6180339887498949d0)) - 1.0d0 end function
public static double code() { return Math.exp((Math.log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0; }
def code(): return math.exp((math.log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0
function code() return Float64(exp(Float64(log(Float64(1.0 + 0.3)) * 0.6180339887498949)) - 1.0) end
function tmp = code() tmp = exp((log((1.0 + 0.3)) * 0.6180339887498949)) - 1.0; end
code[] := N[(N[Exp[N[(N[Log[N[(1.0 + 0.3), $MachinePrecision]], $MachinePrecision] * 0.6180339887498949), $MachinePrecision]], $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l} \\ e^{\log \left(1 + 0.3\right) \cdot 0.6180339887498949} - 1 \end{array}
(FPCore () :precision binary64 (let* ((t_0 (- (pow 1.69 0.30901699437494745) -1.0))) (- (/ (pow 1.69 0.6180339887498949) t_0) (pow t_0 -1.0))))
double code() { double t_0 = pow(1.69, 0.30901699437494745) - -1.0; return (pow(1.69, 0.6180339887498949) / t_0) - pow(t_0, -1.0); }
real(8) function code() real(8) :: t_0 t_0 = (1.69d0 ** 0.30901699437494745d0) - (-1.0d0) code = ((1.69d0 ** 0.6180339887498949d0) / t_0) - (t_0 ** (-1.0d0)) end function
public static double code() { double t_0 = Math.pow(1.69, 0.30901699437494745) - -1.0; return (Math.pow(1.69, 0.6180339887498949) / t_0) - Math.pow(t_0, -1.0); }
def code(): t_0 = math.pow(1.69, 0.30901699437494745) - -1.0 return (math.pow(1.69, 0.6180339887498949) / t_0) - math.pow(t_0, -1.0)
function code() t_0 = Float64((1.69 ^ 0.30901699437494745) - -1.0) return Float64(Float64((1.69 ^ 0.6180339887498949) / t_0) - (t_0 ^ -1.0)) end
function tmp = code() t_0 = (1.69 ^ 0.30901699437494745) - -1.0; tmp = ((1.69 ^ 0.6180339887498949) / t_0) - (t_0 ^ -1.0); end
code[] := Block[{t$95$0 = N[(N[Power[1.69, 0.30901699437494745], $MachinePrecision] - -1.0), $MachinePrecision]}, N[(N[(N[Power[1.69, 0.6180339887498949], $MachinePrecision] / t$95$0), $MachinePrecision] - N[Power[t$95$0, -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l} \\ \begin{array}{l} t_0 := {1.69}^{0.30901699437494745} - -1\\ \frac{{1.69}^{0.6180339887498949}}{t\_0} - {t\_0}^{-1} \end{array} \end{array}
Initial program 97.5%
lift--.f64
N/A
flip--
N/A
metadata-eval
N/A
div-sub
N/A
lower--.f64
N/A
Applied rewrites100.0%
herbie shell --seed 1
(FPCore ()
:name "exp( log( 1.0 + 0.3 ) * 0.6180339887498949 ) - 1"
:precision binary64
(- (exp (* (log (+ 1.0 0.3)) 0.6180339887498949)) 1.0))