
(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 10 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 (let* ((t_1 (+ (/ y z) (/ t (+ z -1.0))))) (if (<= t_1 2e+301) (* t_1 x) (* y (/ x z)))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_1 <= 2e+301) {
tmp = t_1 * x;
} else {
tmp = y * (x / 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 / z) + (t / (z + (-1.0d0)))
if (t_1 <= 2d+301) then
tmp = t_1 * x
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) + (t / (z + -1.0));
double tmp;
if (t_1 <= 2e+301) {
tmp = t_1 * x;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) + (t / (z + -1.0)) tmp = 0 if t_1 <= 2e+301: tmp = t_1 * x else: tmp = y * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) + Float64(t / Float64(z + -1.0))) tmp = 0.0 if (t_1 <= 2e+301) tmp = Float64(t_1 * x); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) + (t / (z + -1.0)); tmp = 0.0; if (t_1 <= 2e+301) tmp = t_1 * x; else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+301], N[(t$95$1 * x), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} + \frac{t}{z + -1}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 2.00000000000000011e301Initial program 97.1%
if 2.00000000000000011e301 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 62.5%
clear-num62.5%
frac-sub62.5%
*-un-lft-identity62.5%
Applied egg-rr62.5%
div-sub0.7%
remove-double-neg0.7%
distribute-neg-frac0.7%
distribute-frac-neg20.7%
distribute-rgt-neg-out0.7%
times-frac0.7%
*-inverses62.5%
cancel-sign-sub-inv62.5%
*-commutative62.5%
associate-/r*62.5%
*-inverses62.5%
metadata-eval62.5%
mul-1-neg62.5%
distribute-neg-frac262.5%
Simplified62.5%
Taylor expanded in z around inf 99.9%
+-commutative99.9%
associate-*l/99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Final simplification97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ y z) x)))
(if (<= z -2.75e+78)
t_1
(if (<= z 4.6e+58)
(* x (- (/ y z) t))
(if (<= z 3e+111)
(* t (/ x z))
(if (<= z 9.6e+178)
t_1
(if (<= z 1.15e+206) (* x (/ t z)) (/ x (/ z y)))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) * x;
double tmp;
if (z <= -2.75e+78) {
tmp = t_1;
} else if (z <= 4.6e+58) {
tmp = x * ((y / z) - t);
} else if (z <= 3e+111) {
tmp = t * (x / z);
} else if (z <= 9.6e+178) {
tmp = t_1;
} else if (z <= 1.15e+206) {
tmp = x * (t / z);
} 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) :: t_1
real(8) :: tmp
t_1 = (y / z) * x
if (z <= (-2.75d+78)) then
tmp = t_1
else if (z <= 4.6d+58) then
tmp = x * ((y / z) - t)
else if (z <= 3d+111) then
tmp = t * (x / z)
else if (z <= 9.6d+178) then
tmp = t_1
else if (z <= 1.15d+206) then
tmp = x * (t / z)
else
tmp = x / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) * x;
double tmp;
if (z <= -2.75e+78) {
tmp = t_1;
} else if (z <= 4.6e+58) {
tmp = x * ((y / z) - t);
} else if (z <= 3e+111) {
tmp = t * (x / z);
} else if (z <= 9.6e+178) {
tmp = t_1;
} else if (z <= 1.15e+206) {
tmp = x * (t / z);
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) * x tmp = 0 if z <= -2.75e+78: tmp = t_1 elif z <= 4.6e+58: tmp = x * ((y / z) - t) elif z <= 3e+111: tmp = t * (x / z) elif z <= 9.6e+178: tmp = t_1 elif z <= 1.15e+206: tmp = x * (t / z) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) * x) tmp = 0.0 if (z <= -2.75e+78) tmp = t_1; elseif (z <= 4.6e+58) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 3e+111) tmp = Float64(t * Float64(x / z)); elseif (z <= 9.6e+178) tmp = t_1; elseif (z <= 1.15e+206) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) * x; tmp = 0.0; if (z <= -2.75e+78) tmp = t_1; elseif (z <= 4.6e+58) tmp = x * ((y / z) - t); elseif (z <= 3e+111) tmp = t * (x / z); elseif (z <= 9.6e+178) tmp = t_1; elseif (z <= 1.15e+206) tmp = x * (t / z); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.75e+78], t$95$1, If[LessEqual[z, 4.6e+58], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+111], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e+178], t$95$1, If[LessEqual[z, 1.15e+206], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} \cdot x\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+58}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+111}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+206}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if z < -2.7499999999999999e78 or 3e111 < z < 9.599999999999999e178Initial program 96.0%
Taylor expanded in y around inf 69.9%
associate-*r/76.7%
Simplified76.7%
if -2.7499999999999999e78 < z < 4.60000000000000005e58Initial program 94.8%
Taylor expanded in z around 0 88.3%
mul-1-neg88.3%
unsub-neg88.3%
div-sub88.3%
associate-/l*88.3%
*-inverses88.3%
*-rgt-identity88.3%
Simplified88.3%
if 4.60000000000000005e58 < z < 3e111Initial program 92.7%
Taylor expanded in z around inf 87.8%
*-commutative87.8%
sub-neg87.8%
remove-double-neg87.8%
neg-mul-187.8%
distribute-neg-in87.8%
neg-mul-187.8%
sub-neg87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
distribute-neg-frac87.8%
associate-/l*92.7%
distribute-rgt-neg-in92.7%
distribute-neg-frac92.7%
Simplified92.7%
Taylor expanded in t around inf 75.9%
associate-/l*87.8%
Simplified87.8%
if 9.599999999999999e178 < z < 1.15000000000000008e206Initial program 100.0%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
sub-neg99.7%
remove-double-neg99.7%
neg-mul-199.7%
distribute-neg-in99.7%
neg-mul-199.7%
sub-neg99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
distribute-neg-frac99.7%
associate-/l*100.0%
distribute-rgt-neg-in100.0%
distribute-neg-frac100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
if 1.15000000000000008e206 < z Initial program 95.1%
Taylor expanded in y around inf 63.2%
associate-*r/72.5%
Simplified72.5%
clear-num72.5%
un-div-inv72.8%
Applied egg-rr72.8%
Final simplification84.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ y z) x)))
(if (<= y -1.15e-106)
t_1
(if (<= y 8.8e-249)
(* x (- t))
(if (or (<= y 7.2e-187) (not (<= y 2.3e-157))) t_1 (* t (/ x z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) * x;
double tmp;
if (y <= -1.15e-106) {
tmp = t_1;
} else if (y <= 8.8e-249) {
tmp = x * -t;
} else if ((y <= 7.2e-187) || !(y <= 2.3e-157)) {
tmp = t_1;
} else {
tmp = t * (x / 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 / z) * x
if (y <= (-1.15d-106)) then
tmp = t_1
else if (y <= 8.8d-249) then
tmp = x * -t
else if ((y <= 7.2d-187) .or. (.not. (y <= 2.3d-157))) then
tmp = t_1
else
tmp = t * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) * x;
double tmp;
if (y <= -1.15e-106) {
tmp = t_1;
} else if (y <= 8.8e-249) {
tmp = x * -t;
} else if ((y <= 7.2e-187) || !(y <= 2.3e-157)) {
tmp = t_1;
} else {
tmp = t * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) * x tmp = 0 if y <= -1.15e-106: tmp = t_1 elif y <= 8.8e-249: tmp = x * -t elif (y <= 7.2e-187) or not (y <= 2.3e-157): tmp = t_1 else: tmp = t * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) * x) tmp = 0.0 if (y <= -1.15e-106) tmp = t_1; elseif (y <= 8.8e-249) tmp = Float64(x * Float64(-t)); elseif ((y <= 7.2e-187) || !(y <= 2.3e-157)) tmp = t_1; else tmp = Float64(t * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) * x; tmp = 0.0; if (y <= -1.15e-106) tmp = t_1; elseif (y <= 8.8e-249) tmp = x * -t; elseif ((y <= 7.2e-187) || ~((y <= 2.3e-157))) tmp = t_1; else tmp = t * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y, -1.15e-106], t$95$1, If[LessEqual[y, 8.8e-249], N[(x * (-t)), $MachinePrecision], If[Or[LessEqual[y, 7.2e-187], N[Not[LessEqual[y, 2.3e-157]], $MachinePrecision]], t$95$1, N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} \cdot x\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-249}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-187} \lor \neg \left(y \leq 2.3 \cdot 10^{-157}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -1.15e-106 or 8.8e-249 < y < 7.19999999999999989e-187 or 2.29999999999999989e-157 < y Initial program 94.2%
Taylor expanded in y around inf 76.0%
associate-*r/75.6%
Simplified75.6%
if -1.15e-106 < y < 8.8e-249Initial program 98.3%
Taylor expanded in z around 0 73.6%
mul-1-neg73.6%
unsub-neg73.6%
div-sub73.6%
associate-/l*73.8%
*-inverses73.8%
*-rgt-identity73.8%
Simplified73.8%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
neg-mul-162.8%
*-commutative62.8%
Simplified62.8%
if 7.19999999999999989e-187 < y < 2.29999999999999989e-157Initial program 99.5%
Taylor expanded in z around inf 89.7%
*-commutative89.7%
sub-neg89.7%
remove-double-neg89.7%
neg-mul-189.7%
distribute-neg-in89.7%
neg-mul-189.7%
sub-neg89.7%
distribute-lft-neg-in89.7%
*-commutative89.7%
distribute-neg-frac89.7%
associate-/l*89.3%
distribute-rgt-neg-in89.3%
distribute-neg-frac89.3%
Simplified89.3%
Taylor expanded in t around inf 89.7%
associate-/l*89.8%
Simplified89.8%
Final simplification73.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.5e-106)
(* y (/ x z))
(if (<= y 1.15e-248)
(* x (- t))
(if (or (<= y 1.7e-187) (not (<= y 7.5e-158)))
(* (/ y z) x)
(* t (/ x z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-106) {
tmp = y * (x / z);
} else if (y <= 1.15e-248) {
tmp = x * -t;
} else if ((y <= 1.7e-187) || !(y <= 7.5e-158)) {
tmp = (y / z) * x;
} else {
tmp = t * (x / 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 (y <= (-2.5d-106)) then
tmp = y * (x / z)
else if (y <= 1.15d-248) then
tmp = x * -t
else if ((y <= 1.7d-187) .or. (.not. (y <= 7.5d-158))) then
tmp = (y / z) * x
else
tmp = t * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.5e-106) {
tmp = y * (x / z);
} else if (y <= 1.15e-248) {
tmp = x * -t;
} else if ((y <= 1.7e-187) || !(y <= 7.5e-158)) {
tmp = (y / z) * x;
} else {
tmp = t * (x / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.5e-106: tmp = y * (x / z) elif y <= 1.15e-248: tmp = x * -t elif (y <= 1.7e-187) or not (y <= 7.5e-158): tmp = (y / z) * x else: tmp = t * (x / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.5e-106) tmp = Float64(y * Float64(x / z)); elseif (y <= 1.15e-248) tmp = Float64(x * Float64(-t)); elseif ((y <= 1.7e-187) || !(y <= 7.5e-158)) tmp = Float64(Float64(y / z) * x); else tmp = Float64(t * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.5e-106) tmp = y * (x / z); elseif (y <= 1.15e-248) tmp = x * -t; elseif ((y <= 1.7e-187) || ~((y <= 7.5e-158))) tmp = (y / z) * x; else tmp = t * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.5e-106], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-248], N[(x * (-t)), $MachinePrecision], If[Or[LessEqual[y, 1.7e-187], N[Not[LessEqual[y, 7.5e-158]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-106}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-248}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-187} \lor \neg \left(y \leq 7.5 \cdot 10^{-158}\right):\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\end{array}
\end{array}
if y < -2.49999999999999991e-106Initial program 91.6%
clear-num91.6%
frac-sub71.7%
*-un-lft-identity71.7%
Applied egg-rr71.7%
div-sub62.7%
remove-double-neg62.7%
distribute-neg-frac62.7%
distribute-frac-neg262.7%
distribute-rgt-neg-out62.7%
times-frac71.3%
*-inverses80.4%
cancel-sign-sub-inv80.4%
*-commutative80.4%
associate-/r*91.6%
*-inverses91.6%
metadata-eval91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Taylor expanded in z around inf 70.7%
+-commutative70.7%
associate-*l/77.4%
+-commutative77.4%
Simplified77.4%
Taylor expanded in t around 0 74.0%
associate-*l/78.6%
*-commutative78.6%
Simplified78.6%
if -2.49999999999999991e-106 < y < 1.15e-248Initial program 98.3%
Taylor expanded in z around 0 73.6%
mul-1-neg73.6%
unsub-neg73.6%
div-sub73.6%
associate-/l*73.8%
*-inverses73.8%
*-rgt-identity73.8%
Simplified73.8%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
neg-mul-162.8%
*-commutative62.8%
Simplified62.8%
if 1.15e-248 < y < 1.7000000000000001e-187 or 7.5e-158 < y Initial program 95.9%
Taylor expanded in y around inf 77.2%
associate-*r/77.3%
Simplified77.3%
if 1.7000000000000001e-187 < y < 7.5e-158Initial program 99.5%
Taylor expanded in z around inf 89.7%
*-commutative89.7%
sub-neg89.7%
remove-double-neg89.7%
neg-mul-189.7%
distribute-neg-in89.7%
neg-mul-189.7%
sub-neg89.7%
distribute-lft-neg-in89.7%
*-commutative89.7%
distribute-neg-frac89.7%
associate-/l*89.3%
distribute-rgt-neg-in89.3%
distribute-neg-frac89.3%
Simplified89.3%
Taylor expanded in t around inf 89.7%
associate-/l*89.8%
Simplified89.8%
Final simplification75.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.35e-106)
(* y (/ x z))
(if (<= y 5.5e-251)
(* x (- t))
(if (<= y 8e-188)
(* (/ y z) x)
(if (<= y 8.6e-159) (* t (/ x z)) (/ x (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e-106) {
tmp = y * (x / z);
} else if (y <= 5.5e-251) {
tmp = x * -t;
} else if (y <= 8e-188) {
tmp = (y / z) * x;
} else if (y <= 8.6e-159) {
tmp = t * (x / z);
} 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.35d-106)) then
tmp = y * (x / z)
else if (y <= 5.5d-251) then
tmp = x * -t
else if (y <= 8d-188) then
tmp = (y / z) * x
else if (y <= 8.6d-159) then
tmp = t * (x / z)
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.35e-106) {
tmp = y * (x / z);
} else if (y <= 5.5e-251) {
tmp = x * -t;
} else if (y <= 8e-188) {
tmp = (y / z) * x;
} else if (y <= 8.6e-159) {
tmp = t * (x / z);
} else {
tmp = x / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.35e-106: tmp = y * (x / z) elif y <= 5.5e-251: tmp = x * -t elif y <= 8e-188: tmp = (y / z) * x elif y <= 8.6e-159: tmp = t * (x / z) else: tmp = x / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.35e-106) tmp = Float64(y * Float64(x / z)); elseif (y <= 5.5e-251) tmp = Float64(x * Float64(-t)); elseif (y <= 8e-188) tmp = Float64(Float64(y / z) * x); elseif (y <= 8.6e-159) tmp = Float64(t * Float64(x / z)); 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.35e-106) tmp = y * (x / z); elseif (y <= 5.5e-251) tmp = x * -t; elseif (y <= 8e-188) tmp = (y / z) * x; elseif (y <= 8.6e-159) tmp = t * (x / z); else tmp = x / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e-106], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-251], N[(x * (-t)), $MachinePrecision], If[LessEqual[y, 8e-188], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 8.6e-159], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-106}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-251}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-188}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-159}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.35000000000000011e-106Initial program 91.6%
clear-num91.6%
frac-sub71.7%
*-un-lft-identity71.7%
Applied egg-rr71.7%
div-sub62.7%
remove-double-neg62.7%
distribute-neg-frac62.7%
distribute-frac-neg262.7%
distribute-rgt-neg-out62.7%
times-frac71.3%
*-inverses80.4%
cancel-sign-sub-inv80.4%
*-commutative80.4%
associate-/r*91.6%
*-inverses91.6%
metadata-eval91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Taylor expanded in z around inf 70.7%
+-commutative70.7%
associate-*l/77.4%
+-commutative77.4%
Simplified77.4%
Taylor expanded in t around 0 74.0%
associate-*l/78.6%
*-commutative78.6%
Simplified78.6%
if -1.35000000000000011e-106 < y < 5.5e-251Initial program 98.3%
Taylor expanded in z around 0 73.6%
mul-1-neg73.6%
unsub-neg73.6%
div-sub73.6%
associate-/l*73.8%
*-inverses73.8%
*-rgt-identity73.8%
Simplified73.8%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
neg-mul-162.8%
*-commutative62.8%
Simplified62.8%
if 5.5e-251 < y < 7.9999999999999996e-188Initial program 99.6%
Taylor expanded in y around inf 71.9%
associate-*r/78.6%
Simplified78.6%
if 7.9999999999999996e-188 < y < 8.6e-159Initial program 99.5%
Taylor expanded in z around inf 89.7%
*-commutative89.7%
sub-neg89.7%
remove-double-neg89.7%
neg-mul-189.7%
distribute-neg-in89.7%
neg-mul-189.7%
sub-neg89.7%
distribute-lft-neg-in89.7%
*-commutative89.7%
distribute-neg-frac89.7%
associate-/l*89.3%
distribute-rgt-neg-in89.3%
distribute-neg-frac89.3%
Simplified89.3%
Taylor expanded in t around inf 89.7%
associate-/l*89.8%
Simplified89.8%
if 8.6e-159 < y Initial program 95.5%
Taylor expanded in y around inf 77.9%
associate-*r/77.1%
Simplified77.1%
clear-num77.2%
un-div-inv77.2%
Applied egg-rr77.2%
Final simplification75.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e-106)
(* y (/ x z))
(if (<= y 1.7e-250)
(* x (- t))
(if (<= y 1.4e-187)
(* (/ y z) x)
(if (<= y 2.7e-157) (* t (/ x z)) (/ (* y x) z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-106) {
tmp = y * (x / z);
} else if (y <= 1.7e-250) {
tmp = x * -t;
} else if (y <= 1.4e-187) {
tmp = (y / z) * x;
} else if (y <= 2.7e-157) {
tmp = t * (x / z);
} else {
tmp = (y * x) / 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 (y <= (-5.2d-106)) then
tmp = y * (x / z)
else if (y <= 1.7d-250) then
tmp = x * -t
else if (y <= 1.4d-187) then
tmp = (y / z) * x
else if (y <= 2.7d-157) then
tmp = t * (x / z)
else
tmp = (y * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-106) {
tmp = y * (x / z);
} else if (y <= 1.7e-250) {
tmp = x * -t;
} else if (y <= 1.4e-187) {
tmp = (y / z) * x;
} else if (y <= 2.7e-157) {
tmp = t * (x / z);
} else {
tmp = (y * x) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e-106: tmp = y * (x / z) elif y <= 1.7e-250: tmp = x * -t elif y <= 1.4e-187: tmp = (y / z) * x elif y <= 2.7e-157: tmp = t * (x / z) else: tmp = (y * x) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e-106) tmp = Float64(y * Float64(x / z)); elseif (y <= 1.7e-250) tmp = Float64(x * Float64(-t)); elseif (y <= 1.4e-187) tmp = Float64(Float64(y / z) * x); elseif (y <= 2.7e-157) tmp = Float64(t * Float64(x / z)); else tmp = Float64(Float64(y * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.2e-106) tmp = y * (x / z); elseif (y <= 1.7e-250) tmp = x * -t; elseif (y <= 1.4e-187) tmp = (y / z) * x; elseif (y <= 2.7e-157) tmp = t * (x / z); else tmp = (y * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e-106], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-250], N[(x * (-t)), $MachinePrecision], If[LessEqual[y, 1.4e-187], N[(N[(y / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 2.7e-157], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-106}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-250}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-187}:\\
\;\;\;\;\frac{y}{z} \cdot x\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-157}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\end{array}
\end{array}
if y < -5.2000000000000001e-106Initial program 91.6%
clear-num91.6%
frac-sub71.7%
*-un-lft-identity71.7%
Applied egg-rr71.7%
div-sub62.7%
remove-double-neg62.7%
distribute-neg-frac62.7%
distribute-frac-neg262.7%
distribute-rgt-neg-out62.7%
times-frac71.3%
*-inverses80.4%
cancel-sign-sub-inv80.4%
*-commutative80.4%
associate-/r*91.6%
*-inverses91.6%
metadata-eval91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Taylor expanded in z around inf 70.7%
+-commutative70.7%
associate-*l/77.4%
+-commutative77.4%
Simplified77.4%
Taylor expanded in t around 0 74.0%
associate-*l/78.6%
*-commutative78.6%
Simplified78.6%
if -5.2000000000000001e-106 < y < 1.69999999999999997e-250Initial program 98.3%
Taylor expanded in z around 0 73.6%
mul-1-neg73.6%
unsub-neg73.6%
div-sub73.6%
associate-/l*73.8%
*-inverses73.8%
*-rgt-identity73.8%
Simplified73.8%
Taylor expanded in y around 0 62.8%
associate-*r*62.8%
neg-mul-162.8%
*-commutative62.8%
Simplified62.8%
if 1.69999999999999997e-250 < y < 1.4e-187Initial program 99.6%
Taylor expanded in y around inf 71.9%
associate-*r/78.6%
Simplified78.6%
if 1.4e-187 < y < 2.7e-157Initial program 99.5%
Taylor expanded in z around inf 89.7%
*-commutative89.7%
sub-neg89.7%
remove-double-neg89.7%
neg-mul-189.7%
distribute-neg-in89.7%
neg-mul-189.7%
sub-neg89.7%
distribute-lft-neg-in89.7%
*-commutative89.7%
distribute-neg-frac89.7%
associate-/l*89.3%
distribute-rgt-neg-in89.3%
distribute-neg-frac89.3%
Simplified89.3%
Taylor expanded in t around inf 89.7%
associate-/l*89.8%
Simplified89.8%
if 2.7e-157 < y Initial program 95.5%
Taylor expanded in y around inf 77.9%
Final simplification76.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -235000.0) (not (<= z 8.8e-14))) (* x (/ (+ y t) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -235000.0) || !(z <= 8.8e-14)) {
tmp = x * ((y + t) / 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 <= (-235000.0d0)) .or. (.not. (z <= 8.8d-14))) then
tmp = x * ((y + t) / 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 <= -235000.0) || !(z <= 8.8e-14)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -235000.0) or not (z <= 8.8e-14): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -235000.0) || !(z <= 8.8e-14)) tmp = Float64(x * Float64(Float64(y + t) / 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 <= -235000.0) || ~((z <= 8.8e-14))) tmp = x * ((y + t) / z); else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -235000.0], N[Not[LessEqual[z, 8.8e-14]], $MachinePrecision]], N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -235000 \lor \neg \left(z \leq 8.8 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -235000 or 8.8000000000000004e-14 < z Initial program 96.6%
Taylor expanded in z around inf 90.1%
*-commutative90.1%
sub-neg90.1%
remove-double-neg90.1%
neg-mul-190.1%
distribute-neg-in90.1%
neg-mul-190.1%
sub-neg90.1%
distribute-lft-neg-in90.1%
*-commutative90.1%
distribute-neg-frac90.1%
associate-/l*96.2%
distribute-rgt-neg-in96.2%
distribute-neg-frac96.2%
Simplified96.2%
if -235000 < z < 8.8000000000000004e-14Initial program 94.0%
Taylor expanded in z around 0 93.6%
mul-1-neg93.6%
unsub-neg93.6%
div-sub93.6%
associate-/l*93.6%
*-inverses93.6%
*-rgt-identity93.6%
Simplified93.6%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.8e+35) (not (<= z 8.8e-14))) (* t (/ x z)) (* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e+35) || !(z <= 8.8e-14)) {
tmp = t * (x / z);
} else {
tmp = x * -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.8d+35)) .or. (.not. (z <= 8.8d-14))) then
tmp = t * (x / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e+35) || !(z <= 8.8e-14)) {
tmp = t * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.8e+35) or not (z <= 8.8e-14): tmp = t * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.8e+35) || !(z <= 8.8e-14)) tmp = Float64(t * Float64(x / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.8e+35) || ~((z <= 8.8e-14))) tmp = t * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.8e+35], N[Not[LessEqual[z, 8.8e-14]], $MachinePrecision]], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+35} \lor \neg \left(z \leq 8.8 \cdot 10^{-14}\right):\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -2.79999999999999999e35 or 8.8000000000000004e-14 < z Initial program 96.5%
Taylor expanded in z around inf 89.9%
*-commutative89.9%
sub-neg89.9%
remove-double-neg89.9%
neg-mul-189.9%
distribute-neg-in89.9%
neg-mul-189.9%
sub-neg89.9%
distribute-lft-neg-in89.9%
*-commutative89.9%
distribute-neg-frac89.9%
associate-/l*96.1%
distribute-rgt-neg-in96.1%
distribute-neg-frac96.1%
Simplified96.1%
Taylor expanded in t around inf 50.6%
associate-/l*50.1%
Simplified50.1%
if -2.79999999999999999e35 < z < 8.8000000000000004e-14Initial program 94.1%
Taylor expanded in z around 0 93.1%
mul-1-neg93.1%
unsub-neg93.1%
div-sub93.1%
associate-/l*93.2%
*-inverses93.2%
*-rgt-identity93.2%
Simplified93.2%
Taylor expanded in y around 0 31.7%
associate-*r*31.7%
neg-mul-131.7%
*-commutative31.7%
Simplified31.7%
Final simplification39.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.8e+35) (not (<= z 8.8e-14))) (* x (/ t z)) (* x (- t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e+35) || !(z <= 8.8e-14)) {
tmp = x * (t / z);
} else {
tmp = x * -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.8d+35)) .or. (.not. (z <= 8.8d-14))) then
tmp = x * (t / z)
else
tmp = x * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e+35) || !(z <= 8.8e-14)) {
tmp = x * (t / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.8e+35) or not (z <= 8.8e-14): tmp = x * (t / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.8e+35) || !(z <= 8.8e-14)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.8e+35) || ~((z <= 8.8e-14))) tmp = x * (t / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.8e+35], N[Not[LessEqual[z, 8.8e-14]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+35} \lor \neg \left(z \leq 8.8 \cdot 10^{-14}\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -2.79999999999999999e35 or 8.8000000000000004e-14 < z Initial program 96.5%
Taylor expanded in z around inf 89.9%
*-commutative89.9%
sub-neg89.9%
remove-double-neg89.9%
neg-mul-189.9%
distribute-neg-in89.9%
neg-mul-189.9%
sub-neg89.9%
distribute-lft-neg-in89.9%
*-commutative89.9%
distribute-neg-frac89.9%
associate-/l*96.1%
distribute-rgt-neg-in96.1%
distribute-neg-frac96.1%
Simplified96.1%
Taylor expanded in t around inf 51.6%
if -2.79999999999999999e35 < z < 8.8000000000000004e-14Initial program 94.1%
Taylor expanded in z around 0 93.1%
mul-1-neg93.1%
unsub-neg93.1%
div-sub93.1%
associate-/l*93.2%
*-inverses93.2%
*-rgt-identity93.2%
Simplified93.2%
Taylor expanded in y around 0 31.7%
associate-*r*31.7%
neg-mul-131.7%
*-commutative31.7%
Simplified31.7%
Final simplification40.2%
(FPCore (x y z t) :precision binary64 (* x (- t)))
double code(double x, double y, double z, double t) {
return x * -t;
}
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 * -t
end function
public static double code(double x, double y, double z, double t) {
return x * -t;
}
def code(x, y, z, t): return x * -t
function code(x, y, z, t) return Float64(x * Float64(-t)) end
function tmp = code(x, y, z, t) tmp = x * -t; end
code[x_, y_, z_, t_] := N[(x * (-t)), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(-t\right)
\end{array}
Initial program 95.1%
Taylor expanded in z around 0 68.1%
mul-1-neg68.1%
unsub-neg68.1%
div-sub68.1%
associate-/l*68.2%
*-inverses68.2%
*-rgt-identity68.2%
Simplified68.2%
Taylor expanded in y around 0 23.5%
associate-*r*23.5%
neg-mul-123.5%
*-commutative23.5%
Simplified23.5%
Final simplification23.5%
(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 2024072
(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)))))