
(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 14 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}
(FPCore (x y z t)
:precision binary64
(if (<= t -2.5e-10)
(* x (+ (/ y z) (/ t (+ z -1.0))))
(if (<= t 1.25e-103)
(* y (+ (/ (* t x) (* y (+ z -1.0))) (/ x z)))
(* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.5e-10) {
tmp = x * ((y / z) + (t / (z + -1.0)));
} else if (t <= 1.25e-103) {
tmp = y * (((t * x) / (y * (z + -1.0))) + (x / z));
} else {
tmp = x * ((y / z) - (t * (1.0 / (1.0 - z))));
}
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 <= (-2.5d-10)) then
tmp = x * ((y / z) + (t / (z + (-1.0d0))))
else if (t <= 1.25d-103) then
tmp = y * (((t * x) / (y * (z + (-1.0d0)))) + (x / z))
else
tmp = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.5e-10) {
tmp = x * ((y / z) + (t / (z + -1.0)));
} else if (t <= 1.25e-103) {
tmp = y * (((t * x) / (y * (z + -1.0))) + (x / z));
} else {
tmp = x * ((y / z) - (t * (1.0 / (1.0 - z))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.5e-10: tmp = x * ((y / z) + (t / (z + -1.0))) elif t <= 1.25e-103: tmp = y * (((t * x) / (y * (z + -1.0))) + (x / z)) else: tmp = x * ((y / z) - (t * (1.0 / (1.0 - z)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.5e-10) tmp = Float64(x * Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))); elseif (t <= 1.25e-103) tmp = Float64(y * Float64(Float64(Float64(t * x) / Float64(y * Float64(z + -1.0))) + Float64(x / z))); else tmp = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.5e-10) tmp = x * ((y / z) + (t / (z + -1.0))); elseif (t <= 1.25e-103) tmp = y * (((t * x) / (y * (z + -1.0))) + (x / z)); else tmp = x * ((y / z) - (t * (1.0 / (1.0 - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.5e-10], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-103], N[(y * N[(N[(N[(t * x), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-103}:\\
\;\;\;\;y \cdot \left(\frac{t \cdot x}{y \cdot \left(z + -1\right)} + \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
\end{array}
\end{array}
if t < -2.50000000000000016e-10Initial program 98.1%
if -2.50000000000000016e-10 < t < 1.24999999999999992e-103Initial program 86.8%
Taylor expanded in y around inf 98.8%
mul-1-neg98.8%
distribute-neg-frac298.8%
distribute-rgt-neg-in98.8%
neg-sub098.8%
associate--r-98.8%
metadata-eval98.8%
Simplified98.8%
if 1.24999999999999992e-103 < t Initial program 97.8%
clear-num97.7%
associate-/r/97.8%
Applied egg-rr97.8%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.35e+199)
(/ (* t x) z)
(if (<= z -5.6e+44)
(* x (/ y z))
(if (<= z -1.35e-7)
(* t (/ x (+ z -1.0)))
(if (<= z 1.9e+51) (* x (- (/ y z) t)) (/ x (/ z t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.35e+199) {
tmp = (t * x) / z;
} else if (z <= -5.6e+44) {
tmp = x * (y / z);
} else if (z <= -1.35e-7) {
tmp = t * (x / (z + -1.0));
} else if (z <= 1.9e+51) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / t);
}
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 (z <= (-2.35d+199)) then
tmp = (t * x) / z
else if (z <= (-5.6d+44)) then
tmp = x * (y / z)
else if (z <= (-1.35d-7)) then
tmp = t * (x / (z + (-1.0d0)))
else if (z <= 1.9d+51) then
tmp = x * ((y / z) - t)
else
tmp = x / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.35e+199) {
tmp = (t * x) / z;
} else if (z <= -5.6e+44) {
tmp = x * (y / z);
} else if (z <= -1.35e-7) {
tmp = t * (x / (z + -1.0));
} else if (z <= 1.9e+51) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.35e+199: tmp = (t * x) / z elif z <= -5.6e+44: tmp = x * (y / z) elif z <= -1.35e-7: tmp = t * (x / (z + -1.0)) elif z <= 1.9e+51: tmp = x * ((y / z) - t) else: tmp = x / (z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.35e+199) tmp = Float64(Float64(t * x) / z); elseif (z <= -5.6e+44) tmp = Float64(x * Float64(y / z)); elseif (z <= -1.35e-7) tmp = Float64(t * Float64(x / Float64(z + -1.0))); elseif (z <= 1.9e+51) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.35e+199) tmp = (t * x) / z; elseif (z <= -5.6e+44) tmp = x * (y / z); elseif (z <= -1.35e-7) tmp = t * (x / (z + -1.0)); elseif (z <= 1.9e+51) tmp = x * ((y / z) - t); else tmp = x / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.35e+199], N[(N[(t * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -5.6e+44], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.35e-7], N[(t * N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+51], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.35 \cdot 10^{+199}:\\
\;\;\;\;\frac{t \cdot x}{z}\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \frac{x}{z + -1}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\end{array}
\end{array}
if z < -2.35e199Initial program 90.4%
Taylor expanded in z around inf 85.8%
Taylor expanded in y around 0 76.3%
*-commutative76.3%
Simplified76.3%
if -2.35e199 < z < -5.6000000000000002e44Initial program 97.1%
Taylor expanded in y around inf 57.7%
associate-*r/64.3%
Simplified64.3%
if -5.6000000000000002e44 < z < -1.35000000000000004e-7Initial program 99.5%
Taylor expanded in y around 0 89.6%
mul-1-neg89.6%
associate-/l*89.8%
distribute-rgt-neg-in89.8%
distribute-neg-frac289.8%
neg-sub089.8%
associate--r-89.8%
metadata-eval89.8%
Simplified89.8%
if -1.35000000000000004e-7 < z < 1.8999999999999999e51Initial program 94.0%
Taylor expanded in z around 0 93.2%
mul-1-neg93.2%
unsub-neg93.2%
div-sub93.2%
associate-/l*93.2%
*-inverses93.2%
*-rgt-identity93.2%
Simplified93.2%
if 1.8999999999999999e51 < z Initial program 90.4%
Taylor expanded in z around inf 89.1%
*-commutative89.1%
remove-double-neg89.1%
cancel-sign-sub-inv89.1%
metadata-eval89.1%
*-lft-identity89.1%
distribute-neg-out89.1%
neg-mul-189.1%
sub-neg89.1%
distribute-lft-neg-in89.1%
*-commutative89.1%
distribute-neg-frac89.1%
associate-/l*90.4%
distribute-rgt-neg-in90.4%
distribute-neg-frac90.4%
Simplified90.4%
clear-num90.4%
un-div-inv90.4%
+-commutative90.4%
Applied egg-rr90.4%
Taylor expanded in y around 0 71.2%
Final simplification82.4%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -1.0)
(and (not (<= z -4.8e-241)) (or (<= z 1.1e-289) (not (<= z 1.0)))))
(* t (/ x z))
(* t (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || (!(z <= -4.8e-241) && ((z <= 1.1e-289) || !(z <= 1.0)))) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= (-4.8d-241))) .and. (z <= 1.1d-289) .or. (.not. (z <= 1.0d0))) then
tmp = t * (x / z)
else
tmp = t * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || (!(z <= -4.8e-241) && ((z <= 1.1e-289) || !(z <= 1.0)))) {
tmp = t * (x / z);
} else {
tmp = t * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or (not (z <= -4.8e-241) and ((z <= 1.1e-289) or not (z <= 1.0))): tmp = t * (x / z) else: tmp = t * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || (!(z <= -4.8e-241) && ((z <= 1.1e-289) || !(z <= 1.0)))) tmp = Float64(t * Float64(x / z)); else tmp = Float64(t * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || (~((z <= -4.8e-241)) && ((z <= 1.1e-289) || ~((z <= 1.0))))) tmp = t * (x / z); else tmp = t * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], And[N[Not[LessEqual[z, -4.8e-241]], $MachinePrecision], Or[LessEqual[z, 1.1e-289], N[Not[LessEqual[z, 1.0]], $MachinePrecision]]]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(t * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq -4.8 \cdot 10^{-241}\right) \land \left(z \leq 1.1 \cdot 10^{-289} \lor \neg \left(z \leq 1\right)\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\end{array}
\end{array}
if z < -1 or -4.8e-241 < z < 1.1e-289 or 1 < z Initial program 92.8%
Taylor expanded in z around inf 84.1%
*-commutative84.1%
remove-double-neg84.1%
cancel-sign-sub-inv84.1%
metadata-eval84.1%
*-lft-identity84.1%
distribute-neg-out84.1%
neg-mul-184.1%
sub-neg84.1%
distribute-lft-neg-in84.1%
*-commutative84.1%
distribute-neg-frac84.1%
associate-/l*88.3%
distribute-rgt-neg-in88.3%
distribute-neg-frac88.3%
Simplified88.3%
Taylor expanded in t around inf 54.8%
associate-/l*52.8%
Simplified52.8%
if -1 < z < -4.8e-241 or 1.1e-289 < z < 1Initial program 94.4%
clear-num94.4%
associate-/r/94.4%
Applied egg-rr94.4%
Taylor expanded in z around 0 93.4%
mul-1-neg93.4%
unsub-neg93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in y around 0 43.2%
neg-mul-143.2%
Simplified43.2%
Final simplification48.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))) (t_2 (* t (- x))))
(if (<= z -1.0)
t_1
(if (<= z -4.5e-243)
t_2
(if (<= z 1.8e-289) (* t (/ x z)) (if (<= z 1.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double t_2 = t * -x;
double tmp;
if (z <= -1.0) {
tmp = t_1;
} else if (z <= -4.5e-243) {
tmp = t_2;
} else if (z <= 1.8e-289) {
tmp = t * (x / z);
} else if (z <= 1.0) {
tmp = t_2;
} 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 * (t / z)
t_2 = t * -x
if (z <= (-1.0d0)) then
tmp = t_1
else if (z <= (-4.5d-243)) then
tmp = t_2
else if (z <= 1.8d-289) then
tmp = t * (x / z)
else if (z <= 1.0d0) then
tmp = t_2
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 * (t / z);
double t_2 = t * -x;
double tmp;
if (z <= -1.0) {
tmp = t_1;
} else if (z <= -4.5e-243) {
tmp = t_2;
} else if (z <= 1.8e-289) {
tmp = t * (x / z);
} else if (z <= 1.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) t_2 = t * -x tmp = 0 if z <= -1.0: tmp = t_1 elif z <= -4.5e-243: tmp = t_2 elif z <= 1.8e-289: tmp = t * (x / z) elif z <= 1.0: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) t_2 = Float64(t * Float64(-x)) tmp = 0.0 if (z <= -1.0) tmp = t_1; elseif (z <= -4.5e-243) tmp = t_2; elseif (z <= 1.8e-289) tmp = Float64(t * Float64(x / z)); elseif (z <= 1.0) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); t_2 = t * -x; tmp = 0.0; if (z <= -1.0) tmp = t_1; elseif (z <= -4.5e-243) tmp = t_2; elseif (z <= 1.8e-289) tmp = t * (x / z); elseif (z <= 1.0) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * (-x)), $MachinePrecision]}, If[LessEqual[z, -1.0], t$95$1, If[LessEqual[z, -4.5e-243], t$95$2, If[LessEqual[z, 1.8e-289], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
t_2 := t \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-289}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1 or 1 < z Initial program 93.5%
Taylor expanded in z around inf 87.5%
*-commutative87.5%
remove-double-neg87.5%
cancel-sign-sub-inv87.5%
metadata-eval87.5%
*-lft-identity87.5%
distribute-neg-out87.5%
neg-mul-187.5%
sub-neg87.5%
distribute-lft-neg-in87.5%
*-commutative87.5%
distribute-neg-frac87.5%
associate-/l*92.8%
distribute-rgt-neg-in92.8%
distribute-neg-frac92.8%
Simplified92.8%
Taylor expanded in t around inf 59.7%
if -1 < z < -4.50000000000000017e-243 or 1.8e-289 < z < 1Initial program 94.4%
clear-num94.4%
associate-/r/94.4%
Applied egg-rr94.4%
Taylor expanded in z around 0 93.4%
mul-1-neg93.4%
unsub-neg93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in y around 0 43.2%
neg-mul-143.2%
Simplified43.2%
if -4.50000000000000017e-243 < z < 1.8e-289Initial program 87.0%
Taylor expanded in z around inf 53.5%
*-commutative53.5%
remove-double-neg53.5%
cancel-sign-sub-inv53.5%
metadata-eval53.5%
*-lft-identity53.5%
distribute-neg-out53.5%
neg-mul-153.5%
sub-neg53.5%
distribute-lft-neg-in53.5%
*-commutative53.5%
distribute-neg-frac53.5%
associate-/l*47.4%
distribute-rgt-neg-in47.4%
distribute-neg-frac47.4%
Simplified47.4%
Taylor expanded in t around inf 33.8%
associate-/l*33.8%
Simplified33.8%
Final simplification51.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= t -3.2e+170)
t_1
(if (<= t 1.45e-155)
(* y (/ x z))
(if (<= t 1.3e+136)
(* x (/ y z))
(if (<= t 5.8e+142) (* t (- x)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (t <= -3.2e+170) {
tmp = t_1;
} else if (t <= 1.45e-155) {
tmp = y * (x / z);
} else if (t <= 1.3e+136) {
tmp = x * (y / z);
} else if (t <= 5.8e+142) {
tmp = t * -x;
} 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) :: tmp
t_1 = x * (t / z)
if (t <= (-3.2d+170)) then
tmp = t_1
else if (t <= 1.45d-155) then
tmp = y * (x / z)
else if (t <= 1.3d+136) then
tmp = x * (y / z)
else if (t <= 5.8d+142) then
tmp = t * -x
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 * (t / z);
double tmp;
if (t <= -3.2e+170) {
tmp = t_1;
} else if (t <= 1.45e-155) {
tmp = y * (x / z);
} else if (t <= 1.3e+136) {
tmp = x * (y / z);
} else if (t <= 5.8e+142) {
tmp = t * -x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if t <= -3.2e+170: tmp = t_1 elif t <= 1.45e-155: tmp = y * (x / z) elif t <= 1.3e+136: tmp = x * (y / z) elif t <= 5.8e+142: tmp = t * -x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (t <= -3.2e+170) tmp = t_1; elseif (t <= 1.45e-155) tmp = Float64(y * Float64(x / z)); elseif (t <= 1.3e+136) tmp = Float64(x * Float64(y / z)); elseif (t <= 5.8e+142) tmp = Float64(t * Float64(-x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / z); tmp = 0.0; if (t <= -3.2e+170) tmp = t_1; elseif (t <= 1.45e-155) tmp = y * (x / z); elseif (t <= 1.3e+136) tmp = x * (y / z); elseif (t <= 5.8e+142) tmp = t * -x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e+170], t$95$1, If[LessEqual[t, 1.45e-155], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+136], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+142], N[(t * (-x)), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-155}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+136}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+142}:\\
\;\;\;\;t \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.19999999999999979e170 or 5.80000000000000027e142 < t Initial program 98.1%
Taylor expanded in z around inf 55.7%
*-commutative55.7%
remove-double-neg55.7%
cancel-sign-sub-inv55.7%
metadata-eval55.7%
*-lft-identity55.7%
distribute-neg-out55.7%
neg-mul-155.7%
sub-neg55.7%
distribute-lft-neg-in55.7%
*-commutative55.7%
distribute-neg-frac55.7%
associate-/l*68.4%
distribute-rgt-neg-in68.4%
distribute-neg-frac68.4%
Simplified68.4%
Taylor expanded in t around inf 63.4%
if -3.19999999999999979e170 < t < 1.45000000000000005e-155Initial program 89.5%
Taylor expanded in y around inf 75.8%
associate-*r/73.3%
Simplified73.3%
clear-num73.3%
un-div-inv73.3%
Applied egg-rr73.3%
associate-/r/79.5%
Simplified79.5%
if 1.45000000000000005e-155 < t < 1.3000000000000001e136Initial program 98.3%
Taylor expanded in y around inf 57.0%
associate-*r/63.5%
Simplified63.5%
if 1.3000000000000001e136 < t < 5.80000000000000027e142Initial program 68.3%
clear-num67.8%
associate-/r/68.3%
Applied egg-rr68.3%
Taylor expanded in z around 0 68.3%
mul-1-neg68.3%
unsub-neg68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y around 0 68.1%
neg-mul-168.1%
Simplified68.1%
Final simplification71.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ x z))))
(if (<= t -2.45e+172)
(/ x (/ z t))
(if (<= t 4.5e-155)
t_1
(if (<= t 4.2e+81)
(* x (/ y z))
(if (<= t 3.4e+162) t_1 (* x (/ t z))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double tmp;
if (t <= -2.45e+172) {
tmp = x / (z / t);
} else if (t <= 4.5e-155) {
tmp = t_1;
} else if (t <= 4.2e+81) {
tmp = x * (y / z);
} else if (t <= 3.4e+162) {
tmp = t_1;
} else {
tmp = x * (t / z);
}
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 = y * (x / z)
if (t <= (-2.45d+172)) then
tmp = x / (z / t)
else if (t <= 4.5d-155) then
tmp = t_1
else if (t <= 4.2d+81) then
tmp = x * (y / z)
else if (t <= 3.4d+162) then
tmp = t_1
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (x / z);
double tmp;
if (t <= -2.45e+172) {
tmp = x / (z / t);
} else if (t <= 4.5e-155) {
tmp = t_1;
} else if (t <= 4.2e+81) {
tmp = x * (y / z);
} else if (t <= 3.4e+162) {
tmp = t_1;
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (x / z) tmp = 0 if t <= -2.45e+172: tmp = x / (z / t) elif t <= 4.5e-155: tmp = t_1 elif t <= 4.2e+81: tmp = x * (y / z) elif t <= 3.4e+162: tmp = t_1 else: tmp = x * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(x / z)) tmp = 0.0 if (t <= -2.45e+172) tmp = Float64(x / Float64(z / t)); elseif (t <= 4.5e-155) tmp = t_1; elseif (t <= 4.2e+81) tmp = Float64(x * Float64(y / z)); elseif (t <= 3.4e+162) tmp = t_1; else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (x / z); tmp = 0.0; if (t <= -2.45e+172) tmp = x / (z / t); elseif (t <= 4.5e-155) tmp = t_1; elseif (t <= 4.2e+81) tmp = x * (y / z); elseif (t <= 3.4e+162) tmp = t_1; else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e+172], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e-155], t$95$1, If[LessEqual[t, 4.2e+81], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+162], t$95$1, N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{x}{z}\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+172}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+81}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if t < -2.45e172Initial program 99.7%
Taylor expanded in z around inf 62.7%
*-commutative62.7%
remove-double-neg62.7%
cancel-sign-sub-inv62.7%
metadata-eval62.7%
*-lft-identity62.7%
distribute-neg-out62.7%
neg-mul-162.7%
sub-neg62.7%
distribute-lft-neg-in62.7%
*-commutative62.7%
distribute-neg-frac62.7%
associate-/l*75.3%
distribute-rgt-neg-in75.3%
distribute-neg-frac75.3%
Simplified75.3%
clear-num75.5%
un-div-inv75.4%
+-commutative75.4%
Applied egg-rr75.4%
Taylor expanded in y around 0 75.4%
if -2.45e172 < t < 4.5000000000000004e-155 or 4.1999999999999997e81 < t < 3.40000000000000003e162Initial program 89.5%
Taylor expanded in y around inf 71.8%
associate-*r/69.8%
Simplified69.8%
clear-num69.7%
un-div-inv70.2%
Applied egg-rr70.2%
associate-/r/76.5%
Simplified76.5%
if 4.5000000000000004e-155 < t < 4.1999999999999997e81Initial program 98.0%
Taylor expanded in y around inf 58.8%
associate-*r/63.8%
Simplified63.8%
if 3.40000000000000003e162 < t Initial program 99.6%
Taylor expanded in z around inf 46.7%
*-commutative46.7%
remove-double-neg46.7%
cancel-sign-sub-inv46.7%
metadata-eval46.7%
*-lft-identity46.7%
distribute-neg-out46.7%
neg-mul-146.7%
sub-neg46.7%
distribute-lft-neg-in46.7%
*-commutative46.7%
distribute-neg-frac46.7%
associate-/l*61.5%
distribute-rgt-neg-in61.5%
distribute-neg-frac61.5%
Simplified61.5%
Taylor expanded in t around inf 58.6%
Final simplification71.4%
(FPCore (x y z t)
:precision binary64
(if (<= t -3.7e-99)
(* x (+ (/ y z) (/ t (+ z -1.0))))
(if (<= t 1.15e-155)
(* (/ x z) (+ t y))
(* x (- (/ y z) (* t (/ 1.0 (- 1.0 z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.7e-99) {
tmp = x * ((y / z) + (t / (z + -1.0)));
} else if (t <= 1.15e-155) {
tmp = (x / z) * (t + y);
} else {
tmp = x * ((y / z) - (t * (1.0 / (1.0 - z))));
}
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 <= (-3.7d-99)) then
tmp = x * ((y / z) + (t / (z + (-1.0d0))))
else if (t <= 1.15d-155) then
tmp = (x / z) * (t + y)
else
tmp = x * ((y / z) - (t * (1.0d0 / (1.0d0 - z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -3.7e-99) {
tmp = x * ((y / z) + (t / (z + -1.0)));
} else if (t <= 1.15e-155) {
tmp = (x / z) * (t + y);
} else {
tmp = x * ((y / z) - (t * (1.0 / (1.0 - z))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -3.7e-99: tmp = x * ((y / z) + (t / (z + -1.0))) elif t <= 1.15e-155: tmp = (x / z) * (t + y) else: tmp = x * ((y / z) - (t * (1.0 / (1.0 - z)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -3.7e-99) tmp = Float64(x * Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))); elseif (t <= 1.15e-155) tmp = Float64(Float64(x / z) * Float64(t + y)); else tmp = Float64(x * Float64(Float64(y / z) - Float64(t * Float64(1.0 / Float64(1.0 - z))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -3.7e-99) tmp = x * ((y / z) + (t / (z + -1.0))); elseif (t <= 1.15e-155) tmp = (x / z) * (t + y); else tmp = x * ((y / z) - (t * (1.0 / (1.0 - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -3.7e-99], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e-155], N[(N[(x / z), $MachinePrecision] * N[(t + y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - N[(t * N[(1.0 / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-99}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-155}:\\
\;\;\;\;\frac{x}{z} \cdot \left(t + y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t \cdot \frac{1}{1 - z}\right)\\
\end{array}
\end{array}
if t < -3.7e-99Initial program 98.3%
if -3.7e-99 < t < 1.15000000000000003e-155Initial program 85.0%
Taylor expanded in z around inf 94.2%
*-commutative94.2%
associate-/l*97.2%
cancel-sign-sub-inv97.2%
metadata-eval97.2%
*-lft-identity97.2%
+-commutative97.2%
Simplified97.2%
if 1.15000000000000003e-155 < t Initial program 97.0%
clear-num96.9%
associate-/r/97.1%
Applied egg-rr97.1%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.7e-99) (not (<= t 8.8e-156))) (* x (+ (/ y z) (/ t (+ z -1.0)))) (* (/ x z) (+ t y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.7e-99) || !(t <= 8.8e-156)) {
tmp = x * ((y / z) + (t / (z + -1.0)));
} else {
tmp = (x / z) * (t + 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) :: tmp
if ((t <= (-3.7d-99)) .or. (.not. (t <= 8.8d-156))) then
tmp = x * ((y / z) + (t / (z + (-1.0d0))))
else
tmp = (x / z) * (t + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.7e-99) || !(t <= 8.8e-156)) {
tmp = x * ((y / z) + (t / (z + -1.0)));
} else {
tmp = (x / z) * (t + y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.7e-99) or not (t <= 8.8e-156): tmp = x * ((y / z) + (t / (z + -1.0))) else: tmp = (x / z) * (t + y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.7e-99) || !(t <= 8.8e-156)) tmp = Float64(x * Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))); else tmp = Float64(Float64(x / z) * Float64(t + y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.7e-99) || ~((t <= 8.8e-156))) tmp = x * ((y / z) + (t / (z + -1.0))); else tmp = (x / z) * (t + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.7e-99], N[Not[LessEqual[t, 8.8e-156]], $MachinePrecision]], N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(t + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-99} \lor \neg \left(t \leq 8.8 \cdot 10^{-156}\right):\\
\;\;\;\;x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(t + y\right)\\
\end{array}
\end{array}
if t < -3.7e-99 or 8.7999999999999996e-156 < t Initial program 97.5%
if -3.7e-99 < t < 8.7999999999999996e-156Initial program 85.0%
Taylor expanded in z around inf 94.2%
*-commutative94.2%
associate-/l*97.2%
cancel-sign-sub-inv97.2%
metadata-eval97.2%
*-lft-identity97.2%
+-commutative97.2%
Simplified97.2%
Final simplification97.4%
(FPCore (x y z t) :precision binary64 (if (<= z -1.0) (* x (/ (+ t y) z)) (if (<= z 1.0) (* x (- (/ y z) t)) (* x (* (+ t y) (/ 1.0 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((t + y) / z);
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((t + y) * (1.0 / z));
}
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 (z <= (-1.0d0)) then
tmp = x * ((t + y) / z)
else if (z <= 1.0d0) then
tmp = x * ((y / z) - t)
else
tmp = x * ((t + y) * (1.0d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((t + y) / z);
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((t + y) * (1.0 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.0: tmp = x * ((t + y) / z) elif z <= 1.0: tmp = x * ((y / z) - t) else: tmp = x * ((t + y) * (1.0 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.0) tmp = Float64(x * Float64(Float64(t + y) / z)); elseif (z <= 1.0) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(Float64(t + y) * Float64(1.0 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.0) tmp = x * ((t + y) / z); elseif (z <= 1.0) tmp = x * ((y / z) - t); else tmp = x * ((t + y) * (1.0 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(t + y), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x \cdot \frac{t + y}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(t + y\right) \cdot \frac{1}{z}\right)\\
\end{array}
\end{array}
if z < -1Initial program 95.2%
Taylor expanded in z around inf 83.5%
*-commutative83.5%
remove-double-neg83.5%
cancel-sign-sub-inv83.5%
metadata-eval83.5%
*-lft-identity83.5%
distribute-neg-out83.5%
neg-mul-183.5%
sub-neg83.5%
distribute-lft-neg-in83.5%
*-commutative83.5%
distribute-neg-frac83.5%
associate-/l*93.7%
distribute-rgt-neg-in93.7%
distribute-neg-frac93.7%
Simplified93.7%
if -1 < z < 1Initial program 93.5%
Taylor expanded in z around 0 92.6%
mul-1-neg92.6%
unsub-neg92.6%
div-sub92.6%
associate-/l*92.6%
*-inverses92.6%
*-rgt-identity92.6%
Simplified92.6%
if 1 < z Initial program 92.0%
Taylor expanded in z around inf 90.9%
*-commutative90.9%
remove-double-neg90.9%
cancel-sign-sub-inv90.9%
metadata-eval90.9%
*-lft-identity90.9%
distribute-neg-out90.9%
neg-mul-190.9%
sub-neg90.9%
distribute-lft-neg-in90.9%
*-commutative90.9%
distribute-neg-frac90.9%
associate-/l*92.0%
distribute-rgt-neg-in92.0%
distribute-neg-frac92.0%
Simplified92.0%
div-inv92.1%
+-commutative92.1%
Applied egg-rr92.1%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.0) (not (<= z 1.0))) (* x (/ (+ t y) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.0)) {
tmp = x * ((t + y) / z);
} else {
tmp = x * ((y / z) - t);
}
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 ((z <= (-1.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x * ((t + y) / z)
else
tmp = x * ((y / z) - t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.0) || !(z <= 1.0)) {
tmp = x * ((t + y) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.0) or not (z <= 1.0): tmp = x * ((t + y) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.0)) tmp = Float64(x * Float64(Float64(t + y) / z)); else tmp = Float64(x * Float64(Float64(y / z) - t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.0) || ~((z <= 1.0))) tmp = x * ((t + y) / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \frac{t + y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -1 or 1 < z Initial program 93.5%
Taylor expanded in z around inf 87.5%
*-commutative87.5%
remove-double-neg87.5%
cancel-sign-sub-inv87.5%
metadata-eval87.5%
*-lft-identity87.5%
distribute-neg-out87.5%
neg-mul-187.5%
sub-neg87.5%
distribute-lft-neg-in87.5%
*-commutative87.5%
distribute-neg-frac87.5%
associate-/l*92.8%
distribute-rgt-neg-in92.8%
distribute-neg-frac92.8%
Simplified92.8%
if -1 < z < 1Initial program 93.5%
Taylor expanded in z around 0 92.6%
mul-1-neg92.6%
unsub-neg92.6%
div-sub92.6%
associate-/l*92.6%
*-inverses92.6%
*-rgt-identity92.6%
Simplified92.6%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (<= y -1.05e-103) (* y (/ x z)) (if (<= y 2e-102) (* t (/ x (+ z -1.0))) (/ x (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e-103) {
tmp = y * (x / z);
} else if (y <= 2e-102) {
tmp = t * (x / (z + -1.0));
} else {
tmp = x / (z / 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) :: tmp
if (y <= (-1.05d-103)) then
tmp = y * (x / z)
else if (y <= 2d-102) then
tmp = t * (x / (z + (-1.0d0)))
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e-103) {
tmp = y * (x / z);
} else if (y <= 2e-102) {
tmp = t * (x / (z + -1.0));
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.05e-103: tmp = y * (x / z) elif y <= 2e-102: tmp = t * (x / (z + -1.0)) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.05e-103) tmp = Float64(y * Float64(x / z)); elseif (y <= 2e-102) tmp = Float64(t * Float64(x / Float64(z + -1.0))); else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.05e-103) tmp = y * (x / z); elseif (y <= 2e-102) tmp = t * (x / (z + -1.0)); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.05e-103], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-102], N[(t * N[(x / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-103}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-102}:\\
\;\;\;\;t \cdot \frac{x}{z + -1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.05000000000000002e-103Initial program 93.9%
Taylor expanded in y around inf 72.8%
associate-*r/74.0%
Simplified74.0%
clear-num73.9%
un-div-inv74.8%
Applied egg-rr74.8%
associate-/r/80.0%
Simplified80.0%
if -1.05000000000000002e-103 < y < 1.99999999999999987e-102Initial program 91.3%
Taylor expanded in y around 0 79.0%
mul-1-neg79.0%
associate-/l*78.9%
distribute-rgt-neg-in78.9%
distribute-neg-frac278.9%
neg-sub078.9%
associate--r-78.9%
metadata-eval78.9%
Simplified78.9%
if 1.99999999999999987e-102 < y Initial program 95.9%
Taylor expanded in y around inf 73.5%
associate-*r/74.6%
Simplified74.6%
clear-num74.6%
un-div-inv74.7%
Applied egg-rr74.7%
Final simplification77.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1.0) (* x (/ (+ t y) z)) (if (<= z 7.8e+40) (* x (- (/ y z) t)) (/ x (/ z (+ t y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((t + y) / z);
} else if (z <= 7.8e+40) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / (t + 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) :: tmp
if (z <= (-1.0d0)) then
tmp = x * ((t + y) / z)
else if (z <= 7.8d+40) then
tmp = x * ((y / z) - t)
else
tmp = x / (z / (t + y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = x * ((t + y) / z);
} else if (z <= 7.8e+40) {
tmp = x * ((y / z) - t);
} else {
tmp = x / (z / (t + y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.0: tmp = x * ((t + y) / z) elif z <= 7.8e+40: tmp = x * ((y / z) - t) else: tmp = x / (z / (t + y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.0) tmp = Float64(x * Float64(Float64(t + y) / z)); elseif (z <= 7.8e+40) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x / Float64(z / Float64(t + y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.0) tmp = x * ((t + y) / z); elseif (z <= 7.8e+40) tmp = x * ((y / z) - t); else tmp = x / (z / (t + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+40], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x \cdot \frac{t + y}{z}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+40}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{t + y}}\\
\end{array}
\end{array}
if z < -1Initial program 95.2%
Taylor expanded in z around inf 83.5%
*-commutative83.5%
remove-double-neg83.5%
cancel-sign-sub-inv83.5%
metadata-eval83.5%
*-lft-identity83.5%
distribute-neg-out83.5%
neg-mul-183.5%
sub-neg83.5%
distribute-lft-neg-in83.5%
*-commutative83.5%
distribute-neg-frac83.5%
associate-/l*93.7%
distribute-rgt-neg-in93.7%
distribute-neg-frac93.7%
Simplified93.7%
if -1 < z < 7.8000000000000002e40Initial program 93.9%
Taylor expanded in z around 0 93.0%
mul-1-neg93.0%
unsub-neg93.0%
div-sub93.0%
associate-/l*93.0%
*-inverses93.0%
*-rgt-identity93.0%
Simplified93.0%
if 7.8000000000000002e40 < z Initial program 91.1%
Taylor expanded in z around inf 89.9%
*-commutative89.9%
remove-double-neg89.9%
cancel-sign-sub-inv89.9%
metadata-eval89.9%
*-lft-identity89.9%
distribute-neg-out89.9%
neg-mul-189.9%
sub-neg89.9%
distribute-lft-neg-in89.9%
*-commutative89.9%
distribute-neg-frac89.9%
associate-/l*91.1%
distribute-rgt-neg-in91.1%
distribute-neg-frac91.1%
Simplified91.1%
clear-num91.1%
un-div-inv91.1%
+-commutative91.1%
Applied egg-rr91.1%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.15e+170) (not (<= t 5e+142))) (* x (/ t z)) (* x (/ y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.15e+170) || !(t <= 5e+142)) {
tmp = x * (t / z);
} else {
tmp = x * (y / z);
}
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 <= (-2.15d+170)) .or. (.not. (t <= 5d+142))) then
tmp = x * (t / z)
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.15e+170) || !(t <= 5e+142)) {
tmp = x * (t / z);
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.15e+170) or not (t <= 5e+142): tmp = x * (t / z) else: tmp = x * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.15e+170) || !(t <= 5e+142)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.15e+170) || ~((t <= 5e+142))) tmp = x * (t / z); else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.15e+170], N[Not[LessEqual[t, 5e+142]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+170} \lor \neg \left(t \leq 5 \cdot 10^{+142}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if t < -2.1499999999999999e170 or 5.0000000000000001e142 < t Initial program 98.1%
Taylor expanded in z around inf 55.7%
*-commutative55.7%
remove-double-neg55.7%
cancel-sign-sub-inv55.7%
metadata-eval55.7%
*-lft-identity55.7%
distribute-neg-out55.7%
neg-mul-155.7%
sub-neg55.7%
distribute-lft-neg-in55.7%
*-commutative55.7%
distribute-neg-frac55.7%
associate-/l*68.4%
distribute-rgt-neg-in68.4%
distribute-neg-frac68.4%
Simplified68.4%
Taylor expanded in t around inf 63.4%
if -2.1499999999999999e170 < t < 5.0000000000000001e142Initial program 92.1%
Taylor expanded in y around inf 68.8%
associate-*r/69.0%
Simplified69.0%
Final simplification67.7%
(FPCore (x y z t) :precision binary64 (* t (- x)))
double code(double x, double y, double z, double t) {
return t * -x;
}
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 = t * -x
end function
public static double code(double x, double y, double z, double t) {
return t * -x;
}
def code(x, y, z, t): return t * -x
function code(x, y, z, t) return Float64(t * Float64(-x)) end
function tmp = code(x, y, z, t) tmp = t * -x; end
code[x_, y_, z_, t_] := N[(t * (-x)), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(-x\right)
\end{array}
Initial program 93.5%
clear-num93.4%
associate-/r/93.5%
Applied egg-rr93.5%
Taylor expanded in z around 0 62.4%
mul-1-neg62.4%
unsub-neg62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in y around 0 24.7%
neg-mul-124.7%
Simplified24.7%
Final simplification24.7%
(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 2024130
(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)))))