
(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 7 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 (* (sqrt (exp (* t t))) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
return sqrt(exp((t * t))) * (((x * 0.5) - 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 = sqrt(exp((t * t))) * (((x * 0.5d0) - y) * sqrt((z * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt(Math.exp((t * t))) * (((x * 0.5) - y) * Math.sqrt((z * 2.0)));
}
def code(x, y, z, t): return math.sqrt(math.exp((t * t))) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
function code(x, y, z, t) return Float64(sqrt(exp(Float64(t * t))) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = sqrt(exp((t * t))) * (((x * 0.5) - y) * sqrt((z * 2.0))); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{e^{t \cdot t}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.8%
exp-sqrt99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (sqrt (* z 2.0))) (t_2 (exp (/ (* t t) 2.0)))) (if (<= t_2 2.2e+301) (* (- (* x 0.5) y) t_1) (* t_2 (* y t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double t_2 = exp(((t * t) / 2.0));
double tmp;
if (t_2 <= 2.2e+301) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = t_2 * (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) :: t_2
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
t_2 = exp(((t * t) / 2.0d0))
if (t_2 <= 2.2d+301) then
tmp = ((x * 0.5d0) - y) * t_1
else
tmp = t_2 * (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((z * 2.0));
double t_2 = Math.exp(((t * t) / 2.0));
double tmp;
if (t_2 <= 2.2e+301) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = t_2 * (y * t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) t_2 = math.exp(((t * t) / 2.0)) tmp = 0 if t_2 <= 2.2e+301: tmp = ((x * 0.5) - y) * t_1 else: tmp = t_2 * (y * t_1) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) t_2 = exp(Float64(Float64(t * t) / 2.0)) tmp = 0.0 if (t_2 <= 2.2e+301) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); else tmp = Float64(t_2 * Float64(y * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); t_2 = exp(((t * t) / 2.0)); tmp = 0.0; if (t_2 <= 2.2e+301) tmp = ((x * 0.5) - y) * t_1; else tmp = t_2 * (y * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2.2e+301], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$2 * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
t_2 := e^{\frac{t \cdot t}{2}}\\
\mathbf{if}\;t\_2 \leq 2.2 \cdot 10^{+301}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \left(y \cdot t\_1\right)\\
\end{array}
\end{array}
if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 2.2e301Initial program 99.6%
exp-sqrt99.6%
pow199.6%
exp-sqrt99.6%
associate-*l*99.6%
exp-sqrt99.6%
sqrt-unprod99.6%
pow299.6%
Applied egg-rr99.6%
unpow199.6%
*-commutative99.6%
*-commutative99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.0%
if 2.2e301 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) Initial program 100.0%
Taylor expanded in x around 0 67.2%
mul-1-neg67.2%
distribute-rgt-neg-in67.2%
Simplified67.2%
pow167.2%
add-sqr-sqrt0.0%
sqrt-unprod28.2%
sqr-neg28.2%
add-sqr-sqrt28.2%
associate-*l*28.2%
sqrt-prod28.2%
Applied egg-rr28.2%
unpow128.2%
Simplified28.2%
Final simplification62.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= (* t t) 1e-30)
(* (- (* x 0.5) y) t_1)
(* (* y (- t_1)) (exp (/ (* t t) 2.0))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if ((t * t) <= 1e-30) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = (y * -t_1) * exp(((t * 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((z * 2.0d0))
if ((t * t) <= 1d-30) then
tmp = ((x * 0.5d0) - y) * t_1
else
tmp = (y * -t_1) * exp(((t * 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((z * 2.0));
double tmp;
if ((t * t) <= 1e-30) {
tmp = ((x * 0.5) - y) * t_1;
} else {
tmp = (y * -t_1) * Math.exp(((t * t) / 2.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if (t * t) <= 1e-30: tmp = ((x * 0.5) - y) * t_1 else: tmp = (y * -t_1) * math.exp(((t * t) / 2.0)) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (Float64(t * t) <= 1e-30) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); else tmp = Float64(Float64(y * Float64(-t_1)) * exp(Float64(Float64(t * t) / 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if ((t * t) <= 1e-30) tmp = ((x * 0.5) - y) * t_1; else tmp = (y * -t_1) * exp(((t * t) / 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 1e-30], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(y * (-t$95$1)), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \cdot t \leq 10^{-30}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(-t\_1\right)\right) \cdot e^{\frac{t \cdot t}{2}}\\
\end{array}
\end{array}
if (*.f64 t t) < 1e-30Initial program 99.6%
exp-sqrt99.6%
pow199.6%
exp-sqrt99.6%
associate-*l*99.6%
exp-sqrt99.6%
sqrt-unprod99.6%
pow299.6%
Applied egg-rr99.6%
unpow199.6%
*-commutative99.6%
*-commutative99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
if 1e-30 < (*.f64 t t) Initial program 100.0%
Taylor expanded in x around 0 68.3%
mul-1-neg68.3%
distribute-rgt-neg-in68.3%
Simplified68.3%
distribute-rgt-neg-out68.3%
neg-sub068.3%
associate-*l*68.3%
sqrt-prod68.3%
Applied egg-rr68.3%
neg-sub068.3%
distribute-lft-neg-in68.3%
Simplified68.3%
Final simplification83.0%
(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.8%
exp-sqrt99.8%
pow199.8%
exp-sqrt99.8%
associate-*l*99.8%
exp-sqrt99.8%
sqrt-unprod99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
pow299.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= y -4.4e+154) (sqrt (* (* z 2.0) (* y (- y x)))) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e+154) {
tmp = sqrt(((z * 2.0) * (y * (y - x))));
} else {
tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.4d+154)) then
tmp = sqrt(((z * 2.0d0) * (y * (y - x))))
else
tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e+154) {
tmp = Math.sqrt(((z * 2.0) * (y * (y - x))));
} else {
tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.4e+154: tmp = math.sqrt(((z * 2.0) * (y * (y - x)))) else: tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.4e+154) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * Float64(y - x)))); else tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.4e+154) tmp = sqrt(((z * 2.0) * (y * (y - x)))); else tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.4e+154], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\
\end{array}
\end{array}
if y < -4.4000000000000002e154Initial program 100.0%
exp-sqrt100.0%
Simplified100.0%
Taylor expanded in t around 0 47.9%
add-sqr-sqrt36.3%
sqrt-unprod57.0%
*-commutative57.0%
*-commutative57.0%
swap-sqr64.1%
add-sqr-sqrt64.1%
pow264.1%
Applied egg-rr64.1%
Taylor expanded in x around 0 60.1%
+-commutative60.1%
mul-1-neg60.1%
unsub-neg60.1%
unpow260.1%
distribute-rgt-out--64.1%
Simplified64.1%
if -4.4000000000000002e154 < y Initial program 99.8%
exp-sqrt99.8%
pow199.8%
exp-sqrt99.8%
associate-*l*99.8%
exp-sqrt99.8%
sqrt-unprod99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 57.5%
Final simplification58.2%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - 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 = ((x * 0.5d0) - y) * sqrt((z * 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));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.8%
exp-sqrt99.8%
pow199.8%
exp-sqrt99.8%
associate-*l*99.8%
exp-sqrt99.8%
sqrt-unprod99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 56.4%
Final simplification56.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 * Float64(-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 \left(-\sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.8%
exp-sqrt99.8%
pow199.8%
exp-sqrt99.8%
associate-*l*99.8%
exp-sqrt99.8%
sqrt-unprod99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
*-commutative99.8%
*-commutative99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 56.4%
Taylor expanded in x around 0 28.4%
mul-1-neg28.4%
Simplified28.4%
pow128.4%
associate-*l*28.4%
sqrt-prod28.5%
Applied egg-rr28.5%
unpow128.5%
Simplified28.5%
Final simplification28.5%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024131
(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))))