
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (pow (exp t) t)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * pow(exp(t), t)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt(((z * 2.0d0) * (exp(t) ** t)))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((z * 2.0) * Math.pow(Math.exp(t), t)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((z * 2.0) * math.pow(math.exp(t), t)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * (exp(t) ^ t)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * (exp(t) ^ t))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot {\left(e^{t}\right)}^{t}}
\end{array}
Initial program 99.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
exp-prodN/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f6499.9
Applied egg-rr99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma (* t t) 0.020833333333333332 0.125))
(t_2 (* (fma 0.5 x (- 0.0 y)) (sqrt 2.0))))
(if (<= (* t t) 10.0)
(*
(* (- (* x 0.5) y) (sqrt (* z 2.0)))
(fma (* t t) (fma (* t t) t_1 0.5) 1.0))
(if (<= (* t t) 5e+79)
(* (sqrt (* (* z 2.0) (exp (* t t)))) (- 0.0 y))
(fma
(* (sqrt z) (* t_1 t_2))
(* (* t t) (* t t))
(* (sqrt z) (* t_2 (fma 0.5 (* t t) 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = fma((t * t), 0.020833333333333332, 0.125);
double t_2 = fma(0.5, x, (0.0 - y)) * sqrt(2.0);
double tmp;
if ((t * t) <= 10.0) {
tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * fma((t * t), fma((t * t), t_1, 0.5), 1.0);
} else if ((t * t) <= 5e+79) {
tmp = sqrt(((z * 2.0) * exp((t * t)))) * (0.0 - y);
} else {
tmp = fma((sqrt(z) * (t_1 * t_2)), ((t * t) * (t * t)), (sqrt(z) * (t_2 * fma(0.5, (t * t), 1.0))));
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(Float64(t * t), 0.020833333333333332, 0.125) t_2 = Float64(fma(0.5, x, Float64(0.0 - y)) * sqrt(2.0)) tmp = 0.0 if (Float64(t * t) <= 10.0) tmp = Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * fma(Float64(t * t), fma(Float64(t * t), t_1, 0.5), 1.0)); elseif (Float64(t * t) <= 5e+79) tmp = Float64(sqrt(Float64(Float64(z * 2.0) * exp(Float64(t * t)))) * Float64(0.0 - y)); else tmp = fma(Float64(sqrt(z) * Float64(t_1 * t_2)), Float64(Float64(t * t) * Float64(t * t)), Float64(sqrt(z) * Float64(t_2 * fma(0.5, Float64(t * t), 1.0)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] * 0.020833333333333332 + 0.125), $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.5 * x + N[(0.0 - y), $MachinePrecision]), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 10.0], N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * t$95$1 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 5e+79], N[(N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$2 * N[(0.5 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t \cdot t, 0.020833333333333332, 0.125\right)\\
t_2 := \mathsf{fma}\left(0.5, x, 0 - y\right) \cdot \sqrt{2}\\
\mathbf{if}\;t \cdot t \leq 10:\\
\;\;\;\;\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, t\_1, 0.5\right), 1\right)\\
\mathbf{elif}\;t \cdot t \leq 5 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}} \cdot \left(0 - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{z} \cdot \left(t\_1 \cdot t\_2\right), \left(t \cdot t\right) \cdot \left(t \cdot t\right), \sqrt{z} \cdot \left(t\_2 \cdot \mathsf{fma}\left(0.5, t \cdot t, 1\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 10Initial program 99.7%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6498.9
Simplified98.9%
if 10 < (*.f64 t t) < 5e79Initial program 99.7%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.7
Applied egg-rr99.7%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6489.7
Simplified89.7%
if 5e79 < (*.f64 t t) Initial program 98.4%
Taylor expanded in t around 0
Simplified98.5%
Final simplification98.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (exp (/ (* t t) 2.0)) 2.0)
(* t_1 (sqrt (* z 2.0)))
(* t_1 (* t (* t (sqrt z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (exp(((t * t) / 2.0)) <= 2.0) {
tmp = t_1 * sqrt((z * 2.0));
} else {
tmp = t_1 * (t * (t * sqrt(z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (exp(((t * t) / 2.0d0)) <= 2.0d0) then
tmp = t_1 * sqrt((z * 2.0d0))
else
tmp = t_1 * (t * (t * sqrt(z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (Math.exp(((t * t) / 2.0)) <= 2.0) {
tmp = t_1 * Math.sqrt((z * 2.0));
} else {
tmp = t_1 * (t * (t * Math.sqrt(z)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if math.exp(((t * t) / 2.0)) <= 2.0: tmp = t_1 * math.sqrt((z * 2.0)) else: tmp = t_1 * (t * (t * math.sqrt(z))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (exp(Float64(Float64(t * t) / 2.0)) <= 2.0) tmp = Float64(t_1 * sqrt(Float64(z * 2.0))); else tmp = Float64(t_1 * Float64(t * Float64(t * sqrt(z)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (exp(((t * t) / 2.0)) <= 2.0) tmp = t_1 * sqrt((z * 2.0)); else tmp = t_1 * (t * (t * sqrt(z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 2.0], N[(t$95$1 * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t * N[(t * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 2:\\
\;\;\;\;t\_1 \cdot \sqrt{z \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t \cdot \left(t \cdot \sqrt{z}\right)\right)\\
\end{array}
\end{array}
if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 2Initial program 99.7%
Taylor expanded in t around 0
Simplified99.1%
*-rgt-identityN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6499.1
Applied egg-rr99.1%
if 2 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) Initial program 98.6%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6479.5
Simplified79.5%
Taylor expanded in t around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6464.8
Simplified64.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (exp (* t t))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * exp((t * t))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt(((z * 2.0d0) * exp((t * t))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((z * 2.0) * Math.exp((t * t))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((z * 2.0) * math.exp((t * t))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * exp(Float64(t * t))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * exp((t * t)))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot e^{t \cdot t}}
\end{array}
Initial program 99.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (fma t t 2.0))) (t_2 (- (* x 0.5) y)))
(if (<= (* t t) 5e+146)
(* t_2 (sqrt (/ (* z (fma (* t t) (* t_1 t_1) -4.0)) (fma t t_1 -2.0))))
(* t_2 (sqrt (* z (fma (fma t t 2.0) (* t t) 2.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * fma(t, t, 2.0);
double t_2 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 5e+146) {
tmp = t_2 * sqrt(((z * fma((t * t), (t_1 * t_1), -4.0)) / fma(t, t_1, -2.0)));
} else {
tmp = t_2 * sqrt((z * fma(fma(t, t, 2.0), (t * t), 2.0)));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(t * fma(t, t, 2.0)) t_2 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 5e+146) tmp = Float64(t_2 * sqrt(Float64(Float64(z * fma(Float64(t * t), Float64(t_1 * t_1), -4.0)) / fma(t, t_1, -2.0)))); else tmp = Float64(t_2 * sqrt(Float64(z * fma(fma(t, t, 2.0), Float64(t * t), 2.0)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(t * t + 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 5e+146], N[(t$95$2 * N[Sqrt[N[(N[(z * N[(N[(t * t), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision] + -4.0), $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1 + -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(z * N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(t, t, 2\right)\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 5 \cdot 10^{+146}:\\
\;\;\;\;t\_2 \cdot \sqrt{\frac{z \cdot \mathsf{fma}\left(t \cdot t, t\_1 \cdot t\_1, -4\right)}{\mathsf{fma}\left(t, t\_1, -2\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{z \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right)}\\
\end{array}
\end{array}
if (*.f64 t t) < 4.9999999999999999e146Initial program 99.7%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.7
Applied egg-rr99.7%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6479.4
Simplified79.4%
*-commutativeN/A
flip-+N/A
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr90.2%
if 4.9999999999999999e146 < (*.f64 t t) Initial program 98.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64100.0
Simplified100.0%
Final simplification94.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))) (t_2 (- (* x 0.5) y)))
(if (<= (* t t) 10000.0)
(*
(* t_2 t_1)
(fma
(* t t)
(fma (* t t) (fma (* t t) 0.020833333333333332 0.125) 0.5)
1.0))
(if (<= (* t t) 2e+101)
(/ (* t_1 (* x (* x (fma (- 0.0 y) (/ y (* x x)) 0.25)))) (fma x 0.5 y))
(*
t_2
(sqrt
(*
(* z 2.0)
(fma
(* t t)
(fma (* t t) (fma t (* t 0.16666666666666666) 0.5) 1.0)
1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 10000.0) {
tmp = (t_2 * t_1) * fma((t * t), fma((t * t), fma((t * t), 0.020833333333333332, 0.125), 0.5), 1.0);
} else if ((t * t) <= 2e+101) {
tmp = (t_1 * (x * (x * fma((0.0 - y), (y / (x * x)), 0.25)))) / fma(x, 0.5, y);
} else {
tmp = t_2 * sqrt(((z * 2.0) * fma((t * t), fma((t * t), fma(t, (t * 0.16666666666666666), 0.5), 1.0), 1.0)));
}
return tmp;
}
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 10000.0) tmp = Float64(Float64(t_2 * t_1) * fma(Float64(t * t), fma(Float64(t * t), fma(Float64(t * t), 0.020833333333333332, 0.125), 0.5), 1.0)); elseif (Float64(t * t) <= 2e+101) tmp = Float64(Float64(t_1 * Float64(x * Float64(x * fma(Float64(0.0 - y), Float64(y / Float64(x * x)), 0.25)))) / fma(x, 0.5, y)); else tmp = Float64(t_2 * sqrt(Float64(Float64(z * 2.0) * fma(Float64(t * t), fma(Float64(t * t), fma(t, Float64(t * 0.16666666666666666), 0.5), 1.0), 1.0)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 10000.0], N[(N[(t$95$2 * t$95$1), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.020833333333333332 + 0.125), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 2e+101], N[(N[(t$95$1 * N[(x * N[(x * N[(N[(0.0 - y), $MachinePrecision] * N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * 0.5 + y), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(t * N[(t * 0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 10000:\\
\;\;\;\;\left(t\_2 \cdot t\_1\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.020833333333333332, 0.125\right), 0.5\right), 1\right)\\
\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+101}:\\
\;\;\;\;\frac{t\_1 \cdot \left(x \cdot \left(x \cdot \mathsf{fma}\left(0 - y, \frac{y}{x \cdot x}, 0.25\right)\right)\right)}{\mathsf{fma}\left(x, 0.5, y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t, t \cdot 0.16666666666666666, 0.5\right), 1\right), 1\right)}\\
\end{array}
\end{array}
if (*.f64 t t) < 1e4Initial program 99.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6496.4
Simplified96.4%
if 1e4 < (*.f64 t t) < 2e101Initial program 100.0%
Taylor expanded in t around 0
Simplified4.4%
*-rgt-identityN/A
flip--N/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
swap-sqrN/A
metadata-evalN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f6440.6
Applied egg-rr40.6%
Taylor expanded in x around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unpow2N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
accelerator-lowering-fma.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6466.6
Simplified66.6%
if 2e101 < (*.f64 t t) Initial program 98.3%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64100.0
Simplified100.0%
Final simplification95.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))) (t_2 (- (* x 0.5) y)))
(if (<= (* t t) 400.0)
(* (* t_2 t_1) (fma 0.5 (* t t) 1.0))
(if (<= (* t t) 2e+92)
(/ (* t_1 (- 0.0 (fma y y 0.0))) y)
(if (<= (* t t) 1e+300)
(* (- 0.0 y) (sqrt (* z (fma (fma t t 2.0) (* t t) 2.0))))
(* t_2 (sqrt (* (* z 2.0) (fma t t 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 400.0) {
tmp = (t_2 * t_1) * fma(0.5, (t * t), 1.0);
} else if ((t * t) <= 2e+92) {
tmp = (t_1 * (0.0 - fma(y, y, 0.0))) / y;
} else if ((t * t) <= 1e+300) {
tmp = (0.0 - y) * sqrt((z * fma(fma(t, t, 2.0), (t * t), 2.0)));
} else {
tmp = t_2 * sqrt(((z * 2.0) * fma(t, t, 1.0)));
}
return tmp;
}
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 400.0) tmp = Float64(Float64(t_2 * t_1) * fma(0.5, Float64(t * t), 1.0)); elseif (Float64(t * t) <= 2e+92) tmp = Float64(Float64(t_1 * Float64(0.0 - fma(y, y, 0.0))) / y); elseif (Float64(t * t) <= 1e+300) tmp = Float64(Float64(0.0 - y) * sqrt(Float64(z * fma(fma(t, t, 2.0), Float64(t * t), 2.0)))); else tmp = Float64(t_2 * sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 400.0], N[(N[(t$95$2 * t$95$1), $MachinePrecision] * N[(0.5 * N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 2e+92], N[(N[(t$95$1 * N[(0.0 - N[(y * y + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+300], N[(N[(0.0 - y), $MachinePrecision] * N[Sqrt[N[(z * N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 400:\\
\;\;\;\;\left(t\_2 \cdot t\_1\right) \cdot \mathsf{fma}\left(0.5, t \cdot t, 1\right)\\
\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+92}:\\
\;\;\;\;\frac{t\_1 \cdot \left(0 - \mathsf{fma}\left(y, y, 0\right)\right)}{y}\\
\mathbf{elif}\;t \cdot t \leq 10^{+300}:\\
\;\;\;\;\left(0 - y\right) \cdot \sqrt{z \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\
\end{array}
\end{array}
if (*.f64 t t) < 400Initial program 99.6%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6498.1
Simplified98.1%
if 400 < (*.f64 t t) < 2.0000000000000001e92Initial program 100.0%
Taylor expanded in t around 0
Simplified4.3%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f643.6
Simplified3.6%
*-rgt-identityN/A
flip--N/A
+-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6429.9
Applied egg-rr29.9%
if 2.0000000000000001e92 < (*.f64 t t) < 1.0000000000000001e300Initial program 98.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6486.0
Simplified86.0%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.1
Simplified67.1%
if 1.0000000000000001e300 < (*.f64 t t) Initial program 98.5%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64100.0
Simplified100.0%
Final simplification85.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (fma t t 1.0))))))
(if (<= (* t t) 400.0)
t_1
(if (<= (* t t) 2e+92)
(/ (* (sqrt (* z 2.0)) (- 0.0 (fma y y 0.0))) y)
(if (<= (* t t) 1e+300)
(* (- 0.0 y) (sqrt (* z (fma (fma t t 2.0) (* t t) 2.0))))
t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * 0.5) - y) * sqrt(((z * 2.0) * fma(t, t, 1.0)));
double tmp;
if ((t * t) <= 400.0) {
tmp = t_1;
} else if ((t * t) <= 2e+92) {
tmp = (sqrt((z * 2.0)) * (0.0 - fma(y, y, 0.0))) / y;
} else if ((t * t) <= 1e+300) {
tmp = (0.0 - y) * sqrt((z * fma(fma(t, t, 2.0), (t * t), 2.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0)))) tmp = 0.0 if (Float64(t * t) <= 400.0) tmp = t_1; elseif (Float64(t * t) <= 2e+92) tmp = Float64(Float64(sqrt(Float64(z * 2.0)) * Float64(0.0 - fma(y, y, 0.0))) / y); elseif (Float64(t * t) <= 1e+300) tmp = Float64(Float64(0.0 - y) * sqrt(Float64(z * fma(fma(t, t, 2.0), Float64(t * t), 2.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 400.0], t$95$1, If[LessEqual[N[(t * t), $MachinePrecision], 2e+92], N[(N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.0 - N[(y * y + 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+300], N[(N[(0.0 - y), $MachinePrecision] * N[Sqrt[N[(z * N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\
\mathbf{if}\;t \cdot t \leq 400:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+92}:\\
\;\;\;\;\frac{\sqrt{z \cdot 2} \cdot \left(0 - \mathsf{fma}\left(y, y, 0\right)\right)}{y}\\
\mathbf{elif}\;t \cdot t \leq 10^{+300}:\\
\;\;\;\;\left(0 - y\right) \cdot \sqrt{z \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 t t) < 400 or 1.0000000000000001e300 < (*.f64 t t) Initial program 99.2%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6498.8
Simplified98.8%
if 400 < (*.f64 t t) < 2.0000000000000001e92Initial program 100.0%
Taylor expanded in t around 0
Simplified4.3%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f643.6
Simplified3.6%
*-rgt-identityN/A
flip--N/A
+-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
+-rgt-identityN/A
accelerator-lowering-fma.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6429.9
Applied egg-rr29.9%
if 2.0000000000000001e92 < (*.f64 t t) < 1.0000000000000001e300Initial program 98.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6486.0
Simplified86.0%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6467.1
Simplified67.1%
Final simplification85.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t_1 1.848e+73)
(* t_1 (sqrt (* z (fma (fma t t 2.0) (* t t) 2.0))))
(* (* t_1 (sqrt (* z 2.0))) (fma t (* t (* (* t t) 0.125)) 1.0)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t_1 <= 1.848e+73) {
tmp = t_1 * sqrt((z * fma(fma(t, t, 2.0), (t * t), 2.0)));
} else {
tmp = (t_1 * sqrt((z * 2.0))) * fma(t, (t * ((t * t) * 0.125)), 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t_1 <= 1.848e+73) tmp = Float64(t_1 * sqrt(Float64(z * fma(fma(t, t, 2.0), Float64(t * t), 2.0)))); else tmp = Float64(Float64(t_1 * sqrt(Float64(z * 2.0))) * fma(t, Float64(t * Float64(Float64(t * t) * 0.125)), 1.0)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, 1.848e+73], N[(t$95$1 * N[Sqrt[N[(z * N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t * N[(t * N[(N[(t * t), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t\_1 \leq 1.848 \cdot 10^{+73}:\\
\;\;\;\;t\_1 \cdot \sqrt{z \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 \cdot \sqrt{z \cdot 2}\right) \cdot \mathsf{fma}\left(t, t \cdot \left(\left(t \cdot t\right) \cdot 0.125\right), 1\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x #s(literal 1/2 binary64)) y) < 1.8480000000000001e73Initial program 98.7%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6490.2
Simplified90.2%
if 1.8480000000000001e73 < (-.f64 (*.f64 x #s(literal 1/2 binary64)) y) Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6491.6
Simplified91.6%
Taylor expanded in t around inf
*-commutativeN/A
cube-multN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6491.3
Simplified91.3%
(FPCore (x y z t)
:precision binary64
(*
(- (* x 0.5) y)
(sqrt
(*
(* z 2.0)
(fma
(* t t)
(fma (* t t) (fma t (* t 0.16666666666666666) 0.5) 1.0)
1.0)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * fma((t * t), fma((t * t), fma(t, (t * 0.16666666666666666), 0.5), 1.0), 1.0)));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * fma(Float64(t * t), fma(Float64(t * t), fma(t, Float64(t * 0.16666666666666666), 0.5), 1.0), 1.0)))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(t * N[(t * 0.16666666666666666), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t, t \cdot 0.16666666666666666, 0.5\right), 1\right), 1\right)}
\end{array}
Initial program 99.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6491.8
Simplified91.8%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (fma (* t t) (fma (* t t) (fma (* t t) 0.020833333333333332 0.125) 0.5) 1.0)))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * fma((t * t), fma((t * t), fma((t * t), 0.020833333333333332, 0.125), 0.5), 1.0);
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * fma(Float64(t * t), fma(Float64(t * t), fma(Float64(t * t), 0.020833333333333332, 0.125), 0.5), 1.0)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.020833333333333332 + 0.125), $MachinePrecision] + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.020833333333333332, 0.125\right), 0.5\right), 1\right)
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6491.7
Simplified91.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (fma t t 1.0))))))
(if (<= (* t t) 1e+26)
t_1
(if (<= (* t t) 1e+300)
(* (- 0.0 y) (sqrt (* z (fma (fma t t 2.0) (* t t) 2.0))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * 0.5) - y) * sqrt(((z * 2.0) * fma(t, t, 1.0)));
double tmp;
if ((t * t) <= 1e+26) {
tmp = t_1;
} else if ((t * t) <= 1e+300) {
tmp = (0.0 - y) * sqrt((z * fma(fma(t, t, 2.0), (t * t), 2.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0)))) tmp = 0.0 if (Float64(t * t) <= 1e+26) tmp = t_1; elseif (Float64(t * t) <= 1e+300) tmp = Float64(Float64(0.0 - y) * sqrt(Float64(z * fma(fma(t, t, 2.0), Float64(t * t), 2.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 1e+26], t$95$1, If[LessEqual[N[(t * t), $MachinePrecision], 1e+300], N[(N[(0.0 - y), $MachinePrecision] * N[Sqrt[N[(z * N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\
\mathbf{if}\;t \cdot t \leq 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \cdot t \leq 10^{+300}:\\
\;\;\;\;\left(0 - y\right) \cdot \sqrt{z \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 t t) < 1.00000000000000005e26 or 1.0000000000000001e300 < (*.f64 t t) Initial program 99.2%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6492.8
Simplified92.8%
if 1.00000000000000005e26 < (*.f64 t t) < 1.0000000000000001e300Initial program 98.5%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6474.5
Simplified74.5%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6457.8
Simplified57.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
(if (<= (* t t) 5000.0)
(* t_1 t_2)
(if (<= (* t t) 1e+94)
(* x (* t_2 (- 0.5 (/ y x))))
(* t_1 (* t (* t (sqrt z))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((z * 2.0));
double tmp;
if ((t * t) <= 5000.0) {
tmp = t_1 * t_2;
} else if ((t * t) <= 1e+94) {
tmp = x * (t_2 * (0.5 - (y / x)));
} else {
tmp = t_1 * (t * (t * sqrt(z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * 0.5d0) - y
t_2 = sqrt((z * 2.0d0))
if ((t * t) <= 5000.0d0) then
tmp = t_1 * t_2
else if ((t * t) <= 1d+94) then
tmp = x * (t_2 * (0.5d0 - (y / x)))
else
tmp = t_1 * (t * (t * sqrt(z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = Math.sqrt((z * 2.0));
double tmp;
if ((t * t) <= 5000.0) {
tmp = t_1 * t_2;
} else if ((t * t) <= 1e+94) {
tmp = x * (t_2 * (0.5 - (y / x)));
} else {
tmp = t_1 * (t * (t * Math.sqrt(z)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y t_2 = math.sqrt((z * 2.0)) tmp = 0 if (t * t) <= 5000.0: tmp = t_1 * t_2 elif (t * t) <= 1e+94: tmp = x * (t_2 * (0.5 - (y / x))) else: tmp = t_1 * (t * (t * math.sqrt(z))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (Float64(t * t) <= 5000.0) tmp = Float64(t_1 * t_2); elseif (Float64(t * t) <= 1e+94) tmp = Float64(x * Float64(t_2 * Float64(0.5 - Float64(y / x)))); else tmp = Float64(t_1 * Float64(t * Float64(t * sqrt(z)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; t_2 = sqrt((z * 2.0)); tmp = 0.0; if ((t * t) <= 5000.0) tmp = t_1 * t_2; elseif ((t * t) <= 1e+94) tmp = x * (t_2 * (0.5 - (y / x))); else tmp = t_1 * (t * (t * sqrt(z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 5000.0], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+94], N[(x * N[(t$95$2 * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t * N[(t * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \cdot t \leq 5000:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;t \cdot t \leq 10^{+94}:\\
\;\;\;\;x \cdot \left(t\_2 \cdot \left(0.5 - \frac{y}{x}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t \cdot \left(t \cdot \sqrt{z}\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 5e3Initial program 99.6%
Taylor expanded in t around 0
Simplified96.7%
*-rgt-identityN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6496.7
Applied egg-rr96.7%
if 5e3 < (*.f64 t t) < 1e94Initial program 100.0%
Taylor expanded in t around 0
Simplified4.3%
Taylor expanded in x around inf
metadata-evalN/A
mul-1-negN/A
distribute-neg-inN/A
+-commutativeN/A
metadata-evalN/A
sub-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6423.2
Simplified23.2%
*-rgt-identityN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6430.9
Applied egg-rr30.9%
if 1e94 < (*.f64 t t) Initial program 98.3%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64100.0
Applied egg-rr100.0%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6493.7
Simplified93.7%
Taylor expanded in t around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6477.1
Simplified77.1%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (* (- (* x 0.5) y) (fma (* t t) (fma (* t t) 0.125 0.5) 1.0))))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * (((x * 0.5) - y) * fma((t * t), fma((t * t), 0.125, 0.5), 1.0));
}
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * fma(Float64(t * t), fma(Float64(t * t), 0.125, 0.5), 1.0))) end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * 0.125 + 0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \mathsf{fma}\left(t \cdot t, \mathsf{fma}\left(t \cdot t, 0.125, 0.5\right), 1\right)\right)
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6489.2
Simplified89.2%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6490.3
Applied egg-rr90.3%
Final simplification90.3%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (fma t (* t (fma (* t t) 0.125 0.5)) 1.0)))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * fma(t, (t * fma((t * t), 0.125, 0.5)), 1.0);
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * fma(t, Float64(t * fma(Float64(t * t), 0.125, 0.5)), 1.0)) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t * N[(t * N[(N[(t * t), $MachinePrecision] * 0.125 + 0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \mathsf{fma}\left(t, t \cdot \mathsf{fma}\left(t \cdot t, 0.125, 0.5\right), 1\right)
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
associate-*l*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6489.2
Simplified89.2%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* z (fma (fma t t 2.0) (* t t) 2.0)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((z * fma(fma(t, t, 2.0), (t * t), 2.0)));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * fma(fma(t, t, 2.0), Float64(t * t), 2.0)))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * N[(N[(t * t + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \mathsf{fma}\left(\mathsf{fma}\left(t, t, 2\right), t \cdot t, 2\right)}
\end{array}
Initial program 99.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Taylor expanded in t around 0
+-commutativeN/A
*-commutativeN/A
distribute-rgt-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f64N/A
unpow2N/A
*-lowering-*.f6488.0
Simplified88.0%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (fma t t 1.0)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * fma(t, t, 1.0)));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0)))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}
\end{array}
Initial program 99.1%
associate-*l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-sqrtN/A
sqrt-unprodN/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f6499.8
Applied egg-rr99.8%
Taylor expanded in t around 0
+-commutativeN/A
unpow2N/A
accelerator-lowering-fma.f6479.8
Simplified79.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((z * 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
Simplified49.6%
*-rgt-identityN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6449.6
Applied egg-rr49.6%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- 0.0 y)))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * (0.0 - y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((z * 2.0d0)) * (0.0d0 - y)
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * (0.0 - y);
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * (0.0 - y)
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(0.0 - y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * (0.0 - y); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.0 - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(0 - y\right)
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
Simplified49.6%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6427.2
Simplified27.2%
*-rgt-identityN/A
sub0-negN/A
sqrt-prodN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-outN/A
neg-lowering-neg.f64N/A
associate-*r*N/A
sqrt-prodN/A
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6427.2
Applied egg-rr27.2%
Final simplification27.2%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024196
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))