
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
real(8) function code(x)
real(8), intent (in) :: x
code = mod(exp(x), sqrt(cos(x))) * exp(-x)
end function
def code(x): return math.fmod(math.exp(x), math.sqrt(math.cos(x))) * math.exp(-x)
function code(x) return Float64(rem(exp(x), sqrt(cos(x))) * exp(Float64(-x))) end
code[x_] := N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
real(8) function code(x)
real(8), intent (in) :: x
code = mod(exp(x), sqrt(cos(x))) * exp(-x)
end function
def code(x): return math.fmod(math.exp(x), math.sqrt(math.cos(x))) * math.exp(-x)
function code(x) return Float64(rem(exp(x), sqrt(cos(x))) * exp(Float64(-x))) end
code[x_] := N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\end{array}
(FPCore (x) :precision binary64 (if (<= x -5e-310) 1.0 (fmod (+ x 1.0) 1.0)))
double code(double x) {
double tmp;
if (x <= -5e-310) {
tmp = 1.0;
} else {
tmp = fmod((x + 1.0), 1.0);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-5d-310)) then
tmp = 1.0d0
else
tmp = mod((x + 1.0d0), 1.0d0)
end if
code = tmp
end function
def code(x): tmp = 0 if x <= -5e-310: tmp = 1.0 else: tmp = math.fmod((x + 1.0), 1.0) return tmp
function code(x) tmp = 0.0 if (x <= -5e-310) tmp = 1.0; else tmp = rem(Float64(x + 1.0), 1.0); end return tmp end
code[x_] := If[LessEqual[x, -5e-310], 1.0, N[With[{TMP1 = N[(x + 1.0), $MachinePrecision], TMP2 = 1.0}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-310}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + 1\right) \bmod 1\right)\\
\end{array}
\end{array}
if x < -4.999999999999985e-310Initial program 13.5%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f6413.5%
Simplified13.5%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f6413.5%
Applied egg-rr13.5%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6494.7%
Simplified94.7%
Taylor expanded in x around 0
Simplified100.0%
if -4.999999999999985e-310 < x Initial program 6.3%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f646.3%
Simplified6.3%
Taylor expanded in x around 0
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f645.3%
Simplified5.3%
Taylor expanded in x around 0
Simplified5.4%
Taylor expanded in x around 0
+-lowering-+.f6435.3%
Simplified35.3%
Final simplification63.6%
(FPCore (x) :precision binary64 (if (<= x -1e-16) 1.0 (exp (- 0.0 x))))
double code(double x) {
double tmp;
if (x <= -1e-16) {
tmp = 1.0;
} else {
tmp = exp((0.0 - x));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-1d-16)) then
tmp = 1.0d0
else
tmp = exp((0.0d0 - x))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= -1e-16) {
tmp = 1.0;
} else {
tmp = Math.exp((0.0 - x));
}
return tmp;
}
def code(x): tmp = 0 if x <= -1e-16: tmp = 1.0 else: tmp = math.exp((0.0 - x)) return tmp
function code(x) tmp = 0.0 if (x <= -1e-16) tmp = 1.0; else tmp = exp(Float64(0.0 - x)); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= -1e-16) tmp = 1.0; else tmp = exp((0.0 - x)); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, -1e-16], 1.0, N[Exp[N[(0.0 - x), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-16}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;e^{0 - x}\\
\end{array}
\end{array}
if x < -9.9999999999999998e-17Initial program 99.7%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f64100.0%
Simplified100.0%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f64100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6450.2%
Simplified50.2%
Taylor expanded in x around 0
Simplified100.0%
if -9.9999999999999998e-17 < x Initial program 5.0%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f645.0%
Simplified5.0%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f645.0%
Applied egg-rr5.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.8%
Simplified60.8%
(FPCore (x) :precision binary64 (if (<= x 0.0001) 1.0 (fmod 1.0 1.0)))
double code(double x) {
double tmp;
if (x <= 0.0001) {
tmp = 1.0;
} else {
tmp = fmod(1.0, 1.0);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 0.0001d0) then
tmp = 1.0d0
else
tmp = mod(1.0d0, 1.0d0)
end if
code = tmp
end function
def code(x): tmp = 0 if x <= 0.0001: tmp = 1.0 else: tmp = math.fmod(1.0, 1.0) return tmp
function code(x) tmp = 0.0 if (x <= 0.0001) tmp = 1.0; else tmp = rem(1.0, 1.0); end return tmp end
code[x_] := If[LessEqual[x, 0.0001], 1.0, N[With[{TMP1 = 1.0, TMP2 = 1.0}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0001:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\left(1 \bmod 1\right)\\
\end{array}
\end{array}
if x < 1.00000000000000005e-4Initial program 11.3%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f6411.3%
Simplified11.3%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f6411.3%
Applied egg-rr11.3%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6452.3%
Simplified52.3%
Taylor expanded in x around 0
Simplified55.1%
if 1.00000000000000005e-4 < x Initial program 0.0%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f640.0%
Simplified0.0%
Taylor expanded in x around 0
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f640.0%
Simplified0.0%
Taylor expanded in x around 0
Simplified0.0%
Taylor expanded in x around 0
Simplified100.0%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (+ x 1.0))) (t_1 (* x (* x x))))
(if (<= x 5e+50)
1.0
(if (<= x 4e+76)
(*
(/ (- 1.0 t_1) (+ 1.0 (* t_0 (* t_0 t_0))))
(+ 1.0 (* t_0 (+ t_0 -1.0))))
(* (/ (- 1.0 (* x x)) (+ 1.0 t_1)) (+ 1.0 (* x (+ x -1.0))))))))
double code(double x) {
double t_0 = x * (x + 1.0);
double t_1 = x * (x * x);
double tmp;
if (x <= 5e+50) {
tmp = 1.0;
} else if (x <= 4e+76) {
tmp = ((1.0 - t_1) / (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 + (t_0 * (t_0 + -1.0)));
} else {
tmp = ((1.0 - (x * x)) / (1.0 + t_1)) * (1.0 + (x * (x + -1.0)));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * (x + 1.0d0)
t_1 = x * (x * x)
if (x <= 5d+50) then
tmp = 1.0d0
else if (x <= 4d+76) then
tmp = ((1.0d0 - t_1) / (1.0d0 + (t_0 * (t_0 * t_0)))) * (1.0d0 + (t_0 * (t_0 + (-1.0d0))))
else
tmp = ((1.0d0 - (x * x)) / (1.0d0 + t_1)) * (1.0d0 + (x * (x + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x) {
double t_0 = x * (x + 1.0);
double t_1 = x * (x * x);
double tmp;
if (x <= 5e+50) {
tmp = 1.0;
} else if (x <= 4e+76) {
tmp = ((1.0 - t_1) / (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 + (t_0 * (t_0 + -1.0)));
} else {
tmp = ((1.0 - (x * x)) / (1.0 + t_1)) * (1.0 + (x * (x + -1.0)));
}
return tmp;
}
def code(x): t_0 = x * (x + 1.0) t_1 = x * (x * x) tmp = 0 if x <= 5e+50: tmp = 1.0 elif x <= 4e+76: tmp = ((1.0 - t_1) / (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 + (t_0 * (t_0 + -1.0))) else: tmp = ((1.0 - (x * x)) / (1.0 + t_1)) * (1.0 + (x * (x + -1.0))) return tmp
function code(x) t_0 = Float64(x * Float64(x + 1.0)) t_1 = Float64(x * Float64(x * x)) tmp = 0.0 if (x <= 5e+50) tmp = 1.0; elseif (x <= 4e+76) tmp = Float64(Float64(Float64(1.0 - t_1) / Float64(1.0 + Float64(t_0 * Float64(t_0 * t_0)))) * Float64(1.0 + Float64(t_0 * Float64(t_0 + -1.0)))); else tmp = Float64(Float64(Float64(1.0 - Float64(x * x)) / Float64(1.0 + t_1)) * Float64(1.0 + Float64(x * Float64(x + -1.0)))); end return tmp end
function tmp_2 = code(x) t_0 = x * (x + 1.0); t_1 = x * (x * x); tmp = 0.0; if (x <= 5e+50) tmp = 1.0; elseif (x <= 4e+76) tmp = ((1.0 - t_1) / (1.0 + (t_0 * (t_0 * t_0)))) * (1.0 + (t_0 * (t_0 + -1.0))); else tmp = ((1.0 - (x * x)) / (1.0 + t_1)) * (1.0 + (x * (x + -1.0))); end tmp_2 = tmp; end
code[x_] := Block[{t$95$0 = N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5e+50], 1.0, If[LessEqual[x, 4e+76], N[(N[(N[(1.0 - t$95$1), $MachinePrecision] / N[(1.0 + N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$0 * N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x + 1\right)\\
t_1 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq 5 \cdot 10^{+50}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+76}:\\
\;\;\;\;\frac{1 - t\_1}{1 + t\_0 \cdot \left(t\_0 \cdot t\_0\right)} \cdot \left(1 + t\_0 \cdot \left(t\_0 + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot x}{1 + t\_1} \cdot \left(1 + x \cdot \left(x + -1\right)\right)\\
\end{array}
\end{array}
if x < 5e50Initial program 11.0%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f6411.0%
Simplified11.0%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f6411.0%
Applied egg-rr11.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6453.6%
Simplified53.6%
Taylor expanded in x around 0
Simplified53.7%
if 5e50 < x < 4.0000000000000002e76Initial program 0.0%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f640.0%
Simplified0.0%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f640.0%
Applied egg-rr0.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f642.7%
Simplified2.7%
Applied egg-rr100.0%
if 4.0000000000000002e76 < x Initial program 0.0%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f640.0%
Simplified0.0%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f640.0%
Applied egg-rr0.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f642.0%
Simplified2.0%
flip--N/A
+-commutativeN/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-rgt-identityN/A
associate-+r-N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
Applied egg-rr16.9%
Final simplification50.7%
(FPCore (x) :precision binary64 (if (<= x 1e+99) 1.0 (* (/ (- 1.0 (* x x)) (+ 1.0 (* x (* x x)))) (+ 1.0 (* x (+ x -1.0))))))
double code(double x) {
double tmp;
if (x <= 1e+99) {
tmp = 1.0;
} else {
tmp = ((1.0 - (x * x)) / (1.0 + (x * (x * x)))) * (1.0 + (x * (x + -1.0)));
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= 1d+99) then
tmp = 1.0d0
else
tmp = ((1.0d0 - (x * x)) / (1.0d0 + (x * (x * x)))) * (1.0d0 + (x * (x + (-1.0d0))))
end if
code = tmp
end function
public static double code(double x) {
double tmp;
if (x <= 1e+99) {
tmp = 1.0;
} else {
tmp = ((1.0 - (x * x)) / (1.0 + (x * (x * x)))) * (1.0 + (x * (x + -1.0)));
}
return tmp;
}
def code(x): tmp = 0 if x <= 1e+99: tmp = 1.0 else: tmp = ((1.0 - (x * x)) / (1.0 + (x * (x * x)))) * (1.0 + (x * (x + -1.0))) return tmp
function code(x) tmp = 0.0 if (x <= 1e+99) tmp = 1.0; else tmp = Float64(Float64(Float64(1.0 - Float64(x * x)) / Float64(1.0 + Float64(x * Float64(x * x)))) * Float64(1.0 + Float64(x * Float64(x + -1.0)))); end return tmp end
function tmp_2 = code(x) tmp = 0.0; if (x <= 1e+99) tmp = 1.0; else tmp = ((1.0 - (x * x)) / (1.0 + (x * (x * x)))) * (1.0 + (x * (x + -1.0))); end tmp_2 = tmp; end
code[x_] := If[LessEqual[x, 1e+99], 1.0, N[(N[(N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+99}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot x}{1 + x \cdot \left(x \cdot x\right)} \cdot \left(1 + x \cdot \left(x + -1\right)\right)\\
\end{array}
\end{array}
if x < 9.9999999999999997e98Initial program 10.5%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f6410.5%
Simplified10.5%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f6410.5%
Applied egg-rr10.5%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6455.7%
Simplified55.7%
Taylor expanded in x around 0
Simplified51.5%
if 9.9999999999999997e98 < x Initial program 0.0%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f640.0%
Simplified0.0%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f640.0%
Applied egg-rr0.0%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f641.9%
Simplified1.9%
flip--N/A
+-commutativeN/A
flip3-+N/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
*-rgt-identityN/A
associate-+r-N/A
+-commutativeN/A
associate-+r-N/A
+-lowering-+.f64N/A
Applied egg-rr18.5%
(FPCore (x) :precision binary64 1.0)
double code(double x) {
return 1.0;
}
real(8) function code(x)
real(8), intent (in) :: x
code = 1.0d0
end function
public static double code(double x) {
return 1.0;
}
def code(x): return 1.0
function code(x) return 1.0 end
function tmp = code(x) tmp = 1.0; end
code[x_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 9.4%
exp-negN/A
associate-*r/N/A
*-rgt-identityN/A
/-lowering-/.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
sqrt-lowering-sqrt.f64N/A
cos-lowering-cos.f64N/A
exp-lowering-exp.f649.4%
Simplified9.4%
clear-numN/A
inv-powN/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-divN/A
rem-log-expN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
fmod-lowering-fmod.f64N/A
exp-lowering-exp.f64N/A
pow1/2N/A
pow-lowering-pow.f64N/A
cos-lowering-cos.f649.4%
Applied egg-rr9.4%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.3%
Simplified60.3%
Taylor expanded in x around 0
Simplified46.4%
herbie shell --seed 2024158
(FPCore (x)
:name "expfmod (used to be hard to sample)"
:precision binary64
(* (fmod (exp x) (sqrt (cos x))) (exp (- x))))