
(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 15 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 (* (pow (exp t) (* 0.5 t)) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
return pow(exp(t), (0.5 * t)) * (((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 = (exp(t) ** (0.5d0 * t)) * (((x * 0.5d0) - y) * sqrt((z * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return Math.pow(Math.exp(t), (0.5 * t)) * (((x * 0.5) - y) * Math.sqrt((z * 2.0)));
}
def code(x, y, z, t): return math.pow(math.exp(t), (0.5 * t)) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
function code(x, y, z, t) return Float64((exp(t) ^ Float64(0.5 * t)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = (exp(t) ^ (0.5 * t)) * (((x * 0.5) - y) * sqrt((z * 2.0))); end
code[x_, y_, z_, t_] := N[(N[Power[N[Exp[t], $MachinePrecision], N[(0.5 * t), $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(e^{t}\right)}^{\left(0.5 \cdot t\right)} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.8%
exp-sqrt99.4%
pow-exp99.4%
pow1/299.4%
pow-pow99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y))
(t_2 (sqrt (* (* z 2.0) (* t_1 t_1))))
(t_3 (sqrt (* z 2.0))))
(if (<= t 0.095)
(* t_1 t_3)
(if (<= t 2.8e+34)
t_2
(if (<= t 4.5e+86)
(* 0.5 (* x (cbrt (pow (* z 2.0) 1.5))))
(if (<= t 9.5e+123)
t_2
(if (<= t 7.4e+163)
(* (* t (* y (sqrt 2.0))) (- (sqrt z)))
(* 0.5 (* x (* t t_3))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt(((z * 2.0) * (t_1 * t_1)));
double t_3 = sqrt((z * 2.0));
double tmp;
if (t <= 0.095) {
tmp = t_1 * t_3;
} else if (t <= 2.8e+34) {
tmp = t_2;
} else if (t <= 4.5e+86) {
tmp = 0.5 * (x * cbrt(pow((z * 2.0), 1.5)));
} else if (t <= 9.5e+123) {
tmp = t_2;
} else if (t <= 7.4e+163) {
tmp = (t * (y * sqrt(2.0))) * -sqrt(z);
} else {
tmp = 0.5 * (x * (t * t_3));
}
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(((z * 2.0) * (t_1 * t_1)));
double t_3 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 0.095) {
tmp = t_1 * t_3;
} else if (t <= 2.8e+34) {
tmp = t_2;
} else if (t <= 4.5e+86) {
tmp = 0.5 * (x * Math.cbrt(Math.pow((z * 2.0), 1.5)));
} else if (t <= 9.5e+123) {
tmp = t_2;
} else if (t <= 7.4e+163) {
tmp = (t * (y * Math.sqrt(2.0))) * -Math.sqrt(z);
} else {
tmp = 0.5 * (x * (t * t_3));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(Float64(z * 2.0) * Float64(t_1 * t_1))) t_3 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 0.095) tmp = Float64(t_1 * t_3); elseif (t <= 2.8e+34) tmp = t_2; elseif (t <= 4.5e+86) tmp = Float64(0.5 * Float64(x * cbrt((Float64(z * 2.0) ^ 1.5)))); elseif (t <= 9.5e+123) tmp = t_2; elseif (t <= 7.4e+163) tmp = Float64(Float64(t * Float64(y * sqrt(2.0))) * Float64(-sqrt(z))); else tmp = Float64(0.5 * Float64(x * Float64(t * t_3))); 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[(N[(z * 2.0), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.095], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[t, 2.8e+34], t$95$2, If[LessEqual[t, 4.5e+86], N[(0.5 * N[(x * N[Power[N[Power[N[(z * 2.0), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+123], t$95$2, If[LessEqual[t, 7.4e+163], N[(N[(t * N[(y * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-N[Sqrt[z], $MachinePrecision])), $MachinePrecision], N[(0.5 * N[(x * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{\left(z \cdot 2\right) \cdot \left(t\_1 \cdot t\_1\right)}\\
t_3 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 0.095:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+86}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{1.5}}\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+123}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{+163}:\\
\;\;\;\;\left(t \cdot \left(y \cdot \sqrt{2}\right)\right) \cdot \left(-\sqrt{z}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \left(t \cdot t\_3\right)\right)\\
\end{array}
\end{array}
if t < 0.095000000000000001Initial program 99.7%
exp-sqrt99.7%
pow-exp99.7%
pow1/299.7%
pow-pow99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
sqrt-prod72.0%
sub-neg72.0%
distribute-rgt-in70.4%
*-commutative70.4%
*-commutative70.4%
Applied egg-rr70.4%
distribute-rgt-out72.0%
sub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 0.095000000000000001 < t < 2.80000000000000008e34 or 4.49999999999999993e86 < t < 9.4999999999999996e123Initial program 99.4%
exp-sqrt94.9%
pow-exp94.9%
pow1/294.9%
pow-pow99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 11.0%
associate-*r*11.0%
sqrt-prod11.0%
*-commutative11.0%
*-commutative11.0%
add-sqr-sqrt10.0%
sqrt-unprod39.8%
*-commutative39.8%
sub-neg39.8%
*-commutative39.8%
sub-neg39.8%
*-commutative39.8%
sub-neg39.8%
*-commutative39.8%
sub-neg39.8%
Applied egg-rr54.9%
Applied egg-rr54.9%
if 2.80000000000000008e34 < t < 4.49999999999999993e86Initial program 100.0%
Taylor expanded in x around inf 88.9%
*-commutative88.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in t around 0 14.5%
*-commutative14.5%
associate-*l*14.5%
*-commutative14.5%
Simplified14.5%
pow114.5%
*-commutative14.5%
*-commutative14.5%
associate-*l*14.5%
sqrt-prod14.5%
*-commutative14.5%
Applied egg-rr14.5%
unpow114.5%
Simplified14.5%
Taylor expanded in x around 0 14.5%
associate-*l*14.5%
Simplified14.5%
sqrt-unprod14.5%
*-commutative14.5%
pow1/214.5%
metadata-eval14.5%
pow-prod-up14.5%
pow214.5%
Applied egg-rr14.5%
pow-pow14.5%
metadata-eval14.5%
pow1/214.5%
add-cbrt-cube45.7%
add-sqr-sqrt45.7%
pow145.7%
pow1/245.7%
pow-prod-up45.7%
*-commutative45.7%
metadata-eval45.7%
Applied egg-rr45.7%
if 9.4999999999999996e123 < t < 7.39999999999999986e163Initial 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%
Simplified100.0%
Taylor expanded in t around 0 85.1%
+-commutative85.1%
unpow285.1%
fma-define85.1%
Simplified85.1%
Taylor expanded in t around inf 85.1%
Taylor expanded in x around 0 66.9%
if 7.39999999999999986e163 < 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%
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 100.0%
Taylor expanded in x around inf 54.6%
associate-*l*54.6%
*-commutative54.6%
Simplified54.6%
pow154.6%
*-commutative54.6%
*-commutative54.6%
associate-*r*54.6%
*-commutative54.6%
associate-*l*54.6%
sqrt-unprod54.6%
*-commutative54.6%
Applied egg-rr54.6%
unpow154.6%
associate-*r*54.6%
*-commutative54.6%
associate-*l*58.1%
*-commutative58.1%
Simplified58.1%
Final simplification68.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 0.095)
(* t_1 (* (hypot 1.0 t) (sqrt (* z 2.0))))
(if (or (<= t 9.4e+33) (and (not (<= t 7.4e+89)) (<= t 1.5e+111)))
(sqrt (* (* z 2.0) (* t_1 t_1)))
(* t_1 (sqrt (* 2.0 (* z (pow t 2.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 0.095) {
tmp = t_1 * (hypot(1.0, t) * sqrt((z * 2.0)));
} else if ((t <= 9.4e+33) || (!(t <= 7.4e+89) && (t <= 1.5e+111))) {
tmp = sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = t_1 * sqrt((2.0 * (z * pow(t, 2.0))));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 0.095) {
tmp = t_1 * (Math.hypot(1.0, t) * Math.sqrt((z * 2.0)));
} else if ((t <= 9.4e+33) || (!(t <= 7.4e+89) && (t <= 1.5e+111))) {
tmp = Math.sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = t_1 * Math.sqrt((2.0 * (z * Math.pow(t, 2.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 0.095: tmp = t_1 * (math.hypot(1.0, t) * math.sqrt((z * 2.0))) elif (t <= 9.4e+33) or (not (t <= 7.4e+89) and (t <= 1.5e+111)): tmp = math.sqrt(((z * 2.0) * (t_1 * t_1))) else: tmp = t_1 * math.sqrt((2.0 * (z * math.pow(t, 2.0)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 0.095) tmp = Float64(t_1 * Float64(hypot(1.0, t) * sqrt(Float64(z * 2.0)))); elseif ((t <= 9.4e+33) || (!(t <= 7.4e+89) && (t <= 1.5e+111))) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(t_1 * t_1))); else tmp = Float64(t_1 * sqrt(Float64(2.0 * Float64(z * (t ^ 2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 0.095) tmp = t_1 * (hypot(1.0, t) * sqrt((z * 2.0))); elseif ((t <= 9.4e+33) || (~((t <= 7.4e+89)) && (t <= 1.5e+111))) tmp = sqrt(((z * 2.0) * (t_1 * t_1))); else tmp = t_1 * sqrt((2.0 * (z * (t ^ 2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 0.095], N[(t$95$1 * N[(N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 9.4e+33], And[N[Not[LessEqual[t, 7.4e+89]], $MachinePrecision], LessEqual[t, 1.5e+111]]], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 0.095:\\
\;\;\;\;t\_1 \cdot \left(\mathsf{hypot}\left(1, t\right) \cdot \sqrt{z \cdot 2}\right)\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{+33} \lor \neg \left(t \leq 7.4 \cdot 10^{+89}\right) \land t \leq 1.5 \cdot 10^{+111}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(t\_1 \cdot t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \left(z \cdot {t}^{2}\right)}\\
\end{array}
\end{array}
if t < 0.095000000000000001Initial program 99.7%
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%
Simplified99.7%
Taylor expanded in t around 0 89.5%
+-commutative89.5%
unpow289.5%
fma-define89.5%
Simplified89.5%
associate-*r*89.5%
*-commutative89.5%
sqrt-prod86.1%
*-commutative86.1%
Applied egg-rr86.1%
fma-undefine86.1%
unpow286.1%
+-commutative86.1%
unpow286.1%
hypot-1-def79.3%
Simplified79.3%
if 0.095000000000000001 < t < 9.3999999999999996e33 or 7.3999999999999996e89 < t < 1.5e111Initial program 99.3%
exp-sqrt94.0%
pow-exp94.0%
pow1/294.0%
pow-pow99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 12.0%
associate-*r*12.0%
sqrt-prod12.0%
*-commutative12.0%
*-commutative12.0%
add-sqr-sqrt10.8%
sqrt-unprod34.6%
*-commutative34.6%
sub-neg34.6%
*-commutative34.6%
sub-neg34.6%
*-commutative34.6%
sub-neg34.6%
*-commutative34.6%
sub-neg34.6%
Applied egg-rr52.5%
Applied egg-rr52.5%
if 9.3999999999999996e33 < t < 7.3999999999999996e89 or 1.5e111 < 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%
Simplified100.0%
Taylor expanded in t around 0 85.5%
+-commutative85.5%
unpow285.5%
fma-define85.5%
Simplified85.5%
Taylor expanded in t around inf 85.5%
Final simplification78.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y))
(t_2 (sqrt (* (* z 2.0) (* t_1 t_1))))
(t_3 (sqrt (* z 2.0))))
(if (<= t 0.095)
(* t_1 t_3)
(if (<= t 1.35e+34)
t_2
(if (<= t 1.1e+87)
(* 0.5 (* x (cbrt (pow (* z 2.0) 1.5))))
(if (<= t 1.8e+181) t_2 (* 0.5 (* x (* t t_3)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt(((z * 2.0) * (t_1 * t_1)));
double t_3 = sqrt((z * 2.0));
double tmp;
if (t <= 0.095) {
tmp = t_1 * t_3;
} else if (t <= 1.35e+34) {
tmp = t_2;
} else if (t <= 1.1e+87) {
tmp = 0.5 * (x * cbrt(pow((z * 2.0), 1.5)));
} else if (t <= 1.8e+181) {
tmp = t_2;
} else {
tmp = 0.5 * (x * (t * t_3));
}
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(((z * 2.0) * (t_1 * t_1)));
double t_3 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 0.095) {
tmp = t_1 * t_3;
} else if (t <= 1.35e+34) {
tmp = t_2;
} else if (t <= 1.1e+87) {
tmp = 0.5 * (x * Math.cbrt(Math.pow((z * 2.0), 1.5)));
} else if (t <= 1.8e+181) {
tmp = t_2;
} else {
tmp = 0.5 * (x * (t * t_3));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(Float64(z * 2.0) * Float64(t_1 * t_1))) t_3 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 0.095) tmp = Float64(t_1 * t_3); elseif (t <= 1.35e+34) tmp = t_2; elseif (t <= 1.1e+87) tmp = Float64(0.5 * Float64(x * cbrt((Float64(z * 2.0) ^ 1.5)))); elseif (t <= 1.8e+181) tmp = t_2; else tmp = Float64(0.5 * Float64(x * Float64(t * t_3))); 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[(N[(z * 2.0), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.095], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[t, 1.35e+34], t$95$2, If[LessEqual[t, 1.1e+87], N[(0.5 * N[(x * N[Power[N[Power[N[(z * 2.0), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+181], t$95$2, N[(0.5 * N[(x * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{\left(z \cdot 2\right) \cdot \left(t\_1 \cdot t\_1\right)}\\
t_3 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 0.095:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+87}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(z \cdot 2\right)}^{1.5}}\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+181}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \left(t \cdot t\_3\right)\right)\\
\end{array}
\end{array}
if t < 0.095000000000000001Initial program 99.7%
exp-sqrt99.7%
pow-exp99.7%
pow1/299.7%
pow-pow99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
sqrt-prod72.0%
sub-neg72.0%
distribute-rgt-in70.4%
*-commutative70.4%
*-commutative70.4%
Applied egg-rr70.4%
distribute-rgt-out72.0%
sub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 0.095000000000000001 < t < 1.35e34 or 1.1e87 < t < 1.79999999999999992e181Initial program 99.6%
exp-sqrt96.8%
pow-exp96.8%
pow1/296.8%
pow-pow99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 15.3%
associate-*r*15.3%
sqrt-prod15.3%
*-commutative15.3%
*-commutative15.3%
add-sqr-sqrt13.7%
sqrt-unprod42.0%
*-commutative42.0%
sub-neg42.0%
*-commutative42.0%
sub-neg42.0%
*-commutative42.0%
sub-neg42.0%
*-commutative42.0%
sub-neg42.0%
Applied egg-rr51.6%
Applied egg-rr51.6%
if 1.35e34 < t < 1.1e87Initial program 100.0%
Taylor expanded in x around inf 88.9%
*-commutative88.9%
associate-*l*88.9%
Simplified88.9%
Taylor expanded in t around 0 14.5%
*-commutative14.5%
associate-*l*14.5%
*-commutative14.5%
Simplified14.5%
pow114.5%
*-commutative14.5%
*-commutative14.5%
associate-*l*14.5%
sqrt-prod14.5%
*-commutative14.5%
Applied egg-rr14.5%
unpow114.5%
Simplified14.5%
Taylor expanded in x around 0 14.5%
associate-*l*14.5%
Simplified14.5%
sqrt-unprod14.5%
*-commutative14.5%
pow1/214.5%
metadata-eval14.5%
pow-prod-up14.5%
pow214.5%
Applied egg-rr14.5%
pow-pow14.5%
metadata-eval14.5%
pow1/214.5%
add-cbrt-cube45.7%
add-sqr-sqrt45.7%
pow145.7%
pow1/245.7%
pow-prod-up45.7%
*-commutative45.7%
metadata-eval45.7%
Applied egg-rr45.7%
if 1.79999999999999992e181 < 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%
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 100.0%
Taylor expanded in x around inf 57.6%
associate-*l*57.6%
*-commutative57.6%
Simplified57.6%
pow157.6%
*-commutative57.6%
*-commutative57.6%
associate-*r*57.6%
*-commutative57.6%
associate-*l*57.6%
sqrt-unprod57.6%
*-commutative57.6%
Applied egg-rr57.6%
unpow157.6%
associate-*r*57.6%
*-commutative57.6%
associate-*l*61.8%
*-commutative61.8%
Simplified61.8%
Final simplification67.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 0.095)
(* t_1 (sqrt (* z 2.0)))
(if (<= t 6.4e+33)
(sqrt (* (* z 2.0) (* t_1 t_1)))
(* t_1 (sqrt (* 2.0 (* z (pow t 2.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 0.095) {
tmp = t_1 * sqrt((z * 2.0));
} else if (t <= 6.4e+33) {
tmp = sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = t_1 * sqrt((2.0 * (z * pow(t, 2.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 = (x * 0.5d0) - y
if (t <= 0.095d0) then
tmp = t_1 * sqrt((z * 2.0d0))
else if (t <= 6.4d+33) then
tmp = sqrt(((z * 2.0d0) * (t_1 * t_1)))
else
tmp = t_1 * sqrt((2.0d0 * (z * (t ** 2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 0.095) {
tmp = t_1 * Math.sqrt((z * 2.0));
} else if (t <= 6.4e+33) {
tmp = Math.sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = t_1 * Math.sqrt((2.0 * (z * Math.pow(t, 2.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 0.095: tmp = t_1 * math.sqrt((z * 2.0)) elif t <= 6.4e+33: tmp = math.sqrt(((z * 2.0) * (t_1 * t_1))) else: tmp = t_1 * math.sqrt((2.0 * (z * math.pow(t, 2.0)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 0.095) tmp = Float64(t_1 * sqrt(Float64(z * 2.0))); elseif (t <= 6.4e+33) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(t_1 * t_1))); else tmp = Float64(t_1 * sqrt(Float64(2.0 * Float64(z * (t ^ 2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 0.095) tmp = t_1 * sqrt((z * 2.0)); elseif (t <= 6.4e+33) tmp = sqrt(((z * 2.0) * (t_1 * t_1))); else tmp = t_1 * sqrt((2.0 * (z * (t ^ 2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 0.095], N[(t$95$1 * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e+33], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(2.0 * N[(z * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 0.095:\\
\;\;\;\;t\_1 \cdot \sqrt{z \cdot 2}\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{+33}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(t\_1 \cdot t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot \left(z \cdot {t}^{2}\right)}\\
\end{array}
\end{array}
if t < 0.095000000000000001Initial program 99.7%
exp-sqrt99.7%
pow-exp99.7%
pow1/299.7%
pow-pow99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
sqrt-prod72.0%
sub-neg72.0%
distribute-rgt-in70.4%
*-commutative70.4%
*-commutative70.4%
Applied egg-rr70.4%
distribute-rgt-out72.0%
sub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 0.095000000000000001 < t < 6.40000000000000034e33Initial program 98.7%
exp-sqrt89.3%
pow-exp89.3%
pow1/289.3%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 18.1%
associate-*r*18.1%
sqrt-prod18.1%
*-commutative18.1%
*-commutative18.1%
add-sqr-sqrt17.1%
sqrt-unprod38.1%
*-commutative38.1%
sub-neg38.1%
*-commutative38.1%
sub-neg38.1%
*-commutative38.1%
sub-neg38.1%
*-commutative38.1%
sub-neg38.1%
Applied egg-rr48.7%
Applied egg-rr48.7%
if 6.40000000000000034e33 < 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%
Simplified100.0%
Taylor expanded in t around 0 76.8%
+-commutative76.8%
unpow276.8%
fma-define76.8%
Simplified76.8%
Taylor expanded in t around inf 76.8%
Final simplification72.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 0.095)
(* t_1 (sqrt (* z 2.0)))
(if (<= t 1.75e+34)
(sqrt (* (* z 2.0) (* t_1 t_1)))
(* (* 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 tmp;
if (t <= 0.095) {
tmp = t_1 * sqrt((z * 2.0));
} else if (t <= 1.75e+34) {
tmp = sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 0.095d0) then
tmp = t_1 * sqrt((z * 2.0d0))
else if (t <= 1.75d+34) then
tmp = sqrt(((z * 2.0d0) * (t_1 * t_1)))
else
tmp = (t * (t_1 * sqrt(2.0d0))) * sqrt(z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 0.095) {
tmp = t_1 * Math.sqrt((z * 2.0));
} else if (t <= 1.75e+34) {
tmp = Math.sqrt(((z * 2.0) * (t_1 * t_1)));
} 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 tmp = 0 if t <= 0.095: tmp = t_1 * math.sqrt((z * 2.0)) elif t <= 1.75e+34: tmp = math.sqrt(((z * 2.0) * (t_1 * t_1))) 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) tmp = 0.0 if (t <= 0.095) tmp = Float64(t_1 * sqrt(Float64(z * 2.0))); elseif (t <= 1.75e+34) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(t_1 * t_1))); 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; tmp = 0.0; if (t <= 0.095) tmp = t_1 * sqrt((z * 2.0)); elseif (t <= 1.75e+34) tmp = sqrt(((z * 2.0) * (t_1 * t_1))); 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]}, If[LessEqual[t, 0.095], N[(t$95$1 * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+34], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t$95$1 * t$95$1), $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\\
\mathbf{if}\;t \leq 0.095:\\
\;\;\;\;t\_1 \cdot \sqrt{z \cdot 2}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+34}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(t\_1 \cdot t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\end{array}
\end{array}
if t < 0.095000000000000001Initial program 99.7%
exp-sqrt99.7%
pow-exp99.7%
pow1/299.7%
pow-pow99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
sqrt-prod72.0%
sub-neg72.0%
distribute-rgt-in70.4%
*-commutative70.4%
*-commutative70.4%
Applied egg-rr70.4%
distribute-rgt-out72.0%
sub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 0.095000000000000001 < t < 1.74999999999999999e34Initial program 98.7%
exp-sqrt89.3%
pow-exp89.3%
pow1/289.3%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 18.1%
associate-*r*18.1%
sqrt-prod18.1%
*-commutative18.1%
*-commutative18.1%
add-sqr-sqrt17.1%
sqrt-unprod38.1%
*-commutative38.1%
sub-neg38.1%
*-commutative38.1%
sub-neg38.1%
*-commutative38.1%
sub-neg38.1%
*-commutative38.1%
sub-neg38.1%
Applied egg-rr48.7%
Applied egg-rr48.7%
if 1.74999999999999999e34 < 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%
Simplified100.0%
Taylor expanded in t around 0 76.8%
+-commutative76.8%
unpow276.8%
fma-define76.8%
Simplified76.8%
Taylor expanded in t around inf 69.2%
Final simplification70.6%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((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 = exp(((t * t) / 2.0d0)) * (((x * 0.5d0) - y) * sqrt((z * 2.0d0)))
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((z * 2.0)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((z * 2.0))); 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[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* z (* 2.0 (fma t t 1.0))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((z * (2.0 * fma(t, t, 1.0))));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * Float64(2.0 * fma(t, t, 1.0))))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * N[(2.0 * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot \left(2 \cdot \mathsf{fma}\left(t, t, 1\right)\right)}
\end{array}
Initial program 99.8%
associate-*l*99.8%
exp-sqrt99.4%
exp-prod99.4%
Simplified99.4%
pow199.4%
sqrt-unprod99.4%
associate-*l*99.4%
pow-exp99.4%
pow299.4%
Applied egg-rr99.4%
unpow199.4%
Simplified99.4%
Taylor expanded in t around 0 84.8%
+-commutative84.8%
unpow284.8%
fma-define84.8%
Simplified84.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (or (<= y -1.55e-50)
(not
(or (<= y -3.1e-131)
(and (not (<= y -2.05e-140)) (<= y 1.15e-81)))))
(* t_1 (- y))
(* 0.5 (* x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if ((y <= -1.55e-50) || !((y <= -3.1e-131) || (!(y <= -2.05e-140) && (y <= 1.15e-81)))) {
tmp = t_1 * -y;
} 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((z * 2.0d0))
if ((y <= (-1.55d-50)) .or. (.not. (y <= (-3.1d-131)) .or. (.not. (y <= (-2.05d-140))) .and. (y <= 1.15d-81))) then
tmp = t_1 * -y
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((z * 2.0));
double tmp;
if ((y <= -1.55e-50) || !((y <= -3.1e-131) || (!(y <= -2.05e-140) && (y <= 1.15e-81)))) {
tmp = t_1 * -y;
} else {
tmp = 0.5 * (x * t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if (y <= -1.55e-50) or not ((y <= -3.1e-131) or (not (y <= -2.05e-140) and (y <= 1.15e-81))): tmp = t_1 * -y else: tmp = 0.5 * (x * t_1) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if ((y <= -1.55e-50) || !((y <= -3.1e-131) || (!(y <= -2.05e-140) && (y <= 1.15e-81)))) tmp = Float64(t_1 * Float64(-y)); else tmp = Float64(0.5 * Float64(x * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if ((y <= -1.55e-50) || ~(((y <= -3.1e-131) || (~((y <= -2.05e-140)) && (y <= 1.15e-81))))) tmp = t_1 * -y; else tmp = 0.5 * (x * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y, -1.55e-50], N[Not[Or[LessEqual[y, -3.1e-131], And[N[Not[LessEqual[y, -2.05e-140]], $MachinePrecision], LessEqual[y, 1.15e-81]]]], $MachinePrecision]], N[(t$95$1 * (-y)), $MachinePrecision], N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{-50} \lor \neg \left(y \leq -3.1 \cdot 10^{-131} \lor \neg \left(y \leq -2.05 \cdot 10^{-140}\right) \land y \leq 1.15 \cdot 10^{-81}\right):\\
\;\;\;\;t\_1 \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot t\_1\right)\\
\end{array}
\end{array}
if y < -1.5500000000000001e-50 or -3.10000000000000021e-131 < y < -2.0500000000000001e-140 or 1.14999999999999996e-81 < y Initial program 99.8%
exp-sqrt99.8%
pow-exp99.8%
pow1/299.8%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 59.0%
Taylor expanded in x around 0 41.8%
mul-1-neg41.8%
associate-*l*41.8%
*-commutative41.8%
distribute-rgt-neg-in41.8%
distribute-rgt-neg-in41.8%
Simplified41.8%
Applied egg-rr41.9%
if -1.5500000000000001e-50 < y < -3.10000000000000021e-131 or -2.0500000000000001e-140 < y < 1.14999999999999996e-81Initial program 99.6%
Taylor expanded in x around inf 89.0%
*-commutative89.0%
associate-*l*88.8%
Simplified88.8%
Taylor expanded in t around 0 52.8%
*-commutative52.8%
associate-*l*52.7%
*-commutative52.7%
Simplified52.7%
pow152.7%
*-commutative52.7%
*-commutative52.7%
associate-*l*52.7%
sqrt-prod52.8%
*-commutative52.8%
Applied egg-rr52.8%
unpow152.8%
Simplified52.8%
Final simplification45.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= y -1.3e-50)
(sqrt (* (* z 2.0) (* y (- y x))))
(if (<= y -5.2e-135)
(* 0.5 (* x t_1))
(if (or (<= y -2.05e-140) (not (<= y 3.1e-44)))
(* t_1 (- y))
(* (* x 0.5) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (y <= -1.3e-50) {
tmp = sqrt(((z * 2.0) * (y * (y - x))));
} else if (y <= -5.2e-135) {
tmp = 0.5 * (x * t_1);
} else if ((y <= -2.05e-140) || !(y <= 3.1e-44)) {
tmp = t_1 * -y;
} else {
tmp = (x * 0.5) * 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((z * 2.0d0))
if (y <= (-1.3d-50)) then
tmp = sqrt(((z * 2.0d0) * (y * (y - x))))
else if (y <= (-5.2d-135)) then
tmp = 0.5d0 * (x * t_1)
else if ((y <= (-2.05d-140)) .or. (.not. (y <= 3.1d-44))) then
tmp = t_1 * -y
else
tmp = (x * 0.5d0) * 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((z * 2.0));
double tmp;
if (y <= -1.3e-50) {
tmp = Math.sqrt(((z * 2.0) * (y * (y - x))));
} else if (y <= -5.2e-135) {
tmp = 0.5 * (x * t_1);
} else if ((y <= -2.05e-140) || !(y <= 3.1e-44)) {
tmp = t_1 * -y;
} else {
tmp = (x * 0.5) * t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if y <= -1.3e-50: tmp = math.sqrt(((z * 2.0) * (y * (y - x)))) elif y <= -5.2e-135: tmp = 0.5 * (x * t_1) elif (y <= -2.05e-140) or not (y <= 3.1e-44): tmp = t_1 * -y else: tmp = (x * 0.5) * t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (y <= -1.3e-50) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * Float64(y - x)))); elseif (y <= -5.2e-135) tmp = Float64(0.5 * Float64(x * t_1)); elseif ((y <= -2.05e-140) || !(y <= 3.1e-44)) tmp = Float64(t_1 * Float64(-y)); else tmp = Float64(Float64(x * 0.5) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (y <= -1.3e-50) tmp = sqrt(((z * 2.0) * (y * (y - x)))); elseif (y <= -5.2e-135) tmp = 0.5 * (x * t_1); elseif ((y <= -2.05e-140) || ~((y <= 3.1e-44))) tmp = t_1 * -y; else tmp = (x * 0.5) * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -1.3e-50], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, -5.2e-135], N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.05e-140], N[Not[LessEqual[y, 3.1e-44]], $MachinePrecision]], N[(t$95$1 * (-y)), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{-50}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-135}:\\
\;\;\;\;0.5 \cdot \left(x \cdot t\_1\right)\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-140} \lor \neg \left(y \leq 3.1 \cdot 10^{-44}\right):\\
\;\;\;\;t\_1 \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\
\end{array}
\end{array}
if y < -1.3000000000000001e-50Initial program 99.9%
exp-sqrt99.9%
pow-exp99.9%
pow1/299.9%
pow-pow99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 59.5%
associate-*r*59.5%
sqrt-prod59.6%
*-commutative59.6%
*-commutative59.6%
add-sqr-sqrt55.3%
sqrt-unprod64.6%
*-commutative64.6%
sub-neg64.6%
*-commutative64.6%
sub-neg64.6%
*-commutative64.6%
sub-neg64.6%
*-commutative64.6%
sub-neg64.6%
Applied egg-rr68.5%
Taylor expanded in x around 0 59.4%
+-commutative59.4%
mul-1-neg59.4%
unsub-neg59.4%
unpow259.4%
distribute-rgt-out--64.7%
Simplified64.7%
if -1.3000000000000001e-50 < y < -5.20000000000000008e-135Initial program 99.6%
Taylor expanded in x around inf 86.9%
*-commutative86.9%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in t around 0 35.6%
*-commutative35.6%
associate-*l*35.6%
*-commutative35.6%
Simplified35.6%
pow135.6%
*-commutative35.6%
*-commutative35.6%
associate-*l*35.6%
sqrt-prod35.5%
*-commutative35.5%
Applied egg-rr35.5%
unpow135.5%
Simplified35.5%
if -5.20000000000000008e-135 < y < -2.0500000000000001e-140 or 3.09999999999999984e-44 < y Initial program 99.7%
exp-sqrt99.7%
pow-exp99.8%
pow1/299.8%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 62.6%
Taylor expanded in x around 0 42.4%
mul-1-neg42.4%
associate-*l*42.4%
*-commutative42.4%
distribute-rgt-neg-in42.4%
distribute-rgt-neg-in42.4%
Simplified42.4%
Applied egg-rr42.5%
if -2.0500000000000001e-140 < y < 3.09999999999999984e-44Initial program 99.7%
Taylor expanded in x around inf 88.5%
*-commutative88.5%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in t around 0 51.7%
*-commutative51.7%
associate-*l*51.5%
*-commutative51.5%
Simplified51.5%
pow151.5%
*-commutative51.5%
*-commutative51.5%
associate-*l*51.6%
sqrt-prod51.7%
*-commutative51.7%
Applied egg-rr51.7%
unpow151.7%
Simplified51.7%
Applied egg-rr51.7%
unpow151.7%
*-commutative51.7%
*-commutative51.7%
*-commutative51.7%
Simplified51.7%
Final simplification51.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))) (t_2 (* t_1 (- y))))
(if (<= y -3.9e-50)
t_2
(if (<= y -4.5e-132)
(* 0.5 (* x t_1))
(if (or (<= y -1.96e-140) (not (<= y 1.05e-81)))
t_2
(* (* x 0.5) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = t_1 * -y;
double tmp;
if (y <= -3.9e-50) {
tmp = t_2;
} else if (y <= -4.5e-132) {
tmp = 0.5 * (x * t_1);
} else if ((y <= -1.96e-140) || !(y <= 1.05e-81)) {
tmp = t_2;
} else {
tmp = (x * 0.5) * 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) :: t_2
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
t_2 = t_1 * -y
if (y <= (-3.9d-50)) then
tmp = t_2
else if (y <= (-4.5d-132)) then
tmp = 0.5d0 * (x * t_1)
else if ((y <= (-1.96d-140)) .or. (.not. (y <= 1.05d-81))) then
tmp = t_2
else
tmp = (x * 0.5d0) * 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((z * 2.0));
double t_2 = t_1 * -y;
double tmp;
if (y <= -3.9e-50) {
tmp = t_2;
} else if (y <= -4.5e-132) {
tmp = 0.5 * (x * t_1);
} else if ((y <= -1.96e-140) || !(y <= 1.05e-81)) {
tmp = t_2;
} else {
tmp = (x * 0.5) * t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) t_2 = t_1 * -y tmp = 0 if y <= -3.9e-50: tmp = t_2 elif y <= -4.5e-132: tmp = 0.5 * (x * t_1) elif (y <= -1.96e-140) or not (y <= 1.05e-81): tmp = t_2 else: tmp = (x * 0.5) * t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = Float64(t_1 * Float64(-y)) tmp = 0.0 if (y <= -3.9e-50) tmp = t_2; elseif (y <= -4.5e-132) tmp = Float64(0.5 * Float64(x * t_1)); elseif ((y <= -1.96e-140) || !(y <= 1.05e-81)) tmp = t_2; else tmp = Float64(Float64(x * 0.5) * t_1); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); t_2 = t_1 * -y; tmp = 0.0; if (y <= -3.9e-50) tmp = t_2; elseif (y <= -4.5e-132) tmp = 0.5 * (x * t_1); elseif ((y <= -1.96e-140) || ~((y <= 1.05e-81))) tmp = t_2; else tmp = (x * 0.5) * t_1; 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 * (-y)), $MachinePrecision]}, If[LessEqual[y, -3.9e-50], t$95$2, If[LessEqual[y, -4.5e-132], N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.96e-140], N[Not[LessEqual[y, 1.05e-81]], $MachinePrecision]], t$95$2, N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := t\_1 \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{-50}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-132}:\\
\;\;\;\;0.5 \cdot \left(x \cdot t\_1\right)\\
\mathbf{elif}\;y \leq -1.96 \cdot 10^{-140} \lor \neg \left(y \leq 1.05 \cdot 10^{-81}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\
\end{array}
\end{array}
if y < -3.90000000000000021e-50 or -4.4999999999999999e-132 < y < -1.96000000000000002e-140 or 1.05e-81 < y Initial program 99.8%
exp-sqrt99.8%
pow-exp99.8%
pow1/299.8%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 59.0%
Taylor expanded in x around 0 41.8%
mul-1-neg41.8%
associate-*l*41.8%
*-commutative41.8%
distribute-rgt-neg-in41.8%
distribute-rgt-neg-in41.8%
Simplified41.8%
Applied egg-rr41.9%
if -3.90000000000000021e-50 < y < -4.4999999999999999e-132Initial program 99.6%
Taylor expanded in x around inf 85.9%
*-commutative85.9%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in t around 0 37.9%
*-commutative37.9%
associate-*l*37.9%
*-commutative37.9%
Simplified37.9%
pow137.9%
*-commutative37.9%
*-commutative37.9%
associate-*l*37.9%
sqrt-prod37.8%
*-commutative37.8%
Applied egg-rr37.8%
unpow137.8%
Simplified37.8%
if -1.96000000000000002e-140 < y < 1.05e-81Initial program 99.7%
Taylor expanded in x around inf 89.5%
*-commutative89.5%
associate-*l*89.4%
Simplified89.4%
Taylor expanded in t around 0 55.6%
*-commutative55.6%
associate-*l*55.4%
*-commutative55.4%
Simplified55.4%
pow155.4%
*-commutative55.4%
*-commutative55.4%
associate-*l*55.4%
sqrt-prod55.6%
*-commutative55.6%
Applied egg-rr55.6%
unpow155.6%
Simplified55.6%
Applied egg-rr55.6%
unpow155.6%
*-commutative55.6%
*-commutative55.6%
*-commutative55.6%
Simplified55.6%
Final simplification45.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* z 2.0))))
(if (<= t 0.095)
(* t_1 t_2)
(if (<= t 3.5e+150)
(sqrt (* (* z 2.0) (* t_1 t_1)))
(* 0.5 (* x (* t t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((z * 2.0));
double tmp;
if (t <= 0.095) {
tmp = t_1 * t_2;
} else if (t <= 3.5e+150) {
tmp = sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = 0.5 * (x * (t * 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 = (x * 0.5d0) - y
t_2 = sqrt((z * 2.0d0))
if (t <= 0.095d0) then
tmp = t_1 * t_2
else if (t <= 3.5d+150) then
tmp = sqrt(((z * 2.0d0) * (t_1 * t_1)))
else
tmp = 0.5d0 * (x * (t * t_2))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 0.095) {
tmp = t_1 * t_2;
} else if (t <= 3.5e+150) {
tmp = Math.sqrt(((z * 2.0) * (t_1 * t_1)));
} else {
tmp = 0.5 * (x * (t * t_2));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y t_2 = math.sqrt((z * 2.0)) tmp = 0 if t <= 0.095: tmp = t_1 * t_2 elif t <= 3.5e+150: tmp = math.sqrt(((z * 2.0) * (t_1 * t_1))) else: tmp = 0.5 * (x * (t * t_2)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 0.095) tmp = Float64(t_1 * t_2); elseif (t <= 3.5e+150) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(t_1 * t_1))); else tmp = Float64(0.5 * Float64(x * Float64(t * t_2))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; t_2 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 0.095) tmp = t_1 * t_2; elseif (t <= 3.5e+150) tmp = sqrt(((z * 2.0) * (t_1 * t_1))); else tmp = 0.5 * (x * (t * t_2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.095], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t, 3.5e+150], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(0.5 * N[(x * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 0.095:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(t\_1 \cdot t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \left(t \cdot t\_2\right)\right)\\
\end{array}
\end{array}
if t < 0.095000000000000001Initial program 99.7%
exp-sqrt99.7%
pow-exp99.7%
pow1/299.7%
pow-pow99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 71.8%
associate-*r*71.8%
sqrt-prod72.0%
sub-neg72.0%
distribute-rgt-in70.4%
*-commutative70.4%
*-commutative70.4%
Applied egg-rr70.4%
distribute-rgt-out72.0%
sub-neg72.0%
*-commutative72.0%
Simplified72.0%
if 0.095000000000000001 < t < 3.49999999999999984e150Initial program 99.6%
exp-sqrt96.9%
pow-exp96.9%
pow1/296.9%
pow-pow99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 18.0%
associate-*r*18.0%
sqrt-prod18.0%
*-commutative18.0%
*-commutative18.0%
add-sqr-sqrt9.9%
sqrt-unprod31.3%
*-commutative31.3%
sub-neg31.3%
*-commutative31.3%
sub-neg31.3%
*-commutative31.3%
sub-neg31.3%
*-commutative31.3%
sub-neg31.3%
Applied egg-rr43.6%
Applied egg-rr43.6%
if 3.49999999999999984e150 < 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%
Simplified100.0%
Taylor expanded in t around 0 97.1%
+-commutative97.1%
unpow297.1%
fma-define97.1%
Simplified97.1%
Taylor expanded in t around inf 97.1%
Taylor expanded in x around inf 52.8%
associate-*l*52.8%
*-commutative52.8%
Simplified52.8%
pow152.8%
*-commutative52.8%
*-commutative52.8%
associate-*r*52.8%
*-commutative52.8%
associate-*l*52.8%
sqrt-unprod52.8%
*-commutative52.8%
Applied egg-rr52.8%
unpow152.8%
associate-*r*52.8%
*-commutative52.8%
associate-*l*55.9%
*-commutative55.9%
Simplified55.9%
Final simplification66.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))) (t_2 (* (- (* x 0.5) y) t_1)))
(if (<= t 8e+45)
t_2
(if (<= t 3.25e+122)
(* (* 0.5 t_1) (* x t))
(if (<= t 5.4e+141) t_2 (* 0.5 (* x (* t t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = ((x * 0.5) - y) * t_1;
double tmp;
if (t <= 8e+45) {
tmp = t_2;
} else if (t <= 3.25e+122) {
tmp = (0.5 * t_1) * (x * t);
} else if (t <= 5.4e+141) {
tmp = t_2;
} else {
tmp = 0.5 * (x * (t * 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) :: t_2
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
t_2 = ((x * 0.5d0) - y) * t_1
if (t <= 8d+45) then
tmp = t_2
else if (t <= 3.25d+122) then
tmp = (0.5d0 * t_1) * (x * t)
else if (t <= 5.4d+141) then
tmp = t_2
else
tmp = 0.5d0 * (x * (t * 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((z * 2.0));
double t_2 = ((x * 0.5) - y) * t_1;
double tmp;
if (t <= 8e+45) {
tmp = t_2;
} else if (t <= 3.25e+122) {
tmp = (0.5 * t_1) * (x * t);
} else if (t <= 5.4e+141) {
tmp = t_2;
} else {
tmp = 0.5 * (x * (t * t_1));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) t_2 = ((x * 0.5) - y) * t_1 tmp = 0 if t <= 8e+45: tmp = t_2 elif t <= 3.25e+122: tmp = (0.5 * t_1) * (x * t) elif t <= 5.4e+141: tmp = t_2 else: tmp = 0.5 * (x * (t * t_1)) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = Float64(Float64(Float64(x * 0.5) - y) * t_1) tmp = 0.0 if (t <= 8e+45) tmp = t_2; elseif (t <= 3.25e+122) tmp = Float64(Float64(0.5 * t_1) * Float64(x * t)); elseif (t <= 5.4e+141) tmp = t_2; else tmp = Float64(0.5 * Float64(x * Float64(t * t_1))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); t_2 = ((x * 0.5) - y) * t_1; tmp = 0.0; if (t <= 8e+45) tmp = t_2; elseif (t <= 3.25e+122) tmp = (0.5 * t_1) * (x * t); elseif (t <= 5.4e+141) tmp = t_2; else tmp = 0.5 * (x * (t * t_1)); 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[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t, 8e+45], t$95$2, If[LessEqual[t, 3.25e+122], N[(N[(0.5 * t$95$1), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e+141], t$95$2, N[(0.5 * N[(x * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := \left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{if}\;t \leq 8 \cdot 10^{+45}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.25 \cdot 10^{+122}:\\
\;\;\;\;\left(0.5 \cdot t\_1\right) \cdot \left(x \cdot t\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \left(t \cdot t\_1\right)\right)\\
\end{array}
\end{array}
if t < 7.9999999999999994e45 or 3.24999999999999982e122 < t < 5.4000000000000002e141Initial program 99.7%
exp-sqrt99.3%
pow-exp99.3%
pow1/299.3%
pow-pow99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 68.6%
associate-*r*68.6%
sqrt-prod68.8%
sub-neg68.8%
distribute-rgt-in67.3%
*-commutative67.3%
*-commutative67.3%
Applied egg-rr67.3%
distribute-rgt-out68.8%
sub-neg68.8%
*-commutative68.8%
Simplified68.8%
if 7.9999999999999994e45 < t < 3.24999999999999982e122Initial 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%
Simplified100.0%
Taylor expanded in t around 0 40.7%
+-commutative40.7%
unpow240.7%
fma-define40.7%
Simplified40.7%
Taylor expanded in t around inf 40.7%
Taylor expanded in x around inf 33.4%
associate-*l*27.5%
*-commutative27.5%
Simplified27.5%
pow127.5%
*-commutative27.5%
*-commutative27.5%
associate-*r*27.5%
*-commutative27.5%
associate-*l*33.4%
sqrt-unprod33.4%
*-commutative33.4%
Applied egg-rr33.4%
unpow133.4%
associate-*r*33.4%
*-commutative33.4%
Simplified33.4%
if 5.4000000000000002e141 < 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%
Simplified100.0%
Taylor expanded in t around 0 97.3%
+-commutative97.3%
unpow297.3%
fma-define97.3%
Simplified97.3%
Taylor expanded in t around inf 97.3%
Taylor expanded in x around inf 49.6%
associate-*l*49.6%
*-commutative49.6%
Simplified49.6%
pow149.6%
*-commutative49.6%
*-commutative49.6%
associate-*r*49.6%
*-commutative49.6%
associate-*l*49.6%
sqrt-unprod49.6%
*-commutative49.6%
Applied egg-rr49.6%
unpow149.6%
associate-*r*49.6%
*-commutative49.6%
associate-*l*52.5%
*-commutative52.5%
Simplified52.5%
Final simplification64.5%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- y)))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.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)) * -y
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * -y;
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * -y
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(-y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * -y; end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(-y\right)
\end{array}
Initial program 99.8%
exp-sqrt99.4%
pow-exp99.4%
pow1/299.4%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 59.4%
Taylor expanded in x around 0 31.6%
mul-1-neg31.6%
associate-*l*31.6%
*-commutative31.6%
distribute-rgt-neg-in31.6%
distribute-rgt-neg-in31.6%
Simplified31.6%
Applied egg-rr31.7%
Final simplification31.7%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return 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 = y * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return y * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(y * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.8%
exp-sqrt99.4%
pow-exp99.4%
pow1/299.4%
pow-pow99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 59.4%
Taylor expanded in x around 0 31.6%
mul-1-neg31.6%
associate-*l*31.6%
*-commutative31.6%
distribute-rgt-neg-in31.6%
distribute-rgt-neg-in31.6%
Simplified31.6%
Applied egg-rr3.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 2024107
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0)))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))