
(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 13 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 (* (- (* 0.5 x) y) (sqrt (* (exp (pow t 2.0)) (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return ((0.5 * x) - 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 = ((0.5d0 * x) - y) * sqrt((exp((t ** 2.0d0)) * (2.0d0 * z)))
end function
public static double code(double x, double y, double z, double t) {
return ((0.5 * x) - y) * Math.sqrt((Math.exp(Math.pow(t, 2.0)) * (2.0 * z)));
}
def code(x, y, z, t): return ((0.5 * x) - y) * math.sqrt((math.exp(math.pow(t, 2.0)) * (2.0 * z)))
function code(x, y, z, t) return Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(exp((t ^ 2.0)) * Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = ((0.5 * x) - y) * sqrt((exp((t ^ 2.0)) * (2.0 * z))); end
code[x_, y_, z_, t_] := N[(N[(N[(0.5 * x), $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(0.5 \cdot x - y\right) \cdot \sqrt{e^{{t}^{2}} \cdot \left(2 \cdot z\right)}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
exp-sqrt99.8%
associate-*r*99.4%
*-commutative99.4%
expm1-log1p-u53.0%
expm1-udef41.9%
Applied egg-rr42.2%
expm1-def53.4%
expm1-log1p99.8%
fma-neg99.8%
*-commutative99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* 0.5 x) y)) (t_2 (sqrt (* 2.0 z))))
(if (<= (* t t) 200000.0)
(* t_1 t_2)
(if (<= (* t t) 2e+263)
(* (exp (/ (* t t) 2.0)) (* y (- t_2)))
(* t_2 (* 0.5 (* t_1 (pow t 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (0.5 * x) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if ((t * t) <= 200000.0) {
tmp = t_1 * t_2;
} else if ((t * t) <= 2e+263) {
tmp = exp(((t * t) / 2.0)) * (y * -t_2);
} else {
tmp = t_2 * (0.5 * (t_1 * 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) :: t_2
real(8) :: tmp
t_1 = (0.5d0 * x) - y
t_2 = sqrt((2.0d0 * z))
if ((t * t) <= 200000.0d0) then
tmp = t_1 * t_2
else if ((t * t) <= 2d+263) then
tmp = exp(((t * t) / 2.0d0)) * (y * -t_2)
else
tmp = t_2 * (0.5d0 * (t_1 * (t ** 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (0.5 * x) - y;
double t_2 = Math.sqrt((2.0 * z));
double tmp;
if ((t * t) <= 200000.0) {
tmp = t_1 * t_2;
} else if ((t * t) <= 2e+263) {
tmp = Math.exp(((t * t) / 2.0)) * (y * -t_2);
} else {
tmp = t_2 * (0.5 * (t_1 * Math.pow(t, 2.0)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (0.5 * x) - y t_2 = math.sqrt((2.0 * z)) tmp = 0 if (t * t) <= 200000.0: tmp = t_1 * t_2 elif (t * t) <= 2e+263: tmp = math.exp(((t * t) / 2.0)) * (y * -t_2) else: tmp = t_2 * (0.5 * (t_1 * math.pow(t, 2.0))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(0.5 * x) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (Float64(t * t) <= 200000.0) tmp = Float64(t_1 * t_2); elseif (Float64(t * t) <= 2e+263) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * Float64(-t_2))); else tmp = Float64(t_2 * Float64(0.5 * Float64(t_1 * (t ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (0.5 * x) - y; t_2 = sqrt((2.0 * z)); tmp = 0.0; if ((t * t) <= 200000.0) tmp = t_1 * t_2; elseif ((t * t) <= 2e+263) tmp = exp(((t * t) / 2.0)) * (y * -t_2); else tmp = t_2 * (0.5 * (t_1 * (t ^ 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 200000.0], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 2e+263], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * (-t$95$2)), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(0.5 * N[(t$95$1 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.5 \cdot x - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \cdot t \leq 200000:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{elif}\;t \cdot t \leq 2 \cdot 10^{+263}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-t_2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left(0.5 \cdot \left(t_1 \cdot {t}^{2}\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 2e5Initial program 99.6%
*-commutative99.6%
associate-*l*99.6%
exp-sqrt99.6%
Simplified99.6%
Taylor expanded in t around 0 98.0%
if 2e5 < (*.f64 t t) < 2.00000000000000003e263Initial program 97.7%
Taylor expanded in x around 0 72.7%
mul-1-neg72.7%
associate-*l*72.7%
distribute-lft-neg-in72.7%
Simplified72.7%
distribute-lft-neg-out72.7%
neg-sub072.7%
sqrt-unprod72.7%
Applied egg-rr72.7%
neg-sub072.7%
*-commutative72.7%
distribute-rgt-neg-in72.7%
Simplified72.7%
if 2.00000000000000003e263 < (*.f64 t t) Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around inf 97.6%
Final simplification93.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (<= (* t t) 5e+110)
(* (- (* 0.5 x) y) t_1)
(* t_1 (* 0.5 (* 0.5 (* x (pow t 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if ((t * t) <= 5e+110) {
tmp = ((0.5 * x) - y) * t_1;
} else {
tmp = t_1 * (0.5 * (0.5 * (x * 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 = sqrt((2.0d0 * z))
if ((t * t) <= 5d+110) then
tmp = ((0.5d0 * x) - y) * t_1
else
tmp = t_1 * (0.5d0 * (0.5d0 * (x * (t ** 2.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((2.0 * z));
double tmp;
if ((t * t) <= 5e+110) {
tmp = ((0.5 * x) - y) * t_1;
} else {
tmp = t_1 * (0.5 * (0.5 * (x * Math.pow(t, 2.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if (t * t) <= 5e+110: tmp = ((0.5 * x) - y) * t_1 else: tmp = t_1 * (0.5 * (0.5 * (x * math.pow(t, 2.0)))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (Float64(t * t) <= 5e+110) tmp = Float64(Float64(Float64(0.5 * x) - y) * t_1); else tmp = Float64(t_1 * Float64(0.5 * Float64(0.5 * Float64(x * (t ^ 2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); tmp = 0.0; if ((t * t) <= 5e+110) tmp = ((0.5 * x) - y) * t_1; else tmp = t_1 * (0.5 * (0.5 * (x * (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]}, If[LessEqual[N[(t * t), $MachinePrecision], 5e+110], N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[(0.5 * N[(0.5 * N[(x * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \cdot t \leq 5 \cdot 10^{+110}:\\
\;\;\;\;\left(0.5 \cdot x - y\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(0.5 \cdot \left(0.5 \cdot \left(x \cdot {t}^{2}\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 4.99999999999999978e110Initial program 99.1%
*-commutative99.1%
associate-*l*99.7%
exp-sqrt99.7%
Simplified99.7%
Taylor expanded in t around 0 88.0%
if 4.99999999999999978e110 < (*.f64 t t) Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 85.4%
*-commutative85.4%
Simplified85.4%
Taylor expanded in x around inf 63.5%
Taylor expanded in t around inf 63.5%
Final simplification78.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (<= (* t t) 200000.0)
(* (- (* 0.5 x) y) t_1)
(* (exp (/ (* t t) 2.0)) (* y (- t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if ((t * t) <= 200000.0) {
tmp = ((0.5 * x) - y) * t_1;
} else {
tmp = exp(((t * t) / 2.0)) * (y * -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 ((t * t) <= 200000.0d0) then
tmp = ((0.5d0 * x) - y) * t_1
else
tmp = exp(((t * t) / 2.0d0)) * (y * -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 ((t * t) <= 200000.0) {
tmp = ((0.5 * x) - y) * t_1;
} else {
tmp = Math.exp(((t * t) / 2.0)) * (y * -t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if (t * t) <= 200000.0: tmp = ((0.5 * x) - y) * t_1 else: tmp = math.exp(((t * t) / 2.0)) * (y * -t_1) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (Float64(t * t) <= 200000.0) tmp = Float64(Float64(Float64(0.5 * x) - y) * t_1); else tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * Float64(-t_1))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); tmp = 0.0; if ((t * t) <= 200000.0) tmp = ((0.5 * x) - y) * t_1; else tmp = exp(((t * t) / 2.0)) * (y * -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[LessEqual[N[(t * t), $MachinePrecision], 200000.0], N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * (-t$95$1)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \cdot t \leq 200000:\\
\;\;\;\;\left(0.5 \cdot x - y\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-t_1\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 2e5Initial program 99.6%
*-commutative99.6%
associate-*l*99.6%
exp-sqrt99.6%
Simplified99.6%
Taylor expanded in t around 0 98.0%
if 2e5 < (*.f64 t t) Initial program 99.1%
Taylor expanded in x around 0 72.6%
mul-1-neg72.6%
associate-*l*72.6%
distribute-lft-neg-in72.6%
Simplified72.6%
distribute-lft-neg-out72.6%
neg-sub072.6%
sqrt-unprod72.6%
Applied egg-rr72.6%
neg-sub072.6%
*-commutative72.6%
distribute-rgt-neg-in72.6%
Simplified72.6%
Final simplification86.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* 0.5 x) y)) (t_2 (sqrt (* 2.0 z))))
(if (<= t 1.9e+67)
(* t_1 t_2)
(if (<= t 5.5e+202)
(* (exp (/ (* t t) 2.0)) (* y t_2))
(* t_1 (cbrt (pow (* 2.0 z) 1.5)))))))
double code(double x, double y, double z, double t) {
double t_1 = (0.5 * x) - y;
double t_2 = sqrt((2.0 * z));
double tmp;
if (t <= 1.9e+67) {
tmp = t_1 * t_2;
} else if (t <= 5.5e+202) {
tmp = exp(((t * t) / 2.0)) * (y * 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 = (0.5 * x) - y;
double t_2 = Math.sqrt((2.0 * z));
double tmp;
if (t <= 1.9e+67) {
tmp = t_1 * t_2;
} else if (t <= 5.5e+202) {
tmp = Math.exp(((t * t) / 2.0)) * (y * 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(0.5 * x) - y) t_2 = sqrt(Float64(2.0 * z)) tmp = 0.0 if (t <= 1.9e+67) tmp = Float64(t_1 * t_2); elseif (t <= 5.5e+202) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * 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[(0.5 * x), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.9e+67], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[t, 5.5e+202], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * t$95$2), $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 := 0.5 \cdot x - y\\
t_2 := \sqrt{2 \cdot z}\\
\mathbf{if}\;t \leq 1.9 \cdot 10^{+67}:\\
\;\;\;\;t_1 \cdot t_2\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+202}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\
\end{array}
\end{array}
if t < 1.9000000000000001e67Initial program 99.3%
*-commutative99.3%
associate-*l*99.8%
exp-sqrt99.7%
Simplified99.7%
Taylor expanded in t around 0 70.1%
if 1.9000000000000001e67 < t < 5.50000000000000011e202Initial program 100.0%
Taylor expanded in x around 0 65.5%
mul-1-neg65.5%
associate-*l*65.5%
distribute-lft-neg-in65.5%
Simplified65.5%
expm1-log1p-u51.7%
expm1-udef13.8%
add-sqr-sqrt13.8%
sqrt-unprod24.1%
sqr-neg24.1%
sqrt-unprod10.3%
add-sqr-sqrt10.3%
sqrt-unprod10.3%
Applied egg-rr10.3%
expm1-def24.1%
expm1-log1p27.6%
Simplified27.6%
if 5.50000000000000011e202 < t Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 10.2%
associate-*r*10.2%
*-commutative10.2%
*-commutative10.2%
Simplified10.2%
*-commutative3.4%
sqrt-prod3.4%
add-cbrt-cube22.0%
pow1/322.0%
add-sqr-sqrt22.0%
pow122.0%
pow1/222.0%
pow-prod-up22.0%
*-commutative22.0%
metadata-eval22.0%
Applied egg-rr42.3%
unpow1/322.0%
Simplified42.3%
Final simplification63.1%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* 0.5 x) y) (sqrt (* 2.0 z)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((0.5 * x) - 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)) * (((0.5d0 * x) - 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)) * (((0.5 * x) - y) * Math.sqrt((2.0 * z)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((0.5 * x) - y) * math.sqrt((2.0 * z)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(2.0 * z)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((0.5 * x) - 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[(0.5 * x), $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(0.5 \cdot x - y\right) \cdot \sqrt{2 \cdot z}\right)
\end{array}
Initial program 99.4%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(if (<= t 9e+118)
(* (- (* 0.5 x) y) (sqrt (* 2.0 z)))
(if (<= t 1.82e+258)
(sqrt (* (pow x 2.0) (* 0.5 z)))
(if (<= t 1.9e+288)
(* 0.5 (* x (cbrt (pow (* 2.0 z) 1.5))))
(sqrt (* (* 2.0 z) (pow y 2.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 9e+118) {
tmp = ((0.5 * x) - y) * sqrt((2.0 * z));
} else if (t <= 1.82e+258) {
tmp = sqrt((pow(x, 2.0) * (0.5 * z)));
} else if (t <= 1.9e+288) {
tmp = 0.5 * (x * cbrt(pow((2.0 * z), 1.5)));
} else {
tmp = sqrt(((2.0 * z) * pow(y, 2.0)));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 9e+118) {
tmp = ((0.5 * x) - y) * Math.sqrt((2.0 * z));
} else if (t <= 1.82e+258) {
tmp = Math.sqrt((Math.pow(x, 2.0) * (0.5 * z)));
} else if (t <= 1.9e+288) {
tmp = 0.5 * (x * Math.cbrt(Math.pow((2.0 * z), 1.5)));
} 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 <= 9e+118) tmp = Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(2.0 * z))); elseif (t <= 1.82e+258) tmp = sqrt(Float64((x ^ 2.0) * Float64(0.5 * z))); elseif (t <= 1.9e+288) tmp = Float64(0.5 * Float64(x * cbrt((Float64(2.0 * z) ^ 1.5)))); else tmp = sqrt(Float64(Float64(2.0 * z) * (y ^ 2.0))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[t, 9e+118], N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.82e+258], N[Sqrt[N[(N[Power[x, 2.0], $MachinePrecision] * N[(0.5 * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.9e+288], N[(0.5 * N[(x * N[Power[N[Power[N[(2.0 * z), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $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 9 \cdot 10^{+118}:\\
\;\;\;\;\left(0.5 \cdot x - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 1.82 \cdot 10^{+258}:\\
\;\;\;\;\sqrt{{x}^{2} \cdot \left(0.5 \cdot z\right)}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+288}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot z\right) \cdot {y}^{2}}\\
\end{array}
\end{array}
if t < 9.00000000000000004e118Initial program 99.3%
*-commutative99.3%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 68.2%
if 9.00000000000000004e118 < t < 1.81999999999999999e258Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 8.3%
*-commutative8.3%
associate-*l*8.3%
Simplified8.3%
Taylor expanded in x around inf 7.1%
associate-*l*7.1%
Simplified7.1%
add-sqr-sqrt2.6%
sqrt-unprod28.8%
swap-sqr28.8%
metadata-eval28.8%
sqrt-prod28.8%
sqrt-prod28.8%
swap-sqr35.5%
unpow235.5%
add-sqr-sqrt35.5%
Applied egg-rr35.5%
*-commutative35.5%
associate-*l*35.5%
*-commutative35.5%
associate-*l*35.5%
metadata-eval35.5%
Simplified35.5%
if 1.81999999999999999e258 < t < 1.90000000000000004e288Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 15.8%
*-commutative15.8%
associate-*l*15.8%
Simplified15.8%
Taylor expanded in x around inf 2.7%
associate-*l*2.7%
Simplified2.7%
*-commutative2.7%
sqrt-prod2.7%
add-cbrt-cube39.0%
pow1/339.0%
add-sqr-sqrt39.0%
pow139.0%
pow1/239.0%
pow-prod-up39.0%
*-commutative39.0%
metadata-eval39.0%
Applied egg-rr39.0%
unpow1/339.0%
Simplified39.0%
if 1.90000000000000004e288 < t Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 6.6%
Taylor expanded in x around 0 6.6%
associate-*r*6.6%
*-commutative6.6%
mul-1-neg6.6%
distribute-rgt-neg-in6.6%
Simplified6.6%
Applied egg-rr0.3%
associate-*r*0.3%
*-commutative0.3%
*-commutative0.3%
Simplified0.3%
Final simplification62.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* 0.5 x) y)))
(if (<= t 4.8e+118)
(* t_1 (sqrt (* 2.0 z)))
(if (<= t 3.7e+227)
(sqrt (* (pow x 2.0) (* 0.5 z)))
(* t_1 (cbrt (pow (* 2.0 z) 1.5)))))))
double code(double x, double y, double z, double t) {
double t_1 = (0.5 * x) - y;
double tmp;
if (t <= 4.8e+118) {
tmp = t_1 * sqrt((2.0 * z));
} else if (t <= 3.7e+227) {
tmp = sqrt((pow(x, 2.0) * (0.5 * z)));
} 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 = (0.5 * x) - y;
double tmp;
if (t <= 4.8e+118) {
tmp = t_1 * Math.sqrt((2.0 * z));
} else if (t <= 3.7e+227) {
tmp = Math.sqrt((Math.pow(x, 2.0) * (0.5 * z)));
} 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(0.5 * x) - y) tmp = 0.0 if (t <= 4.8e+118) tmp = Float64(t_1 * sqrt(Float64(2.0 * z))); elseif (t <= 3.7e+227) tmp = sqrt(Float64((x ^ 2.0) * Float64(0.5 * z))); 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[(0.5 * x), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 4.8e+118], N[(t$95$1 * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e+227], N[Sqrt[N[(N[Power[x, 2.0], $MachinePrecision] * N[(0.5 * z), $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 := 0.5 \cdot x - y\\
\mathbf{if}\;t \leq 4.8 \cdot 10^{+118}:\\
\;\;\;\;t_1 \cdot \sqrt{2 \cdot z}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+227}:\\
\;\;\;\;\sqrt{{x}^{2} \cdot \left(0.5 \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt[3]{{\left(2 \cdot z\right)}^{1.5}}\\
\end{array}
\end{array}
if t < 4.8e118Initial program 99.3%
*-commutative99.3%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 68.2%
if 4.8e118 < t < 3.6999999999999999e227Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 9.2%
*-commutative9.2%
associate-*l*9.2%
Simplified9.2%
Taylor expanded in x around inf 8.5%
associate-*l*8.5%
Simplified8.5%
add-sqr-sqrt2.8%
sqrt-unprod35.6%
swap-sqr35.6%
metadata-eval35.6%
sqrt-prod35.6%
sqrt-prod35.6%
swap-sqr39.8%
unpow239.8%
add-sqr-sqrt39.8%
Applied egg-rr39.8%
*-commutative39.8%
associate-*l*39.8%
*-commutative39.8%
associate-*l*39.8%
metadata-eval39.8%
Simplified39.8%
if 3.6999999999999999e227 < t Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in t around 0 10.4%
associate-*r*10.4%
*-commutative10.4%
*-commutative10.4%
Simplified10.4%
*-commutative2.3%
sqrt-prod2.3%
add-cbrt-cube19.3%
pow1/319.3%
add-sqr-sqrt19.3%
pow119.3%
pow1/219.3%
pow-prod-up19.3%
*-commutative19.3%
metadata-eval19.3%
Applied egg-rr43.1%
unpow1/319.3%
Simplified43.1%
Final simplification64.0%
(FPCore (x y z t) :precision binary64 (if (<= t 6.5e+118) (* (- (* 0.5 x) y) (sqrt (* 2.0 z))) (sqrt (* (pow x 2.0) (* 0.5 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6.5e+118) {
tmp = ((0.5 * x) - y) * sqrt((2.0 * z));
} else {
tmp = sqrt((pow(x, 2.0) * (0.5 * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= 6.5d+118) then
tmp = ((0.5d0 * x) - y) * sqrt((2.0d0 * z))
else
tmp = sqrt(((x ** 2.0d0) * (0.5d0 * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 6.5e+118) {
tmp = ((0.5 * x) - y) * Math.sqrt((2.0 * z));
} else {
tmp = Math.sqrt((Math.pow(x, 2.0) * (0.5 * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 6.5e+118: tmp = ((0.5 * x) - y) * math.sqrt((2.0 * z)) else: tmp = math.sqrt((math.pow(x, 2.0) * (0.5 * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 6.5e+118) tmp = Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(2.0 * z))); else tmp = sqrt(Float64((x ^ 2.0) * Float64(0.5 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 6.5e+118) tmp = ((0.5 * x) - y) * sqrt((2.0 * z)); else tmp = sqrt(((x ^ 2.0) * (0.5 * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 6.5e+118], N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[Power[x, 2.0], $MachinePrecision] * N[(0.5 * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.5 \cdot 10^{+118}:\\
\;\;\;\;\left(0.5 \cdot x - y\right) \cdot \sqrt{2 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{x}^{2} \cdot \left(0.5 \cdot z\right)}\\
\end{array}
\end{array}
if t < 6.5e118Initial program 99.3%
*-commutative99.3%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 68.2%
if 6.5e118 < t Initial program 100.0%
*-commutative100.0%
associate-*l*100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 9.7%
*-commutative9.7%
associate-*l*9.7%
Simplified9.7%
Taylor expanded in x around inf 5.9%
associate-*l*5.9%
Simplified5.9%
add-sqr-sqrt2.2%
sqrt-unprod23.7%
swap-sqr23.7%
metadata-eval23.7%
sqrt-prod23.7%
sqrt-prod23.7%
swap-sqr28.6%
unpow228.6%
add-sqr-sqrt28.6%
Applied egg-rr28.6%
*-commutative28.6%
associate-*l*28.6%
*-commutative28.6%
associate-*l*28.6%
metadata-eval28.6%
Simplified28.6%
Final simplification62.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 z))))
(if (or (<= x -3.6e+38) (not (<= x 3.2e+119)))
(* (* 0.5 x) t_1)
(* y (- t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((2.0 * z));
double tmp;
if ((x <= -3.6e+38) || !(x <= 3.2e+119)) {
tmp = (0.5 * x) * t_1;
} else {
tmp = y * -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 ((x <= (-3.6d+38)) .or. (.not. (x <= 3.2d+119))) then
tmp = (0.5d0 * x) * t_1
else
tmp = y * -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 ((x <= -3.6e+38) || !(x <= 3.2e+119)) {
tmp = (0.5 * x) * t_1;
} else {
tmp = y * -t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((2.0 * z)) tmp = 0 if (x <= -3.6e+38) or not (x <= 3.2e+119): tmp = (0.5 * x) * t_1 else: tmp = y * -t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(2.0 * z)) tmp = 0.0 if ((x <= -3.6e+38) || !(x <= 3.2e+119)) tmp = Float64(Float64(0.5 * x) * t_1); else tmp = Float64(y * Float64(-t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((2.0 * z)); tmp = 0.0; if ((x <= -3.6e+38) || ~((x <= 3.2e+119))) tmp = (0.5 * x) * t_1; else tmp = y * -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[x, -3.6e+38], N[Not[LessEqual[x, 3.2e+119]], $MachinePrecision]], N[(N[(0.5 * x), $MachinePrecision] * t$95$1), $MachinePrecision], N[(y * (-t$95$1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot z}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+38} \lor \neg \left(x \leq 3.2 \cdot 10^{+119}\right):\\
\;\;\;\;\left(0.5 \cdot x\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-t_1\right)\\
\end{array}
\end{array}
if x < -3.59999999999999969e38 or 3.19999999999999989e119 < x Initial program 99.8%
*-commutative99.8%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in x around inf 81.9%
Taylor expanded in t around 0 51.3%
if -3.59999999999999969e38 < x < 3.19999999999999989e119Initial program 99.2%
*-commutative99.2%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 59.5%
Taylor expanded in x around 0 46.8%
associate-*r*46.8%
*-commutative46.8%
mul-1-neg46.8%
distribute-rgt-neg-in46.8%
Simplified46.8%
Applied egg-rr47.5%
*-commutative47.5%
distribute-rgt-neg-in47.5%
Simplified47.5%
Final simplification48.9%
(FPCore (x y z t) :precision binary64 (* (- (* 0.5 x) y) (sqrt (* 2.0 z))))
double code(double x, double y, double z, double t) {
return ((0.5 * x) - 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 = ((0.5d0 * x) - y) * sqrt((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return ((0.5 * x) - y) * Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return ((0.5 * x) - y) * math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(2.0 * z))) end
function tmp = code(x, y, z, t) tmp = ((0.5 * x) - y) * sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(0.5 \cdot x - y\right) \cdot \sqrt{2 \cdot z}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 59.1%
Final simplification59.1%
(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 99.4%
*-commutative99.4%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 59.1%
Taylor expanded in x around 0 32.4%
associate-*r*32.4%
*-commutative32.4%
mul-1-neg32.4%
distribute-rgt-neg-in32.4%
Simplified32.4%
Applied egg-rr32.8%
*-commutative32.8%
distribute-rgt-neg-in32.8%
Simplified32.8%
Final simplification32.8%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* 2.0 z))))
double code(double x, double y, double z, double t) {
return y * sqrt((2.0 * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * sqrt((2.0d0 * z))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((2.0 * z));
}
def code(x, y, z, t): return y * math.sqrt((2.0 * z))
function code(x, y, z, t) return Float64(y * sqrt(Float64(2.0 * z))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((2.0 * z)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{2 \cdot z}
\end{array}
Initial program 99.4%
*-commutative99.4%
associate-*l*99.8%
exp-sqrt99.8%
Simplified99.8%
Taylor expanded in t around 0 59.1%
Taylor expanded in x around 0 32.4%
associate-*r*32.4%
*-commutative32.4%
mul-1-neg32.4%
distribute-rgt-neg-in32.4%
Simplified32.4%
Applied egg-rr2.4%
expm1-def2.4%
expm1-log1p2.6%
Simplified2.6%
Final simplification2.6%
(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 2024011
(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))))