
(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 9 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 (* 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
(let* ((t_1 (exp (/ (* t t) 2.0))) (t_2 (sqrt (* z 2.0))))
(if (<= (* t t) 1.08e-5)
(* (sqrt z) (* (sqrt 2.0) (- (* x 0.5) y)))
(if (<= (* t t) 5e+259)
(* t_1 (/ t_2 (/ 2.0 x)))
(* t_1 (* y (- t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = exp(((t * t) / 2.0));
double t_2 = sqrt((z * 2.0));
double tmp;
if ((t * t) <= 1.08e-5) {
tmp = sqrt(z) * (sqrt(2.0) * ((x * 0.5) - y));
} else if ((t * t) <= 5e+259) {
tmp = t_1 * (t_2 / (2.0 / x));
} else {
tmp = t_1 * (y * -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 = exp(((t * t) / 2.0d0))
t_2 = sqrt((z * 2.0d0))
if ((t * t) <= 1.08d-5) then
tmp = sqrt(z) * (sqrt(2.0d0) * ((x * 0.5d0) - y))
else if ((t * t) <= 5d+259) then
tmp = t_1 * (t_2 / (2.0d0 / x))
else
tmp = t_1 * (y * -t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.exp(((t * t) / 2.0));
double t_2 = Math.sqrt((z * 2.0));
double tmp;
if ((t * t) <= 1.08e-5) {
tmp = Math.sqrt(z) * (Math.sqrt(2.0) * ((x * 0.5) - y));
} else if ((t * t) <= 5e+259) {
tmp = t_1 * (t_2 / (2.0 / x));
} else {
tmp = t_1 * (y * -t_2);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.exp(((t * t) / 2.0)) t_2 = math.sqrt((z * 2.0)) tmp = 0 if (t * t) <= 1.08e-5: tmp = math.sqrt(z) * (math.sqrt(2.0) * ((x * 0.5) - y)) elif (t * t) <= 5e+259: tmp = t_1 * (t_2 / (2.0 / x)) else: tmp = t_1 * (y * -t_2) return tmp
function code(x, y, z, t) t_1 = exp(Float64(Float64(t * t) / 2.0)) t_2 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (Float64(t * t) <= 1.08e-5) tmp = Float64(sqrt(z) * Float64(sqrt(2.0) * Float64(Float64(x * 0.5) - y))); elseif (Float64(t * t) <= 5e+259) tmp = Float64(t_1 * Float64(t_2 / Float64(2.0 / x))); else tmp = Float64(t_1 * Float64(y * Float64(-t_2))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = exp(((t * t) / 2.0)); t_2 = sqrt((z * 2.0)); tmp = 0.0; if ((t * t) <= 1.08e-5) tmp = sqrt(z) * (sqrt(2.0) * ((x * 0.5) - y)); elseif ((t * t) <= 5e+259) tmp = t_1 * (t_2 / (2.0 / x)); else tmp = t_1 * (y * -t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 1.08e-5], N[(N[Sqrt[z], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(t * t), $MachinePrecision], 5e+259], N[(t$95$1 * N[(t$95$2 / N[(2.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y * (-t$95$2)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := e^{\frac{t \cdot t}{2}}\\
t_2 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \cdot t \leq 1.08 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(x \cdot 0.5 - y\right)\right)\\
\mathbf{elif}\;t \cdot t \leq 5 \cdot 10^{+259}:\\
\;\;\;\;t_1 \cdot \frac{t_2}{\frac{2}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(y \cdot \left(-t_2\right)\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* t t) 8.5e-17) (* (sqrt z) (* (sqrt 2.0) (- (* x 0.5) y))) (* (exp (/ (* t t) 2.0)) (* y (- (sqrt (* z 2.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t * t) <= 8.5e-17) {
tmp = sqrt(z) * (sqrt(2.0) * ((x * 0.5) - y));
} else {
tmp = exp(((t * t) / 2.0)) * (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 ((t * t) <= 8.5d-17) then
tmp = sqrt(z) * (sqrt(2.0d0) * ((x * 0.5d0) - y))
else
tmp = exp(((t * t) / 2.0d0)) * (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 ((t * t) <= 8.5e-17) {
tmp = Math.sqrt(z) * (Math.sqrt(2.0) * ((x * 0.5) - y));
} else {
tmp = Math.exp(((t * t) / 2.0)) * (y * -Math.sqrt((z * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t * t) <= 8.5e-17: tmp = math.sqrt(z) * (math.sqrt(2.0) * ((x * 0.5) - y)) else: tmp = math.exp(((t * t) / 2.0)) * (y * -math.sqrt((z * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(t * t) <= 8.5e-17) tmp = Float64(sqrt(z) * Float64(sqrt(2.0) * Float64(Float64(x * 0.5) - y))); else tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(y * Float64(-sqrt(Float64(z * 2.0))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t * t) <= 8.5e-17) tmp = sqrt(z) * (sqrt(2.0) * ((x * 0.5) - y)); else tmp = exp(((t * t) / 2.0)) * (y * -sqrt((z * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(t * t), $MachinePrecision], 8.5e-17], N[(N[Sqrt[z], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(y * (-N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \cdot t \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(x \cdot 0.5 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(y \cdot \left(-\sqrt{z \cdot 2}\right)\right)\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= x -9.8e+132)
(* (* x 0.5) t_1)
(if (<= x 5.6e+40) (/ t_1 (/ -1.0 y)) (sqrt (* z (* 0.5 (pow x 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (x <= -9.8e+132) {
tmp = (x * 0.5) * t_1;
} else if (x <= 5.6e+40) {
tmp = t_1 / (-1.0 / y);
} else {
tmp = sqrt((z * (0.5 * pow(x, 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 (x <= (-9.8d+132)) then
tmp = (x * 0.5d0) * t_1
else if (x <= 5.6d+40) then
tmp = t_1 / ((-1.0d0) / y)
else
tmp = sqrt((z * (0.5d0 * (x ** 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 (x <= -9.8e+132) {
tmp = (x * 0.5) * t_1;
} else if (x <= 5.6e+40) {
tmp = t_1 / (-1.0 / y);
} else {
tmp = Math.sqrt((z * (0.5 * Math.pow(x, 2.0))));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if x <= -9.8e+132: tmp = (x * 0.5) * t_1 elif x <= 5.6e+40: tmp = t_1 / (-1.0 / y) else: tmp = math.sqrt((z * (0.5 * math.pow(x, 2.0)))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (x <= -9.8e+132) tmp = Float64(Float64(x * 0.5) * t_1); elseif (x <= 5.6e+40) tmp = Float64(t_1 / Float64(-1.0 / y)); else tmp = sqrt(Float64(z * Float64(0.5 * (x ^ 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (x <= -9.8e+132) tmp = (x * 0.5) * t_1; elseif (x <= 5.6e+40) tmp = t_1 / (-1.0 / y); else tmp = sqrt((z * (0.5 * (x ^ 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[x, -9.8e+132], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x, 5.6e+40], N[(t$95$1 / N[(-1.0 / y), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(z * N[(0.5 * N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \leq -9.8 \cdot 10^{+132}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t_1\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+40}:\\
\;\;\;\;\frac{t_1}{\frac{-1}{y}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{z \cdot \left(0.5 \cdot {x}^{2}\right)}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (* (sqrt z) (* (sqrt 2.0) (- (* x 0.5) y))))
double code(double x, double y, double z, double t) {
return sqrt(z) * (sqrt(2.0) * ((x * 0.5) - y));
}
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(z) * (sqrt(2.0d0) * ((x * 0.5d0) - y))
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt(z) * (Math.sqrt(2.0) * ((x * 0.5) - y));
}
def code(x, y, z, t): return math.sqrt(z) * (math.sqrt(2.0) * ((x * 0.5) - y))
function code(x, y, z, t) return Float64(sqrt(z) * Float64(sqrt(2.0) * Float64(Float64(x * 0.5) - y))) end
function tmp = code(x, y, z, t) tmp = sqrt(z) * (sqrt(2.0) * ((x * 0.5) - y)); end
code[x_, y_, z_, t_] := N[(N[Sqrt[z], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z} \cdot \left(\sqrt{2} \cdot \left(x \cdot 0.5 - y\right)\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (or (<= x -9.5e+132) (not (<= x 5.2e+40)))
(* (* x 0.5) t_1)
(* y (- t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if ((x <= -9.5e+132) || !(x <= 5.2e+40)) {
tmp = (x * 0.5) * 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((z * 2.0d0))
if ((x <= (-9.5d+132)) .or. (.not. (x <= 5.2d+40))) then
tmp = (x * 0.5d0) * 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((z * 2.0));
double tmp;
if ((x <= -9.5e+132) || !(x <= 5.2e+40)) {
tmp = (x * 0.5) * t_1;
} else {
tmp = y * -t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if (x <= -9.5e+132) or not (x <= 5.2e+40): tmp = (x * 0.5) * t_1 else: tmp = y * -t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if ((x <= -9.5e+132) || !(x <= 5.2e+40)) tmp = Float64(Float64(x * 0.5) * t_1); else tmp = Float64(y * Float64(-t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if ((x <= -9.5e+132) || ~((x <= 5.2e+40))) tmp = (x * 0.5) * t_1; else tmp = 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]}, If[Or[LessEqual[x, -9.5e+132], N[Not[LessEqual[x, 5.2e+40]], $MachinePrecision]], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision], N[(y * (-t$95$1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+132} \lor \neg \left(x \leq 5.2 \cdot 10^{+40}\right):\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-t_1\right)\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (or (<= x -9.5e+132) (not (<= x 9e+40)))
(* (* x 0.5) t_1)
(/ t_1 (/ -1.0 y)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if ((x <= -9.5e+132) || !(x <= 9e+40)) {
tmp = (x * 0.5) * t_1;
} else {
tmp = t_1 / (-1.0 / y);
}
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 ((x <= (-9.5d+132)) .or. (.not. (x <= 9d+40))) then
tmp = (x * 0.5d0) * t_1
else
tmp = t_1 / ((-1.0d0) / y)
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 ((x <= -9.5e+132) || !(x <= 9e+40)) {
tmp = (x * 0.5) * t_1;
} else {
tmp = t_1 / (-1.0 / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if (x <= -9.5e+132) or not (x <= 9e+40): tmp = (x * 0.5) * t_1 else: tmp = t_1 / (-1.0 / y) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if ((x <= -9.5e+132) || !(x <= 9e+40)) tmp = Float64(Float64(x * 0.5) * t_1); else tmp = Float64(t_1 / Float64(-1.0 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if ((x <= -9.5e+132) || ~((x <= 9e+40))) tmp = (x * 0.5) * t_1; else tmp = t_1 / (-1.0 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x, -9.5e+132], N[Not[LessEqual[x, 9e+40]], $MachinePrecision]], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 / N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+132} \lor \neg \left(x \leq 9 \cdot 10^{+40}\right):\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{\frac{-1}{y}}\\
\end{array}
\end{array}
(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}
(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}
(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 2024008
(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))))