
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.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 = x * ((y / z) - (t / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* x (- (/ y z) (/ t (- 1.0 z)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.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 = x * ((y / z) - (t / (1.0d0 - z)))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) - (t / (1.0 - z)));
}
def code(x, y, z, t): return x * ((y / z) - (t / (1.0 - z)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) - (t / (1.0 - z))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)
\end{array}
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ t (+ z -1.0))) (t_2 (* x_m (+ (/ y z) t_1))))
(*
x_s
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+290)))
(/ (* x_m (- (* y (- 1.0 z)) (* z t))) (* z (- 1.0 z)))
(+ (* x_m (/ y z)) (* x_m t_1))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = t / (z + -1.0);
double t_2 = x_m * ((y / z) + t_1);
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+290)) {
tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z));
} else {
tmp = (x_m * (y / z)) + (x_m * t_1);
}
return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = t / (z + -1.0);
double t_2 = x_m * ((y / z) + t_1);
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+290)) {
tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z));
} else {
tmp = (x_m * (y / z)) + (x_m * t_1);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = t / (z + -1.0) t_2 = x_m * ((y / z) + t_1) tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+290): tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z)) else: tmp = (x_m * (y / z)) + (x_m * t_1) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(t / Float64(z + -1.0)) t_2 = Float64(x_m * Float64(Float64(y / z) + t_1)) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+290)) tmp = Float64(Float64(x_m * Float64(Float64(y * Float64(1.0 - z)) - Float64(z * t))) / Float64(z * Float64(1.0 - z))); else tmp = Float64(Float64(x_m * Float64(y / z)) + Float64(x_m * t_1)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = t / (z + -1.0); t_2 = x_m * ((y / z) + t_1); tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+290))) tmp = (x_m * ((y * (1.0 - z)) - (z * t))) / (z * (1.0 - z)); else tmp = (x_m * (y / z)) + (x_m * t_1); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(N[(y / z), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+290]], $MachinePrecision]], N[(N[(x$95$m * N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(x$95$m * t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{t}{z + -1}\\
t_2 := x\_m \cdot \left(\frac{y}{z} + t\_1\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+290}\right):\\
\;\;\;\;\frac{x\_m \cdot \left(y \cdot \left(1 - z\right) - z \cdot t\right)}{z \cdot \left(1 - z\right)}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{y}{z} + x\_m \cdot t\_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < -inf.0 or 1.00000000000000006e290 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) Initial program 83.8%
*-commutative83.8%
frac-sub82.4%
associate-*l/98.5%
Applied egg-rr98.5%
if -inf.0 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < 1.00000000000000006e290Initial program 98.3%
sub-neg98.3%
distribute-rgt-in98.3%
distribute-neg-frac298.3%
Applied egg-rr98.3%
Final simplification98.4%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (+ (/ y z) (/ t (+ z -1.0)))))
(*
x_s
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+306)))
(* y (/ x_m z))
(* x_m t_1)))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+306)) {
tmp = y * (x_m / z);
} else {
tmp = x_m * t_1;
}
return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+306)) {
tmp = y * (x_m / z);
} else {
tmp = x_m * t_1;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (y / z) + (t / (z + -1.0)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+306): tmp = y * (x_m / z) else: tmp = x_m * t_1 return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+306)) tmp = Float64(y * Float64(x_m / z)); else tmp = Float64(x_m * t_1); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (y / z) + (t / (z + -1.0)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+306))) tmp = y * (x_m / z); else tmp = x_m * t_1; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+306]], $MachinePrecision]], N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * t$95$1), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+306}\right):\\
\;\;\;\;y \cdot \frac{x\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot t\_1\\
\end{array}
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < -inf.0 or 2.00000000000000003e306 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) Initial program 66.2%
Taylor expanded in y around inf 99.9%
associate-*r/66.2%
Simplified66.2%
*-commutative66.2%
associate-*l/99.9%
Applied egg-rr99.9%
associate-/l*99.9%
*-commutative99.9%
Applied egg-rr99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z))) < 2.00000000000000003e306Initial program 98.6%
Final simplification98.7%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (* x_m y) z)))
(*
x_s
(if (<= y -1.92e+74)
t_1
(if (<= y -9.2e-5)
(/ t (/ z x_m))
(if (or (<= y -5.5e-64) (not (<= y 5.9e-64)))
t_1
(* t (/ x_m (+ z -1.0)))))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m * y) / z;
double tmp;
if (y <= -1.92e+74) {
tmp = t_1;
} else if (y <= -9.2e-5) {
tmp = t / (z / x_m);
} else if ((y <= -5.5e-64) || !(y <= 5.9e-64)) {
tmp = t_1;
} else {
tmp = t * (x_m / (z + -1.0));
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_m * y) / z
if (y <= (-1.92d+74)) then
tmp = t_1
else if (y <= (-9.2d-5)) then
tmp = t / (z / x_m)
else if ((y <= (-5.5d-64)) .or. (.not. (y <= 5.9d-64))) then
tmp = t_1
else
tmp = t * (x_m / (z + (-1.0d0)))
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m * y) / z;
double tmp;
if (y <= -1.92e+74) {
tmp = t_1;
} else if (y <= -9.2e-5) {
tmp = t / (z / x_m);
} else if ((y <= -5.5e-64) || !(y <= 5.9e-64)) {
tmp = t_1;
} else {
tmp = t * (x_m / (z + -1.0));
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (x_m * y) / z tmp = 0 if y <= -1.92e+74: tmp = t_1 elif y <= -9.2e-5: tmp = t / (z / x_m) elif (y <= -5.5e-64) or not (y <= 5.9e-64): tmp = t_1 else: tmp = t * (x_m / (z + -1.0)) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m * y) / z) tmp = 0.0 if (y <= -1.92e+74) tmp = t_1; elseif (y <= -9.2e-5) tmp = Float64(t / Float64(z / x_m)); elseif ((y <= -5.5e-64) || !(y <= 5.9e-64)) tmp = t_1; else tmp = Float64(t * Float64(x_m / Float64(z + -1.0))); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (x_m * y) / z; tmp = 0.0; if (y <= -1.92e+74) tmp = t_1; elseif (y <= -9.2e-5) tmp = t / (z / x_m); elseif ((y <= -5.5e-64) || ~((y <= 5.9e-64))) tmp = t_1; else tmp = t * (x_m / (z + -1.0)); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * y), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.92e+74], t$95$1, If[LessEqual[y, -9.2e-5], N[(t / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5.5e-64], N[Not[LessEqual[y, 5.9e-64]], $MachinePrecision]], t$95$1, N[(t * N[(x$95$m / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot y}{z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{\frac{z}{x\_m}}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-64} \lor \neg \left(y \leq 5.9 \cdot 10^{-64}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x\_m}{z + -1}\\
\end{array}
\end{array}
\end{array}
if y < -1.92000000000000002e74 or -9.20000000000000001e-5 < y < -5.4999999999999999e-64 or 5.89999999999999995e-64 < y Initial program 91.9%
Taylor expanded in y around inf 83.4%
if -1.92000000000000002e74 < y < -9.20000000000000001e-5Initial program 92.7%
Taylor expanded in y around 0 72.1%
mul-1-neg72.1%
distribute-frac-neg272.1%
neg-sub072.1%
associate--r-72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in z around inf 72.4%
associate-/l*85.9%
Simplified85.9%
clear-num85.8%
un-div-inv86.0%
Applied egg-rr86.0%
if -5.4999999999999999e-64 < y < 5.89999999999999995e-64Initial program 97.9%
Taylor expanded in y around 0 71.6%
mul-1-neg71.6%
distribute-frac-neg271.6%
associate-/l*72.2%
neg-sub072.2%
associate--r-72.2%
metadata-eval72.2%
Simplified72.2%
Final simplification79.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (/ (* x_m y) z)))
(*
x_s
(if (<= y -1.92e+74)
t_1
(if (<= y -9.2e-5)
(/ t (/ z x_m))
(if (or (<= y -5e-61) (not (<= y 7e-63)))
t_1
(* x_m (/ t (+ z -1.0)))))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m * y) / z;
double tmp;
if (y <= -1.92e+74) {
tmp = t_1;
} else if (y <= -9.2e-5) {
tmp = t / (z / x_m);
} else if ((y <= -5e-61) || !(y <= 7e-63)) {
tmp = t_1;
} else {
tmp = x_m * (t / (z + -1.0));
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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_m * y) / z
if (y <= (-1.92d+74)) then
tmp = t_1
else if (y <= (-9.2d-5)) then
tmp = t / (z / x_m)
else if ((y <= (-5d-61)) .or. (.not. (y <= 7d-63))) then
tmp = t_1
else
tmp = x_m * (t / (z + (-1.0d0)))
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = (x_m * y) / z;
double tmp;
if (y <= -1.92e+74) {
tmp = t_1;
} else if (y <= -9.2e-5) {
tmp = t / (z / x_m);
} else if ((y <= -5e-61) || !(y <= 7e-63)) {
tmp = t_1;
} else {
tmp = x_m * (t / (z + -1.0));
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = (x_m * y) / z tmp = 0 if y <= -1.92e+74: tmp = t_1 elif y <= -9.2e-5: tmp = t / (z / x_m) elif (y <= -5e-61) or not (y <= 7e-63): tmp = t_1 else: tmp = x_m * (t / (z + -1.0)) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(Float64(x_m * y) / z) tmp = 0.0 if (y <= -1.92e+74) tmp = t_1; elseif (y <= -9.2e-5) tmp = Float64(t / Float64(z / x_m)); elseif ((y <= -5e-61) || !(y <= 7e-63)) tmp = t_1; else tmp = Float64(x_m * Float64(t / Float64(z + -1.0))); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = (x_m * y) / z; tmp = 0.0; if (y <= -1.92e+74) tmp = t_1; elseif (y <= -9.2e-5) tmp = t / (z / x_m); elseif ((y <= -5e-61) || ~((y <= 7e-63))) tmp = t_1; else tmp = x_m * (t / (z + -1.0)); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x$95$m * y), $MachinePrecision] / z), $MachinePrecision]}, N[(x$95$s * If[LessEqual[y, -1.92e+74], t$95$1, If[LessEqual[y, -9.2e-5], N[(t / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -5e-61], N[Not[LessEqual[y, 7e-63]], $MachinePrecision]], t$95$1, N[(x$95$m * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := \frac{x\_m \cdot y}{z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -1.92 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{\frac{z}{x\_m}}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-61} \lor \neg \left(y \leq 7 \cdot 10^{-63}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{t}{z + -1}\\
\end{array}
\end{array}
\end{array}
if y < -1.92000000000000002e74 or -9.20000000000000001e-5 < y < -4.9999999999999999e-61 or 7.00000000000000006e-63 < y Initial program 91.9%
Taylor expanded in y around inf 83.4%
if -1.92000000000000002e74 < y < -9.20000000000000001e-5Initial program 92.7%
Taylor expanded in y around 0 72.1%
mul-1-neg72.1%
distribute-frac-neg272.1%
neg-sub072.1%
associate--r-72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in z around inf 72.4%
associate-/l*85.9%
Simplified85.9%
clear-num85.8%
un-div-inv86.0%
Applied egg-rr86.0%
if -4.9999999999999999e-61 < y < 7.00000000000000006e-63Initial program 97.9%
Taylor expanded in y around 0 74.2%
mul-1-neg74.2%
distribute-frac-neg274.2%
neg-sub074.2%
associate--r-74.2%
metadata-eval74.2%
Simplified74.2%
Final simplification79.8%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -1.12e-13)
(and (not (<= z -7.5e-110)) (or (<= z 2.4e-225) (not (<= z 2.2)))))
(* t (/ x_m z))
(* x_m (- t)))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -1.12e-13) || (!(z <= -7.5e-110) && ((z <= 2.4e-225) || !(z <= 2.2)))) {
tmp = t * (x_m / z);
} else {
tmp = x_m * -t;
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.12d-13)) .or. (.not. (z <= (-7.5d-110))) .and. (z <= 2.4d-225) .or. (.not. (z <= 2.2d0))) then
tmp = t * (x_m / z)
else
tmp = x_m * -t
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -1.12e-13) || (!(z <= -7.5e-110) && ((z <= 2.4e-225) || !(z <= 2.2)))) {
tmp = t * (x_m / z);
} else {
tmp = x_m * -t;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -1.12e-13) or (not (z <= -7.5e-110) and ((z <= 2.4e-225) or not (z <= 2.2))): tmp = t * (x_m / z) else: tmp = x_m * -t return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -1.12e-13) || (!(z <= -7.5e-110) && ((z <= 2.4e-225) || !(z <= 2.2)))) tmp = Float64(t * Float64(x_m / z)); else tmp = Float64(x_m * Float64(-t)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -1.12e-13) || (~((z <= -7.5e-110)) && ((z <= 2.4e-225) || ~((z <= 2.2))))) tmp = t * (x_m / z); else tmp = x_m * -t; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -1.12e-13], And[N[Not[LessEqual[z, -7.5e-110]], $MachinePrecision], Or[LessEqual[z, 2.4e-225], N[Not[LessEqual[z, 2.2]], $MachinePrecision]]]], N[(t * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * (-t)), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-13} \lor \neg \left(z \leq -7.5 \cdot 10^{-110}\right) \land \left(z \leq 2.4 \cdot 10^{-225} \lor \neg \left(z \leq 2.2\right)\right):\\
\;\;\;\;t \cdot \frac{x\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.12e-13 or -7.50000000000000053e-110 < z < 2.39999999999999996e-225 or 2.2000000000000002 < z Initial program 95.4%
Taylor expanded in y around 0 46.5%
mul-1-neg46.5%
distribute-frac-neg246.5%
neg-sub046.5%
associate--r-46.5%
metadata-eval46.5%
Simplified46.5%
Taylor expanded in z around inf 44.8%
associate-/l*46.9%
Simplified46.9%
if -1.12e-13 < z < -7.50000000000000053e-110 or 2.39999999999999996e-225 < z < 2.2000000000000002Initial program 91.5%
Taylor expanded in y around 0 44.9%
mul-1-neg44.9%
distribute-frac-neg244.9%
neg-sub044.9%
associate--r-44.9%
metadata-eval44.9%
Simplified44.9%
Taylor expanded in z around 0 43.7%
neg-mul-143.7%
Simplified43.7%
Final simplification46.1%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(let* ((t_1 (* t (- x_m))) (t_2 (* x_m (/ t z))))
(*
x_s
(if (<= z -1.12e-13)
t_2
(if (<= z -1.6e-109)
t_1
(if (<= z 3.8e-224) (* t (/ x_m z)) (if (<= z 1.0) t_1 t_2)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = t * -x_m;
double t_2 = x_m * (t / z);
double tmp;
if (z <= -1.12e-13) {
tmp = t_2;
} else if (z <= -1.6e-109) {
tmp = t_1;
} else if (z <= 3.8e-224) {
tmp = t * (x_m / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
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 = t * -x_m
t_2 = x_m * (t / z)
if (z <= (-1.12d-13)) then
tmp = t_2
else if (z <= (-1.6d-109)) then
tmp = t_1
else if (z <= 3.8d-224) then
tmp = t * (x_m / z)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double t_1 = t * -x_m;
double t_2 = x_m * (t / z);
double tmp;
if (z <= -1.12e-13) {
tmp = t_2;
} else if (z <= -1.6e-109) {
tmp = t_1;
} else if (z <= 3.8e-224) {
tmp = t * (x_m / z);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): t_1 = t * -x_m t_2 = x_m * (t / z) tmp = 0 if z <= -1.12e-13: tmp = t_2 elif z <= -1.6e-109: tmp = t_1 elif z <= 3.8e-224: tmp = t * (x_m / z) elif z <= 1.0: tmp = t_1 else: tmp = t_2 return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) t_1 = Float64(t * Float64(-x_m)) t_2 = Float64(x_m * Float64(t / z)) tmp = 0.0 if (z <= -1.12e-13) tmp = t_2; elseif (z <= -1.6e-109) tmp = t_1; elseif (z <= 3.8e-224) tmp = Float64(t * Float64(x_m / z)); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) t_1 = t * -x_m; t_2 = x_m * (t / z); tmp = 0.0; if (z <= -1.12e-13) tmp = t_2; elseif (z <= -1.6e-109) tmp = t_1; elseif (z <= 3.8e-224) tmp = t * (x_m / z); elseif (z <= 1.0) tmp = t_1; else tmp = t_2; end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := Block[{t$95$1 = N[(t * (-x$95$m)), $MachinePrecision]}, Block[{t$95$2 = N[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[z, -1.12e-13], t$95$2, If[LessEqual[z, -1.6e-109], t$95$1, If[LessEqual[z, 3.8e-224], N[(t * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, t$95$2]]]]), $MachinePrecision]]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := t \cdot \left(-x\_m\right)\\
t_2 := x\_m \cdot \frac{t}{z}\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-13}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-224}:\\
\;\;\;\;t \cdot \frac{x\_m}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -1.12e-13 or 1 < z Initial program 97.8%
Taylor expanded in y around 0 57.2%
mul-1-neg57.2%
distribute-frac-neg257.2%
neg-sub057.2%
associate--r-57.2%
metadata-eval57.2%
Simplified57.2%
Taylor expanded in z around inf 56.9%
if -1.12e-13 < z < -1.6000000000000001e-109 or 3.80000000000000002e-224 < z < 1Initial program 91.5%
Taylor expanded in y around 0 44.9%
mul-1-neg44.9%
distribute-frac-neg244.9%
neg-sub044.9%
associate--r-44.9%
metadata-eval44.9%
Simplified44.9%
Taylor expanded in z around 0 43.7%
neg-mul-143.7%
Simplified43.7%
if -1.6000000000000001e-109 < z < 3.80000000000000002e-224Initial program 89.2%
Taylor expanded in y around 0 18.5%
mul-1-neg18.5%
distribute-frac-neg218.5%
neg-sub018.5%
associate--r-18.5%
metadata-eval18.5%
Simplified18.5%
Taylor expanded in z around inf 23.6%
associate-/l*26.9%
Simplified26.9%
Final simplification47.3%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= z -68000000000.0) (not (<= z 1.0)))
(* x_m (/ (+ y t) z))
(* x_m (- (/ y z) t)))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -68000000000.0) || !(z <= 1.0)) {
tmp = x_m * ((y + t) / z);
} else {
tmp = x_m * ((y / z) - t);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-68000000000.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x_m * ((y + t) / z)
else
tmp = x_m * ((y / z) - t)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((z <= -68000000000.0) || !(z <= 1.0)) {
tmp = x_m * ((y + t) / z);
} else {
tmp = x_m * ((y / z) - t);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (z <= -68000000000.0) or not (z <= 1.0): tmp = x_m * ((y + t) / z) else: tmp = x_m * ((y / z) - t) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((z <= -68000000000.0) || !(z <= 1.0)) tmp = Float64(x_m * Float64(Float64(y + t) / z)); else tmp = Float64(x_m * Float64(Float64(y / z) - t)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((z <= -68000000000.0) || ~((z <= 1.0))) tmp = x_m * ((y + t) / z); else tmp = x_m * ((y / z) - t); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[z, -68000000000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x$95$m * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -68000000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x\_m \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -6.8e10 or 1 < z Initial program 97.7%
Taylor expanded in z around inf 90.9%
associate-/l*97.4%
cancel-sign-sub-inv97.4%
metadata-eval97.4%
*-lft-identity97.4%
+-commutative97.4%
Simplified97.4%
if -6.8e10 < z < 1Initial program 91.0%
Taylor expanded in z around 0 88.8%
+-commutative88.8%
associate-*r/88.0%
*-commutative88.0%
associate-*r*88.0%
neg-mul-188.0%
distribute-rgt-out90.3%
unsub-neg90.3%
Simplified90.3%
Final simplification93.9%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
(FPCore (x_s x_m y z t)
:precision binary64
(*
x_s
(if (or (<= t -1e+184) (not (<= t 8.5e+55)))
(* x_m (/ t z))
(* x_m (/ y z)))))x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((t <= -1e+184) || !(t <= 8.5e+55)) {
tmp = x_m * (t / z);
} else {
tmp = x_m * (y / z);
}
return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1d+184)) .or. (.not. (t <= 8.5d+55))) then
tmp = x_m * (t / z)
else
tmp = x_m * (y / z)
end if
code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
double tmp;
if ((t <= -1e+184) || !(t <= 8.5e+55)) {
tmp = x_m * (t / z);
} else {
tmp = x_m * (y / z);
}
return x_s * tmp;
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): tmp = 0 if (t <= -1e+184) or not (t <= 8.5e+55): tmp = x_m * (t / z) else: tmp = x_m * (y / z) return x_s * tmp
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) tmp = 0.0 if ((t <= -1e+184) || !(t <= 8.5e+55)) tmp = Float64(x_m * Float64(t / z)); else tmp = Float64(x_m * Float64(y / z)); end return Float64(x_s * tmp) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp_2 = code(x_s, x_m, y, z, t) tmp = 0.0; if ((t <= -1e+184) || ~((t <= 8.5e+55))) tmp = x_m * (t / z); else tmp = x_m * (y / z); end tmp_2 = x_s * tmp; end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * If[Or[LessEqual[t, -1e+184], N[Not[LessEqual[t, 8.5e+55]], $MachinePrecision]], N[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+184} \lor \neg \left(t \leq 8.5 \cdot 10^{+55}\right):\\
\;\;\;\;x\_m \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -1.00000000000000002e184 or 8.50000000000000002e55 < t Initial program 98.3%
Taylor expanded in y around 0 79.7%
mul-1-neg79.7%
distribute-frac-neg279.7%
neg-sub079.7%
associate--r-79.7%
metadata-eval79.7%
Simplified79.7%
Taylor expanded in z around inf 63.5%
if -1.00000000000000002e184 < t < 8.50000000000000002e55Initial program 93.1%
Taylor expanded in y around inf 70.1%
associate-*r/70.6%
Simplified70.6%
Final simplification68.9%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* t (- x_m))))
x_m = fabs(x);
x_s = copysign(1.0, x);
double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (t * -x_m);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
real(8) function code(x_s, x_m, y, z, t)
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x_s * (t * -x_m)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
public static double code(double x_s, double x_m, double y, double z, double t) {
return x_s * (t * -x_m);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * (t * -x_m)
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(t * Float64(-x_m))) end
x_m = abs(x); x_s = sign(x) * abs(1.0); function tmp = code(x_s, x_m, y, z, t) tmp = x_s * (t * -x_m); end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[x$95$s_, x$95$m_, y_, z_, t_] := N[(x$95$s * N[(t * (-x$95$m)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
x\_s \cdot \left(t \cdot \left(-x\_m\right)\right)
\end{array}
Initial program 94.4%
Taylor expanded in y around 0 46.1%
mul-1-neg46.1%
distribute-frac-neg246.1%
neg-sub046.1%
associate--r-46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in z around 0 21.0%
neg-mul-121.0%
Simplified21.0%
Final simplification21.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))
(t_2 (* x (- (/ y z) (/ t (- 1.0 z))))))
(if (< t_2 -7.623226303312042e-196)
t_1
(if (< t_2 1.4133944927702302e-211)
(+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z))))
t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} 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 = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
t_2 = x * ((y / z) - (t / (1.0d0 - z)))
if (t_2 < (-7.623226303312042d-196)) then
tmp = t_1
else if (t_2 < 1.4133944927702302d-211) then
tmp = ((y * x) / z) + -((t * x) / (1.0d0 - z))
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 = x * ((y / z) - (t * (1.0 / (1.0 - z))));
double t_2 = x * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_2 < -7.623226303312042e-196) {
tmp = t_1;
} else if (t_2 < 1.4133944927702302e-211) {
tmp = ((y * x) / z) + -((t * x) / (1.0 - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))) t_2 = x * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_2 < -7.623226303312042e-196: tmp = t_1 elif t_2 < 1.4133944927702302e-211: tmp = ((y * x) / z) + -((t * x) / (1.0 - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))) t_2 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = Float64(Float64(Float64(y * x) / z) + Float64(-Float64(Float64(t * x) / Float64(1.0 - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t * (1.0 / (1.0 - z)))); t_2 = x * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_2 < -7.623226303312042e-196) tmp = t_1; elseif (t_2 < 1.4133944927702302e-211) tmp = ((y * x) / z) + -((t * x) / (1.0 - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -7.623226303312042e-196], t$95$1, If[Less[t$95$2, 1.4133944927702302e-211], N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] + (-N[(N[(t * x), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
t_2 := x \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
\mathbf{if}\;t\_2 < -7.623226303312042 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4133944927702302 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot x}{z} + \left(-\frac{t \cdot x}{1 - z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024046
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:alt
(if (< (* x (- (/ y z) (/ t (- 1.0 z)))) -7.623226303312042e-196) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))) (if (< (* x (- (/ y z) (/ t (- 1.0 z)))) 1.4133944927702302e-211) (+ (/ (* y x) z) (- (/ (* t x) (- 1.0 z)))) (* x (- (/ y z) (* t (/ 1.0 (- 1.0 z)))))))
(* x (- (/ y z) (/ t (- 1.0 z)))))