
(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 16 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) (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%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 3.4e+29)
(* t_1 (pow (* 2.0 z) 0.5))
(if (or (<= t 4e+174) (not (<= t 7.6e+286)))
(sqrt (* (* 2.0 z) (pow t_1 2.0)))
(* 0.5 (* x (cbrt (pow (* 2.0 z) 1.5))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 3.4e+29) {
tmp = t_1 * pow((2.0 * z), 0.5);
} else if ((t <= 4e+174) || !(t <= 7.6e+286)) {
tmp = sqrt(((2.0 * z) * pow(t_1, 2.0)));
} else {
tmp = 0.5 * (x * cbrt(pow((2.0 * z), 1.5)));
}
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 <= 3.4e+29) {
tmp = t_1 * Math.pow((2.0 * z), 0.5);
} else if ((t <= 4e+174) || !(t <= 7.6e+286)) {
tmp = Math.sqrt(((2.0 * z) * Math.pow(t_1, 2.0)));
} else {
tmp = 0.5 * (x * Math.cbrt(Math.pow((2.0 * z), 1.5)));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 3.4e+29) tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5)); elseif ((t <= 4e+174) || !(t <= 7.6e+286)) tmp = sqrt(Float64(Float64(2.0 * z) * (t_1 ^ 2.0))); else tmp = Float64(0.5 * Float64(x * cbrt((Float64(2.0 * z) ^ 1.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.4e+29], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 4e+174], N[Not[LessEqual[t, 7.6e+286]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(0.5 * N[(x * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 3.4 \cdot 10^{+29}:\\
\;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+174} \lor \neg \left(t \leq 7.6 \cdot 10^{+286}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\
\end{array}
\end{array}
if t < 3.39999999999999981e29Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 71.5%
sqrt-prod71.7%
pow1/271.7%
*-commutative71.7%
Applied egg-rr71.7%
if 3.39999999999999981e29 < t < 4.00000000000000028e174 or 7.6e286 < t Initial program 100.0%
Taylor expanded in t around 0 4.7%
associate-*r*4.7%
*-commutative4.7%
associate-*l*4.7%
Simplified4.7%
*-commutative4.7%
*-commutative4.7%
*-commutative4.7%
associate-*r*4.7%
sqrt-prod4.7%
add-sqr-sqrt2.4%
unpow22.4%
pow12.4%
metadata-eval2.4%
pow-prod-up2.4%
pow-prod-down33.8%
Applied egg-rr37.2%
unpow1/237.2%
*-commutative37.2%
*-commutative37.2%
Simplified37.2%
if 4.00000000000000028e174 < t < 7.6e286Initial program 96.4%
Taylor expanded in t around 0 11.4%
associate-*r*11.4%
*-commutative11.4%
associate-*l*11.4%
Simplified11.4%
Taylor expanded in x around inf 6.4%
associate-*l*6.4%
Simplified6.4%
sqrt-prod6.4%
pow1/26.4%
metadata-eval6.4%
pow-pow33.6%
*-commutative33.6%
Applied egg-rr33.6%
unpow1/333.6%
Simplified33.6%
Final simplification63.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1.16e+31)
(* t_1 (pow (* 2.0 z) 0.5))
(if (<= t 7.8e+174)
(sqrt (* (* 2.0 z) (pow t_1 2.0)))
(if (<= t 1.25e+243)
(* 0.5 (* x (cbrt (pow (* 2.0 z) 1.5))))
(* (sqrt 2.0) (* x (* (sqrt z) (/ y (- x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1.16e+31) {
tmp = t_1 * pow((2.0 * z), 0.5);
} else if (t <= 7.8e+174) {
tmp = sqrt(((2.0 * z) * pow(t_1, 2.0)));
} else if (t <= 1.25e+243) {
tmp = 0.5 * (x * cbrt(pow((2.0 * z), 1.5)));
} else {
tmp = sqrt(2.0) * (x * (sqrt(z) * (y / -x)));
}
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 <= 1.16e+31) {
tmp = t_1 * Math.pow((2.0 * z), 0.5);
} else if (t <= 7.8e+174) {
tmp = Math.sqrt(((2.0 * z) * Math.pow(t_1, 2.0)));
} else if (t <= 1.25e+243) {
tmp = 0.5 * (x * Math.cbrt(Math.pow((2.0 * z), 1.5)));
} else {
tmp = Math.sqrt(2.0) * (x * (Math.sqrt(z) * (y / -x)));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1.16e+31) tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5)); elseif (t <= 7.8e+174) tmp = sqrt(Float64(Float64(2.0 * z) * (t_1 ^ 2.0))); elseif (t <= 1.25e+243) tmp = Float64(0.5 * Float64(x * cbrt((Float64(2.0 * z) ^ 1.5)))); else tmp = Float64(sqrt(2.0) * Float64(x * Float64(sqrt(z) * Float64(y / Float64(-x))))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 1.16e+31], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+174], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.25e+243], N[(0.5 * N[(x * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(x * N[(N[Sqrt[z], $MachinePrecision] * N[(y / (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1.16 \cdot 10^{+31}:\\
\;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+174}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {t\_1}^{2}}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+243}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(x \cdot \left(\sqrt{z} \cdot \frac{y}{-x}\right)\right)\\
\end{array}
\end{array}
if t < 1.1599999999999999e31Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 71.5%
sqrt-prod71.7%
pow1/271.7%
*-commutative71.7%
Applied egg-rr71.7%
if 1.1599999999999999e31 < t < 7.79999999999999962e174Initial program 100.0%
Taylor expanded in t around 0 4.8%
associate-*r*4.8%
*-commutative4.8%
associate-*l*4.8%
Simplified4.8%
*-commutative4.8%
*-commutative4.8%
*-commutative4.8%
associate-*r*4.8%
sqrt-prod4.8%
add-sqr-sqrt2.5%
unpow22.5%
pow12.5%
metadata-eval2.5%
pow-prod-up2.5%
pow-prod-down35.0%
Applied egg-rr38.5%
unpow1/238.5%
*-commutative38.5%
*-commutative38.5%
Simplified38.5%
if 7.79999999999999962e174 < t < 1.25000000000000009e243Initial program 95.5%
Taylor expanded in t around 0 9.3%
associate-*r*9.3%
*-commutative9.3%
associate-*l*9.3%
Simplified9.3%
Taylor expanded in x around inf 7.5%
associate-*l*7.5%
Simplified7.5%
sqrt-prod7.5%
pow1/27.5%
metadata-eval7.5%
pow-pow37.7%
*-commutative37.7%
Applied egg-rr37.7%
unpow1/337.7%
Simplified37.7%
if 1.25000000000000009e243 < t Initial program 100.0%
Taylor expanded in t around 0 17.3%
associate-*r*17.3%
*-commutative17.3%
associate-*l*17.3%
Simplified17.3%
Taylor expanded in x around inf 31.0%
+-commutative31.0%
mul-1-neg31.0%
unsub-neg31.0%
distribute-rgt-out--31.0%
Simplified31.0%
Taylor expanded in y around inf 30.5%
mul-1-neg30.5%
distribute-lft-neg-in30.5%
distribute-frac-neg230.5%
*-commutative30.5%
Simplified30.5%
Final simplification63.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1750000000000.0)
(* t_1 (pow (* 2.0 z) 0.5))
(if (<= t 1.95e+236)
(* t_1 (cbrt (pow (* 2.0 z) 1.5)))
(* (sqrt 2.0) (* x (* (sqrt z) (- 0.5 (/ y x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1750000000000.0) {
tmp = t_1 * pow((2.0 * z), 0.5);
} else if (t <= 1.95e+236) {
tmp = t_1 * cbrt(pow((2.0 * z), 1.5));
} else {
tmp = sqrt(2.0) * (x * (sqrt(z) * (0.5 - (y / x))));
}
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 <= 1750000000000.0) {
tmp = t_1 * Math.pow((2.0 * z), 0.5);
} else if (t <= 1.95e+236) {
tmp = t_1 * Math.cbrt(Math.pow((2.0 * z), 1.5));
} else {
tmp = Math.sqrt(2.0) * (x * (Math.sqrt(z) * (0.5 - (y / x))));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1750000000000.0) tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5)); elseif (t <= 1.95e+236) tmp = Float64(t_1 * cbrt((Float64(2.0 * z) ^ 1.5))); else tmp = Float64(sqrt(2.0) * Float64(x * Float64(sqrt(z) * Float64(0.5 - Float64(y / x))))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 1750000000000.0], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+236], N[(t$95$1 * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(x * N[(N[Sqrt[z], $MachinePrecision] * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1750000000000:\\
\;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+236}:\\
\;\;\;\;t\_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(x \cdot \left(\sqrt{z} \cdot \left(0.5 - \frac{y}{x}\right)\right)\right)\\
\end{array}
\end{array}
if t < 1.75e12Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 71.3%
sqrt-prod71.6%
pow1/271.6%
*-commutative71.6%
Applied egg-rr71.6%
if 1.75e12 < t < 1.95e236Initial program 98.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
Taylor expanded in t around 0 8.7%
sqrt-prod8.7%
add-cbrt-cube38.9%
pow1/338.9%
add-sqr-sqrt38.9%
pow138.9%
pow1/238.9%
pow-prod-up38.9%
*-commutative38.9%
metadata-eval38.9%
Applied egg-rr38.9%
unpow1/338.9%
Simplified38.9%
if 1.95e236 < t Initial program 100.0%
Taylor expanded in t around 0 14.1%
associate-*r*14.1%
*-commutative14.1%
associate-*l*14.1%
Simplified14.1%
Taylor expanded in x around inf 24.8%
+-commutative24.8%
mul-1-neg24.8%
unsub-neg24.8%
distribute-rgt-out--24.8%
Simplified24.8%
Final simplification63.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1050000000000.0)
(* t_1 (pow (* 2.0 z) 0.5))
(if (<= t 1.3e+237)
(* t_1 (pow (pow (* 2.0 z) 1.5) 0.3333333333333333))
(* (sqrt 2.0) (* x (* (sqrt z) (- 0.5 (/ y x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1050000000000.0) {
tmp = t_1 * pow((2.0 * z), 0.5);
} else if (t <= 1.3e+237) {
tmp = t_1 * pow(pow((2.0 * z), 1.5), 0.3333333333333333);
} else {
tmp = sqrt(2.0) * (x * (sqrt(z) * (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 = (x * 0.5d0) - y
if (t <= 1050000000000.0d0) then
tmp = t_1 * ((2.0d0 * z) ** 0.5d0)
else if (t <= 1.3d+237) then
tmp = t_1 * (((2.0d0 * z) ** 1.5d0) ** 0.3333333333333333d0)
else
tmp = sqrt(2.0d0) * (x * (sqrt(z) * (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 = (x * 0.5) - y;
double tmp;
if (t <= 1050000000000.0) {
tmp = t_1 * Math.pow((2.0 * z), 0.5);
} else if (t <= 1.3e+237) {
tmp = t_1 * Math.pow(Math.pow((2.0 * z), 1.5), 0.3333333333333333);
} else {
tmp = Math.sqrt(2.0) * (x * (Math.sqrt(z) * (0.5 - (y / x))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 1050000000000.0: tmp = t_1 * math.pow((2.0 * z), 0.5) elif t <= 1.3e+237: tmp = t_1 * math.pow(math.pow((2.0 * z), 1.5), 0.3333333333333333) else: tmp = math.sqrt(2.0) * (x * (math.sqrt(z) * (0.5 - (y / x)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1050000000000.0) tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5)); elseif (t <= 1.3e+237) tmp = Float64(t_1 * ((Float64(2.0 * z) ^ 1.5) ^ 0.3333333333333333)); else tmp = Float64(sqrt(2.0) * Float64(x * Float64(sqrt(z) * Float64(0.5 - Float64(y / x))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 1050000000000.0) tmp = t_1 * ((2.0 * z) ^ 0.5); elseif (t <= 1.3e+237) tmp = t_1 * (((2.0 * z) ^ 1.5) ^ 0.3333333333333333); else tmp = sqrt(2.0) * (x * (sqrt(z) * (0.5 - (y / x)))); 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, 1050000000000.0], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+237], N[(t$95$1 * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 0.3333333333333333], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(x * N[(N[Sqrt[z], $MachinePrecision] * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1050000000000:\\
\;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+237}:\\
\;\;\;\;t\_1 \cdot {\left({\left(2 \cdot z\right)}^{1.5}\right)}^{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(x \cdot \left(\sqrt{z} \cdot \left(0.5 - \frac{y}{x}\right)\right)\right)\\
\end{array}
\end{array}
if t < 1.05e12Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 71.3%
sqrt-prod71.6%
pow1/271.6%
*-commutative71.6%
Applied egg-rr71.6%
if 1.05e12 < t < 1.30000000000000001e237Initial program 98.0%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
Taylor expanded in t around 0 8.7%
sqrt-prod8.7%
add-cbrt-cube38.9%
pow1/338.9%
add-sqr-sqrt38.9%
pow138.9%
pow1/238.9%
pow-prod-up38.9%
*-commutative38.9%
metadata-eval38.9%
Applied egg-rr38.9%
if 1.30000000000000001e237 < t Initial program 100.0%
Taylor expanded in t around 0 14.1%
associate-*r*14.1%
*-commutative14.1%
associate-*l*14.1%
Simplified14.1%
Taylor expanded in x around inf 24.8%
+-commutative24.8%
mul-1-neg24.8%
unsub-neg24.8%
distribute-rgt-out--24.8%
Simplified24.8%
Final simplification63.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 600000000000.0)
(* t_1 (pow (* 2.0 z) 0.5))
(* t_1 (cbrt (pow (* 2.0 z) 1.5))))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 600000000000.0) {
tmp = t_1 * pow((2.0 * z), 0.5);
} else {
tmp = t_1 * cbrt(pow((2.0 * z), 1.5));
}
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 <= 600000000000.0) {
tmp = t_1 * Math.pow((2.0 * z), 0.5);
} else {
tmp = t_1 * Math.cbrt(Math.pow((2.0 * z), 1.5));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 600000000000.0) tmp = Float64(t_1 * (Float64(2.0 * z) ^ 0.5)); else tmp = Float64(t_1 * cbrt((Float64(2.0 * z) ^ 1.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, 600000000000.0], N[(t$95$1 * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 600000000000:\\
\;\;\;\;t\_1 \cdot {\left(2 \cdot z\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\
\end{array}
\end{array}
if t < 6e11Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 71.3%
sqrt-prod71.6%
pow1/271.6%
*-commutative71.6%
Applied egg-rr71.6%
if 6e11 < t Initial program 98.3%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
Taylor expanded in t around 0 9.5%
sqrt-prod9.5%
add-cbrt-cube35.1%
pow1/335.1%
add-sqr-sqrt35.1%
pow135.1%
pow1/235.1%
pow-prod-up35.1%
*-commutative35.1%
metadata-eval35.1%
Applied egg-rr35.1%
unpow1/335.1%
Simplified35.1%
Final simplification63.2%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((2.0 * z))) * 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((2.0d0 * z))) * 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((2.0 * z))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((2.0 * z))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((2.0 * z))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $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{2 \cdot z}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Initial program 99.0%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (<= t 2.35e+29) (* (- (* x 0.5) y) (pow (* 2.0 z) 0.5)) (* 0.5 (* x (cbrt (pow (* 2.0 z) 1.5))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.35e+29) {
tmp = ((x * 0.5) - y) * pow((2.0 * z), 0.5);
} else {
tmp = 0.5 * (x * cbrt(pow((2.0 * z), 1.5)));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 2.35e+29) {
tmp = ((x * 0.5) - y) * Math.pow((2.0 * z), 0.5);
} else {
tmp = 0.5 * (x * Math.cbrt(Math.pow((2.0 * z), 1.5)));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (t <= 2.35e+29) tmp = Float64(Float64(Float64(x * 0.5) - y) * (Float64(2.0 * z) ^ 0.5)); else tmp = Float64(0.5 * Float64(x * cbrt((Float64(2.0 * z) ^ 1.5)))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, 2.35e+29], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.35 \cdot 10^{+29}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot {\left(2 \cdot z\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\
\end{array}
\end{array}
if t < 2.3500000000000001e29Initial program 99.3%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 71.5%
sqrt-prod71.7%
pow1/271.7%
*-commutative71.7%
Applied egg-rr71.7%
if 2.3500000000000001e29 < t Initial program 98.3%
Taylor expanded in t around 0 8.0%
associate-*r*8.0%
*-commutative8.0%
associate-*l*8.0%
Simplified8.0%
Taylor expanded in x around inf 4.9%
associate-*l*4.9%
Simplified4.9%
sqrt-prod4.9%
pow1/24.9%
metadata-eval4.9%
pow-pow31.2%
*-commutative31.2%
Applied egg-rr31.2%
unpow1/331.2%
Simplified31.2%
Final simplification62.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7.3e+126) (not (<= y 2.15e-28))) (* y (- (sqrt (* 2.0 z)))) (* 0.5 (* x (pow (* 2.0 z) 0.5)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.3e+126) || !(y <= 2.15e-28)) {
tmp = y * -sqrt((2.0 * z));
} else {
tmp = 0.5 * (x * pow((2.0 * z), 0.5));
}
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 ((y <= (-7.3d+126)) .or. (.not. (y <= 2.15d-28))) then
tmp = y * -sqrt((2.0d0 * z))
else
tmp = 0.5d0 * (x * ((2.0d0 * z) ** 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.3e+126) || !(y <= 2.15e-28)) {
tmp = y * -Math.sqrt((2.0 * z));
} else {
tmp = 0.5 * (x * Math.pow((2.0 * z), 0.5));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7.3e+126) or not (y <= 2.15e-28): tmp = y * -math.sqrt((2.0 * z)) else: tmp = 0.5 * (x * math.pow((2.0 * z), 0.5)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7.3e+126) || !(y <= 2.15e-28)) tmp = Float64(y * Float64(-sqrt(Float64(2.0 * z)))); else tmp = Float64(0.5 * Float64(x * (Float64(2.0 * z) ^ 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7.3e+126) || ~((y <= 2.15e-28))) tmp = y * -sqrt((2.0 * z)); else tmp = 0.5 * (x * ((2.0 * z) ^ 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7.3e+126], N[Not[LessEqual[y, 2.15e-28]], $MachinePrecision]], N[(y * (-N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(0.5 * N[(x * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.3 \cdot 10^{+126} \lor \neg \left(y \leq 2.15 \cdot 10^{-28}\right):\\
\;\;\;\;y \cdot \left(-\sqrt{2 \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot {\left(2 \cdot z\right)}^{0.5}\right)\\
\end{array}
\end{array}
if y < -7.29999999999999983e126 or 2.15e-28 < y Initial program 99.8%
Taylor expanded in t around 0 66.4%
associate-*r*66.5%
*-commutative66.5%
associate-*l*66.5%
Simplified66.5%
Taylor expanded in x around 0 53.2%
pow153.2%
associate-*l*53.2%
sqrt-prod53.4%
Applied egg-rr53.4%
unpow153.4%
Simplified53.4%
if -7.29999999999999983e126 < y < 2.15e-28Initial program 98.4%
Taylor expanded in t around 0 48.8%
associate-*r*48.8%
*-commutative48.8%
associate-*l*48.8%
Simplified48.8%
Taylor expanded in x around inf 40.6%
associate-*l*40.6%
Simplified40.6%
sqrt-prod40.7%
pow1/240.7%
*-commutative40.7%
Applied egg-rr40.7%
Final simplification46.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -5800.0)
(sqrt (* (* 2.0 z) (* y (- y x))))
(if (<= y 2e-28)
(* 0.5 (* x (pow (* 2.0 z) 0.5)))
(* y (- (sqrt (* 2.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5800.0) {
tmp = sqrt(((2.0 * z) * (y * (y - x))));
} else if (y <= 2e-28) {
tmp = 0.5 * (x * pow((2.0 * z), 0.5));
} else {
tmp = y * -sqrt((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 (y <= (-5800.0d0)) then
tmp = sqrt(((2.0d0 * z) * (y * (y - x))))
else if (y <= 2d-28) then
tmp = 0.5d0 * (x * ((2.0d0 * z) ** 0.5d0))
else
tmp = y * -sqrt((2.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5800.0) {
tmp = Math.sqrt(((2.0 * z) * (y * (y - x))));
} else if (y <= 2e-28) {
tmp = 0.5 * (x * Math.pow((2.0 * z), 0.5));
} else {
tmp = y * -Math.sqrt((2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5800.0: tmp = math.sqrt(((2.0 * z) * (y * (y - x)))) elif y <= 2e-28: tmp = 0.5 * (x * math.pow((2.0 * z), 0.5)) else: tmp = y * -math.sqrt((2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5800.0) tmp = sqrt(Float64(Float64(2.0 * z) * Float64(y * Float64(y - x)))); elseif (y <= 2e-28) tmp = Float64(0.5 * Float64(x * (Float64(2.0 * z) ^ 0.5))); else tmp = Float64(y * Float64(-sqrt(Float64(2.0 * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5800.0) tmp = sqrt(((2.0 * z) * (y * (y - x)))); elseif (y <= 2e-28) tmp = 0.5 * (x * ((2.0 * z) ^ 0.5)); else tmp = y * -sqrt((2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5800.0], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 2e-28], N[(0.5 * N[(x * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5800:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-28}:\\
\;\;\;\;0.5 \cdot \left(x \cdot {\left(2 \cdot z\right)}^{0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-\sqrt{2 \cdot z}\right)\\
\end{array}
\end{array}
if y < -5800Initial program 99.8%
Taylor expanded in t around 0 57.4%
associate-*r*57.5%
*-commutative57.5%
associate-*l*57.4%
Simplified57.4%
*-commutative57.4%
*-commutative57.4%
*-commutative57.4%
associate-*r*57.5%
sqrt-prod57.6%
add-sqr-sqrt53.9%
unpow253.9%
pow153.9%
metadata-eval53.9%
pow-prod-up53.9%
pow-prod-down45.7%
Applied egg-rr50.3%
unpow1/250.3%
*-commutative50.3%
*-commutative50.3%
Simplified50.3%
Taylor expanded in x around 0 47.2%
+-commutative47.2%
unpow247.2%
associate-*r*47.2%
distribute-rgt-in50.5%
mul-1-neg50.5%
unsub-neg50.5%
Simplified50.5%
if -5800 < y < 1.99999999999999994e-28Initial program 98.1%
Taylor expanded in t around 0 50.7%
associate-*r*50.7%
*-commutative50.7%
associate-*l*50.7%
Simplified50.7%
Taylor expanded in x around inf 43.9%
associate-*l*43.9%
Simplified43.9%
sqrt-prod44.0%
pow1/244.1%
*-commutative44.1%
Applied egg-rr44.1%
if 1.99999999999999994e-28 < y Initial program 99.8%
Taylor expanded in t around 0 66.0%
associate-*r*66.0%
*-commutative66.0%
associate-*l*66.1%
Simplified66.1%
Taylor expanded in x around 0 48.4%
pow148.4%
associate-*l*48.3%
sqrt-prod48.6%
Applied egg-rr48.6%
unpow148.6%
Simplified48.6%
Final simplification47.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (or (<= y -7.6e+126) (not (<= y 4.8e-29)))
(* y (- t_1))
(* (* x 0.5) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if ((y <= -7.6e+126) || !(y <= 4.8e-29)) {
tmp = y * -t_1;
} 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((2.0d0 * z))
if ((y <= (-7.6d+126)) .or. (.not. (y <= 4.8d-29))) then
tmp = y * -t_1
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((2.0 * z));
double tmp;
if ((y <= -7.6e+126) || !(y <= 4.8e-29)) {
tmp = y * -t_1;
} else {
tmp = (x * 0.5) * t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if (y <= -7.6e+126) or not (y <= 4.8e-29): tmp = y * -t_1 else: tmp = (x * 0.5) * t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if ((y <= -7.6e+126) || !(y <= 4.8e-29)) tmp = Float64(y * Float64(-t_1)); else tmp = Float64(Float64(x * 0.5) * 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 <= -7.6e+126) || ~((y <= 4.8e-29))) tmp = y * -t_1; else tmp = (x * 0.5) * 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, -7.6e+126], N[Not[LessEqual[y, 4.8e-29]], $MachinePrecision]], N[(y * (-t$95$1)), $MachinePrecision], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{+126} \lor \neg \left(y \leq 4.8 \cdot 10^{-29}\right):\\
\;\;\;\;y \cdot \left(-t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\
\end{array}
\end{array}
if y < -7.60000000000000033e126 or 4.79999999999999984e-29 < y Initial program 99.8%
Taylor expanded in t around 0 66.4%
associate-*r*66.5%
*-commutative66.5%
associate-*l*66.5%
Simplified66.5%
Taylor expanded in x around 0 53.2%
pow153.2%
associate-*l*53.2%
sqrt-prod53.4%
Applied egg-rr53.4%
unpow153.4%
Simplified53.4%
if -7.60000000000000033e126 < y < 4.79999999999999984e-29Initial program 98.4%
Taylor expanded in t around 0 48.8%
associate-*r*48.8%
*-commutative48.8%
associate-*l*48.8%
Simplified48.8%
Taylor expanded in x around inf 40.6%
associate-*l*40.6%
Simplified40.6%
pow140.6%
*-commutative40.6%
sqrt-prod40.7%
*-commutative40.7%
associate-*l*40.7%
*-commutative40.7%
Applied egg-rr40.7%
unpow140.7%
*-commutative40.7%
Simplified40.7%
Final simplification46.7%
(FPCore (x y z t) :precision binary64 (if (<= t 3300000000.0) (* y (- (sqrt (* 2.0 z)))) (sqrt (* y (* z (* y 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3300000000.0) {
tmp = y * -sqrt((2.0 * z));
} else {
tmp = sqrt((y * (z * (y * 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) :: tmp
if (t <= 3300000000.0d0) then
tmp = y * -sqrt((2.0d0 * z))
else
tmp = sqrt((y * (z * (y * 2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 3300000000.0) {
tmp = y * -Math.sqrt((2.0 * z));
} else {
tmp = Math.sqrt((y * (z * (y * 2.0))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 3300000000.0: tmp = y * -math.sqrt((2.0 * z)) else: tmp = math.sqrt((y * (z * (y * 2.0)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 3300000000.0) tmp = Float64(y * Float64(-sqrt(Float64(2.0 * z)))); else tmp = sqrt(Float64(y * Float64(z * Float64(y * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 3300000000.0) tmp = y * -sqrt((2.0 * z)); else tmp = sqrt((y * (z * (y * 2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 3300000000.0], N[(y * (-N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[Sqrt[N[(y * N[(z * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3300000000:\\
\;\;\;\;y \cdot \left(-\sqrt{2 \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y \cdot \left(z \cdot \left(y \cdot 2\right)\right)}\\
\end{array}
\end{array}
if t < 3.3e9Initial program 99.3%
Taylor expanded in t around 0 71.7%
associate-*r*71.7%
*-commutative71.7%
associate-*l*71.7%
Simplified71.7%
Taylor expanded in x around 0 37.8%
pow137.8%
associate-*l*37.8%
sqrt-prod37.9%
Applied egg-rr37.9%
unpow137.9%
Simplified37.9%
if 3.3e9 < t Initial program 98.3%
Taylor expanded in t around 0 9.4%
associate-*r*9.4%
*-commutative9.4%
associate-*l*9.4%
Simplified9.4%
*-commutative9.4%
*-commutative9.4%
*-commutative9.4%
associate-*r*9.4%
sqrt-prod9.4%
add-sqr-sqrt3.7%
unpow23.7%
pow13.7%
metadata-eval3.7%
pow-prod-up3.7%
pow-prod-down22.6%
Applied egg-rr24.3%
unpow1/224.3%
*-commutative24.3%
*-commutative24.3%
Simplified24.3%
Taylor expanded in x around 0 16.1%
associate-*r*16.1%
*-commutative16.1%
associate-*r*19.3%
associate-*r*19.3%
*-commutative19.3%
unpow219.3%
associate-*r*17.7%
*-commutative17.7%
associate-*l*17.7%
distribute-rgt-in19.4%
+-commutative19.4%
associate-*r*19.4%
associate-*r*19.4%
distribute-rgt-out19.4%
Simplified19.4%
Taylor expanded in y around inf 16.3%
associate-*r*16.3%
*-commutative16.3%
*-commutative16.3%
Simplified16.3%
Final simplification32.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (pow (* 2.0 z) 0.5)))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * pow((2.0 * z), 0.5);
}
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) * ((2.0d0 * z) ** 0.5d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.pow((2.0 * z), 0.5);
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.pow((2.0 * z), 0.5)
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * (Float64(2.0 * z) ^ 0.5)) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * ((2.0 * z) ^ 0.5); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Power[N[(2.0 * z), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot {\left(2 \cdot z\right)}^{0.5}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
Taylor expanded in t around 0 57.1%
sqrt-prod57.3%
pow1/257.3%
*-commutative57.3%
Applied egg-rr57.3%
Final simplification57.3%
(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%
Taylor expanded in t around 0 57.1%
sqrt-prod57.3%
pow1/257.3%
*-commutative57.3%
Applied egg-rr57.3%
unpow1/257.3%
Simplified57.3%
Final simplification57.3%
(FPCore (x y z t) :precision binary64 (sqrt (* y (* z (* x -2.0)))))
double code(double x, double y, double z, double t) {
return sqrt((y * (z * (x * -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 = sqrt((y * (z * (x * (-2.0d0)))))
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((y * (z * (x * -2.0))));
}
def code(x, y, z, t): return math.sqrt((y * (z * (x * -2.0))))
function code(x, y, z, t) return sqrt(Float64(y * Float64(z * Float64(x * -2.0)))) end
function tmp = code(x, y, z, t) tmp = sqrt((y * (z * (x * -2.0)))); end
code[x_, y_, z_, t_] := N[Sqrt[N[(y * N[(z * N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{y \cdot \left(z \cdot \left(x \cdot -2\right)\right)}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0 57.1%
associate-*r*57.1%
*-commutative57.1%
associate-*l*57.1%
Simplified57.1%
*-commutative57.1%
*-commutative57.1%
*-commutative57.1%
associate-*r*57.1%
sqrt-prod57.3%
add-sqr-sqrt27.7%
unpow227.7%
pow127.7%
metadata-eval27.7%
pow-prod-up27.7%
pow-prod-down24.2%
Applied egg-rr23.1%
unpow1/223.1%
*-commutative23.1%
*-commutative23.1%
Simplified23.1%
Taylor expanded in x around 0 12.4%
associate-*r*12.4%
*-commutative12.4%
associate-*r*13.2%
associate-*r*13.2%
*-commutative13.2%
unpow213.2%
associate-*r*11.7%
*-commutative11.7%
associate-*l*11.7%
distribute-rgt-in13.8%
+-commutative13.8%
associate-*r*13.8%
associate-*r*13.8%
distribute-rgt-out14.2%
Simplified14.2%
Taylor expanded in y around 0 5.8%
associate-*r*5.8%
*-commutative5.8%
*-commutative5.8%
Simplified5.8%
Final simplification5.8%
(FPCore (x y z t) :precision binary64 (sqrt (* y (* z (* y 2.0)))))
double code(double x, double y, double z, double t) {
return sqrt((y * (z * (y * 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 = sqrt((y * (z * (y * 2.0d0))))
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((y * (z * (y * 2.0))));
}
def code(x, y, z, t): return math.sqrt((y * (z * (y * 2.0))))
function code(x, y, z, t) return sqrt(Float64(y * Float64(z * Float64(y * 2.0)))) end
function tmp = code(x, y, z, t) tmp = sqrt((y * (z * (y * 2.0)))); end
code[x_, y_, z_, t_] := N[Sqrt[N[(y * N[(z * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{y \cdot \left(z \cdot \left(y \cdot 2\right)\right)}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0 57.1%
associate-*r*57.1%
*-commutative57.1%
associate-*l*57.1%
Simplified57.1%
*-commutative57.1%
*-commutative57.1%
*-commutative57.1%
associate-*r*57.1%
sqrt-prod57.3%
add-sqr-sqrt27.7%
unpow227.7%
pow127.7%
metadata-eval27.7%
pow-prod-up27.7%
pow-prod-down24.2%
Applied egg-rr23.1%
unpow1/223.1%
*-commutative23.1%
*-commutative23.1%
Simplified23.1%
Taylor expanded in x around 0 12.4%
associate-*r*12.4%
*-commutative12.4%
associate-*r*13.2%
associate-*r*13.2%
*-commutative13.2%
unpow213.2%
associate-*r*11.7%
*-commutative11.7%
associate-*l*11.7%
distribute-rgt-in13.8%
+-commutative13.8%
associate-*r*13.8%
associate-*r*13.8%
distribute-rgt-out14.2%
Simplified14.2%
Taylor expanded in y around inf 14.5%
associate-*r*14.5%
*-commutative14.5%
*-commutative14.5%
Simplified14.5%
Final simplification14.5%
(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 2024055
(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))))