
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* 2.0 z) (pow (exp t) t)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((2.0 * z) * pow(exp(t), t)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt(((2.0d0 * z) * (exp(t) ** t)))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((2.0 * z) * Math.pow(Math.exp(t), t)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((2.0 * z) * math.pow(math.exp(t), t)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * (exp(t) ^ t)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((2.0 * z) * (exp(t) ^ t))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot {\left(e^{t}\right)}^{t}}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
pow299.8%
exp-prod99.8%
Applied egg-rr99.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* 2.0 z) (exp (pow t 2.0))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((2.0 * z) * exp(pow(t, 2.0))));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt(((2.0d0 * z) * exp((t ** 2.0d0))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((2.0 * z) * Math.exp(Math.pow(t, 2.0))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((2.0 * z) * math.exp(math.pow(t, 2.0))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(2.0 * z) * exp((t ^ 2.0))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((2.0 * z) * exp((t ^ 2.0)))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Exp[N[Power[t, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(2 \cdot z\right) \cdot e^{{t}^{2}}}
\end{array}
Initial program 99.0%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (* t t) 0.0001)
(* t_1 (sqrt (* (* 2.0 z) (fma t t 1.0))))
(if (<= (* t t) 1e+268)
(* (exp (/ (* t t) 2.0)) (* 0.5 (* x (sqrt (* 2.0 z)))))
(* 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 * t) <= 0.0001) {
tmp = t_1 * sqrt(((2.0 * z) * fma(t, t, 1.0)));
} else if ((t * t) <= 1e+268) {
tmp = exp(((t * t) / 2.0)) * (0.5 * (x * sqrt((2.0 * z))));
} else {
tmp = t_1 * sqrt(((2.0 * z) * pow(t, 2.0)));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 0.0001) tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * z) * fma(t, t, 1.0)))); elseif (Float64(t * t) <= 1e+268) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(0.5 * Float64(x * sqrt(Float64(2.0 * z))))); else tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * z) * (t ^ 2.0)))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 0.0001], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+268], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.5 * N[(x * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 0.0001:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\
\mathbf{elif}\;t \cdot t \leq 10^{+268}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\
\end{array}
\end{array}
if (*.f64 t t) < 1.00000000000000005e-4Initial program 99.6%
associate-*l*99.6%
exp-sqrt99.6%
exp-prod99.6%
Simplified99.6%
pow199.6%
sqrt-unprod99.6%
associate-*l*99.6%
pow-exp99.6%
pow299.6%
Applied egg-rr99.6%
unpow199.6%
associate-*r*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.3%
+-commutative99.3%
unpow299.3%
fma-define99.3%
Simplified99.3%
if 1.00000000000000005e-4 < (*.f64 t t) < 9.9999999999999997e267Initial program 98.2%
Taylor expanded in x around inf 75.9%
pow175.9%
associate-*l*75.9%
*-commutative75.9%
sqrt-unprod75.9%
*-commutative75.9%
Applied egg-rr75.9%
unpow175.9%
Simplified75.9%
if 9.9999999999999997e267 < (*.f64 t t) Initial program 98.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 96.3%
+-commutative96.3%
unpow296.3%
fma-define96.3%
Simplified96.3%
Taylor expanded in t around inf 96.3%
*-commutative96.3%
associate-*l*96.3%
*-commutative96.3%
Simplified96.3%
Final simplification93.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))) (t_2 (- (* x 0.5) y)))
(if (<= (* t t) 0.0001)
(* t_2 (* t_1 (hypot 1.0 t)))
(if (<= (* t t) 1e+268)
(* (exp (/ (* t t) 2.0)) (* 0.5 (* x t_1)))
(* t_2 (sqrt (* (* 2.0 z) (pow t 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double t_2 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 0.0001) {
tmp = t_2 * (t_1 * hypot(1.0, t));
} else if ((t * t) <= 1e+268) {
tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_1));
} else {
tmp = t_2 * 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 = Math.sqrt((2.0 * z));
double t_2 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 0.0001) {
tmp = t_2 * (t_1 * Math.hypot(1.0, t));
} else if ((t * t) <= 1e+268) {
tmp = Math.exp(((t * t) / 2.0)) * (0.5 * (x * t_1));
} else {
tmp = t_2 * Math.sqrt(((2.0 * z) * Math.pow(t, 2.0)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) t_2 = (x * 0.5) - y tmp = 0 if (t * t) <= 0.0001: tmp = t_2 * (t_1 * math.hypot(1.0, t)) elif (t * t) <= 1e+268: tmp = math.exp(((t * t) / 2.0)) * (0.5 * (x * t_1)) else: tmp = t_2 * math.sqrt(((2.0 * z) * math.pow(t, 2.0))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) t_2 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 0.0001) tmp = Float64(t_2 * Float64(t_1 * hypot(1.0, t))); elseif (Float64(t * t) <= 1e+268) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(0.5 * Float64(x * t_1))); else tmp = Float64(t_2 * sqrt(Float64(Float64(2.0 * z) * (t ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); t_2 = (x * 0.5) - y; tmp = 0.0; if ((t * t) <= 0.0001) tmp = t_2 * (t_1 * hypot(1.0, t)); elseif ((t * t) <= 1e+268) tmp = exp(((t * t) / 2.0)) * (0.5 * (x * t_1)); else tmp = t_2 * sqrt(((2.0 * z) * (t ^ 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 0.0001], N[(t$95$2 * N[(t$95$1 * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 1e+268], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(0.5 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 0.0001:\\
\;\;\;\;t\_2 \cdot \left(t\_1 \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{elif}\;t \cdot t \leq 10^{+268}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(0.5 \cdot \left(x \cdot t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\
\end{array}
\end{array}
if (*.f64 t t) < 1.00000000000000005e-4Initial program 99.6%
associate-*l*99.6%
exp-sqrt99.6%
exp-prod99.6%
Simplified99.6%
pow199.6%
sqrt-unprod99.6%
associate-*l*99.6%
pow-exp99.6%
pow299.6%
Applied egg-rr99.6%
unpow199.6%
associate-*r*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.3%
+-commutative99.3%
unpow299.3%
fma-define99.3%
Simplified99.3%
sqrt-prod99.2%
Applied egg-rr99.2%
fma-undefine99.2%
unpow299.2%
+-commutative99.2%
unpow299.2%
hypot-1-def99.3%
Simplified99.3%
if 1.00000000000000005e-4 < (*.f64 t t) < 9.9999999999999997e267Initial program 98.2%
Taylor expanded in x around inf 75.9%
pow175.9%
associate-*l*75.9%
*-commutative75.9%
sqrt-unprod75.9%
*-commutative75.9%
Applied egg-rr75.9%
unpow175.9%
Simplified75.9%
if 9.9999999999999997e267 < (*.f64 t t) Initial program 98.7%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 96.3%
+-commutative96.3%
unpow296.3%
fma-define96.3%
Simplified96.3%
Taylor expanded in t around inf 96.3%
*-commutative96.3%
associate-*l*96.3%
*-commutative96.3%
Simplified96.3%
Final simplification93.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1e+87)
(* t_1 (* (sqrt (* 2.0 z)) (hypot 1.0 t)))
(* 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 <= 1e+87) {
tmp = t_1 * (sqrt((2.0 * z)) * hypot(1.0, t));
} 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 <= 1e+87) {
tmp = t_1 * (Math.sqrt((2.0 * z)) * Math.hypot(1.0, t));
} 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 <= 1e+87: tmp = t_1 * (math.sqrt((2.0 * z)) * math.hypot(1.0, t)) 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 <= 1e+87) tmp = Float64(t_1 * Float64(sqrt(Float64(2.0 * z)) * hypot(1.0, t))); else tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * 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 <= 1e+87) tmp = t_1 * (sqrt((2.0 * z)) * hypot(1.0, t)); 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, 1e+87], N[(t$95$1 * N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[Sqrt[1.0 ^ 2 + t ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 10^{+87}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt{2 \cdot z} \cdot \mathsf{hypot}\left(1, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\
\end{array}
\end{array}
if t < 9.9999999999999996e86Initial program 99.8%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 84.0%
+-commutative84.0%
unpow284.0%
fma-define84.0%
Simplified84.0%
sqrt-prod82.6%
Applied egg-rr82.6%
fma-undefine82.6%
unpow282.6%
+-commutative82.6%
unpow282.6%
hypot-1-def77.0%
Simplified77.0%
if 9.9999999999999996e86 < t Initial program 96.2%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp100.0%
pow2100.0%
Applied egg-rr100.0%
unpow1100.0%
associate-*r*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 85.2%
+-commutative85.2%
unpow285.2%
fma-define85.2%
Simplified85.2%
Taylor expanded in t around inf 85.2%
*-commutative85.2%
associate-*l*85.2%
*-commutative85.2%
Simplified85.2%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1.0)
(* t_1 (sqrt (* 2.0 z)))
(* 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 <= 1.0) {
tmp = t_1 * sqrt((2.0 * z));
} 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 <= 1.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
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 <= 1.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} 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 <= 1.0: tmp = t_1 * math.sqrt((2.0 * z)) 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 <= 1.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); else tmp = Float64(t_1 * sqrt(Float64(Float64(2.0 * 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 <= 1.0) tmp = t_1 * sqrt((2.0 * z)); 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, 1.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{\left(2 \cdot z\right) \cdot {t}^{2}}\\
\end{array}
\end{array}
if t < 1Initial program 99.8%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 68.7%
if 1 < t Initial program 97.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp99.9%
pow299.9%
Applied egg-rr99.9%
unpow199.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
unpow268.9%
fma-define68.9%
Simplified68.9%
Taylor expanded in t around inf 68.9%
*-commutative68.9%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
Final simplification68.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= t 1.0)
(* t_1 (sqrt (* 2.0 z)))
(* (* t (* t_1 (sqrt 2.0))) (sqrt z)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1.0) {
tmp = t_1 * sqrt((2.0 * z));
} else {
tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if (t <= 1.0d0) then
tmp = t_1 * sqrt((2.0d0 * z))
else
tmp = (t * (t_1 * sqrt(2.0d0))) * sqrt(z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if (t <= 1.0) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else {
tmp = (t * (t_1 * Math.sqrt(2.0))) * Math.sqrt(z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if t <= 1.0: tmp = t_1 * math.sqrt((2.0 * z)) else: tmp = (t * (t_1 * math.sqrt(2.0))) * math.sqrt(z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1.0) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); else tmp = Float64(Float64(t * Float64(t_1 * sqrt(2.0))) * sqrt(z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if (t <= 1.0) tmp = t_1 * sqrt((2.0 * z)); else tmp = (t * (t_1 * sqrt(2.0))) * sqrt(z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 1.0], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(t$95$1 * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[z], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1:\\
\;\;\;\;t\_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(t\_1 \cdot \sqrt{2}\right)\right) \cdot \sqrt{z}\\
\end{array}
\end{array}
if t < 1Initial program 99.8%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 68.7%
if 1 < t Initial program 97.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp99.9%
pow299.9%
Applied egg-rr99.9%
unpow199.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
unpow268.9%
fma-define68.9%
Simplified68.9%
Taylor expanded in t around inf 51.3%
Final simplification63.9%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = exp(((t * t) / 2.0d0)) * (((x * 0.5d0) - y) * sqrt((2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return Math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * Math.sqrt((2.0 * z)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((2.0 * z)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Initial program 99.0%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (* x 0.5) y)) (t_2 (sqrt (* 2.0 z)))) (if (<= t 1.0) (* t_1 t_2) (* t_1 (* t t_2)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if (t <= 1.0) {
tmp = t_1 * t_2;
} else {
tmp = t_1 * (t * t_2);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * 0.5d0) - y
t_2 = sqrt((2.0d0 * z))
if (t <= 1.0d0) then
tmp = t_1 * t_2
else
tmp = t_1 * (t * t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double t_2 = Math.sqrt((2.0 * z));
double tmp;
if (t <= 1.0) {
tmp = t_1 * t_2;
} else {
tmp = t_1 * (t * t_2);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y t_2 = math.sqrt((2.0 * z)) tmp = 0 if t <= 1.0: tmp = t_1 * t_2 else: tmp = t_1 * (t * t_2) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 1.0) tmp = Float64(t_1 * t_2); else tmp = Float64(t_1 * Float64(t * t_2)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; t_2 = sqrt((2.0 * z)); tmp = 0.0; if (t <= 1.0) tmp = t_1 * t_2; else tmp = t_1 * (t * t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.0], N[(t$95$1 * t$95$2), $MachinePrecision], N[(t$95$1 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 1:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t \cdot t\_2\right)\\
\end{array}
\end{array}
if t < 1Initial program 99.8%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 68.7%
if 1 < t Initial program 97.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp99.9%
pow299.9%
Applied egg-rr99.9%
unpow199.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
unpow268.9%
fma-define68.9%
Simplified68.9%
Taylor expanded in t around inf 47.2%
associate-*l*47.2%
Simplified47.2%
sqrt-prod47.2%
pow1/247.2%
Applied egg-rr47.2%
unpow1/247.2%
Simplified47.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (- (* x 0.5) y) (sqrt (* 2.0 z))))) (if (<= t 1.0) t_1 (* t t_1))))
double code(double x, double y, double z, double t) {
double t_1 = ((x * 0.5) - y) * sqrt((2.0 * z));
double tmp;
if (t <= 1.0) {
tmp = t_1;
} else {
tmp = t * t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = ((x * 0.5d0) - y) * sqrt((2.0d0 * z))
if (t <= 1.0d0) then
tmp = t_1
else
tmp = t * t_1
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) * Math.sqrt((2.0 * z));
double tmp;
if (t <= 1.0) {
tmp = t_1;
} else {
tmp = t * t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x * 0.5) - y) * math.sqrt((2.0 * z)) tmp = 0 if t <= 1.0: tmp = t_1 else: tmp = t * t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))) tmp = 0.0 if (t <= 1.0) tmp = t_1; else tmp = Float64(t * t_1); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x * 0.5) - y) * sqrt((2.0 * z)); tmp = 0.0; if (t <= 1.0) tmp = t_1; else tmp = t * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 1.0], t$95$1, N[(t * t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 1:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot t\_1\\
\end{array}
\end{array}
if t < 1Initial program 99.8%
associate-*l*99.7%
exp-sqrt99.7%
exp-prod99.7%
Simplified99.7%
pow199.7%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 68.7%
if 1 < t Initial program 97.1%
associate-*l*100.0%
exp-sqrt100.0%
exp-prod100.0%
Simplified100.0%
pow1100.0%
sqrt-unprod100.0%
associate-*l*100.0%
pow-exp99.9%
pow299.9%
Applied egg-rr99.9%
unpow199.9%
associate-*r*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 68.9%
+-commutative68.9%
unpow268.9%
fma-define68.9%
Simplified68.9%
Taylor expanded in t around inf 47.2%
associate-*l*47.2%
Simplified47.2%
*-commutative47.2%
sub-neg47.2%
*-commutative47.2%
distribute-lft-in43.0%
sqrt-prod43.0%
*-commutative43.0%
*-commutative43.0%
sqrt-prod43.0%
*-commutative43.0%
Applied egg-rr43.0%
*-commutative43.0%
*-commutative43.0%
associate-*r*42.9%
associate-*r*42.9%
associate-*r*43.0%
distribute-rgt-out47.2%
associate-*r*47.2%
distribute-rgt-in47.2%
*-commutative47.2%
sub-neg47.2%
Simplified47.2%
Final simplification62.8%
(FPCore (x y z t) :precision binary64 (if (<= y -9.7e+114) (sqrt (* (* 2.0 z) (* y (- y x)))) (* (- (* x 0.5) y) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.7e+114) {
tmp = sqrt(((2.0 * z) * (y * (y - x))));
} else {
tmp = ((x * 0.5) - 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 <= (-9.7d+114)) then
tmp = sqrt(((2.0d0 * z) * (y * (y - x))))
else
tmp = ((x * 0.5d0) - 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 <= -9.7e+114) {
tmp = Math.sqrt(((2.0 * z) * (y * (y - x))));
} else {
tmp = ((x * 0.5) - y) * Math.sqrt((2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.7e+114: tmp = math.sqrt(((2.0 * z) * (y * (y - x)))) else: tmp = ((x * 0.5) - y) * math.sqrt((2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.7e+114) tmp = sqrt(Float64(Float64(2.0 * z) * Float64(y * Float64(y - x)))); else tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(2.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.7e+114) tmp = sqrt(((2.0 * z) * (y * (y - x)))); else tmp = ((x * 0.5) - y) * sqrt((2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.7e+114], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.7 \cdot 10^{+114}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{2 \cdot z}\\
\end{array}
\end{array}
if y < -9.7000000000000002e114Initial program 99.9%
Taylor expanded in t around 0 48.8%
associate-*r*48.7%
*-commutative48.7%
*-commutative48.7%
add-sqr-sqrt48.3%
sqrt-unprod61.0%
*-commutative61.0%
*-commutative61.0%
swap-sqr63.7%
sqrt-unprod63.7%
sqrt-unprod63.7%
add-sqr-sqrt63.7%
*-commutative63.7%
pow263.7%
fma-neg63.7%
Applied egg-rr63.7%
fma-neg63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in x around 0 55.3%
+-commutative55.3%
mul-1-neg55.3%
unsub-neg55.3%
unpow255.3%
distribute-rgt-out--63.7%
Simplified63.7%
if -9.7000000000000002e114 < y Initial program 98.9%
associate-*l*99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 54.6%
(FPCore (x y z t) :precision binary64 (if (<= y -2.8e-19) (sqrt (* (* 2.0 z) (* y (- y x)))) (* (sqrt (* 2.0 z)) (* x 0.5))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e-19) {
tmp = sqrt(((2.0 * z) * (y * (y - x))));
} else {
tmp = sqrt((2.0 * z)) * (x * 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 <= (-2.8d-19)) then
tmp = sqrt(((2.0d0 * z) * (y * (y - x))))
else
tmp = sqrt((2.0d0 * z)) * (x * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.8e-19) {
tmp = Math.sqrt(((2.0 * z) * (y * (y - x))));
} else {
tmp = Math.sqrt((2.0 * z)) * (x * 0.5);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.8e-19: tmp = math.sqrt(((2.0 * z) * (y * (y - x)))) else: tmp = math.sqrt((2.0 * z)) * (x * 0.5) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.8e-19) tmp = sqrt(Float64(Float64(2.0 * z) * Float64(y * Float64(y - x)))); else tmp = Float64(sqrt(Float64(2.0 * z)) * Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.8e-19) tmp = sqrt(((2.0 * z) * (y * (y - x)))); else tmp = sqrt((2.0 * z)) * (x * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.8e-19], N[Sqrt[N[(N[(2.0 * z), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-19}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot z} \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if y < -2.80000000000000003e-19Initial program 99.8%
Taylor expanded in t around 0 50.5%
associate-*r*50.4%
*-commutative50.4%
*-commutative50.4%
add-sqr-sqrt42.6%
sqrt-unprod49.7%
*-commutative49.7%
*-commutative49.7%
swap-sqr52.6%
sqrt-unprod52.7%
sqrt-unprod52.7%
add-sqr-sqrt52.7%
*-commutative52.7%
pow252.7%
fma-neg52.7%
Applied egg-rr52.7%
fma-neg52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in x around 0 46.6%
+-commutative46.6%
mul-1-neg46.6%
unsub-neg46.6%
unpow246.6%
distribute-rgt-out--51.3%
Simplified51.3%
if -2.80000000000000003e-19 < y Initial program 98.7%
Taylor expanded in t around 0 54.3%
Taylor expanded in x around inf 34.4%
associate-*r*34.4%
*-commutative34.4%
*-commutative34.4%
associate-*r*34.4%
*-commutative34.4%
Simplified34.4%
pow134.4%
*-commutative34.4%
*-commutative34.4%
associate-*l*34.4%
sqrt-prod35.0%
Applied egg-rr35.0%
unpow135.0%
*-commutative35.0%
Simplified35.0%
Final simplification39.2%
(FPCore (x y z t) :precision binary64 (if (<= t 1.26e+48) (* x (sqrt (* 0.5 z))) (sqrt (* z (* 0.5 (* x x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.26e+48) {
tmp = x * sqrt((0.5 * z));
} else {
tmp = sqrt((z * (0.5 * (x * 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) :: tmp
if (t <= 1.26d+48) then
tmp = x * sqrt((0.5d0 * z))
else
tmp = sqrt((z * (0.5d0 * (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.26e+48) {
tmp = x * Math.sqrt((0.5 * z));
} else {
tmp = Math.sqrt((z * (0.5 * (x * x))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.26e+48: tmp = x * math.sqrt((0.5 * z)) else: tmp = math.sqrt((z * (0.5 * (x * x)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.26e+48) tmp = Float64(x * sqrt(Float64(0.5 * z))); else tmp = sqrt(Float64(z * Float64(0.5 * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.26e+48) tmp = x * sqrt((0.5 * z)); else tmp = sqrt((z * (0.5 * (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.26e+48], N[(x * N[Sqrt[N[(0.5 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(z * N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.26 \cdot 10^{+48}:\\
\;\;\;\;x \cdot \sqrt{0.5 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{z \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)}\\
\end{array}
\end{array}
if t < 1.26000000000000001e48Initial program 99.7%
Taylor expanded in t around 0 65.2%
Taylor expanded in x around inf 35.9%
associate-*r*35.9%
*-commutative35.9%
*-commutative35.9%
associate-*r*35.9%
*-commutative35.9%
Simplified35.9%
add-sqr-sqrt16.4%
sqrt-unprod17.2%
*-commutative17.2%
*-commutative17.2%
swap-sqr15.4%
add-sqr-sqrt15.5%
*-commutative15.5%
*-commutative15.5%
swap-sqr15.4%
rem-square-sqrt15.5%
pow215.5%
Applied egg-rr15.5%
*-commutative15.5%
unpow215.5%
rem-square-sqrt15.4%
swap-sqr15.5%
associate-*r*15.5%
associate-*r*15.5%
*-commutative15.5%
*-commutative15.5%
swap-sqr15.4%
swap-sqr15.4%
metadata-eval15.4%
rem-square-sqrt15.5%
metadata-eval15.5%
Simplified15.5%
associate-*r*15.5%
sqrt-prod14.0%
*-commutative14.0%
sqrt-prod16.3%
add-sqr-sqrt36.0%
Applied egg-rr36.0%
if 1.26000000000000001e48 < t Initial program 96.7%
Taylor expanded in t around 0 15.4%
Taylor expanded in x around inf 8.0%
associate-*r*8.0%
*-commutative8.0%
*-commutative8.0%
associate-*r*8.0%
*-commutative8.0%
Simplified8.0%
add-sqr-sqrt3.2%
sqrt-unprod11.1%
*-commutative11.1%
*-commutative11.1%
swap-sqr11.1%
add-sqr-sqrt11.1%
*-commutative11.1%
*-commutative11.1%
swap-sqr11.1%
rem-square-sqrt11.1%
pow211.1%
Applied egg-rr11.1%
*-commutative11.1%
unpow211.1%
rem-square-sqrt11.1%
swap-sqr11.1%
associate-*r*11.1%
associate-*r*11.1%
*-commutative11.1%
*-commutative11.1%
swap-sqr11.1%
swap-sqr11.1%
metadata-eval11.1%
rem-square-sqrt11.1%
metadata-eval11.1%
Simplified11.1%
Final simplification30.1%
(FPCore (x y z t) :precision binary64 (* x (sqrt (* 0.5 z))))
double code(double x, double y, double z, double t) {
return x * sqrt((0.5 * 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 * sqrt((0.5d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return x * Math.sqrt((0.5 * z));
}
def code(x, y, z, t): return x * math.sqrt((0.5 * z))
function code(x, y, z, t) return Float64(x * sqrt(Float64(0.5 * z))) end
function tmp = code(x, y, z, t) tmp = x * sqrt((0.5 * z)); end
code[x_, y_, z_, t_] := N[(x * N[Sqrt[N[(0.5 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \sqrt{0.5 \cdot z}
\end{array}
Initial program 99.0%
Taylor expanded in t around 0 53.3%
Taylor expanded in x around inf 29.2%
associate-*r*29.2%
*-commutative29.2%
*-commutative29.2%
associate-*r*29.2%
*-commutative29.2%
Simplified29.2%
add-sqr-sqrt13.2%
sqrt-unprod15.7%
*-commutative15.7%
*-commutative15.7%
swap-sqr14.4%
add-sqr-sqrt14.4%
*-commutative14.4%
*-commutative14.4%
swap-sqr14.4%
rem-square-sqrt14.4%
pow214.4%
Applied egg-rr14.4%
*-commutative14.4%
unpow214.4%
rem-square-sqrt14.4%
swap-sqr14.4%
associate-*r*14.4%
associate-*r*14.4%
*-commutative14.4%
*-commutative14.4%
swap-sqr14.4%
swap-sqr14.4%
metadata-eval14.4%
rem-square-sqrt14.4%
metadata-eval14.4%
Simplified14.4%
associate-*r*14.4%
sqrt-prod12.9%
*-commutative12.9%
sqrt-prod13.2%
add-sqr-sqrt29.3%
Applied egg-rr29.3%
Final simplification29.3%
(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 2024095
(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))))