
(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 (* x_m (- (/ y z) (/ t (- 1.0 z)))))) (* x_s (if (<= t_1 (- INFINITY)) (* (/ x_m z) (+ y t)) 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 = x_m * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x_m / z) * (y + t);
} else {
tmp = 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 = x_m * ((y / z) - (t / (1.0 - z)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x_m / z) * (y + t);
} else {
tmp = 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 = x_m * ((y / z) - (t / (1.0 - z))) tmp = 0 if t_1 <= -math.inf: tmp = (x_m / z) * (y + t) else: tmp = 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(x_m * Float64(Float64(y / z) - Float64(t / Float64(1.0 - z)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x_m / z) * Float64(y + t)); else tmp = 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 = x_m * ((y / z) - (t / (1.0 - z))); tmp = 0.0; if (t_1 <= -Inf) tmp = (x_m / z) * (y + t); else tmp = 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[(x$95$m * N[(N[(y / z), $MachinePrecision] - N[(t / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(x$95$m / z), $MachinePrecision] * N[(y + t), $MachinePrecision]), $MachinePrecision], t$95$1]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x_m \cdot \left(\frac{y}{z} - \frac{t}{1 - z}\right)\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{x_m}{z} \cdot \left(y + t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) < -inf.0Initial program 88.0%
Taylor expanded in z around inf 87.4%
associate-/l*78.4%
associate-/r/87.4%
cancel-sign-sub-inv87.4%
metadata-eval87.4%
*-lft-identity87.4%
+-commutative87.4%
Simplified87.4%
if -inf.0 < (*.f64 x (-.f64 (/.f64 y z) (/.f64 t (-.f64 1 z)))) Initial program 96.4%
Final simplification95.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 -1.05e+16)
(and (not (<= z -9e-139)) (or (<= z 3.8e-279) (not (<= z 0.235)))))
(* x_m (/ t 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.05e+16) || (!(z <= -9e-139) && ((z <= 3.8e-279) || !(z <= 0.235)))) {
tmp = x_m * (t / 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.05d+16)) .or. (.not. (z <= (-9d-139))) .and. (z <= 3.8d-279) .or. (.not. (z <= 0.235d0))) then
tmp = x_m * (t / 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.05e+16) || (!(z <= -9e-139) && ((z <= 3.8e-279) || !(z <= 0.235)))) {
tmp = x_m * (t / 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.05e+16) or (not (z <= -9e-139) and ((z <= 3.8e-279) or not (z <= 0.235))): tmp = x_m * (t / 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.05e+16) || (!(z <= -9e-139) && ((z <= 3.8e-279) || !(z <= 0.235)))) tmp = Float64(x_m * Float64(t / 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.05e+16) || (~((z <= -9e-139)) && ((z <= 3.8e-279) || ~((z <= 0.235))))) tmp = x_m * (t / 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.05e+16], And[N[Not[LessEqual[z, -9e-139]], $MachinePrecision], Or[LessEqual[z, 3.8e-279], N[Not[LessEqual[z, 0.235]], $MachinePrecision]]]], N[(x$95$m * N[(t / 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.05 \cdot 10^{+16} \lor \neg \left(z \leq -9 \cdot 10^{-139}\right) \land \left(z \leq 3.8 \cdot 10^{-279} \lor \neg \left(z \leq 0.235\right)\right):\\
\;\;\;\;x_m \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x_m \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.05e16 or -9.00000000000000046e-139 < z < 3.80000000000000033e-279 or 0.23499999999999999 < z Initial program 95.3%
Taylor expanded in z around inf 89.9%
cancel-sign-sub-inv89.9%
metadata-eval89.9%
*-lft-identity89.9%
+-commutative89.9%
Simplified89.9%
Taylor expanded in t around inf 53.1%
if -1.05e16 < z < -9.00000000000000046e-139 or 3.80000000000000033e-279 < z < 0.23499999999999999Initial program 95.4%
Taylor expanded in y around 0 43.1%
associate-*r/43.1%
associate-*r*43.1%
neg-mul-143.1%
Simplified43.1%
Taylor expanded in z around 0 40.4%
associate-*r*40.4%
mul-1-neg40.4%
Simplified40.4%
Final simplification48.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 -2.95e+15)
(not (or (<= t 3.8e-5) (and (not (<= t 1.3e+117)) (<= t 9e+206)))))
(* 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 <= -2.95e+15) || !((t <= 3.8e-5) || (!(t <= 1.3e+117) && (t <= 9e+206)))) {
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 <= (-2.95d+15)) .or. (.not. (t <= 3.8d-5) .or. (.not. (t <= 1.3d+117)) .and. (t <= 9d+206))) 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 <= -2.95e+15) || !((t <= 3.8e-5) || (!(t <= 1.3e+117) && (t <= 9e+206)))) {
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 <= -2.95e+15) or not ((t <= 3.8e-5) or (not (t <= 1.3e+117) and (t <= 9e+206))): 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 <= -2.95e+15) || !((t <= 3.8e-5) || (!(t <= 1.3e+117) && (t <= 9e+206)))) 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 <= -2.95e+15) || ~(((t <= 3.8e-5) || (~((t <= 1.3e+117)) && (t <= 9e+206))))) 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, -2.95e+15], N[Not[Or[LessEqual[t, 3.8e-5], And[N[Not[LessEqual[t, 1.3e+117]], $MachinePrecision], LessEqual[t, 9e+206]]]], $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 -2.95 \cdot 10^{+15} \lor \neg \left(t \leq 3.8 \cdot 10^{-5} \lor \neg \left(t \leq 1.3 \cdot 10^{+117}\right) \land t \leq 9 \cdot 10^{+206}\right):\\
\;\;\;\;x_m \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x_m \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -2.95e15 or 3.8000000000000002e-5 < t < 1.3e117 or 9.00000000000000035e206 < t Initial program 96.2%
Taylor expanded in z around inf 65.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
*-lft-identity65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in t around inf 53.7%
if -2.95e15 < t < 3.8000000000000002e-5 or 1.3e117 < t < 9.00000000000000035e206Initial program 94.8%
Taylor expanded in y around inf 80.2%
associate-*r/81.4%
Simplified81.4%
Final simplification70.3%
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 (/ t z))))
(*
x_s
(if (<= t -2.95e+15)
t_1
(if (<= t 3.8e-5)
(* x_m (/ y z))
(if (or (<= t 1.35e+117) (not (<= t 9e+206))) t_1 (* y (/ x_m 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 t_1 = x_m * (t / z);
double tmp;
if (t <= -2.95e+15) {
tmp = t_1;
} else if (t <= 3.8e-5) {
tmp = x_m * (y / z);
} else if ((t <= 1.35e+117) || !(t <= 9e+206)) {
tmp = t_1;
} else {
tmp = y * (x_m / 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) :: t_1
real(8) :: tmp
t_1 = x_m * (t / z)
if (t <= (-2.95d+15)) then
tmp = t_1
else if (t <= 3.8d-5) then
tmp = x_m * (y / z)
else if ((t <= 1.35d+117) .or. (.not. (t <= 9d+206))) then
tmp = t_1
else
tmp = y * (x_m / 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 t_1 = x_m * (t / z);
double tmp;
if (t <= -2.95e+15) {
tmp = t_1;
} else if (t <= 3.8e-5) {
tmp = x_m * (y / z);
} else if ((t <= 1.35e+117) || !(t <= 9e+206)) {
tmp = t_1;
} else {
tmp = y * (x_m / 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): t_1 = x_m * (t / z) tmp = 0 if t <= -2.95e+15: tmp = t_1 elif t <= 3.8e-5: tmp = x_m * (y / z) elif (t <= 1.35e+117) or not (t <= 9e+206): tmp = t_1 else: tmp = y * (x_m / z) 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(x_m * Float64(t / z)) tmp = 0.0 if (t <= -2.95e+15) tmp = t_1; elseif (t <= 3.8e-5) tmp = Float64(x_m * Float64(y / z)); elseif ((t <= 1.35e+117) || !(t <= 9e+206)) tmp = t_1; else tmp = Float64(y * Float64(x_m / 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) t_1 = x_m * (t / z); tmp = 0.0; if (t <= -2.95e+15) tmp = t_1; elseif (t <= 3.8e-5) tmp = x_m * (y / z); elseif ((t <= 1.35e+117) || ~((t <= 9e+206))) tmp = t_1; else tmp = y * (x_m / 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_] := Block[{t$95$1 = N[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -2.95e+15], t$95$1, If[LessEqual[t, 3.8e-5], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.35e+117], N[Not[LessEqual[t, 9e+206]], $MachinePrecision]], t$95$1, N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x_m \cdot \frac{t}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.95 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-5}:\\
\;\;\;\;x_m \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+117} \lor \neg \left(t \leq 9 \cdot 10^{+206}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x_m}{z}\\
\end{array}
\end{array}
\end{array}
if t < -2.95e15 or 3.8000000000000002e-5 < t < 1.3500000000000001e117 or 9.00000000000000035e206 < t Initial program 96.2%
Taylor expanded in z around inf 65.1%
cancel-sign-sub-inv65.1%
metadata-eval65.1%
*-lft-identity65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in t around inf 53.7%
if -2.95e15 < t < 3.8000000000000002e-5Initial program 94.7%
Taylor expanded in y around inf 83.9%
associate-*r/85.4%
Simplified85.4%
if 1.3500000000000001e117 < t < 9.00000000000000035e206Initial program 95.2%
Taylor expanded in y around inf 56.7%
associate-/l*56.9%
associate-/r/57.0%
Simplified57.0%
Final simplification70.3%
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 (/ t z))))
(*
x_s
(if (<= t -6.4e+16)
t_1
(if (<= t 3.8e-5)
(* x_m (/ y z))
(if (<= t 1.3e+117)
(/ x_m (/ z t))
(if (<= t 1e+207) (* y (/ x_m z)) 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 = x_m * (t / z);
double tmp;
if (t <= -6.4e+16) {
tmp = t_1;
} else if (t <= 3.8e-5) {
tmp = x_m * (y / z);
} else if (t <= 1.3e+117) {
tmp = x_m / (z / t);
} else if (t <= 1e+207) {
tmp = y * (x_m / z);
} else {
tmp = t_1;
}
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 * (t / z)
if (t <= (-6.4d+16)) then
tmp = t_1
else if (t <= 3.8d-5) then
tmp = x_m * (y / z)
else if (t <= 1.3d+117) then
tmp = x_m / (z / t)
else if (t <= 1d+207) then
tmp = y * (x_m / z)
else
tmp = t_1
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 * (t / z);
double tmp;
if (t <= -6.4e+16) {
tmp = t_1;
} else if (t <= 3.8e-5) {
tmp = x_m * (y / z);
} else if (t <= 1.3e+117) {
tmp = x_m / (z / t);
} else if (t <= 1e+207) {
tmp = y * (x_m / z);
} else {
tmp = 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 = x_m * (t / z) tmp = 0 if t <= -6.4e+16: tmp = t_1 elif t <= 3.8e-5: tmp = x_m * (y / z) elif t <= 1.3e+117: tmp = x_m / (z / t) elif t <= 1e+207: tmp = y * (x_m / z) else: tmp = 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(x_m * Float64(t / z)) tmp = 0.0 if (t <= -6.4e+16) tmp = t_1; elseif (t <= 3.8e-5) tmp = Float64(x_m * Float64(y / z)); elseif (t <= 1.3e+117) tmp = Float64(x_m / Float64(z / t)); elseif (t <= 1e+207) tmp = Float64(y * Float64(x_m / z)); else tmp = 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 = x_m * (t / z); tmp = 0.0; if (t <= -6.4e+16) tmp = t_1; elseif (t <= 3.8e-5) tmp = x_m * (y / z); elseif (t <= 1.3e+117) tmp = x_m / (z / t); elseif (t <= 1e+207) tmp = y * (x_m / z); else tmp = 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[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -6.4e+16], t$95$1, If[LessEqual[t, 3.8e-5], N[(x$95$m * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+117], N[(x$95$m / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+207], N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x_m \cdot \frac{t}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-5}:\\
\;\;\;\;x_m \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+117}:\\
\;\;\;\;\frac{x_m}{\frac{z}{t}}\\
\mathbf{elif}\;t \leq 10^{+207}:\\
\;\;\;\;y \cdot \frac{x_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if t < -6.4e16 or 1e207 < t Initial program 96.4%
Taylor expanded in z around inf 68.1%
cancel-sign-sub-inv68.1%
metadata-eval68.1%
*-lft-identity68.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in t around inf 54.7%
if -6.4e16 < t < 3.8000000000000002e-5Initial program 94.7%
Taylor expanded in y around inf 83.9%
associate-*r/85.4%
Simplified85.4%
if 3.8000000000000002e-5 < t < 1.3e117Initial program 95.2%
Taylor expanded in z around inf 53.4%
cancel-sign-sub-inv53.4%
metadata-eval53.4%
*-lft-identity53.4%
+-commutative53.4%
Simplified53.4%
Taylor expanded in t around inf 45.6%
*-commutative45.6%
associate-/l*50.1%
Simplified50.1%
if 1.3e117 < t < 1e207Initial program 95.2%
Taylor expanded in y around inf 56.7%
associate-/l*56.9%
associate-/r/57.0%
Simplified57.0%
Final simplification70.3%
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 (/ t z))))
(*
x_s
(if (<= t -6.5e+17)
t_1
(if (<= t 3.8e-5)
(/ x_m (/ z y))
(if (<= t 1.3e+117)
(/ x_m (/ z t))
(if (<= t 1.35e+207) (* y (/ x_m z)) 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 = x_m * (t / z);
double tmp;
if (t <= -6.5e+17) {
tmp = t_1;
} else if (t <= 3.8e-5) {
tmp = x_m / (z / y);
} else if (t <= 1.3e+117) {
tmp = x_m / (z / t);
} else if (t <= 1.35e+207) {
tmp = y * (x_m / z);
} else {
tmp = t_1;
}
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 * (t / z)
if (t <= (-6.5d+17)) then
tmp = t_1
else if (t <= 3.8d-5) then
tmp = x_m / (z / y)
else if (t <= 1.3d+117) then
tmp = x_m / (z / t)
else if (t <= 1.35d+207) then
tmp = y * (x_m / z)
else
tmp = t_1
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 * (t / z);
double tmp;
if (t <= -6.5e+17) {
tmp = t_1;
} else if (t <= 3.8e-5) {
tmp = x_m / (z / y);
} else if (t <= 1.3e+117) {
tmp = x_m / (z / t);
} else if (t <= 1.35e+207) {
tmp = y * (x_m / z);
} else {
tmp = 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 = x_m * (t / z) tmp = 0 if t <= -6.5e+17: tmp = t_1 elif t <= 3.8e-5: tmp = x_m / (z / y) elif t <= 1.3e+117: tmp = x_m / (z / t) elif t <= 1.35e+207: tmp = y * (x_m / z) else: tmp = 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(x_m * Float64(t / z)) tmp = 0.0 if (t <= -6.5e+17) tmp = t_1; elseif (t <= 3.8e-5) tmp = Float64(x_m / Float64(z / y)); elseif (t <= 1.3e+117) tmp = Float64(x_m / Float64(z / t)); elseif (t <= 1.35e+207) tmp = Float64(y * Float64(x_m / z)); else tmp = 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 = x_m * (t / z); tmp = 0.0; if (t <= -6.5e+17) tmp = t_1; elseif (t <= 3.8e-5) tmp = x_m / (z / y); elseif (t <= 1.3e+117) tmp = x_m / (z / t); elseif (t <= 1.35e+207) tmp = y * (x_m / z); else tmp = 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[(x$95$m * N[(t / z), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[LessEqual[t, -6.5e+17], t$95$1, If[LessEqual[t, 3.8e-5], N[(x$95$m / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+117], N[(x$95$m / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+207], N[(y * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
\begin{array}{l}
t_1 := x_m \cdot \frac{t}{z}\\
x_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-5}:\\
\;\;\;\;\frac{x_m}{\frac{z}{y}}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+117}:\\
\;\;\;\;\frac{x_m}{\frac{z}{t}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+207}:\\
\;\;\;\;y \cdot \frac{x_m}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
\end{array}
if t < -6.5e17 or 1.35000000000000012e207 < t Initial program 96.4%
Taylor expanded in z around inf 68.1%
cancel-sign-sub-inv68.1%
metadata-eval68.1%
*-lft-identity68.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in t around inf 54.7%
if -6.5e17 < t < 3.8000000000000002e-5Initial program 94.7%
Taylor expanded in y around inf 83.9%
associate-/l*85.7%
Simplified85.7%
if 3.8000000000000002e-5 < t < 1.3e117Initial program 95.2%
Taylor expanded in z around inf 53.4%
cancel-sign-sub-inv53.4%
metadata-eval53.4%
*-lft-identity53.4%
+-commutative53.4%
Simplified53.4%
Taylor expanded in t around inf 45.6%
*-commutative45.6%
associate-/l*50.1%
Simplified50.1%
if 1.3e117 < t < 1.35000000000000012e207Initial program 95.2%
Taylor expanded in y around inf 56.7%
associate-/l*56.9%
associate-/r/57.0%
Simplified57.0%
Final simplification70.5%
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.7e+67) (not (<= z 1.85e+21)))
(* x_m (/ 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 <= -1.7e+67) || !(z <= 1.85e+21)) {
tmp = x_m * (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 <= (-1.7d+67)) .or. (.not. (z <= 1.85d+21))) then
tmp = x_m * (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 <= -1.7e+67) || !(z <= 1.85e+21)) {
tmp = x_m * (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 <= -1.7e+67) or not (z <= 1.85e+21): tmp = x_m * (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 <= -1.7e+67) || !(z <= 1.85e+21)) tmp = Float64(x_m * Float64(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 <= -1.7e+67) || ~((z <= 1.85e+21))) tmp = x_m * (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, -1.7e+67], N[Not[LessEqual[z, 1.85e+21]], $MachinePrecision]], N[(x$95$m * N[(t / 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 -1.7 \cdot 10^{+67} \lor \neg \left(z \leq 1.85 \cdot 10^{+21}\right):\\
\;\;\;\;x_m \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x_m \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1.7000000000000001e67 or 1.85e21 < z Initial program 95.5%
Taylor expanded in z around inf 95.5%
cancel-sign-sub-inv95.5%
metadata-eval95.5%
*-lft-identity95.5%
+-commutative95.5%
Simplified95.5%
Taylor expanded in t around inf 64.7%
if -1.7000000000000001e67 < z < 1.85e21Initial program 95.2%
Taylor expanded in z around 0 88.9%
+-commutative88.9%
associate-*r/86.3%
*-commutative86.3%
associate-*r*86.3%
neg-mul-186.3%
distribute-rgt-out89.8%
unsub-neg89.8%
Simplified89.8%
Final simplification78.7%
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.05e+16) (not (<= z 0.235)))
(* 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 <= -1.05e+16) || !(z <= 0.235)) {
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 <= (-1.05d+16)) .or. (.not. (z <= 0.235d0))) 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 <= -1.05e+16) || !(z <= 0.235)) {
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 <= -1.05e+16) or not (z <= 0.235): 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 <= -1.05e+16) || !(z <= 0.235)) 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 <= -1.05e+16) || ~((z <= 0.235))) 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, -1.05e+16], N[Not[LessEqual[z, 0.235]], $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 -1.05 \cdot 10^{+16} \lor \neg \left(z \leq 0.235\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 < -1.05e16 or 0.23499999999999999 < z Initial program 96.1%
Taylor expanded in z around inf 95.6%
cancel-sign-sub-inv95.6%
metadata-eval95.6%
*-lft-identity95.6%
+-commutative95.6%
Simplified95.6%
if -1.05e16 < z < 0.23499999999999999Initial program 94.5%
Taylor expanded in z around 0 92.4%
+-commutative92.4%
associate-*r/88.7%
*-commutative88.7%
associate-*r*88.7%
neg-mul-188.7%
distribute-rgt-out92.7%
unsub-neg92.7%
Simplified92.7%
Final simplification94.2%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) (FPCore (x_s x_m y z t) :precision binary64 (* x_s (* 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) {
return x_s * (x_m * -t);
}
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 * (x_m * -t)
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 * (x_m * -t);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) def code(x_s, x_m, y, z, t): return x_s * (x_m * -t)
x_m = abs(x) x_s = copysign(1.0, x) function code(x_s, x_m, y, z, t) return Float64(x_s * Float64(x_m * Float64(-t))) 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 * (x_m * -t); 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[(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 \left(x_m \cdot \left(-t\right)\right)
\end{array}
Initial program 95.3%
Taylor expanded in y around 0 44.6%
associate-*r/44.6%
associate-*r*44.6%
neg-mul-144.6%
Simplified44.6%
Taylor expanded in z around 0 21.8%
associate-*r*21.8%
mul-1-neg21.8%
Simplified21.8%
Final simplification21.8%
(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 2024020
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(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)))))