
(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 (* (- (* x 0.5) y) (sqrt (* (exp (pow t 2.0)) (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((exp(pow(t, 2.0)) * (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((exp((t ** 2.0d0)) * (2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((Math.exp(Math.pow(t, 2.0)) * (2.0 * z)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((math.exp(math.pow(t, 2.0)) * (2.0 * z)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(exp((t ^ 2.0)) * Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((exp((t ^ 2.0)) * (2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[Exp[N[Power[t, 2.0], $MachinePrecision]], $MachinePrecision] * N[(2.0 * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{{t}^{2}} \cdot \left(2 \cdot z\right)}
\end{array}
Initial program 98.7%
sqr-neg98.7%
associate-/l*98.7%
distribute-frac-neg98.7%
exp-neg98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.5%
expm1-udef78.4%
sqrt-unprod78.4%
associate-*l*78.4%
pow278.4%
Applied egg-rr78.4%
expm1-def98.5%
expm1-log1p99.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)) (t_2 (* (sqrt z) (* t_1 (* t (sqrt 2.0))))))
(if (<= t 175000.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 3.42e+40)
(sqrt (* 2.0 (* z (pow (* x 0.5) 2.0))))
(if (<= t 2.15e+104)
t_2
(if (<= t 1.04e+116)
(sqrt (* (* 2.0 z) (pow y 2.0)))
(if (or (<= t 9.4e+144) (not (<= t 9.6e+169)))
t_2
(* 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 t_2 = sqrt(z) * (t_1 * (t * sqrt(2.0)));
double tmp;
if (t <= 175000.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 3.42e+40) {
tmp = sqrt((2.0 * (z * pow((x * 0.5), 2.0))));
} else if (t <= 2.15e+104) {
tmp = t_2;
} else if (t <= 1.04e+116) {
tmp = sqrt(((2.0 * z) * pow(y, 2.0)));
} else if ((t <= 9.4e+144) || !(t <= 9.6e+169)) {
tmp = t_2;
} 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 t_2 = Math.sqrt(z) * (t_1 * (t * Math.sqrt(2.0)));
double tmp;
if (t <= 175000.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 3.42e+40) {
tmp = Math.sqrt((2.0 * (z * Math.pow((x * 0.5), 2.0))));
} else if (t <= 2.15e+104) {
tmp = t_2;
} else if (t <= 1.04e+116) {
tmp = Math.sqrt(((2.0 * z) * Math.pow(y, 2.0)));
} else if ((t <= 9.4e+144) || !(t <= 9.6e+169)) {
tmp = t_2;
} 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) t_2 = Float64(sqrt(z) * Float64(t_1 * Float64(t * sqrt(2.0)))) tmp = 0.0 if (t <= 175000.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 3.42e+40) tmp = sqrt(Float64(2.0 * Float64(z * (Float64(x * 0.5) ^ 2.0)))); elseif (t <= 2.15e+104) tmp = t_2; elseif (t <= 1.04e+116) tmp = sqrt(Float64(Float64(2.0 * z) * (y ^ 2.0))); elseif ((t <= 9.4e+144) || !(t <= 9.6e+169)) tmp = t_2; 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]}, Block[{t$95$2 = N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$1 * N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 175000.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.42e+40], N[Sqrt[N[(2.0 * N[(z * N[Power[N[(x * 0.5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.15e+104], t$95$2, If[LessEqual[t, 1.04e+116], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[t, 9.4e+144], N[Not[LessEqual[t, 9.6e+169]], $MachinePrecision]], t$95$2, 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\\
t_2 := \sqrt{z} \cdot \left(t_1 \cdot \left(t \cdot \sqrt{2}\right)\right)\\
\mathbf{if}\;t \leq 175000:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 3.42 \cdot 10^{+40}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot {\left(x \cdot 0.5\right)}^{2}\right)}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{+116}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{+144} \lor \neg \left(t \leq 9.6 \cdot 10^{+169}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\
\end{array}
\end{array}
if t < 175000Initial program 98.8%
sqr-neg98.8%
associate-/l*98.8%
distribute-frac-neg98.8%
exp-neg98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.1%
expm1-udef72.2%
sqrt-unprod72.2%
associate-*l*72.2%
pow272.2%
Applied egg-rr72.2%
expm1-def98.1%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 64.4%
if 175000 < t < 3.42000000000000018e40Initial program 100.0%
Taylor expanded in t around 0 14.1%
associate-*r*14.1%
*-commutative14.1%
*-commutative14.1%
fma-neg14.1%
associate-*l*14.1%
fma-neg14.1%
*-commutative14.1%
Simplified14.1%
Taylor expanded in x around inf 3.5%
add-sqr-sqrt2.5%
sqrt-unprod30.7%
swap-sqr30.7%
rem-square-sqrt30.7%
associate-*r*30.7%
*-commutative30.7%
associate-*r*30.7%
*-commutative30.7%
swap-sqr30.7%
pow230.7%
add-sqr-sqrt30.7%
Applied egg-rr30.7%
if 3.42000000000000018e40 < t < 2.1500000000000001e104 or 1.04e116 < t < 9.4000000000000004e144 or 9.5999999999999994e169 < t Initial program 97.4%
sqr-neg97.4%
associate-/l*97.4%
distribute-frac-neg97.4%
exp-neg97.4%
associate-*r/97.4%
*-rgt-identity97.4%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 82.5%
distribute-lft-out82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in z around 0 82.5%
+-commutative82.5%
unpow282.5%
fma-def82.5%
Simplified82.5%
Taylor expanded in t around inf 57.6%
*-commutative57.6%
associate-*r*57.6%
*-commutative57.6%
Simplified57.6%
if 2.1500000000000001e104 < t < 1.04e116Initial program 100.0%
sqr-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 4.7%
Taylor expanded in x around 0 4.4%
mul-1-neg4.4%
*-commutative4.4%
distribute-rgt-neg-in4.4%
*-commutative4.4%
Simplified4.4%
add-sqr-sqrt4.4%
sqrt-unprod4.4%
swap-sqr100.0%
add-sqr-sqrt100.0%
sqr-neg100.0%
swap-sqr100.0%
rem-square-sqrt100.0%
pow2100.0%
Applied egg-rr100.0%
associate-*r*100.0%
Simplified100.0%
if 9.4000000000000004e144 < t < 9.5999999999999994e169Initial program 100.0%
sqr-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 16.6%
sqrt-prod16.6%
add-cbrt-cube76.4%
add-sqr-sqrt76.4%
pow1/376.4%
pow176.4%
pow1/276.4%
pow-prod-up76.4%
*-commutative76.4%
metadata-eval76.4%
Applied egg-rr76.4%
unpow1/376.4%
Simplified76.4%
Final simplification62.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 240000.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 3.42e+40)
(sqrt (* 2.0 (* z (pow (* x 0.5) 2.0))))
(if (<= t 6.5e+105)
(* (sqrt z) (* t_1 (* t (sqrt 2.0))))
(* 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 <= 240000.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 3.42e+40) {
tmp = sqrt((2.0 * (z * pow((x * 0.5), 2.0))));
} else if (t <= 6.5e+105) {
tmp = sqrt(z) * (t_1 * (t * sqrt(2.0)));
} 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 <= 240000.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else if (t <= 3.42d+40) then
tmp = sqrt((2.0d0 * (z * ((x * 0.5d0) ** 2.0d0))))
else if (t <= 6.5d+105) then
tmp = sqrt(z) * (t_1 * (t * sqrt(2.0d0)))
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 <= 240000.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 3.42e+40) {
tmp = Math.sqrt((2.0 * (z * Math.pow((x * 0.5), 2.0))));
} else if (t <= 6.5e+105) {
tmp = Math.sqrt(z) * (t_1 * (t * Math.sqrt(2.0)));
} 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 <= 240000.0: tmp = t_1 * math.sqrt((2.0 * z)) elif t <= 3.42e+40: tmp = math.sqrt((2.0 * (z * math.pow((x * 0.5), 2.0)))) elif t <= 6.5e+105: tmp = math.sqrt(z) * (t_1 * (t * math.sqrt(2.0))) 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 <= 240000.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 3.42e+40) tmp = sqrt(Float64(2.0 * Float64(z * (Float64(x * 0.5) ^ 2.0)))); elseif (t <= 6.5e+105) tmp = Float64(sqrt(z) * Float64(t_1 * Float64(t * sqrt(2.0)))); 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 <= 240000.0) tmp = t_1 * sqrt((2.0 * z)); elseif (t <= 3.42e+40) tmp = sqrt((2.0 * (z * ((x * 0.5) ^ 2.0)))); elseif (t <= 6.5e+105) tmp = sqrt(z) * (t_1 * (t * sqrt(2.0))); 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, 240000.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.42e+40], N[Sqrt[N[(2.0 * N[(z * N[Power[N[(x * 0.5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 6.5e+105], N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$1 * N[(t * N[Sqrt[2.0], $MachinePrecision]), $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 240000:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 3.42 \cdot 10^{+40}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot {\left(x \cdot 0.5\right)}^{2}\right)}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+105}:\\
\;\;\;\;\sqrt{z} \cdot \left(t_1 \cdot \left(t \cdot \sqrt{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot \left(z \cdot {t}^{2}\right)}\\
\end{array}
\end{array}
if t < 2.4e5Initial program 98.8%
sqr-neg98.8%
associate-/l*98.8%
distribute-frac-neg98.8%
exp-neg98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.1%
expm1-udef72.2%
sqrt-unprod72.2%
associate-*l*72.2%
pow272.2%
Applied egg-rr72.2%
expm1-def98.1%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 64.4%
if 2.4e5 < t < 3.42000000000000018e40Initial program 100.0%
Taylor expanded in t around 0 14.1%
associate-*r*14.1%
*-commutative14.1%
*-commutative14.1%
fma-neg14.1%
associate-*l*14.1%
fma-neg14.1%
*-commutative14.1%
Simplified14.1%
Taylor expanded in x around inf 3.5%
add-sqr-sqrt2.5%
sqrt-unprod30.7%
swap-sqr30.7%
rem-square-sqrt30.7%
associate-*r*30.7%
*-commutative30.7%
associate-*r*30.7%
*-commutative30.7%
swap-sqr30.7%
pow230.7%
add-sqr-sqrt30.7%
Applied egg-rr30.7%
if 3.42000000000000018e40 < t < 6.50000000000000049e105Initial program 83.3%
sqr-neg83.3%
associate-/l*83.3%
distribute-frac-neg83.3%
exp-neg83.3%
associate-*r/83.3%
*-rgt-identity83.3%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 20.8%
distribute-lft-out20.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in z around 0 20.8%
+-commutative20.8%
unpow220.8%
fma-def20.8%
Simplified20.8%
Taylor expanded in t around inf 20.8%
*-commutative20.8%
associate-*r*20.8%
*-commutative20.8%
Simplified20.8%
if 6.50000000000000049e105 < t Initial program 100.0%
sqr-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 93.1%
distribute-lft-out93.1%
*-commutative93.1%
Simplified93.1%
Taylor expanded in z around 0 93.1%
+-commutative93.1%
unpow293.1%
fma-def93.1%
Simplified93.1%
Taylor expanded in t around inf 93.1%
Final simplification66.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 240000.0)
(* t_1 (* (sqrt (* 2.0 z)) (hypot 1.0 t)))
(if (<= t 3.42e+40)
(sqrt (* 2.0 (* z (pow (* x 0.5) 2.0))))
(if (<= t 1.1e+116)
(* (sqrt z) (* t_1 (* t (sqrt 2.0))))
(* 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 <= 240000.0) {
tmp = t_1 * (sqrt((2.0 * z)) * hypot(1.0, t));
} else if (t <= 3.42e+40) {
tmp = sqrt((2.0 * (z * pow((x * 0.5), 2.0))));
} else if (t <= 1.1e+116) {
tmp = sqrt(z) * (t_1 * (t * sqrt(2.0)));
} 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 <= 240000.0) {
tmp = t_1 * (Math.sqrt((2.0 * z)) * Math.hypot(1.0, t));
} else if (t <= 3.42e+40) {
tmp = Math.sqrt((2.0 * (z * Math.pow((x * 0.5), 2.0))));
} else if (t <= 1.1e+116) {
tmp = Math.sqrt(z) * (t_1 * (t * Math.sqrt(2.0)));
} 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 <= 240000.0: tmp = t_1 * (math.sqrt((2.0 * z)) * math.hypot(1.0, t)) elif t <= 3.42e+40: tmp = math.sqrt((2.0 * (z * math.pow((x * 0.5), 2.0)))) elif t <= 1.1e+116: tmp = math.sqrt(z) * (t_1 * (t * math.sqrt(2.0))) 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 <= 240000.0) tmp = Float64(t_1 * Float64(sqrt(Float64(2.0 * z)) * hypot(1.0, t))); elseif (t <= 3.42e+40) tmp = sqrt(Float64(2.0 * Float64(z * (Float64(x * 0.5) ^ 2.0)))); elseif (t <= 1.1e+116) tmp = Float64(sqrt(z) * Float64(t_1 * Float64(t * sqrt(2.0)))); 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 <= 240000.0) tmp = t_1 * (sqrt((2.0 * z)) * hypot(1.0, t)); elseif (t <= 3.42e+40) tmp = sqrt((2.0 * (z * ((x * 0.5) ^ 2.0)))); elseif (t <= 1.1e+116) tmp = sqrt(z) * (t_1 * (t * sqrt(2.0))); 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, 240000.0], N[(t$95$1 * N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.42e+40], N[Sqrt[N[(2.0 * N[(z * N[Power[N[(x * 0.5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.1e+116], N[(N[Sqrt[z], $MachinePrecision] * N[(t$95$1 * N[(t * N[Sqrt[2.0], $MachinePrecision]), $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 240000:\\
\;\;\;\;t_1 \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{elif}\;t \leq 3.42 \cdot 10^{+40}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot {\left(x \cdot 0.5\right)}^{2}\right)}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+116}:\\
\;\;\;\;\sqrt{z} \cdot \left(t_1 \cdot \left(t \cdot \sqrt{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot \left(z \cdot {t}^{2}\right)}\\
\end{array}
\end{array}
if t < 2.4e5Initial program 98.8%
sqr-neg98.8%
associate-/l*98.8%
distribute-frac-neg98.8%
exp-neg98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.1%
expm1-udef72.2%
sqrt-unprod72.2%
associate-*l*72.2%
pow272.2%
Applied egg-rr72.2%
expm1-def98.1%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 86.8%
distribute-lft-out86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in z around 0 86.8%
+-commutative86.8%
unpow286.8%
fma-def86.8%
Simplified86.8%
associate-*r*86.8%
*-commutative86.8%
sqrt-prod85.8%
*-commutative85.8%
Applied egg-rr85.8%
*-commutative85.8%
fma-udef85.8%
unpow285.8%
+-commutative85.8%
unpow285.8%
hypot-1-def77.8%
Simplified77.8%
if 2.4e5 < t < 3.42000000000000018e40Initial program 100.0%
Taylor expanded in t around 0 14.1%
associate-*r*14.1%
*-commutative14.1%
*-commutative14.1%
fma-neg14.1%
associate-*l*14.1%
fma-neg14.1%
*-commutative14.1%
Simplified14.1%
Taylor expanded in x around inf 3.5%
add-sqr-sqrt2.5%
sqrt-unprod30.7%
swap-sqr30.7%
rem-square-sqrt30.7%
associate-*r*30.7%
*-commutative30.7%
associate-*r*30.7%
*-commutative30.7%
swap-sqr30.7%
pow230.7%
add-sqr-sqrt30.7%
Applied egg-rr30.7%
if 3.42000000000000018e40 < t < 1.1e116Initial program 85.7%
sqr-neg85.7%
associate-/l*85.7%
distribute-frac-neg85.7%
exp-neg85.7%
associate-*r/85.7%
*-rgt-identity85.7%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 18.9%
distribute-lft-out18.9%
*-commutative18.9%
Simplified18.9%
Taylor expanded in z around 0 18.9%
+-commutative18.9%
unpow218.9%
fma-def18.9%
Simplified18.9%
Taylor expanded in t around inf 18.9%
*-commutative18.9%
associate-*r*18.9%
*-commutative18.9%
Simplified18.9%
if 1.1e116 < t Initial program 100.0%
sqr-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 95.3%
distribute-lft-out95.3%
*-commutative95.3%
Simplified95.3%
Taylor expanded in z around 0 95.3%
+-commutative95.3%
unpow295.3%
fma-def95.3%
Simplified95.3%
Taylor expanded in t around inf 95.3%
Final simplification77.0%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = exp(((t * t) / 2.0d0)) * (((x * 0.5d0) - y) * sqrt((2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return Math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * Math.sqrt((2.0 * z)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((2.0 * z)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Initial program 98.7%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= t 240000.0)
(* (- (* x 0.5) y) (sqrt (* 2.0 z)))
(if (or (<= t 9.2e+132) (not (<= t 7.5e+183)))
(sqrt (* 2.0 (* z (pow (* x 0.5) 2.0))))
(* 0.5 (* x (cbrt (pow (* 2.0 z) 1.5)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 240000.0) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else if ((t <= 9.2e+132) || !(t <= 7.5e+183)) {
tmp = sqrt((2.0 * (z * pow((x * 0.5), 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 tmp;
if (t <= 240000.0) {
tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
} else if ((t <= 9.2e+132) || !(t <= 7.5e+183)) {
tmp = Math.sqrt((2.0 * (z * Math.pow((x * 0.5), 2.0))));
} 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 <= 240000.0) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); elseif ((t <= 9.2e+132) || !(t <= 7.5e+183)) tmp = sqrt(Float64(2.0 * Float64(z * (Float64(x * 0.5) ^ 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_] := If[LessEqual[t, 240000.0], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 9.2e+132], N[Not[LessEqual[t, 7.5e+183]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(z * N[Power[N[(x * 0.5), $MachinePrecision], 2.0], $MachinePrecision]), $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}
\mathbf{if}\;t \leq 240000:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+132} \lor \neg \left(t \leq 7.5 \cdot 10^{+183}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot {\left(x \cdot 0.5\right)}^{2}\right)}\\
\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.4e5Initial program 98.8%
sqr-neg98.8%
associate-/l*98.8%
distribute-frac-neg98.8%
exp-neg98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.1%
expm1-udef72.2%
sqrt-unprod72.2%
associate-*l*72.2%
pow272.2%
Applied egg-rr72.2%
expm1-def98.1%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 64.4%
if 2.4e5 < t < 9.2000000000000006e132 or 7.49999999999999966e183 < t Initial program 97.7%
Taylor expanded in t around 0 13.7%
associate-*r*13.7%
*-commutative13.7%
*-commutative13.7%
fma-neg13.7%
associate-*l*13.7%
fma-neg13.7%
*-commutative13.7%
Simplified13.7%
Taylor expanded in x around inf 8.3%
add-sqr-sqrt4.6%
sqrt-unprod26.6%
swap-sqr26.6%
rem-square-sqrt26.6%
associate-*r*26.6%
*-commutative26.6%
associate-*r*26.6%
*-commutative26.6%
swap-sqr28.9%
pow228.9%
add-sqr-sqrt28.9%
Applied egg-rr28.9%
if 9.2000000000000006e132 < t < 7.49999999999999966e183Initial program 100.0%
Taylor expanded in t around 0 17.9%
associate-*r*17.9%
*-commutative17.9%
*-commutative17.9%
fma-neg17.9%
associate-*l*17.9%
fma-neg17.9%
*-commutative17.9%
Simplified17.9%
Taylor expanded in x around inf 9.6%
expm1-log1p-u1.7%
expm1-udef1.5%
*-commutative1.5%
associate-*r*1.5%
*-commutative1.5%
associate-*l*1.5%
sqrt-prod1.5%
*-commutative1.5%
*-commutative1.5%
Applied egg-rr1.5%
expm1-def1.7%
expm1-log1p9.6%
*-commutative9.6%
associate-*r*9.6%
*-commutative9.6%
*-commutative9.6%
Simplified9.6%
add-cbrt-cube37.1%
add-sqr-sqrt37.1%
pow137.1%
pow1/237.1%
pow-prod-up37.1%
metadata-eval37.1%
Applied egg-rr37.1%
Final simplification57.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 210000.0)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 9.2e+124)
(sqrt (* 2.0 (* z (pow (* x 0.5) 2.0))))
(* 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 <= 210000.0) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 9.2e+124) {
tmp = sqrt((2.0 * (z * pow((x * 0.5), 2.0))));
} 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 <= 210000.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 9.2e+124) {
tmp = Math.sqrt((2.0 * (z * Math.pow((x * 0.5), 2.0))));
} 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 <= 210000.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 9.2e+124) tmp = sqrt(Float64(2.0 * Float64(z * (Float64(x * 0.5) ^ 2.0)))); 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, 210000.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.2e+124], N[Sqrt[N[(2.0 * N[(z * N[Power[N[(x * 0.5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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 210000:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot {\left(x \cdot 0.5\right)}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\
\end{array}
\end{array}
if t < 2.1e5Initial program 98.8%
sqr-neg98.8%
associate-/l*98.8%
distribute-frac-neg98.8%
exp-neg98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.1%
expm1-udef72.2%
sqrt-unprod72.2%
associate-*l*72.2%
pow272.2%
Applied egg-rr72.2%
expm1-def98.1%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 64.4%
if 2.1e5 < t < 9.19999999999999938e124Initial program 95.0%
Taylor expanded in t around 0 14.5%
associate-*r*14.5%
*-commutative14.5%
*-commutative14.5%
fma-neg14.5%
associate-*l*14.5%
fma-neg14.5%
*-commutative14.5%
Simplified14.5%
Taylor expanded in x around inf 9.0%
add-sqr-sqrt2.8%
sqrt-unprod26.0%
swap-sqr26.0%
rem-square-sqrt26.0%
associate-*r*26.0%
*-commutative26.0%
associate-*r*26.0%
*-commutative26.0%
swap-sqr30.8%
pow230.8%
add-sqr-sqrt30.8%
Applied egg-rr30.8%
if 9.19999999999999938e124 < t Initial program 100.0%
sqr-neg100.0%
associate-/l*100.0%
distribute-frac-neg100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 14.9%
sqrt-prod14.9%
add-cbrt-cube32.6%
add-sqr-sqrt32.6%
pow1/332.6%
pow132.6%
pow1/232.6%
pow-prod-up32.6%
*-commutative32.6%
metadata-eval32.6%
Applied egg-rr32.6%
unpow1/332.6%
Simplified32.6%
Final simplification57.2%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* 2.0 (+ z (* z (pow t 2.0)))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * (z + (z * 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 + (z * (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 + (z * Math.pow(t, 2.0)))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((2.0 * (z + (z * math.pow(t, 2.0)))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * Float64(z + Float64(z * (t ^ 2.0)))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((2.0 * (z + (z * (t ^ 2.0))))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z + N[(z * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z + z \cdot {t}^{2}\right)}
\end{array}
Initial program 98.7%
sqr-neg98.7%
associate-/l*98.7%
distribute-frac-neg98.7%
exp-neg98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.5%
expm1-udef78.4%
sqrt-unprod78.4%
associate-*l*78.4%
pow278.4%
Applied egg-rr78.4%
expm1-def98.5%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 83.4%
distribute-lft-out83.4%
*-commutative83.4%
Simplified83.4%
Final simplification83.4%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* 2.0 (* z (fma t t 1.0))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((2.0 * (z * fma(t, t, 1.0))));
}
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * Float64(z * fma(t, t, 1.0))))) end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(z * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot \left(z \cdot \mathsf{fma}\left(t, t, 1\right)\right)}
\end{array}
Initial program 98.7%
sqr-neg98.7%
associate-/l*98.7%
distribute-frac-neg98.7%
exp-neg98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.5%
expm1-udef78.4%
sqrt-unprod78.4%
associate-*l*78.4%
pow278.4%
Applied egg-rr78.4%
expm1-def98.5%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 83.4%
distribute-lft-out83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in z around 0 83.4%
+-commutative83.4%
unpow283.4%
fma-def83.4%
Simplified83.4%
Final simplification83.4%
(FPCore (x y z t) :precision binary64 (if (<= (* x 0.5) 1e+146) (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (sqrt (* 2.0 (* z (pow (* x 0.5) 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x * 0.5) <= 1e+146) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else {
tmp = sqrt((2.0 * (z * pow((x * 0.5), 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 ((x * 0.5d0) <= 1d+146) then
tmp = ((x * 0.5d0) - y) * sqrt((2.0d0 * z))
else
tmp = sqrt((2.0d0 * (z * ((x * 0.5d0) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x * 0.5) <= 1e+146) {
tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
} else {
tmp = Math.sqrt((2.0 * (z * Math.pow((x * 0.5), 2.0))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x * 0.5) <= 1e+146: tmp = ((x * 0.5) - y) * math.sqrt((2.0 * z)) else: tmp = math.sqrt((2.0 * (z * math.pow((x * 0.5), 2.0)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x * 0.5) <= 1e+146) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); else tmp = sqrt(Float64(2.0 * Float64(z * (Float64(x * 0.5) ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x * 0.5) <= 1e+146) tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); else tmp = sqrt((2.0 * (z * ((x * 0.5) ^ 2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x * 0.5), $MachinePrecision], 1e+146], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(z * N[Power[N[(x * 0.5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot 0.5 \leq 10^{+146}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(z \cdot {\left(x \cdot 0.5\right)}^{2}\right)}\\
\end{array}
\end{array}
if (*.f64 x 1/2) < 9.99999999999999934e145Initial program 98.5%
sqr-neg98.5%
associate-/l*98.5%
distribute-frac-neg98.5%
exp-neg98.5%
associate-*r/98.5%
*-rgt-identity98.5%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.3%
expm1-udef77.3%
sqrt-unprod77.3%
associate-*l*77.3%
pow277.3%
Applied egg-rr77.3%
expm1-def98.3%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 55.0%
if 9.99999999999999934e145 < (*.f64 x 1/2) Initial program 99.9%
Taylor expanded in t around 0 40.6%
associate-*r*40.5%
*-commutative40.5%
*-commutative40.5%
fma-neg40.5%
associate-*l*40.5%
fma-neg40.5%
*-commutative40.5%
Simplified40.5%
Taylor expanded in x around inf 35.6%
add-sqr-sqrt35.5%
sqrt-unprod68.3%
swap-sqr68.3%
rem-square-sqrt68.3%
associate-*r*68.3%
*-commutative68.3%
associate-*r*68.3%
*-commutative68.3%
swap-sqr77.9%
pow277.9%
add-sqr-sqrt77.9%
Applied egg-rr77.9%
Final simplification57.7%
(FPCore (x y z t) :precision binary64 (if (<= t 72000000000000.0) (* (- (* x 0.5) y) (sqrt (* 2.0 z))) (sqrt (* (* 2.0 z) (pow y 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 72000000000000.0) {
tmp = ((x * 0.5) - y) * sqrt((2.0 * z));
} else {
tmp = sqrt(((2.0 * z) * pow(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 <= 72000000000000.0d0) then
tmp = ((x * 0.5d0) - y) * sqrt((2.0d0 * z))
else
tmp = sqrt(((2.0d0 * 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 <= 72000000000000.0) {
tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
} else {
tmp = Math.sqrt(((2.0 * z) * Math.pow(y, 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 72000000000000.0: tmp = ((x * 0.5) - y) * math.sqrt((2.0 * z)) else: tmp = math.sqrt(((2.0 * z) * math.pow(y, 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 72000000000000.0) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); else tmp = sqrt(Float64(Float64(2.0 * z) * (y ^ 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 72000000000000.0) tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); else tmp = sqrt(((2.0 * z) * (y ^ 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 72000000000000.0], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 72000000000000:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}\\
\end{array}
\end{array}
if t < 7.2e13Initial program 98.8%
sqr-neg98.8%
associate-/l*98.8%
distribute-frac-neg98.8%
exp-neg98.8%
associate-*r/98.8%
*-rgt-identity98.8%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.1%
expm1-udef72.6%
sqrt-unprod72.6%
associate-*l*72.6%
pow272.6%
Applied egg-rr72.6%
expm1-def98.1%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 63.5%
if 7.2e13 < t Initial program 98.1%
sqr-neg98.1%
associate-/l*98.1%
distribute-frac-neg98.1%
exp-neg98.1%
associate-*r/98.1%
*-rgt-identity98.1%
associate-*r/100.0%
*-rgt-identity100.0%
associate-*r/100.0%
exp-neg100.0%
distribute-frac-neg100.0%
associate-/l*100.0%
sqr-neg100.0%
exp-sqrt100.0%
Simplified100.0%
expm1-log1p-u100.0%
expm1-udef100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow2100.0%
Applied egg-rr100.0%
expm1-def100.0%
expm1-log1p100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 15.3%
Taylor expanded in x around 0 8.3%
mul-1-neg8.3%
*-commutative8.3%
distribute-rgt-neg-in8.3%
*-commutative8.3%
Simplified8.3%
add-sqr-sqrt1.4%
sqrt-unprod7.2%
swap-sqr10.7%
add-sqr-sqrt10.7%
sqr-neg10.7%
swap-sqr10.7%
rem-square-sqrt10.7%
pow210.7%
Applied egg-rr10.7%
associate-*r*10.7%
Simplified10.7%
Final simplification52.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (or (<= y -9e+39) (not (<= y 6.2e+41)))
(* y (- t_1))
(* 0.5 (* x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if ((y <= -9e+39) || !(y <= 6.2e+41)) {
tmp = y * -t_1;
} else {
tmp = 0.5 * (x * t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((2.0d0 * z))
if ((y <= (-9d+39)) .or. (.not. (y <= 6.2d+41))) then
tmp = y * -t_1
else
tmp = 0.5d0 * (x * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((2.0 * z));
double tmp;
if ((y <= -9e+39) || !(y <= 6.2e+41)) {
tmp = y * -t_1;
} else {
tmp = 0.5 * (x * t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if (y <= -9e+39) or not (y <= 6.2e+41): tmp = y * -t_1 else: tmp = 0.5 * (x * t_1) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if ((y <= -9e+39) || !(y <= 6.2e+41)) tmp = Float64(y * Float64(-t_1)); else tmp = Float64(0.5 * Float64(x * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); tmp = 0.0; if ((y <= -9e+39) || ~((y <= 6.2e+41))) tmp = y * -t_1; else tmp = 0.5 * (x * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y, -9e+39], N[Not[LessEqual[y, 6.2e+41]], $MachinePrecision]], N[(y * (-t$95$1)), $MachinePrecision], N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+39} \lor \neg \left(y \leq 6.2 \cdot 10^{+41}\right):\\
\;\;\;\;y \cdot \left(-t_1\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot t_1\right)\\
\end{array}
\end{array}
if y < -8.99999999999999991e39 or 6.2e41 < y Initial program 99.9%
sqr-neg99.9%
associate-/l*99.9%
distribute-frac-neg99.9%
exp-neg99.9%
associate-*r/99.9%
*-rgt-identity99.9%
associate-*r/99.9%
*-rgt-identity99.9%
associate-*r/99.9%
exp-neg99.9%
distribute-frac-neg99.9%
associate-/l*99.9%
sqr-neg99.9%
exp-sqrt99.9%
Simplified99.9%
expm1-log1p-u98.9%
expm1-udef71.4%
sqrt-unprod71.4%
associate-*l*71.4%
pow271.4%
Applied egg-rr71.4%
expm1-def98.9%
expm1-log1p99.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 58.2%
Taylor expanded in x around 0 51.6%
mul-1-neg51.6%
*-commutative51.6%
distribute-rgt-neg-in51.6%
*-commutative51.6%
Simplified51.6%
distribute-rgt-neg-out51.6%
neg-sub051.6%
associate-*r*51.6%
sqrt-prod51.8%
*-commutative51.8%
Applied egg-rr51.8%
neg-sub051.8%
distribute-rgt-neg-in51.8%
*-commutative51.8%
Simplified51.8%
if -8.99999999999999991e39 < y < 6.2e41Initial program 97.7%
Taylor expanded in t around 0 49.4%
associate-*r*49.3%
*-commutative49.3%
*-commutative49.3%
fma-neg49.3%
associate-*l*49.2%
fma-neg49.2%
*-commutative49.2%
Simplified49.2%
Taylor expanded in x around inf 40.8%
expm1-log1p-u21.3%
expm1-udef12.7%
*-commutative12.7%
associate-*r*12.7%
*-commutative12.7%
associate-*l*12.7%
sqrt-prod12.7%
*-commutative12.7%
*-commutative12.7%
Applied egg-rr12.7%
expm1-def21.3%
expm1-log1p40.9%
*-commutative40.9%
associate-*r*40.9%
*-commutative40.9%
*-commutative40.9%
Simplified40.9%
Final simplification45.8%
(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 98.7%
sqr-neg98.7%
associate-/l*98.7%
distribute-frac-neg98.7%
exp-neg98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.5%
expm1-udef78.4%
sqrt-unprod78.4%
associate-*l*78.4%
pow278.4%
Applied egg-rr78.4%
expm1-def98.5%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 53.4%
Final simplification53.4%
(FPCore (x y z t) :precision binary64 (* y (- (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return y * -sqrt((2.0 * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * -sqrt((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return y * -Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return y * -math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(y * Float64(-sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = y * -sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(y * (-N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(-\sqrt{2 \cdot z}\right)
\end{array}
Initial program 98.7%
sqr-neg98.7%
associate-/l*98.7%
distribute-frac-neg98.7%
exp-neg98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.5%
expm1-udef78.4%
sqrt-unprod78.4%
associate-*l*78.4%
pow278.4%
Applied egg-rr78.4%
expm1-def98.5%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 53.4%
Taylor expanded in x around 0 29.5%
mul-1-neg29.5%
*-commutative29.5%
distribute-rgt-neg-in29.5%
*-commutative29.5%
Simplified29.5%
distribute-rgt-neg-out29.5%
neg-sub029.5%
associate-*r*29.5%
sqrt-prod29.6%
*-commutative29.6%
Applied egg-rr29.6%
neg-sub029.6%
distribute-rgt-neg-in29.6%
*-commutative29.6%
Simplified29.6%
Final simplification29.6%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* 2.0 z))))
double code(double x, double y, double z, double t) {
return y * sqrt((2.0 * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * sqrt((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return y * math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(y * sqrt(Float64(2.0 * z))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{2 \cdot z}
\end{array}
Initial program 98.7%
sqr-neg98.7%
associate-/l*98.7%
distribute-frac-neg98.7%
exp-neg98.7%
associate-*r/98.7%
*-rgt-identity98.7%
associate-*r/99.8%
*-rgt-identity99.8%
associate-*r/99.8%
exp-neg99.8%
distribute-frac-neg99.8%
associate-/l*99.8%
sqr-neg99.8%
exp-sqrt99.8%
Simplified99.8%
expm1-log1p-u98.5%
expm1-udef78.4%
sqrt-unprod78.4%
associate-*l*78.4%
pow278.4%
Applied egg-rr78.4%
expm1-def98.5%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 53.4%
Taylor expanded in x around 0 29.5%
mul-1-neg29.5%
*-commutative29.5%
distribute-rgt-neg-in29.5%
*-commutative29.5%
Simplified29.5%
expm1-log1p-u18.1%
expm1-udef12.5%
add-sqr-sqrt11.2%
sqrt-unprod13.6%
sqr-neg13.6%
sqrt-unprod1.3%
add-sqr-sqrt1.8%
associate-*r*1.8%
sqrt-prod1.8%
*-commutative1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p2.1%
*-commutative2.1%
*-commutative2.1%
Simplified2.1%
Final simplification2.1%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2023336
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:herbie-target
(* (* (- (* 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))))