
(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 (* (* 2.0 z) (pow (exp t) t)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((2.0 * z) * 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(((2.0d0 * z) * (exp(t) ** t)))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((2.0 * z) * Math.pow(Math.exp(t), t)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((2.0 * z) * math.pow(math.exp(t), t)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * (exp(t) ^ t)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((2.0 * z) * (exp(t) ^ t))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $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(2 \cdot z\right) \cdot {\left(e^{t}\right)}^{t}}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
pow299.8%
exp-prod99.8%
Applied egg-rr99.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* 2.0 z) (exp (pow t 2.0))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((2.0 * z) * exp(pow(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(((2.0d0 * z) * exp((t ** 2.0d0))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((2.0 * z) * Math.exp(Math.pow(t, 2.0))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((2.0 * z) * math.exp(math.pow(t, 2.0))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * exp((t ^ 2.0))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((2.0 * z) * exp((t ^ 2.0)))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Exp[N[Power[t, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot e^{{t}^{2}}}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 3.15)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 1.85e+50)
(* t_1 (pow (* (pow z 2.0) 4.0) 0.25))
(if (or (<= t 8.5e+154) (not (<= t 1.9e+258)))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z))
(* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 3.15) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 1.85e+50) {
tmp = t_1 * pow((pow(z, 2.0) * 4.0), 0.25);
} else if ((t <= 8.5e+154) || !(t <= 1.9e+258)) {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
} else {
tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 3.15) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 1.85e+50) tmp = Float64(t_1 * (Float64((z ^ 2.0) * 4.0) ^ 0.25)); elseif ((t <= 8.5e+154) || !(t <= 1.9e+258)) tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); else tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 3.15], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+50], N[(t$95$1 * N[Power[N[(N[Power[z, 2.0], $MachinePrecision] * 4.0), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.5e+154], N[Not[LessEqual[t, 1.9e+258]], $MachinePrecision]], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 3.15:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+50}:\\
\;\;\;\;t\_1 \cdot {\left({z}^{2} \cdot 4\right)}^{0.25}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+154} \lor \neg \left(t \leq 1.9 \cdot 10^{+258}\right):\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if t < 3.14999999999999991Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 78.4%
if 3.14999999999999991 < t < 1.85e50Initial program 99.8%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.9%
Simplified99.9%
pow199.9%
sqrt-unprod99.9%
associate-*l*99.9%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 19.9%
sqrt-prod19.9%
pow1/219.9%
metadata-eval19.9%
pow-prod-up19.9%
pow-prod-down71.3%
swap-sqr71.3%
pow271.3%
metadata-eval71.3%
Applied egg-rr71.3%
if 1.85e50 < t < 8.5000000000000002e154 or 1.90000000000000004e258 < t Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 59.5%
+-commutative59.5%
unpow259.5%
fma-define59.5%
Simplified59.5%
Taylor expanded in t around inf 52.3%
if 8.5000000000000002e154 < t < 1.90000000000000004e258Initial program 94.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around inf 89.5%
Final simplification74.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* 2.0 z))))
(if (<= t 89.0)
(* t_1 t_2)
(if (<= t 86000000000.0)
(* (exp (/ (* t t) 2.0)) (* y t_2))
(if (or (<= t 5.9e+153) (not (<= t 9.5e+257)))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z))
(* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if (t <= 89.0) {
tmp = t_1 * t_2;
} else if (t <= 86000000000.0) {
tmp = exp(((t * t) / 2.0)) * (y * t_2);
} else if ((t <= 5.9e+153) || !(t <= 9.5e+257)) {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
} else {
tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 89.0) tmp = Float64(t_1 * t_2); elseif (t <= 86000000000.0) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * t_2)); elseif ((t <= 5.9e+153) || !(t <= 9.5e+257)) tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); else tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5)); end return 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[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 89.0], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t, 86000000000.0], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * t$95$2), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 5.9e+153], N[Not[LessEqual[t, 9.5e+257]], $MachinePrecision]], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 89:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;t \leq 86000000000:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot t\_2\right)\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+153} \lor \neg \left(t \leq 9.5 \cdot 10^{+257}\right):\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if t < 89Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 78.1%
if 89 < t < 8.6e10Initial program 100.0%
add-cbrt-cube50.0%
pow350.0%
unpow-prod-down50.0%
metadata-eval50.0%
Applied egg-rr50.0%
Taylor expanded in x around 0 0.0%
neg-mul-10.0%
Simplified0.0%
neg-sub00.0%
sub-neg0.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod50.0%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
+-lft-identity100.0%
Simplified100.0%
if 8.6e10 < t < 5.9000000000000002e153 or 9.50000000000000022e257 < t Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 55.5%
+-commutative55.5%
unpow255.5%
fma-define55.5%
Simplified55.5%
Taylor expanded in t around inf 47.5%
if 5.9000000000000002e153 < t < 9.50000000000000022e257Initial program 94.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around inf 89.5%
Final simplification73.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 89.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 2.7e+35)
(sqrt (* (* 2.0 z) (pow t_1 2.0)))
(if (or (<= t 5.2e+152) (not (<= t 6.2e+258)))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z))
(* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 89.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 2.7e+35) {
tmp = sqrt(((2.0 * z) * pow(t_1, 2.0)));
} else if ((t <= 5.2e+152) || !(t <= 6.2e+258)) {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
} else {
tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 89.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 2.7e+35) tmp = sqrt(Float64(Float64(2.0 * z) * (t_1 ^ 2.0))); elseif ((t <= 5.2e+152) || !(t <= 6.2e+258)) tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); else tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 89.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+35], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[t, 5.2e+152], N[Not[LessEqual[t, 6.2e+258]], $MachinePrecision]], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 89:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+35}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+152} \lor \neg \left(t \leq 6.2 \cdot 10^{+258}\right):\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if t < 89Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 78.1%
if 89 < t < 2.70000000000000003e35Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 4.3%
add-cbrt-cube24.9%
pow324.9%
unpow-prod-down24.9%
metadata-eval24.9%
*-commutative24.9%
add-sqr-sqrt13.6%
sqrt-unprod24.2%
*-commutative24.2%
*-commutative24.2%
*-commutative24.2%
*-commutative24.2%
Applied egg-rr24.4%
fma-neg24.4%
*-commutative24.4%
Simplified24.4%
if 2.70000000000000003e35 < t < 5.2000000000000001e152 or 6.1999999999999996e258 < t Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 59.2%
+-commutative59.2%
unpow259.2%
fma-define59.2%
Simplified59.2%
Taylor expanded in t around inf 52.4%
if 5.2000000000000001e152 < t < 6.1999999999999996e258Initial program 94.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around inf 89.5%
Final simplification72.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))) (t_2 (- (* x 0.5) y)))
(if (<= (* t t) 1e-9)
(* t_2 (* t_1 (hypot 1.0 t)))
(if (<= (* t t) 2e+293)
(* (exp (/ (* t t) 2.0)) (* 0.5 (* x t_1)))
(* t_2 (sqrt (* (* 2.0 z) (fma t t 1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double t_2 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 1e-9) {
tmp = t_2 * (t_1 * hypot(1.0, t));
} else if ((t * t) <= 2e+293) {
tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_1));
} else {
tmp = t_2 * sqrt(((2.0 * z) * fma(t, t, 1.0)));
}
return tmp;
}
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) t_2 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 1e-9) tmp = Float64(t_2 * Float64(t_1 * hypot(1.0, t))); elseif (Float64(t * t) <= 2e+293) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(0.5 * Float64(x * t_1))); else tmp = Float64(t_2 * sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 1e-9], N[(t$95$2 * N[(t$95$1 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 2e+293], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 10^{-9}:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+293}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\
\end{array}
\end{array}
if (*.f64 t t) < 1.00000000000000006e-9Initial program 99.6%
associate-*l*99.6%
exp-sqrt99.6%
exp-prod99.6%
Simplified99.6%
pow199.6%
sqrt-unprod99.6%
associate-*l*99.6%
pow-exp99.6%
pow299.6%
Applied egg-rr99.6%
unpow199.6%
associate-*r*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
+-commutative99.6%
unpow299.6%
fma-define99.6%
Simplified99.6%
sqrt-prod99.6%
Applied egg-rr99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
unpow299.6%
hypot-1-def99.6%
*-commutative99.6%
Simplified99.6%
if 1.00000000000000006e-9 < (*.f64 t t) < 1.9999999999999998e293Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around inf 70.9%
associate-*l*70.9%
*-commutative70.9%
unpow1/270.9%
metadata-eval70.9%
pow-sqr70.9%
unpow1/270.9%
metadata-eval70.9%
pow-sqr70.9%
unswap-sqr70.9%
exp-to-pow70.9%
exp-to-pow70.9%
exp-sum70.9%
distribute-rgt-in70.9%
+-commutative70.9%
*-commutative70.9%
exp-prod70.9%
exp-sum70.9%
rem-exp-log70.9%
rem-exp-log70.9%
exp-to-pow70.9%
exp-to-pow70.9%
Simplified70.9%
if 1.9999999999999998e293 < (*.f64 t t) Initial program 97.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 98.6%
+-commutative98.6%
unpow298.6%
fma-define98.6%
Simplified98.6%
Final simplification93.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* 2.0 z))))
(if (<= t 5.0)
(* t_1 (* t_2 (hypot 1.0 t)))
(if (<= t 1.32e+154)
(* (exp (/ (* t t) 2.0)) (* y (- t_2)))
(if (<= t 6.5e+258)
(* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if (t <= 5.0) {
tmp = t_1 * (t_2 * hypot(1.0, t));
} else if (t <= 1.32e+154) {
tmp = exp(((t * t) / 2.0)) * (y * -t_2);
} else if (t <= 6.5e+258) {
tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
} else {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 5.0) tmp = Float64(t_1 * Float64(t_2 * hypot(1.0, t))); elseif (t <= 1.32e+154) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * Float64(-t_2))); elseif (t <= 6.5e+258) tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5)); else tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); end return 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[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 5.0], N[(t$95$1 * N[(t$95$2 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e+154], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * (-t$95$2)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+258], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 5:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-t\_2\right)\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+258}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\end{array}
\end{array}
if t < 5Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 92.5%
+-commutative92.5%
unpow292.5%
fma-define92.5%
Simplified92.5%
sqrt-prod92.0%
Applied egg-rr92.0%
*-commutative92.0%
fma-undefine92.0%
unpow292.0%
+-commutative92.0%
unpow292.0%
hypot-1-def87.4%
*-commutative87.4%
Simplified87.4%
if 5 < t < 1.31999999999999998e154Initial program 100.0%
add-cbrt-cube91.4%
pow391.4%
unpow-prod-down91.4%
metadata-eval91.4%
Applied egg-rr91.4%
Taylor expanded in x around 0 71.4%
neg-mul-171.4%
Simplified71.4%
if 1.31999999999999998e154 < t < 6.50000000000000005e258Initial program 94.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around inf 89.5%
if 6.50000000000000005e258 < t Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 84.2%
Final simplification85.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* 2.0 z))))
(if (<= t 4.8)
(* t_1 t_2)
(if (<= t 5e+151)
(* (exp (/ (* t t) 2.0)) (* y (- t_2)))
(if (<= t 8e+257)
(* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if (t <= 4.8) {
tmp = t_1 * t_2;
} else if (t <= 5e+151) {
tmp = exp(((t * t) / 2.0)) * (y * -t_2);
} else if (t <= 8e+257) {
tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
} else {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 4.8) tmp = Float64(t_1 * t_2); elseif (t <= 5e+151) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * Float64(-t_2))); elseif (t <= 8e+257) tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5)); else tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); end return 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[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 4.8], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t, 5e+151], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * (-t$95$2)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+257], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 4.8:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+151}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-t\_2\right)\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+257}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\end{array}
\end{array}
if t < 4.79999999999999982Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 78.1%
if 4.79999999999999982 < t < 5.0000000000000002e151Initial program 100.0%
add-cbrt-cube91.4%
pow391.4%
unpow-prod-down91.4%
metadata-eval91.4%
Applied egg-rr91.4%
Taylor expanded in x around 0 71.4%
neg-mul-171.4%
Simplified71.4%
if 5.0000000000000002e151 < t < 8.00000000000000024e257Initial program 94.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in x around inf 89.5%
if 8.00000000000000024e257 < t Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 84.2%
Final simplification78.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* 2.0 z))))
(if (<= t 0.37)
(* t_1 (* t_2 (hypot 1.0 t)))
(if (<= t 4.6e+258)
(* (exp (/ (* t t) 2.0)) (* 0.5 (* x t_2)))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if (t <= 0.37) {
tmp = t_1 * (t_2 * hypot(1.0, t));
} else if (t <= 4.6e+258) {
tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_2));
} else {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = Math.sqrt((2.0 * z));
double tmp;
if (t <= 0.37) {
tmp = t_1 * (t_2 * Math.hypot(1.0, t));
} else if (t <= 4.6e+258) {
tmp = Math.exp(((t * t) / 2.0)) * (0.5 * (x * t_2));
} else {
tmp = (t * (t_1 * Math.sqrt(2.0))) * Math.sqrt(z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y t_2 = math.sqrt((2.0 * z)) tmp = 0 if t <= 0.37: tmp = t_1 * (t_2 * math.hypot(1.0, t)) elif t <= 4.6e+258: tmp = math.exp(((t * t) / 2.0)) * (0.5 * (x * t_2)) else: tmp = (t * (t_1 * math.sqrt(2.0))) * math.sqrt(z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 0.37) tmp = Float64(t_1 * Float64(t_2 * hypot(1.0, t))); elseif (t <= 4.6e+258) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(0.5 * Float64(x * t_2))); else tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; t_2 = sqrt((2.0 * z)); tmp = 0.0; if (t <= 0.37) tmp = t_1 * (t_2 * hypot(1.0, t)); elseif (t <= 4.6e+258) tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_2)); else tmp = (t * (t_1 * sqrt(2.0))) * 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[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.37], N[(t$95$1 * N[(t$95$2 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+258], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.5 * N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 0.37:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+258}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot t\_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\end{array}
\end{array}
if t < 0.37Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 92.9%
+-commutative92.9%
unpow292.9%
fma-define92.9%
Simplified92.9%
sqrt-prod92.4%
Applied egg-rr92.4%
*-commutative92.4%
fma-undefine92.4%
unpow292.4%
+-commutative92.4%
unpow292.4%
hypot-1-def87.7%
*-commutative87.7%
Simplified87.7%
if 0.37 < t < 4.6000000000000002e258Initial program 98.2%
Taylor expanded in z around 0 98.2%
Taylor expanded in x around inf 71.4%
associate-*l*71.4%
*-commutative71.4%
unpow1/271.4%
metadata-eval71.4%
pow-sqr71.4%
unpow1/271.4%
metadata-eval71.4%
pow-sqr71.4%
unswap-sqr71.4%
exp-to-pow71.4%
exp-to-pow71.4%
exp-sum71.4%
distribute-rgt-in71.4%
+-commutative71.4%
*-commutative71.4%
exp-prod71.4%
exp-sum71.4%
rem-exp-log71.4%
rem-exp-log71.4%
exp-to-pow71.4%
exp-to-pow71.4%
Simplified71.4%
if 4.6000000000000002e258 < t Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
+-commutative100.0%
unpow2100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in t around inf 84.2%
Final simplification83.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 89.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 2.8e+39)
(sqrt (* (* 2.0 z) (pow t_1 2.0)))
(* (sqrt (* (* 2.0 z) (fma t t 1.0))) (* x 0.5))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 89.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 2.8e+39) {
tmp = sqrt(((2.0 * z) * pow(t_1, 2.0)));
} else {
tmp = sqrt(((2.0 * z) * fma(t, t, 1.0))) * (x * 0.5);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 89.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 2.8e+39) tmp = sqrt(Float64(Float64(2.0 * z) * (t_1 ^ 2.0))); else tmp = Float64(sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))) * Float64(x * 0.5)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 89.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+39], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 89:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+39}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)} \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if t < 89Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 78.1%
if 89 < t < 2.80000000000000001e39Initial program 100.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 4.3%
add-cbrt-cube24.9%
pow324.9%
unpow-prod-down24.9%
metadata-eval24.9%
*-commutative24.9%
add-sqr-sqrt13.6%
sqrt-unprod24.2%
*-commutative24.2%
*-commutative24.2%
*-commutative24.2%
*-commutative24.2%
Applied egg-rr24.4%
fma-neg24.4%
*-commutative24.4%
Simplified24.4%
if 2.80000000000000001e39 < t Initial program 98.4%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 71.5%
+-commutative71.5%
unpow271.5%
fma-define71.5%
Simplified71.5%
Taylor expanded in x around inf 55.2%
Final simplification70.6%
(FPCore (x y z t) :precision binary64 (if (<= t 8e+54) (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (* y (- (sqrt (* (* 2.0 z) (fma t t 1.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 8e+54) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else {
tmp = y * -sqrt(((2.0 * z) * fma(t, t, 1.0)));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= 8e+54) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); else tmp = Float64(y * Float64(-sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0))))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, 8e+54], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8 \cdot 10^{+54}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-\sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\right)\\
\end{array}
\end{array}
if t < 8.0000000000000006e54Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 74.1%
if 8.0000000000000006e54 < t Initial program 98.3%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 73.2%
+-commutative73.2%
unpow273.2%
fma-define73.2%
Simplified73.2%
Taylor expanded in x around 0 54.1%
mul-1-neg54.1%
Simplified54.1%
Final simplification69.4%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z)));
}
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 = exp(((t * t) / 2.0d0)) * (((x * 0.5d0) - y) * sqrt((2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return Math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * Math.sqrt((2.0 * z)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((2.0 * z)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Initial program 99.0%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (<= t 4.5)
(* (- (* x 0.5) y) t_1)
(* t_1 (* y (+ (* 0.5 (/ x y)) -1.0))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if (t <= 4.5) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = t_1 * (y * ((0.5 * (x / y)) + -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) :: t_1
real(8) :: tmp
t_1 = sqrt((2.0d0 * z))
if (t <= 4.5d0) then
tmp = ((x * 0.5d0) - y) * t_1
else
tmp = t_1 * (y * ((0.5d0 * (x / y)) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((2.0 * z));
double tmp;
if (t <= 4.5) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if t <= 4.5: tmp = ((x * 0.5) - y) * t_1 else: tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0)) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 4.5) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); else tmp = Float64(t_1 * Float64(y * Float64(Float64(0.5 * Float64(x / y)) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); tmp = 0.0; if (t <= 4.5) tmp = ((x * 0.5) - y) * t_1; else tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 4.5], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[(y * N[(N[(0.5 * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 4.5:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(0.5 \cdot \frac{x}{y} + -1\right)\right)\\
\end{array}
\end{array}
if t < 4.5Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 78.0%
if 4.5 < t Initial program 98.6%
Taylor expanded in t around 0 15.8%
add-cbrt-cube90.4%
pow390.4%
unpow-prod-down90.4%
metadata-eval90.4%
Applied egg-rr36.4%
Taylor expanded in y around inf 30.0%
Final simplification64.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (or (<= y -1.25e+110) (not (<= y 1.5e+110)))
(* y (- t_1))
(* 0.5 (* x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if ((y <= -1.25e+110) || !(y <= 1.5e+110)) {
tmp = y * -t_1;
} else {
tmp = 0.5 * (x * t_1);
}
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((2.0d0 * z))
if ((y <= (-1.25d+110)) .or. (.not. (y <= 1.5d+110))) then
tmp = y * -t_1
else
tmp = 0.5d0 * (x * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((2.0 * z));
double tmp;
if ((y <= -1.25e+110) || !(y <= 1.5e+110)) {
tmp = y * -t_1;
} else {
tmp = 0.5 * (x * t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if (y <= -1.25e+110) or not (y <= 1.5e+110): tmp = y * -t_1 else: tmp = 0.5 * (x * t_1) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if ((y <= -1.25e+110) || !(y <= 1.5e+110)) tmp = Float64(y * Float64(-t_1)); else tmp = Float64(0.5 * Float64(x * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); tmp = 0.0; if ((y <= -1.25e+110) || ~((y <= 1.5e+110))) tmp = y * -t_1; else tmp = 0.5 * (x * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y, -1.25e+110], N[Not[LessEqual[y, 1.5e+110]], $MachinePrecision]], N[(y * (-t$95$1)), $MachinePrecision], N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+110} \lor \neg \left(y \leq 1.5 \cdot 10^{+110}\right):\\
\;\;\;\;y \cdot \left(-t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot t\_1\right)\\
\end{array}
\end{array}
if y < -1.24999999999999995e110 or 1.50000000000000004e110 < y Initial program 99.8%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 73.6%
Taylor expanded in x around 0 64.7%
mul-1-neg64.7%
associate-*l*64.7%
*-commutative64.7%
unpow1/264.7%
metadata-eval64.7%
pow-sqr64.7%
unpow1/264.7%
metadata-eval64.7%
pow-sqr64.7%
unswap-sqr64.7%
exp-to-pow63.2%
exp-to-pow63.2%
exp-sum63.1%
distribute-rgt-in63.1%
+-commutative63.1%
*-commutative63.1%
exp-prod63.1%
exp-sum63.2%
rem-exp-log63.2%
rem-exp-log64.8%
exp-to-pow63.2%
exp-to-pow63.2%
Simplified64.9%
if -1.24999999999999995e110 < y < 1.50000000000000004e110Initial program 98.8%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 55.5%
Taylor expanded in x around inf 44.6%
associate-*l*75.3%
*-commutative75.3%
unpow1/275.3%
metadata-eval75.3%
pow-sqr75.4%
unpow1/275.4%
metadata-eval75.4%
pow-sqr75.3%
unswap-sqr75.3%
exp-to-pow73.7%
exp-to-pow73.7%
exp-sum73.4%
distribute-rgt-in73.4%
+-commutative73.4%
*-commutative73.4%
exp-prod73.4%
exp-sum73.7%
rem-exp-log73.7%
rem-exp-log75.4%
exp-to-pow73.7%
exp-to-pow73.7%
Simplified44.8%
Final simplification49.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (<= t 1100000.0)
(* (- (* 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((2.0 * z));
double tmp;
if (t <= 1100000.0) {
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((2.0d0 * z))
if (t <= 1100000.0d0) 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((2.0 * z));
double tmp;
if (t <= 1100000.0) {
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((2.0 * z)) tmp = 0 if t <= 1100000.0: 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(2.0 * z)) tmp = 0.0 if (t <= 1100000.0) 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((2.0 * z)); tmp = 0.0; if (t <= 1100000.0) 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[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1100000.0], 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{2 \cdot z}\\
\mathbf{if}\;t \leq 1100000:\\
\;\;\;\;\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 < 1.1e6Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 77.3%
if 1.1e6 < t Initial program 98.6%
Taylor expanded in t around 0 15.0%
add-cbrt-cube92.9%
pow392.9%
unpow-prod-down92.9%
metadata-eval92.9%
Applied egg-rr36.5%
Taylor expanded in x around inf 20.4%
mul-1-neg20.4%
unsub-neg20.4%
Simplified20.4%
Final simplification61.8%
(FPCore (x y z t) :precision binary64 (if (<= t 1.45e+57) (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (* y (/ (pow (* 2.0 z) 1.5) (* 2.0 (- z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.45e+57) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else {
tmp = y * (pow((2.0 * z), 1.5) / (2.0 * -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) :: tmp
if (t <= 1.45d+57) then
tmp = ((x * 0.5d0) - y) * sqrt((2.0d0 * z))
else
tmp = y * (((2.0d0 * z) ** 1.5d0) / (2.0d0 * -z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.45e+57) {
tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
} else {
tmp = y * (Math.pow((2.0 * z), 1.5) / (2.0 * -z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.45e+57: tmp = ((x * 0.5) - y) * math.sqrt((2.0 * z)) else: tmp = y * (math.pow((2.0 * z), 1.5) / (2.0 * -z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.45e+57) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); else tmp = Float64(y * Float64((Float64(2.0 * z) ^ 1.5) / Float64(2.0 * Float64(-z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.45e+57) tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); else tmp = y * (((2.0 * z) ^ 1.5) / (2.0 * -z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.45e+57], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * N[(N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision] / N[(2.0 * (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.45 \cdot 10^{+57}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{{\left(2 \cdot z\right)}^{1.5}}{2 \cdot \left(-z\right)}\\
\end{array}
\end{array}
if t < 1.4500000000000001e57Initial program 99.2%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.7%
associate-*l*99.7%
pow-exp99.7%
pow299.7%
Applied egg-rr99.7%
unpow199.7%
associate-*r*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 73.4%
if 1.4500000000000001e57 < t Initial program 98.3%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 15.5%
Taylor expanded in x around 0 11.0%
mul-1-neg11.0%
associate-*l*11.0%
*-commutative11.0%
unpow1/211.0%
metadata-eval11.0%
pow-sqr11.0%
unpow1/211.0%
metadata-eval11.0%
pow-sqr11.0%
unswap-sqr11.0%
exp-to-pow11.0%
exp-to-pow11.0%
exp-sum11.0%
distribute-rgt-in11.0%
+-commutative11.0%
*-commutative11.0%
exp-prod11.0%
exp-sum11.0%
rem-exp-log11.0%
rem-exp-log11.0%
exp-to-pow11.0%
exp-to-pow11.0%
Simplified11.0%
neg-sub011.0%
*-commutative11.0%
flip3--24.1%
metadata-eval24.1%
pow324.1%
add-sqr-sqrt24.1%
*-commutative24.1%
pow124.1%
pow1/224.1%
*-commutative24.1%
pow-prod-up24.1%
metadata-eval24.1%
metadata-eval24.1%
add-sqr-sqrt24.1%
*-commutative24.1%
*-commutative24.1%
Applied egg-rr24.1%
sub0-neg24.1%
*-commutative24.1%
+-lft-identity24.1%
mul0-lft24.1%
+-rgt-identity24.1%
*-commutative24.1%
Simplified24.1%
Final simplification62.2%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* 2.0 z))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * z));
}
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((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 60.3%
(FPCore (x y z t) :precision binary64 (* (sqrt (* 2.0 z)) (- y)))
double code(double x, double y, double z, double t) {
return sqrt((2.0 * z)) * -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((2.0d0 * z)) * -y
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((2.0 * z)) * -y;
}
def code(x, y, z, t): return math.sqrt((2.0 * z)) * -y
function code(x, y, z, t) return Float64(sqrt(Float64(2.0 * z)) * Float64(-y)) end
function tmp = code(x, y, z, t) tmp = sqrt((2.0 * z)) * -y; end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot z} \cdot \left(-y\right)
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 60.1%
Taylor expanded in x around 0 25.4%
mul-1-neg25.4%
associate-*l*25.4%
*-commutative25.4%
unpow1/225.4%
metadata-eval25.4%
pow-sqr25.4%
unpow1/225.4%
metadata-eval25.4%
pow-sqr25.4%
unswap-sqr25.4%
exp-to-pow24.6%
exp-to-pow24.6%
exp-sum24.6%
distribute-rgt-in24.6%
+-commutative24.6%
*-commutative24.6%
exp-prod24.6%
exp-sum24.6%
rem-exp-log24.6%
rem-exp-log25.4%
exp-to-pow24.6%
exp-to-pow24.6%
Simplified25.5%
Final simplification25.5%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* 2.0 z))))
double code(double x, double y, double z, double t) {
return y * sqrt((2.0 * z));
}
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 = y * sqrt((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return y * math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(y * sqrt(Float64(2.0 * z))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{2 \cdot z}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 60.1%
Taylor expanded in x around 0 25.4%
mul-1-neg25.4%
associate-*l*25.4%
*-commutative25.4%
unpow1/225.4%
metadata-eval25.4%
pow-sqr25.4%
unpow1/225.4%
metadata-eval25.4%
pow-sqr25.4%
unswap-sqr25.4%
exp-to-pow24.6%
exp-to-pow24.6%
exp-sum24.6%
distribute-rgt-in24.6%
+-commutative24.6%
*-commutative24.6%
exp-prod24.6%
exp-sum24.6%
rem-exp-log24.6%
rem-exp-log25.4%
exp-to-pow24.6%
exp-to-pow24.6%
Simplified25.5%
*-commutative25.5%
distribute-rgt-neg-in25.5%
distribute-lft-neg-out25.5%
add-sqr-sqrt11.4%
sqrt-unprod11.6%
sqr-neg11.6%
sqrt-unprod0.9%
add-sqr-sqrt1.9%
pow11.9%
*-commutative1.9%
Applied egg-rr1.9%
unpow11.9%
*-commutative1.9%
Simplified1.9%
Final simplification1.9%
(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 2024116
(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))))