
(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 17 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) (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.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
associate-*r*N/A
*-commutativeN/A
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 (- (* x 0.5) y)))
(*
(sqrt (* z 2.0))
(+
(* t (* t (* (* t (* t_1 t)) (+ 0.125 (* t (* t 0.020833333333333332))))))
(* t_1 (+ (* 0.5 (* t t)) 1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
return sqrt((z * 2.0)) * ((t * (t * ((t * (t_1 * t)) * (0.125 + (t * (t * 0.020833333333333332)))))) + (t_1 * ((0.5 * (t * t)) + 1.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
real(8) :: t_1
t_1 = (x * 0.5d0) - y
code = sqrt((z * 2.0d0)) * ((t * (t * ((t * (t_1 * t)) * (0.125d0 + (t * (t * 0.020833333333333332d0)))))) + (t_1 * ((0.5d0 * (t * t)) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
return Math.sqrt((z * 2.0)) * ((t * (t * ((t * (t_1 * t)) * (0.125 + (t * (t * 0.020833333333333332)))))) + (t_1 * ((0.5 * (t * t)) + 1.0)));
}
def code(x, y, z, t): t_1 = (x * 0.5) - y return math.sqrt((z * 2.0)) * ((t * (t * ((t * (t_1 * t)) * (0.125 + (t * (t * 0.020833333333333332)))))) + (t_1 * ((0.5 * (t * t)) + 1.0)))
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(t * Float64(t * Float64(Float64(t * Float64(t_1 * t)) * Float64(0.125 + Float64(t * Float64(t * 0.020833333333333332)))))) + Float64(t_1 * Float64(Float64(0.5 * Float64(t * t)) + 1.0)))) end
function tmp = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = sqrt((z * 2.0)) * ((t * (t * ((t * (t_1 * t)) * (0.125 + (t * (t * 0.020833333333333332)))))) + (t_1 * ((0.5 * (t * t)) + 1.0))); end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(t * N[(t * N[(N[(t * N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] * N[(0.125 + N[(t * N[(t * 0.020833333333333332), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\sqrt{z \cdot 2} \cdot \left(t \cdot \left(t \cdot \left(\left(t \cdot \left(t\_1 \cdot t\right)\right) \cdot \left(0.125 + t \cdot \left(t \cdot 0.020833333333333332\right)\right)\right)\right) + t\_1 \cdot \left(0.5 \cdot \left(t \cdot t\right) + 1\right)\right)
\end{array}
\end{array}
Initial program 99.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
Simplified96.4%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6496.4%
Applied egg-rr96.4%
Final simplification96.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0)))
(t_2 (* t_1 (* (- (* x 0.5) y) (+ (* 0.5 (* t t)) 1.0)))))
(if (<= (* x 0.5) -1e+22)
t_2
(if (<= (* x 0.5) 2e-103)
(* y (* t_1 (- -1.0 (* t (* t (+ 0.5 (* (* t t) 0.125)))))))
t_2))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = t_1 * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.0));
double tmp;
if ((x * 0.5) <= -1e+22) {
tmp = t_2;
} else if ((x * 0.5) <= 2e-103) {
tmp = y * (t_1 * (-1.0 - (t * (t * (0.5 + ((t * t) * 0.125))))));
} else {
tmp = t_2;
}
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 = sqrt((z * 2.0d0))
t_2 = t_1 * (((x * 0.5d0) - y) * ((0.5d0 * (t * t)) + 1.0d0))
if ((x * 0.5d0) <= (-1d+22)) then
tmp = t_2
else if ((x * 0.5d0) <= 2d-103) then
tmp = y * (t_1 * ((-1.0d0) - (t * (t * (0.5d0 + ((t * t) * 0.125d0))))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double t_2 = t_1 * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.0));
double tmp;
if ((x * 0.5) <= -1e+22) {
tmp = t_2;
} else if ((x * 0.5) <= 2e-103) {
tmp = y * (t_1 * (-1.0 - (t * (t * (0.5 + ((t * t) * 0.125))))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) t_2 = t_1 * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.0)) tmp = 0 if (x * 0.5) <= -1e+22: tmp = t_2 elif (x * 0.5) <= 2e-103: tmp = y * (t_1 * (-1.0 - (t * (t * (0.5 + ((t * t) * 0.125)))))) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = Float64(t_1 * Float64(Float64(Float64(x * 0.5) - y) * Float64(Float64(0.5 * Float64(t * t)) + 1.0))) tmp = 0.0 if (Float64(x * 0.5) <= -1e+22) tmp = t_2; elseif (Float64(x * 0.5) <= 2e-103) tmp = Float64(y * Float64(t_1 * Float64(-1.0 - Float64(t * Float64(t * Float64(0.5 + Float64(Float64(t * t) * 0.125))))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); t_2 = t_1 * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.0)); tmp = 0.0; if ((x * 0.5) <= -1e+22) tmp = t_2; elseif ((x * 0.5) <= 2e-103) tmp = y * (t_1 * (-1.0 - (t * (t * (0.5 + ((t * t) * 0.125)))))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * 0.5), $MachinePrecision], -1e+22], t$95$2, If[LessEqual[N[(x * 0.5), $MachinePrecision], 2e-103], N[(y * N[(t$95$1 * N[(-1.0 - N[(t * N[(t * N[(0.5 + N[(N[(t * t), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := t\_1 \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(0.5 \cdot \left(t \cdot t\right) + 1\right)\right)\\
\mathbf{if}\;x \cdot 0.5 \leq -1 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot 0.5 \leq 2 \cdot 10^{-103}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 - t \cdot \left(t \cdot \left(0.5 + \left(t \cdot t\right) \cdot 0.125\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 x #s(literal 1/2 binary64)) < -1e22 or 1.99999999999999992e-103 < (*.f64 x #s(literal 1/2 binary64)) Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.7%
Simplified96.7%
if -1e22 < (*.f64 x #s(literal 1/2 binary64)) < 1.99999999999999992e-103Initial program 98.9%
Taylor expanded in t around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.7%
Simplified89.7%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6484.6%
Simplified84.6%
sub0-negN/A
associate-*l*N/A
distribute-lft-neg-outN/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
associate-*r*N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.4%
Applied egg-rr87.4%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (* (+ 1.0 (* (* t t) (+ 0.5 (* t (* t (+ 0.125 (* (* t t) 0.020833333333333332))))))) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
return (1.0 + ((t * t) * (0.5 + (t * (t * (0.125 + ((t * t) * 0.020833333333333332))))))) * (((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 = (1.0d0 + ((t * t) * (0.5d0 + (t * (t * (0.125d0 + ((t * t) * 0.020833333333333332d0))))))) * (((x * 0.5d0) - y) * sqrt((z * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (1.0 + ((t * t) * (0.5 + (t * (t * (0.125 + ((t * t) * 0.020833333333333332))))))) * (((x * 0.5) - y) * Math.sqrt((z * 2.0)));
}
def code(x, y, z, t): return (1.0 + ((t * t) * (0.5 + (t * (t * (0.125 + ((t * t) * 0.020833333333333332))))))) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
function code(x, y, z, t) return Float64(Float64(1.0 + Float64(Float64(t * t) * Float64(0.5 + Float64(t * Float64(t * Float64(0.125 + Float64(Float64(t * t) * 0.020833333333333332))))))) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = (1.0 + ((t * t) * (0.5 + (t * (t * (0.125 + ((t * t) * 0.020833333333333332))))))) * (((x * 0.5) - y) * sqrt((z * 2.0))); end
code[x_, y_, z_, t_] := N[(N[(1.0 + N[(N[(t * t), $MachinePrecision] * N[(0.5 + N[(t * N[(t * N[(0.125 + N[(N[(t * t), $MachinePrecision] * 0.020833333333333332), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \left(t \cdot t\right) \cdot \left(0.5 + t \cdot \left(t \cdot \left(0.125 + \left(t \cdot t\right) \cdot 0.020833333333333332\right)\right)\right)\right) \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.4%
Taylor expanded in t around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6496.4%
Simplified96.4%
Final simplification96.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 2.75e-5)
(* (- (* x 0.5) y) t_1)
(if (<= t 4.4e+242)
(* (+ (* 0.5 (* t t)) 1.0) (* t_1 (* x 0.5)))
(* (sqrt (* (* z 2.0) (+ (* t t) 1.0))) (- 0.0 y))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 2.75e-5) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 4.4e+242) {
tmp = ((0.5 * (t * t)) + 1.0) * (t_1 * (x * 0.5));
} else {
tmp = sqrt(((z * 2.0) * ((t * t) + 1.0))) * (0.0 - y);
}
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 = sqrt((z * 2.0d0))
if (t <= 2.75d-5) then
tmp = ((x * 0.5d0) - y) * t_1
else if (t <= 4.4d+242) then
tmp = ((0.5d0 * (t * t)) + 1.0d0) * (t_1 * (x * 0.5d0))
else
tmp = sqrt(((z * 2.0d0) * ((t * t) + 1.0d0))) * (0.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 2.75e-5) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 4.4e+242) {
tmp = ((0.5 * (t * t)) + 1.0) * (t_1 * (x * 0.5));
} else {
tmp = Math.sqrt(((z * 2.0) * ((t * t) + 1.0))) * (0.0 - y);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 2.75e-5: tmp = ((x * 0.5) - y) * t_1 elif t <= 4.4e+242: tmp = ((0.5 * (t * t)) + 1.0) * (t_1 * (x * 0.5)) else: tmp = math.sqrt(((z * 2.0) * ((t * t) + 1.0))) * (0.0 - y) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 2.75e-5) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); elseif (t <= 4.4e+242) tmp = Float64(Float64(Float64(0.5 * Float64(t * t)) + 1.0) * Float64(t_1 * Float64(x * 0.5))); else tmp = Float64(sqrt(Float64(Float64(z * 2.0) * Float64(Float64(t * t) + 1.0))) * Float64(0.0 - y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 2.75e-5) tmp = ((x * 0.5) - y) * t_1; elseif (t <= 4.4e+242) tmp = ((0.5 * (t * t)) + 1.0) * (t_1 * (x * 0.5)); else tmp = sqrt(((z * 2.0) * ((t * t) + 1.0))) * (0.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 2.75e-5], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t, 4.4e+242], N[(N[(N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(t$95$1 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(0.0 - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 2.75 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+242}:\\
\;\;\;\;\left(0.5 \cdot \left(t \cdot t\right) + 1\right) \cdot \left(t\_1 \cdot \left(x \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(t \cdot t + 1\right)} \cdot \left(0 - y\right)\\
\end{array}
\end{array}
if t < 2.7500000000000001e-5Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6469.9%
Simplified69.9%
if 2.7500000000000001e-5 < t < 4.39999999999999999e242Initial program 98.3%
Taylor expanded in t around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.8%
Simplified70.8%
Taylor expanded in x around inf
*-lowering-*.f6456.8%
Simplified56.8%
if 4.39999999999999999e242 < t Initial program 100.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
associate-*r*N/A
*-commutativeN/A
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6488.9%
Simplified88.9%
Final simplification67.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* (* z 2.0) (+ (* t t) 1.0)))))
(if (<= t 2.75e-5)
(* (- (* x 0.5) y) (sqrt (* z 2.0)))
(if (<= t 3e+242) (* (* x 0.5) t_1) (* t_1 (- 0.0 y))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt(((z * 2.0) * ((t * t) + 1.0)));
double tmp;
if (t <= 2.75e-5) {
tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
} else if (t <= 3e+242) {
tmp = (x * 0.5) * t_1;
} else {
tmp = t_1 * (0.0 - y);
}
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 = sqrt(((z * 2.0d0) * ((t * t) + 1.0d0)))
if (t <= 2.75d-5) then
tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
else if (t <= 3d+242) then
tmp = (x * 0.5d0) * t_1
else
tmp = t_1 * (0.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt(((z * 2.0) * ((t * t) + 1.0)));
double tmp;
if (t <= 2.75e-5) {
tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
} else if (t <= 3e+242) {
tmp = (x * 0.5) * t_1;
} else {
tmp = t_1 * (0.0 - y);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt(((z * 2.0) * ((t * t) + 1.0))) tmp = 0 if t <= 2.75e-5: tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0)) elif t <= 3e+242: tmp = (x * 0.5) * t_1 else: tmp = t_1 * (0.0 - y) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(Float64(z * 2.0) * Float64(Float64(t * t) + 1.0))) tmp = 0.0 if (t <= 2.75e-5) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))); elseif (t <= 3e+242) tmp = Float64(Float64(x * 0.5) * t_1); else tmp = Float64(t_1 * Float64(0.0 - y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt(((z * 2.0) * ((t * t) + 1.0))); tmp = 0.0; if (t <= 2.75e-5) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); elseif (t <= 3e+242) tmp = (x * 0.5) * t_1; else tmp = t_1 * (0.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 2.75e-5], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+242], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[(0.0 - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(z \cdot 2\right) \cdot \left(t \cdot t + 1\right)}\\
\mathbf{if}\;t \leq 2.75 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+242}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(0 - y\right)\\
\end{array}
\end{array}
if t < 2.7500000000000001e-5Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6469.9%
Simplified69.9%
if 2.7500000000000001e-5 < t < 3e242Initial program 98.3%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
associate-*r*N/A
*-commutativeN/A
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6462.9%
Simplified62.9%
Taylor expanded in x around inf
*-lowering-*.f6454.0%
Simplified54.0%
if 3e242 < t Initial program 100.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
associate-*r*N/A
*-commutativeN/A
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6488.9%
Simplified88.9%
Final simplification66.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 2e-5)
(* (- (* x 0.5) y) t_1)
(if (<= t 5.3e+135)
(* t_1 (* y (+ -1.0 (/ (* x 0.5) y))))
(/ (* t_1 (* y y)) (- 0.0 y))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 2e-5) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 5.3e+135) {
tmp = t_1 * (y * (-1.0 + ((x * 0.5) / y)));
} else {
tmp = (t_1 * (y * y)) / (0.0 - y);
}
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 = sqrt((z * 2.0d0))
if (t <= 2d-5) then
tmp = ((x * 0.5d0) - y) * t_1
else if (t <= 5.3d+135) then
tmp = t_1 * (y * ((-1.0d0) + ((x * 0.5d0) / y)))
else
tmp = (t_1 * (y * y)) / (0.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 2e-5) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 5.3e+135) {
tmp = t_1 * (y * (-1.0 + ((x * 0.5) / y)));
} else {
tmp = (t_1 * (y * y)) / (0.0 - y);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 2e-5: tmp = ((x * 0.5) - y) * t_1 elif t <= 5.3e+135: tmp = t_1 * (y * (-1.0 + ((x * 0.5) / y))) else: tmp = (t_1 * (y * y)) / (0.0 - y) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 2e-5) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); elseif (t <= 5.3e+135) tmp = Float64(t_1 * Float64(y * Float64(-1.0 + Float64(Float64(x * 0.5) / y)))); else tmp = Float64(Float64(t_1 * Float64(y * y)) / Float64(0.0 - y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 2e-5) tmp = ((x * 0.5) - y) * t_1; elseif (t <= 5.3e+135) tmp = t_1 * (y * (-1.0 + ((x * 0.5) / y))); else tmp = (t_1 * (y * y)) / (0.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 2e-5], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t, 5.3e+135], N[(t$95$1 * N[(y * N[(-1.0 + N[(N[(x * 0.5), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[(y * y), $MachinePrecision]), $MachinePrecision] / N[(0.0 - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 2 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{+135}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(-1 + \frac{x \cdot 0.5}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 \cdot \left(y \cdot y\right)}{0 - y}\\
\end{array}
\end{array}
if t < 2.00000000000000016e-5Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6469.9%
Simplified69.9%
if 2.00000000000000016e-5 < t < 5.30000000000000017e135Initial program 100.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6415.5%
Simplified15.5%
Taylor expanded in y around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6425.8%
Simplified25.8%
if 5.30000000000000017e135 < t Initial program 97.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6417.8%
Simplified17.8%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6412.3%
Simplified12.3%
sub0-negN/A
*-commutativeN/A
sub0-negN/A
flip--N/A
+-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6430.8%
Applied egg-rr30.8%
Final simplification59.0%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (* (- (* x 0.5) y) (+ 1.0 (* t (* t (+ 0.5 (* (* t t) 0.125))))))))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (t * (t * (0.5 + ((t * t) * 0.125))))));
}
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)) * (((x * 0.5d0) - y) * (1.0d0 + (t * (t * (0.5d0 + ((t * t) * 0.125d0))))))
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (t * (t * (0.5 + ((t * t) * 0.125))))));
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (t * (t * (0.5 + ((t * t) * 0.125))))))
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * Float64(1.0 + Float64(t * Float64(t * Float64(0.5 + Float64(Float64(t * t) * 0.125))))))) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * (((x * 0.5) - y) * (1.0 + (t * (t * (0.5 + ((t * t) * 0.125)))))); 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[(1.0 + N[(t * N[(t * N[(0.5 + N[(N[(t * t), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(1 + t \cdot \left(t \cdot \left(0.5 + \left(t \cdot t\right) \cdot 0.125\right)\right)\right)\right)
\end{array}
Initial program 99.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6495.0%
Simplified95.0%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (+ (* z 2.0) (* (* t t) (* z (+ 2.0 (* t t))))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) + ((t * t) * (z * (2.0 + (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) + ((t * t) * (z * (2.0d0 + (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) + ((t * t) * (z * (2.0 + (t * t))))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((z * 2.0) + ((t * t) * (z * (2.0 + (t * t))))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) + Float64(Float64(t * t) * Float64(z * Float64(2.0 + Float64(t * t))))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) + ((t * t) * (z * (2.0 + (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[(N[(t * t), $MachinePrecision] * N[(z * N[(2.0 + N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2 + \left(t \cdot t\right) \cdot \left(z \cdot \left(2 + t \cdot t\right)\right)}
\end{array}
Initial program 99.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
associate-*r*N/A
*-commutativeN/A
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
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
distribute-rgt-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6493.5%
Simplified93.5%
Final simplification93.5%
(FPCore (x y z t) :precision binary64 (if (<= t 2.75e-5) (* (- (* x 0.5) y) (sqrt (* z 2.0))) (* (* x 0.5) (sqrt (* (* z 2.0) (+ (* t t) 1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.75e-5) {
tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
} else {
tmp = (x * 0.5) * sqrt(((z * 2.0) * ((t * t) + 1.0)));
}
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) :: tmp
if (t <= 2.75d-5) then
tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
else
tmp = (x * 0.5d0) * sqrt(((z * 2.0d0) * ((t * t) + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.75e-5) {
tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
} else {
tmp = (x * 0.5) * Math.sqrt(((z * 2.0) * ((t * t) + 1.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 2.75e-5: tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0)) else: tmp = (x * 0.5) * math.sqrt(((z * 2.0) * ((t * t) + 1.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 2.75e-5) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))); else tmp = Float64(Float64(x * 0.5) * sqrt(Float64(Float64(z * 2.0) * Float64(Float64(t * t) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 2.75e-5) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); else tmp = (x * 0.5) * sqrt(((z * 2.0) * ((t * t) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 2.75e-5], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.75 \cdot 10^{-5}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \left(t \cdot t + 1\right)}\\
\end{array}
\end{array}
if t < 2.7500000000000001e-5Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6469.9%
Simplified69.9%
if 2.7500000000000001e-5 < t Initial program 98.5%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
associate-*r*N/A
*-commutativeN/A
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6467.9%
Simplified67.9%
Taylor expanded in x around inf
*-lowering-*.f6457.1%
Simplified57.1%
Final simplification66.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (sqrt (* z 2.0))) (t_2 (* t_1 (- 0.0 y)))) (if (<= y -1.06e-73) t_2 (if (<= y 1.05e+79) (* t_1 (* x 0.5)) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = t_1 * (0.0 - y);
double tmp;
if (y <= -1.06e-73) {
tmp = t_2;
} else if (y <= 1.05e+79) {
tmp = t_1 * (x * 0.5);
} else {
tmp = t_2;
}
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 = sqrt((z * 2.0d0))
t_2 = t_1 * (0.0d0 - y)
if (y <= (-1.06d-73)) then
tmp = t_2
else if (y <= 1.05d+79) then
tmp = t_1 * (x * 0.5d0)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double t_2 = t_1 * (0.0 - y);
double tmp;
if (y <= -1.06e-73) {
tmp = t_2;
} else if (y <= 1.05e+79) {
tmp = t_1 * (x * 0.5);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) t_2 = t_1 * (0.0 - y) tmp = 0 if y <= -1.06e-73: tmp = t_2 elif y <= 1.05e+79: tmp = t_1 * (x * 0.5) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = Float64(t_1 * Float64(0.0 - y)) tmp = 0.0 if (y <= -1.06e-73) tmp = t_2; elseif (y <= 1.05e+79) tmp = Float64(t_1 * Float64(x * 0.5)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); t_2 = t_1 * (0.0 - y); tmp = 0.0; if (y <= -1.06e-73) tmp = t_2; elseif (y <= 1.05e+79) tmp = t_1 * (x * 0.5); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(0.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e-73], t$95$2, If[LessEqual[y, 1.05e+79], N[(t$95$1 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := t\_1 \cdot \left(0 - y\right)\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+79}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.05999999999999997e-73 or 1.05000000000000004e79 < y Initial program 99.9%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6456.2%
Simplified56.2%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6448.2%
Simplified48.2%
sub0-negN/A
neg-lowering-neg.f6448.2%
Applied egg-rr48.2%
if -1.05999999999999997e-73 < y < 1.05000000000000004e79Initial program 99.0%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6455.4%
Simplified55.4%
Taylor expanded in x around inf
*-lowering-*.f6443.6%
Simplified43.6%
Final simplification45.9%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (* (- (* x 0.5) y) (+ (* 0.5 (* t t)) 1.0))))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.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 = sqrt((z * 2.0d0)) * (((x * 0.5d0) - y) * ((0.5d0 * (t * t)) + 1.0d0))
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.0));
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * (((x * 0.5) - y) * ((0.5 * (t * t)) + 1.0))
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * Float64(Float64(0.5 * Float64(t * t)) + 1.0))) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * (((x * 0.5) - y) * ((0.5 * (t * t)) + 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[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \left(0.5 \cdot \left(t \cdot t\right) + 1\right)\right)
\end{array}
Initial program 99.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.0%
Simplified89.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (sqrt (* z 2.0)))) (if (<= t 3.3e+65) (* (- (* x 0.5) y) t_1) (/ (* t_1 (* y y)) (- 0.0 y)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 3.3e+65) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = (t_1 * (y * y)) / (0.0 - y);
}
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 = sqrt((z * 2.0d0))
if (t <= 3.3d+65) then
tmp = ((x * 0.5d0) - y) * t_1
else
tmp = (t_1 * (y * y)) / (0.0d0 - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 3.3e+65) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = (t_1 * (y * y)) / (0.0 - y);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 3.3e+65: tmp = ((x * 0.5) - y) * t_1 else: tmp = (t_1 * (y * y)) / (0.0 - y) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 3.3e+65) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); else tmp = Float64(Float64(t_1 * Float64(y * y)) / Float64(0.0 - y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 3.3e+65) tmp = ((x * 0.5) - y) * t_1; else tmp = (t_1 * (y * y)) / (0.0 - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 3.3e+65], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(t$95$1 * N[(y * y), $MachinePrecision]), $MachinePrecision] / N[(0.0 - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1 \cdot \left(y \cdot y\right)}{0 - y}\\
\end{array}
\end{array}
if t < 3.30000000000000023e65Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6466.8%
Simplified66.8%
if 3.30000000000000023e65 < t Initial program 98.2%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6417.6%
Simplified17.6%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6411.6%
Simplified11.6%
sub0-negN/A
*-commutativeN/A
sub0-negN/A
flip--N/A
+-lft-identityN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f6429.7%
Applied egg-rr29.7%
Final simplification58.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (sqrt (* z 2.0)))) (if (<= t 3.1e-30) (* (- (* x 0.5) y) t_1) (* t_1 (* x (- 0.5 (/ y x)))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 3.1e-30) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = t_1 * (x * (0.5 - (y / x)));
}
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 = sqrt((z * 2.0d0))
if (t <= 3.1d-30) then
tmp = ((x * 0.5d0) - y) * t_1
else
tmp = t_1 * (x * (0.5d0 - (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 3.1e-30) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = t_1 * (x * (0.5 - (y / x)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 3.1e-30: tmp = ((x * 0.5) - y) * t_1 else: tmp = t_1 * (x * (0.5 - (y / x))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 3.1e-30) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); else tmp = Float64(t_1 * Float64(x * Float64(0.5 - Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 3.1e-30) tmp = ((x * 0.5) - y) * t_1; else tmp = t_1 * (x * (0.5 - (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 3.1e-30], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[(x * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 3.1 \cdot 10^{-30}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 - \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if t < 3.09999999999999991e-30Initial program 99.8%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.7%
Simplified99.7%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6468.9%
Simplified68.9%
if 3.09999999999999991e-30 < t Initial program 98.6%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6423.6%
Simplified23.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6432.4%
Simplified32.4%
Final simplification58.4%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (+ (* t t) 1.0)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * ((t * t) + 1.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) * ((t * t) + 1.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) * ((t * t) + 1.0)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((z * 2.0) * ((t * t) + 1.0)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * Float64(Float64(t * t) + 1.0)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * ((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[(N[(t * t), $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 \left(t \cdot t + 1\right)}
\end{array}
Initial program 99.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
associate-*r*N/A
*-commutativeN/A
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
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6483.9%
Simplified83.9%
(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.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6455.8%
Simplified55.8%
Final simplification55.8%
(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.4%
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
exp-lowering-exp.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in t around 0
--lowering--.f64N/A
*-lowering-*.f6455.8%
Simplified55.8%
Taylor expanded in x around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6431.1%
Simplified31.1%
sub0-negN/A
neg-lowering-neg.f6431.1%
Applied egg-rr31.1%
Final simplification31.1%
(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 2024155
(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))))