
(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 10 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) (pow (* z (* 2.0 (pow (exp t) t))) 0.5)))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * pow((z * (2.0 * pow(exp(t), t))), 0.5);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * ((z * (2.0d0 * (exp(t) ** t))) ** 0.5d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.pow((z * (2.0 * Math.pow(Math.exp(t), t))), 0.5);
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.pow((z * (2.0 * math.pow(math.exp(t), t))), 0.5)
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * (Float64(z * Float64(2.0 * (exp(t) ^ t))) ^ 0.5)) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * ((z * (2.0 * (exp(t) ^ t))) ^ 0.5); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Power[N[(z * N[(2.0 * N[Power[N[Exp[t], $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot {\left(z \cdot \left(2 \cdot {\left(e^{t}\right)}^{t}\right)\right)}^{0.5}
\end{array}
Initial program 99.1%
sqr-neg99.1%
associate-/l*99.1%
distribute-frac-neg99.1%
exp-neg99.1%
associate-*r/99.0%
*-rgt-identity99.0%
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%
pow1/299.8%
pow1/299.8%
pow-prod-down99.8%
associate-*l*99.8%
exp-prod99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (exp (* t t)) (* z 2.0)))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((exp((t * t)) * (z * 2.0)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * sqrt((exp((t * t)) * (z * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((Math.exp((t * t)) * (z * 2.0)));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((math.exp((t * t)) * (z * 2.0)))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(exp(Float64(t * t)) * Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((exp((t * t)) * (z * 2.0))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision] * N[(z * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z \cdot 2\right)}
\end{array}
Initial program 99.1%
sqr-neg99.1%
associate-/l*99.1%
distribute-frac-neg99.1%
exp-neg99.1%
associate-*r/99.0%
*-rgt-identity99.0%
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-udef74.4%
sqrt-unprod74.4%
associate-*l*74.4%
exp-prod74.4%
Applied egg-rr74.4%
expm1-def98.3%
expm1-log1p99.8%
associate-*r*99.8%
*-commutative99.8%
exp-prod99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (* z 2.0) 1e+59)
(* t_1 (* (+ 1.0 (* 0.5 (* t t))) (sqrt (* z 2.0))))
(* t_1 (pow (* z (* 2.0 (+ (* t t) 1.0))) 0.5)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if ((z * 2.0) <= 1e+59) {
tmp = t_1 * ((1.0 + (0.5 * (t * t))) * sqrt((z * 2.0)));
} else {
tmp = t_1 * pow((z * (2.0 * ((t * t) + 1.0))), 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) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if ((z * 2.0d0) <= 1d+59) then
tmp = t_1 * ((1.0d0 + (0.5d0 * (t * t))) * sqrt((z * 2.0d0)))
else
tmp = t_1 * ((z * (2.0d0 * ((t * t) + 1.0d0))) ** 0.5d0)
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 ((z * 2.0) <= 1e+59) {
tmp = t_1 * ((1.0 + (0.5 * (t * t))) * Math.sqrt((z * 2.0)));
} else {
tmp = t_1 * Math.pow((z * (2.0 * ((t * t) + 1.0))), 0.5);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if (z * 2.0) <= 1e+59: tmp = t_1 * ((1.0 + (0.5 * (t * t))) * math.sqrt((z * 2.0))) else: tmp = t_1 * math.pow((z * (2.0 * ((t * t) + 1.0))), 0.5) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(z * 2.0) <= 1e+59) tmp = Float64(t_1 * Float64(Float64(1.0 + Float64(0.5 * Float64(t * t))) * sqrt(Float64(z * 2.0)))); else tmp = Float64(t_1 * (Float64(z * Float64(2.0 * Float64(Float64(t * t) + 1.0))) ^ 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if ((z * 2.0) <= 1e+59) tmp = t_1 * ((1.0 + (0.5 * (t * t))) * sqrt((z * 2.0))); else tmp = t_1 * ((z * (2.0 * ((t * t) + 1.0))) ^ 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(z * 2.0), $MachinePrecision], 1e+59], N[(t$95$1 * N[(N[(1.0 + N[(0.5 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[(z * N[(2.0 * N[(N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;z \cdot 2 \leq 10^{+59}:\\
\;\;\;\;t_1 \cdot \left(\left(1 + 0.5 \cdot \left(t \cdot t\right)\right) \cdot \sqrt{z \cdot 2}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(z \cdot \left(2 \cdot \left(t \cdot t + 1\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 z 2) < 9.99999999999999972e58Initial program 98.6%
sqr-neg98.6%
associate-/l*98.6%
distribute-frac-neg98.6%
exp-neg98.6%
associate-*r/98.5%
*-rgt-identity98.5%
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%
Taylor expanded in t around 0 89.6%
unpow289.6%
Simplified89.6%
if 9.99999999999999972e58 < (*.f64 z 2) Initial program 99.8%
sqr-neg99.8%
associate-/l*99.8%
distribute-frac-neg99.8%
exp-neg99.8%
associate-*r/99.8%
*-rgt-identity99.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%
pow1/299.8%
pow1/299.8%
pow-prod-down99.8%
associate-*l*99.8%
exp-prod99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 95.2%
+-commutative95.2%
unpow295.2%
Simplified95.2%
Final simplification91.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x 0.5) y)))
(if (<= (* t t) 0.02)
(* t_1 (pow (* z 2.0) 0.5))
(* t_1 (pow (* 2.0 (* z (* t t))) 0.5)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * 0.5) - y;
double tmp;
if ((t * t) <= 0.02) {
tmp = t_1 * pow((z * 2.0), 0.5);
} else {
tmp = t_1 * pow((2.0 * (z * (t * t))), 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) :: t_1
real(8) :: tmp
t_1 = (x * 0.5d0) - y
if ((t * t) <= 0.02d0) then
tmp = t_1 * ((z * 2.0d0) ** 0.5d0)
else
tmp = t_1 * ((2.0d0 * (z * (t * t))) ** 0.5d0)
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 * t) <= 0.02) {
tmp = t_1 * Math.pow((z * 2.0), 0.5);
} else {
tmp = t_1 * Math.pow((2.0 * (z * (t * t))), 0.5);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * 0.5) - y tmp = 0 if (t * t) <= 0.02: tmp = t_1 * math.pow((z * 2.0), 0.5) else: tmp = t_1 * math.pow((2.0 * (z * (t * t))), 0.5) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (Float64(t * t) <= 0.02) tmp = Float64(t_1 * (Float64(z * 2.0) ^ 0.5)); else tmp = Float64(t_1 * (Float64(2.0 * Float64(z * Float64(t * t))) ^ 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * 0.5) - y; tmp = 0.0; if ((t * t) <= 0.02) tmp = t_1 * ((z * 2.0) ^ 0.5); else tmp = t_1 * ((2.0 * (z * (t * t))) ^ 0.5); end tmp_2 = 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.02], N[(t$95$1 * N[Power[N[(z * 2.0), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[(2.0 * N[(z * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot 0.5 - y\\
\mathbf{if}\;t \cdot t \leq 0.02:\\
\;\;\;\;t_1 \cdot {\left(z \cdot 2\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(2 \cdot \left(z \cdot \left(t \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if (*.f64 t t) < 0.0200000000000000004Initial program 99.7%
sqr-neg99.7%
associate-/l*99.7%
distribute-frac-neg99.7%
exp-neg99.7%
associate-*r/99.7%
*-rgt-identity99.7%
associate-*r/99.7%
*-rgt-identity99.7%
associate-*r/99.7%
exp-neg99.7%
distribute-frac-neg99.7%
associate-/l*99.7%
sqr-neg99.7%
exp-sqrt99.7%
Simplified99.7%
Taylor expanded in t around 0 98.6%
*-commutative98.6%
sqrt-prod99.0%
pow1/299.0%
Applied egg-rr99.0%
if 0.0200000000000000004 < (*.f64 t t) Initial program 98.3%
sqr-neg98.3%
associate-/l*98.3%
distribute-frac-neg98.3%
exp-neg98.3%
associate-*r/98.3%
*-rgt-identity98.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%
pow1/2100.0%
pow1/2100.0%
pow-prod-down100.0%
associate-*l*100.0%
exp-prod100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 79.0%
+-commutative79.0%
unpow279.0%
Simplified79.0%
Taylor expanded in t around inf 79.0%
unpow279.0%
*-commutative79.0%
Simplified79.0%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (pow (* z (* 2.0 (+ (* t t) 1.0))) 0.5)))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * pow((z * (2.0 * ((t * t) + 1.0))), 0.5);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * 0.5d0) - y) * ((z * (2.0d0 * ((t * t) + 1.0d0))) ** 0.5d0)
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.pow((z * (2.0 * ((t * t) + 1.0))), 0.5);
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.pow((z * (2.0 * ((t * t) + 1.0))), 0.5)
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * (Float64(z * Float64(2.0 * Float64(Float64(t * t) + 1.0))) ^ 0.5)) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * ((z * (2.0 * ((t * t) + 1.0))) ^ 0.5); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Power[N[(z * N[(2.0 * N[(N[(t * t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot {\left(z \cdot \left(2 \cdot \left(t \cdot t + 1\right)\right)\right)}^{0.5}
\end{array}
Initial program 99.1%
sqr-neg99.1%
associate-/l*99.1%
distribute-frac-neg99.1%
exp-neg99.1%
associate-*r/99.0%
*-rgt-identity99.0%
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%
pow1/299.8%
pow1/299.8%
pow-prod-down99.8%
associate-*l*99.8%
exp-prod99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 90.0%
+-commutative90.0%
unpow290.0%
Simplified90.0%
Final simplification90.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 0.5 (* z (* x x)))))
(t_2 (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
(if (<= t 760000000000.0)
t_2
(if (<= t 1.95e+66)
t_1
(if (<= t 1.1e+94)
t_2
(if (<= t 6.8e+191) (sqrt (* (* z 2.0) (* y y))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((0.5 * (z * (x * x))));
double t_2 = ((x * 0.5) - y) * sqrt((z * 2.0));
double tmp;
if (t <= 760000000000.0) {
tmp = t_2;
} else if (t <= 1.95e+66) {
tmp = t_1;
} else if (t <= 1.1e+94) {
tmp = t_2;
} else if (t <= 6.8e+191) {
tmp = sqrt(((z * 2.0) * (y * y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((0.5d0 * (z * (x * x))))
t_2 = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
if (t <= 760000000000.0d0) then
tmp = t_2
else if (t <= 1.95d+66) then
tmp = t_1
else if (t <= 1.1d+94) then
tmp = t_2
else if (t <= 6.8d+191) then
tmp = sqrt(((z * 2.0d0) * (y * y)))
else
tmp = 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((0.5 * (z * (x * x))));
double t_2 = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
double tmp;
if (t <= 760000000000.0) {
tmp = t_2;
} else if (t <= 1.95e+66) {
tmp = t_1;
} else if (t <= 1.1e+94) {
tmp = t_2;
} else if (t <= 6.8e+191) {
tmp = Math.sqrt(((z * 2.0) * (y * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((0.5 * (z * (x * x)))) t_2 = ((x * 0.5) - y) * math.sqrt((z * 2.0)) tmp = 0 if t <= 760000000000.0: tmp = t_2 elif t <= 1.95e+66: tmp = t_1 elif t <= 1.1e+94: tmp = t_2 elif t <= 6.8e+191: tmp = math.sqrt(((z * 2.0) * (y * y))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(0.5 * Float64(z * Float64(x * x)))) t_2 = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) tmp = 0.0 if (t <= 760000000000.0) tmp = t_2; elseif (t <= 1.95e+66) tmp = t_1; elseif (t <= 1.1e+94) tmp = t_2; elseif (t <= 6.8e+191) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((0.5 * (z * (x * x)))); t_2 = ((x * 0.5) - y) * sqrt((z * 2.0)); tmp = 0.0; if (t <= 760000000000.0) tmp = t_2; elseif (t <= 1.95e+66) tmp = t_1; elseif (t <= 1.1e+94) tmp = t_2; elseif (t <= 6.8e+191) tmp = sqrt(((z * 2.0) * (y * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(0.5 * N[(z * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 760000000000.0], t$95$2, If[LessEqual[t, 1.95e+66], t$95$1, If[LessEqual[t, 1.1e+94], t$95$2, If[LessEqual[t, 6.8e+191], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{0.5 \cdot \left(z \cdot \left(x \cdot x\right)\right)}\\
t_2 := \left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 760000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+94}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+191}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < 7.6e11 or 1.9500000000000002e66 < t < 1.10000000000000006e94Initial program 99.3%
sqr-neg99.3%
associate-/l*99.3%
distribute-frac-neg99.3%
exp-neg99.3%
associate-*r/99.3%
*-rgt-identity99.3%
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%
Taylor expanded in t around 0 71.6%
*-commutative71.6%
sqrt-prod71.9%
Applied egg-rr71.9%
if 7.6e11 < t < 1.9500000000000002e66 or 6.80000000000000018e191 < t Initial program 97.1%
sqr-neg97.1%
associate-/l*97.1%
distribute-frac-neg97.1%
exp-neg97.1%
associate-*r/97.1%
*-rgt-identity97.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%
Taylor expanded in t around 0 12.9%
add-sqr-sqrt11.0%
sqrt-prod27.8%
unpow227.8%
pow1/227.8%
*-rgt-identity27.8%
pow1/227.8%
unpow-prod-down30.6%
*-commutative30.6%
*-commutative30.6%
associate-*l*30.6%
Applied egg-rr30.6%
unpow1/230.6%
associate-*r*30.6%
*-commutative30.6%
*-commutative30.6%
*-commutative30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in x around inf 30.4%
unpow230.4%
Simplified30.4%
if 1.10000000000000006e94 < t < 6.80000000000000018e191Initial 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 15.6%
add-sqr-sqrt1.8%
sqrt-prod17.6%
unpow217.6%
pow1/217.6%
*-rgt-identity17.6%
pow1/217.6%
unpow-prod-down28.2%
*-commutative28.2%
*-commutative28.2%
associate-*l*28.2%
Applied egg-rr28.2%
unpow1/228.2%
associate-*r*28.2%
*-commutative28.2%
*-commutative28.2%
*-commutative28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in x around 0 28.3%
unpow228.3%
Simplified28.3%
Final simplification63.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* 0.5 (* z (* x x))))) (t_2 (- (* x 0.5) y)))
(if (<= t 1250000000000.0)
(* t_2 (pow (* z 2.0) 0.5))
(if (<= t 2.7e+66)
t_1
(if (<= t 7.5e+91)
(* t_2 (sqrt (* z 2.0)))
(if (<= t 6.8e+191) (sqrt (* (* z 2.0) (* y y))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((0.5 * (z * (x * x))));
double t_2 = (x * 0.5) - y;
double tmp;
if (t <= 1250000000000.0) {
tmp = t_2 * pow((z * 2.0), 0.5);
} else if (t <= 2.7e+66) {
tmp = t_1;
} else if (t <= 7.5e+91) {
tmp = t_2 * sqrt((z * 2.0));
} else if (t <= 6.8e+191) {
tmp = sqrt(((z * 2.0) * (y * y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = sqrt((0.5d0 * (z * (x * x))))
t_2 = (x * 0.5d0) - y
if (t <= 1250000000000.0d0) then
tmp = t_2 * ((z * 2.0d0) ** 0.5d0)
else if (t <= 2.7d+66) then
tmp = t_1
else if (t <= 7.5d+91) then
tmp = t_2 * sqrt((z * 2.0d0))
else if (t <= 6.8d+191) then
tmp = sqrt(((z * 2.0d0) * (y * y)))
else
tmp = 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((0.5 * (z * (x * x))));
double t_2 = (x * 0.5) - y;
double tmp;
if (t <= 1250000000000.0) {
tmp = t_2 * Math.pow((z * 2.0), 0.5);
} else if (t <= 2.7e+66) {
tmp = t_1;
} else if (t <= 7.5e+91) {
tmp = t_2 * Math.sqrt((z * 2.0));
} else if (t <= 6.8e+191) {
tmp = Math.sqrt(((z * 2.0) * (y * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((0.5 * (z * (x * x)))) t_2 = (x * 0.5) - y tmp = 0 if t <= 1250000000000.0: tmp = t_2 * math.pow((z * 2.0), 0.5) elif t <= 2.7e+66: tmp = t_1 elif t <= 7.5e+91: tmp = t_2 * math.sqrt((z * 2.0)) elif t <= 6.8e+191: tmp = math.sqrt(((z * 2.0) * (y * y))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(0.5 * Float64(z * Float64(x * x)))) t_2 = Float64(Float64(x * 0.5) - y) tmp = 0.0 if (t <= 1250000000000.0) tmp = Float64(t_2 * (Float64(z * 2.0) ^ 0.5)); elseif (t <= 2.7e+66) tmp = t_1; elseif (t <= 7.5e+91) tmp = Float64(t_2 * sqrt(Float64(z * 2.0))); elseif (t <= 6.8e+191) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((0.5 * (z * (x * x)))); t_2 = (x * 0.5) - y; tmp = 0.0; if (t <= 1250000000000.0) tmp = t_2 * ((z * 2.0) ^ 0.5); elseif (t <= 2.7e+66) tmp = t_1; elseif (t <= 7.5e+91) tmp = t_2 * sqrt((z * 2.0)); elseif (t <= 6.8e+191) tmp = sqrt(((z * 2.0) * (y * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(0.5 * N[(z * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t, 1250000000000.0], N[(t$95$2 * N[Power[N[(z * 2.0), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+66], t$95$1, If[LessEqual[t, 7.5e+91], N[(t$95$2 * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+191], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{0.5 \cdot \left(z \cdot \left(x \cdot x\right)\right)}\\
t_2 := x \cdot 0.5 - y\\
\mathbf{if}\;t \leq 1250000000000:\\
\;\;\;\;t_2 \cdot {\left(z \cdot 2\right)}^{0.5}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+91}:\\
\;\;\;\;t_2 \cdot \sqrt{z \cdot 2}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+191}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < 1.25e12Initial program 99.3%
sqr-neg99.3%
associate-/l*99.3%
distribute-frac-neg99.3%
exp-neg99.3%
associate-*r/99.3%
*-rgt-identity99.3%
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%
Taylor expanded in t around 0 72.9%
*-commutative72.9%
sqrt-prod73.2%
pow1/273.2%
Applied egg-rr73.2%
if 1.25e12 < t < 2.7e66 or 6.80000000000000018e191 < t Initial program 97.1%
sqr-neg97.1%
associate-/l*97.1%
distribute-frac-neg97.1%
exp-neg97.1%
associate-*r/97.1%
*-rgt-identity97.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%
Taylor expanded in t around 0 12.9%
add-sqr-sqrt11.0%
sqrt-prod27.8%
unpow227.8%
pow1/227.8%
*-rgt-identity27.8%
pow1/227.8%
unpow-prod-down30.6%
*-commutative30.6%
*-commutative30.6%
associate-*l*30.6%
Applied egg-rr30.6%
unpow1/230.6%
associate-*r*30.6%
*-commutative30.6%
*-commutative30.6%
*-commutative30.6%
*-commutative30.6%
Simplified30.6%
Taylor expanded in x around inf 30.4%
unpow230.4%
Simplified30.4%
if 2.7e66 < t < 7.50000000000000033e91Initial 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 40.4%
*-commutative40.4%
sqrt-prod40.4%
Applied egg-rr40.4%
if 7.50000000000000033e91 < t < 6.80000000000000018e191Initial 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 15.6%
add-sqr-sqrt1.8%
sqrt-prod17.6%
unpow217.6%
pow1/217.6%
*-rgt-identity17.6%
pow1/217.6%
unpow-prod-down28.2%
*-commutative28.2%
*-commutative28.2%
associate-*l*28.2%
Applied egg-rr28.2%
unpow1/228.2%
associate-*r*28.2%
*-commutative28.2%
*-commutative28.2%
*-commutative28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in x around 0 28.3%
unpow228.3%
Simplified28.3%
Final simplification63.3%
(FPCore (x y z t) :precision binary64 (if (<= x 5.6e-41) (* (- y) (sqrt (* z 2.0))) (sqrt (* 0.5 (* z (* x x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= 5.6e-41) {
tmp = -y * sqrt((z * 2.0));
} else {
tmp = sqrt((0.5 * (z * (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 (x <= 5.6d-41) then
tmp = -y * sqrt((z * 2.0d0))
else
tmp = sqrt((0.5d0 * (z * (x * x))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= 5.6e-41) {
tmp = -y * Math.sqrt((z * 2.0));
} else {
tmp = Math.sqrt((0.5 * (z * (x * x))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= 5.6e-41: tmp = -y * math.sqrt((z * 2.0)) else: tmp = math.sqrt((0.5 * (z * (x * x)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= 5.6e-41) tmp = Float64(Float64(-y) * sqrt(Float64(z * 2.0))); else tmp = sqrt(Float64(0.5 * Float64(z * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= 5.6e-41) tmp = -y * sqrt((z * 2.0)); else tmp = sqrt((0.5 * (z * (x * x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, 5.6e-41], N[((-y) * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(0.5 * N[(z * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.6 \cdot 10^{-41}:\\
\;\;\;\;\left(-y\right) \cdot \sqrt{z \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{0.5 \cdot \left(z \cdot \left(x \cdot x\right)\right)}\\
\end{array}
\end{array}
if x < 5.6000000000000003e-41Initial 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%
Taylor expanded in t around 0 62.2%
Taylor expanded in x around 0 35.1%
mul-1-neg35.1%
associate-*l*35.1%
distribute-rgt-neg-in35.1%
distribute-lft-neg-out35.1%
*-commutative35.1%
Simplified35.1%
*-commutative35.1%
*-commutative35.1%
associate-*l*35.1%
sqrt-prod35.2%
add-cube-cbrt34.8%
unpow334.8%
*-commutative34.8%
distribute-rgt-neg-out34.8%
add-sqr-sqrt20.0%
sqrt-unprod19.8%
sqr-neg19.8%
sqrt-unprod2.2%
add-sqr-sqrt3.1%
*-commutative3.1%
add-sqr-sqrt2.2%
sqrt-unprod19.8%
sqr-neg19.8%
sqrt-unprod20.0%
add-sqr-sqrt34.8%
unpow334.8%
add-cube-cbrt35.2%
*-commutative35.2%
Applied egg-rr35.2%
distribute-lft-neg-in35.2%
Simplified35.2%
if 5.6000000000000003e-41 < x Initial program 99.8%
sqr-neg99.8%
associate-/l*99.8%
distribute-frac-neg99.8%
exp-neg99.8%
associate-*r/99.8%
*-rgt-identity99.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%
Taylor expanded in t around 0 55.5%
add-sqr-sqrt51.1%
sqrt-prod51.5%
unpow251.5%
pow1/251.5%
*-rgt-identity51.5%
pow1/251.5%
unpow-prod-down51.5%
*-commutative51.5%
*-commutative51.5%
associate-*l*51.5%
Applied egg-rr51.5%
unpow1/251.5%
associate-*r*51.5%
*-commutative51.5%
*-commutative51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x around inf 50.3%
unpow250.3%
Simplified50.3%
Final simplification39.9%
(FPCore (x y z t) :precision binary64 (* (- y) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return -y * sqrt((z * 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -y * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return -y * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return -y * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(Float64(-y) * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = -y * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[((-y) * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-y\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.1%
sqr-neg99.1%
associate-/l*99.1%
distribute-frac-neg99.1%
exp-neg99.1%
associate-*r/99.0%
*-rgt-identity99.0%
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%
Taylor expanded in t around 0 60.1%
Taylor expanded in x around 0 29.3%
mul-1-neg29.3%
associate-*l*29.3%
distribute-rgt-neg-in29.3%
distribute-lft-neg-out29.3%
*-commutative29.3%
Simplified29.3%
*-commutative29.3%
*-commutative29.3%
associate-*l*29.2%
sqrt-prod29.4%
add-cube-cbrt29.0%
unpow329.0%
*-commutative29.0%
distribute-rgt-neg-out29.0%
add-sqr-sqrt15.2%
sqrt-unprod16.4%
sqr-neg16.4%
sqrt-unprod1.7%
add-sqr-sqrt2.8%
*-commutative2.8%
add-sqr-sqrt1.7%
sqrt-unprod16.4%
sqr-neg16.4%
sqrt-unprod15.2%
add-sqr-sqrt29.0%
unpow329.0%
add-cube-cbrt29.4%
*-commutative29.4%
Applied egg-rr29.4%
distribute-lft-neg-in29.4%
Simplified29.4%
Final simplification29.4%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return y * sqrt((z * 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return y * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(y * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.1%
sqr-neg99.1%
associate-/l*99.1%
distribute-frac-neg99.1%
exp-neg99.1%
associate-*r/99.0%
*-rgt-identity99.0%
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%
Taylor expanded in t around 0 60.1%
Taylor expanded in x around 0 29.3%
mul-1-neg29.3%
associate-*l*29.3%
distribute-rgt-neg-in29.3%
distribute-lft-neg-out29.3%
*-commutative29.3%
Simplified29.3%
expm1-log1p-u16.5%
expm1-udef10.5%
*-commutative10.5%
*-commutative10.5%
associate-*l*10.5%
add-sqr-sqrt9.8%
sqrt-unprod12.6%
sqr-neg12.6%
sqrt-unprod1.1%
add-sqr-sqrt2.6%
sqrt-prod2.6%
*-commutative2.6%
Applied egg-rr2.6%
expm1-def2.5%
expm1-log1p2.8%
Simplified2.8%
Final simplification2.8%
(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 2023279
(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))))