
(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 11 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 (* 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}
Initial program 94.6%
Final simplification94.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (+ z -1.0)))))
(if (<= t -5e+107)
t_1
(if (<= t 3.6e-66)
(/ (* x y) z)
(if (or (<= t 0.00146) (not (<= t 7.1e+105))) t_1 (* y (/ x z)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z + -1.0));
double tmp;
if (t <= -5e+107) {
tmp = t_1;
} else if (t <= 3.6e-66) {
tmp = (x * y) / z;
} else if ((t <= 0.00146) || !(t <= 7.1e+105)) {
tmp = t_1;
} 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 = x * (t / (z + (-1.0d0)))
if (t <= (-5d+107)) then
tmp = t_1
else if (t <= 3.6d-66) then
tmp = (x * y) / z
else if ((t <= 0.00146d0) .or. (.not. (t <= 7.1d+105))) then
tmp = t_1
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 = x * (t / (z + -1.0));
double tmp;
if (t <= -5e+107) {
tmp = t_1;
} else if (t <= 3.6e-66) {
tmp = (x * y) / z;
} else if ((t <= 0.00146) || !(t <= 7.1e+105)) {
tmp = t_1;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / (z + -1.0)) tmp = 0 if t <= -5e+107: tmp = t_1 elif t <= 3.6e-66: tmp = (x * y) / z elif (t <= 0.00146) or not (t <= 7.1e+105): tmp = t_1 else: tmp = y * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(z + -1.0))) tmp = 0.0 if (t <= -5e+107) tmp = t_1; elseif (t <= 3.6e-66) tmp = Float64(Float64(x * y) / z); elseif ((t <= 0.00146) || !(t <= 7.1e+105)) tmp = t_1; else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / (z + -1.0)); tmp = 0.0; if (t <= -5e+107) tmp = t_1; elseif (t <= 3.6e-66) tmp = (x * y) / z; elseif ((t <= 0.00146) || ~((t <= 7.1e+105))) tmp = t_1; else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+107], t$95$1, If[LessEqual[t, 3.6e-66], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[t, 0.00146], N[Not[LessEqual[t, 7.1e+105]], $MachinePrecision]], t$95$1, N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z + -1}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-66}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;t \leq 0.00146 \lor \neg \left(t \leq 7.1 \cdot 10^{+105}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if t < -5.0000000000000002e107 or 3.60000000000000012e-66 < t < 0.0014599999999999999 or 7.1000000000000003e105 < t Initial program 98.8%
Taylor expanded in y around 0 80.7%
associate-*r/80.7%
mul-1-neg80.7%
*-commutative80.7%
distribute-rgt-neg-in80.7%
associate-*r/86.8%
neg-mul-186.8%
*-commutative86.8%
associate-*r/86.8%
metadata-eval86.8%
associate-/r*86.8%
neg-mul-186.8%
associate-*r/86.8%
*-rgt-identity86.8%
neg-sub086.8%
associate--r-86.8%
metadata-eval86.8%
Simplified86.8%
if -5.0000000000000002e107 < t < 3.60000000000000012e-66Initial program 92.3%
Taylor expanded in y around inf 85.3%
if 0.0014599999999999999 < t < 7.1000000000000003e105Initial program 91.7%
Taylor expanded in y around inf 63.0%
associate-*l/59.0%
Simplified59.0%
*-commutative59.0%
clear-num58.9%
un-div-inv59.0%
Applied egg-rr59.0%
associate-/r/67.2%
Simplified67.2%
Final simplification84.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t z))))
(if (<= t -2.9e+174)
t_1
(if (<= t -4.9e+114)
(- (* x t))
(if (<= t -1.9e+25)
(* y (/ x z))
(if (<= t 5.7e+62) (* x (/ y z)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / z);
double tmp;
if (t <= -2.9e+174) {
tmp = t_1;
} else if (t <= -4.9e+114) {
tmp = -(x * t);
} else if (t <= -1.9e+25) {
tmp = y * (x / z);
} else if (t <= 5.7e+62) {
tmp = x * (y / 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) :: tmp
t_1 = x * (t / z)
if (t <= (-2.9d+174)) then
tmp = t_1
else if (t <= (-4.9d+114)) then
tmp = -(x * t)
else if (t <= (-1.9d+25)) then
tmp = y * (x / z)
else if (t <= 5.7d+62) then
tmp = x * (y / 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 * (t / z);
double tmp;
if (t <= -2.9e+174) {
tmp = t_1;
} else if (t <= -4.9e+114) {
tmp = -(x * t);
} else if (t <= -1.9e+25) {
tmp = y * (x / z);
} else if (t <= 5.7e+62) {
tmp = x * (y / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / z) tmp = 0 if t <= -2.9e+174: tmp = t_1 elif t <= -4.9e+114: tmp = -(x * t) elif t <= -1.9e+25: tmp = y * (x / z) elif t <= 5.7e+62: tmp = x * (y / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / z)) tmp = 0.0 if (t <= -2.9e+174) tmp = t_1; elseif (t <= -4.9e+114) tmp = Float64(-Float64(x * t)); elseif (t <= -1.9e+25) tmp = Float64(y * Float64(x / z)); elseif (t <= 5.7e+62) tmp = Float64(x * Float64(y / z)); 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 <= -2.9e+174) tmp = t_1; elseif (t <= -4.9e+114) tmp = -(x * t); elseif (t <= -1.9e+25) tmp = y * (x / z); elseif (t <= 5.7e+62) tmp = x * (y / z); 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, -2.9e+174], t$95$1, If[LessEqual[t, -4.9e+114], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -1.9e+25], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e+62], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\
\;\;\;\;-x \cdot t\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{+25}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{+62}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.9e174 or 5.69999999999999998e62 < t Initial program 97.4%
Taylor expanded in z around inf 60.0%
cancel-sign-sub-inv60.0%
metadata-eval60.0%
*-lft-identity60.0%
Simplified60.0%
Taylor expanded in y around 0 47.6%
*-commutative47.6%
*-lft-identity47.6%
times-frac56.1%
/-rgt-identity56.1%
Simplified56.1%
if -2.9e174 < t < -4.9000000000000001e114Initial program 99.9%
Taylor expanded in y around 0 99.7%
associate-*r/99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
associate-*r/99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-/r*99.5%
neg-mul-199.5%
associate-*r/99.5%
*-rgt-identity99.5%
neg-sub099.5%
associate--r-99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.2%
un-div-inv99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
neg-mul-173.6%
Simplified73.6%
if -4.9000000000000001e114 < t < -1.9e25Initial program 88.1%
Taylor expanded in y around inf 58.7%
associate-*l/47.1%
Simplified47.1%
*-commutative47.1%
clear-num47.2%
un-div-inv50.3%
Applied egg-rr50.3%
associate-/r/53.0%
Simplified53.0%
if -1.9e25 < t < 5.69999999999999998e62Initial program 93.6%
Taylor expanded in y around inf 81.1%
associate-*l/81.3%
Simplified81.3%
Final simplification71.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -1.1e+174)
t_1
(if (<= t -4.9e+114)
(- (* x t))
(if (<= t -1.3e+26)
(* y (/ x z))
(if (<= t 2.7e+62) (* x (/ y z)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -1.1e+174) {
tmp = t_1;
} else if (t <= -4.9e+114) {
tmp = -(x * t);
} else if (t <= -1.3e+26) {
tmp = y * (x / z);
} else if (t <= 2.7e+62) {
tmp = x * (y / 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) :: tmp
t_1 = x / (z / t)
if (t <= (-1.1d+174)) then
tmp = t_1
else if (t <= (-4.9d+114)) then
tmp = -(x * t)
else if (t <= (-1.3d+26)) then
tmp = y * (x / z)
else if (t <= 2.7d+62) then
tmp = x * (y / 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 / (z / t);
double tmp;
if (t <= -1.1e+174) {
tmp = t_1;
} else if (t <= -4.9e+114) {
tmp = -(x * t);
} else if (t <= -1.3e+26) {
tmp = y * (x / z);
} else if (t <= 2.7e+62) {
tmp = x * (y / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -1.1e+174: tmp = t_1 elif t <= -4.9e+114: tmp = -(x * t) elif t <= -1.3e+26: tmp = y * (x / z) elif t <= 2.7e+62: tmp = x * (y / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -1.1e+174) tmp = t_1; elseif (t <= -4.9e+114) tmp = Float64(-Float64(x * t)); elseif (t <= -1.3e+26) tmp = Float64(y * Float64(x / z)); elseif (t <= 2.7e+62) tmp = Float64(x * Float64(y / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); tmp = 0.0; if (t <= -1.1e+174) tmp = t_1; elseif (t <= -4.9e+114) tmp = -(x * t); elseif (t <= -1.3e+26) tmp = y * (x / z); elseif (t <= 2.7e+62) tmp = x * (y / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+174], t$95$1, If[LessEqual[t, -4.9e+114], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -1.3e+26], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+62], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.9 \cdot 10^{+114}:\\
\;\;\;\;-x \cdot t\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{+26}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+62}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.1000000000000001e174 or 2.7e62 < t Initial program 97.4%
Taylor expanded in z around inf 54.0%
*-commutative54.0%
associate-/l*60.3%
neg-mul-160.3%
Simplified60.3%
Taylor expanded in y around 0 56.4%
if -1.1000000000000001e174 < t < -4.9000000000000001e114Initial program 99.9%
Taylor expanded in y around 0 99.7%
associate-*r/99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
associate-*r/99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-/r*99.5%
neg-mul-199.5%
associate-*r/99.5%
*-rgt-identity99.5%
neg-sub099.5%
associate--r-99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.2%
un-div-inv99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
neg-mul-173.6%
Simplified73.6%
if -4.9000000000000001e114 < t < -1.30000000000000001e26Initial program 88.1%
Taylor expanded in y around inf 58.7%
associate-*l/47.1%
Simplified47.1%
*-commutative47.1%
clear-num47.2%
un-div-inv50.3%
Applied egg-rr50.3%
associate-/r/53.0%
Simplified53.0%
if -1.30000000000000001e26 < t < 2.7e62Initial program 93.6%
Taylor expanded in y around inf 81.1%
associate-*l/81.3%
Simplified81.3%
Final simplification71.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -4e+174)
t_1
(if (<= t -5.2e+114)
(- (* x t))
(if (<= t -5.2e+107)
(* x (/ t z))
(if (<= t 9.5e+63) (/ x (/ z y)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -4e+174) {
tmp = t_1;
} else if (t <= -5.2e+114) {
tmp = -(x * t);
} else if (t <= -5.2e+107) {
tmp = x * (t / z);
} else if (t <= 9.5e+63) {
tmp = x / (z / y);
} 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 / (z / t)
if (t <= (-4d+174)) then
tmp = t_1
else if (t <= (-5.2d+114)) then
tmp = -(x * t)
else if (t <= (-5.2d+107)) then
tmp = x * (t / z)
else if (t <= 9.5d+63) then
tmp = x / (z / y)
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 / (z / t);
double tmp;
if (t <= -4e+174) {
tmp = t_1;
} else if (t <= -5.2e+114) {
tmp = -(x * t);
} else if (t <= -5.2e+107) {
tmp = x * (t / z);
} else if (t <= 9.5e+63) {
tmp = x / (z / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -4e+174: tmp = t_1 elif t <= -5.2e+114: tmp = -(x * t) elif t <= -5.2e+107: tmp = x * (t / z) elif t <= 9.5e+63: tmp = x / (z / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -4e+174) tmp = t_1; elseif (t <= -5.2e+114) tmp = Float64(-Float64(x * t)); elseif (t <= -5.2e+107) tmp = Float64(x * Float64(t / z)); elseif (t <= 9.5e+63) tmp = Float64(x / Float64(z / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); tmp = 0.0; if (t <= -4e+174) tmp = t_1; elseif (t <= -5.2e+114) tmp = -(x * t); elseif (t <= -5.2e+107) tmp = x * (t / z); elseif (t <= 9.5e+63) tmp = x / (z / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+174], t$95$1, If[LessEqual[t, -5.2e+114], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -5.2e+107], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+63], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -4 \cdot 10^{+174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+114}:\\
\;\;\;\;-x \cdot t\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.00000000000000028e174 or 9.5000000000000003e63 < t Initial program 97.4%
Taylor expanded in z around inf 54.0%
*-commutative54.0%
associate-/l*60.3%
neg-mul-160.3%
Simplified60.3%
Taylor expanded in y around 0 56.4%
if -4.00000000000000028e174 < t < -5.2000000000000001e114Initial program 99.9%
Taylor expanded in y around 0 99.7%
associate-*r/99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
associate-*r/99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-/r*99.5%
neg-mul-199.5%
associate-*r/99.5%
*-rgt-identity99.5%
neg-sub099.5%
associate--r-99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.2%
un-div-inv99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
neg-mul-173.6%
Simplified73.6%
if -5.2000000000000001e114 < t < -5.2000000000000002e107Initial program 100.0%
Taylor expanded in z around inf 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
*-commutative100.0%
*-lft-identity100.0%
times-frac100.0%
/-rgt-identity100.0%
Simplified100.0%
if -5.2000000000000002e107 < t < 9.5000000000000003e63Initial program 93.0%
Taylor expanded in z around inf 86.7%
*-commutative86.7%
associate-/l*81.7%
neg-mul-181.7%
Simplified81.7%
Taylor expanded in y around inf 78.7%
Final simplification71.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (/ z t))))
(if (<= t -1.7e+174)
t_1
(if (<= t -2.25e+111)
(- (* x t))
(if (<= t -8e+107)
(* x (/ t z))
(if (<= t 7.5e+106) (/ (* x y) z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (z / t);
double tmp;
if (t <= -1.7e+174) {
tmp = t_1;
} else if (t <= -2.25e+111) {
tmp = -(x * t);
} else if (t <= -8e+107) {
tmp = x * (t / z);
} else if (t <= 7.5e+106) {
tmp = (x * y) / 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) :: tmp
t_1 = x / (z / t)
if (t <= (-1.7d+174)) then
tmp = t_1
else if (t <= (-2.25d+111)) then
tmp = -(x * t)
else if (t <= (-8d+107)) then
tmp = x * (t / z)
else if (t <= 7.5d+106) then
tmp = (x * y) / 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 / (z / t);
double tmp;
if (t <= -1.7e+174) {
tmp = t_1;
} else if (t <= -2.25e+111) {
tmp = -(x * t);
} else if (t <= -8e+107) {
tmp = x * (t / z);
} else if (t <= 7.5e+106) {
tmp = (x * y) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (z / t) tmp = 0 if t <= -1.7e+174: tmp = t_1 elif t <= -2.25e+111: tmp = -(x * t) elif t <= -8e+107: tmp = x * (t / z) elif t <= 7.5e+106: tmp = (x * y) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(z / t)) tmp = 0.0 if (t <= -1.7e+174) tmp = t_1; elseif (t <= -2.25e+111) tmp = Float64(-Float64(x * t)); elseif (t <= -8e+107) tmp = Float64(x * Float64(t / z)); elseif (t <= 7.5e+106) tmp = Float64(Float64(x * y) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (z / t); tmp = 0.0; if (t <= -1.7e+174) tmp = t_1; elseif (t <= -2.25e+111) tmp = -(x * t); elseif (t <= -8e+107) tmp = x * (t / z); elseif (t <= 7.5e+106) tmp = (x * y) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+174], t$95$1, If[LessEqual[t, -2.25e+111], (-N[(x * t), $MachinePrecision]), If[LessEqual[t, -8e+107], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+106], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{z}{t}}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{+111}:\\
\;\;\;\;-x \cdot t\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.7000000000000001e174 or 7.50000000000000058e106 < t Initial program 98.4%
Taylor expanded in z around inf 47.0%
*-commutative47.0%
associate-/l*55.9%
neg-mul-155.9%
Simplified55.9%
Taylor expanded in y around 0 55.9%
if -1.7000000000000001e174 < t < -2.25e111Initial program 99.9%
Taylor expanded in y around 0 99.7%
associate-*r/99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
associate-*r/99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
metadata-eval99.5%
associate-/r*99.5%
neg-mul-199.5%
associate-*r/99.5%
*-rgt-identity99.5%
neg-sub099.5%
associate--r-99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.2%
un-div-inv99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in z around 0 73.6%
associate-*r*73.6%
neg-mul-173.6%
Simplified73.6%
if -2.25e111 < t < -7.9999999999999998e107Initial program 100.0%
Taylor expanded in z around inf 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
*-lft-identity100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
*-commutative100.0%
*-lft-identity100.0%
times-frac100.0%
/-rgt-identity100.0%
Simplified100.0%
if -7.9999999999999998e107 < t < 7.50000000000000058e106Initial program 93.0%
Taylor expanded in y around inf 78.0%
Final simplification72.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.6e+201)
(/ (* x y) z)
(if (<= z -2.1e+44)
(* x (/ t z))
(if (<= z 82.0)
(* x (- (/ y z) t))
(if (<= z 3.4e+215) (/ x (/ z t)) (* x (/ y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.6e+201) {
tmp = (x * y) / z;
} else if (z <= -2.1e+44) {
tmp = x * (t / z);
} else if (z <= 82.0) {
tmp = x * ((y / z) - t);
} else if (z <= 3.4e+215) {
tmp = x / (z / t);
} 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 (z <= (-1.6d+201)) then
tmp = (x * y) / z
else if (z <= (-2.1d+44)) then
tmp = x * (t / z)
else if (z <= 82.0d0) then
tmp = x * ((y / z) - t)
else if (z <= 3.4d+215) then
tmp = x / (z / t)
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 (z <= -1.6e+201) {
tmp = (x * y) / z;
} else if (z <= -2.1e+44) {
tmp = x * (t / z);
} else if (z <= 82.0) {
tmp = x * ((y / z) - t);
} else if (z <= 3.4e+215) {
tmp = x / (z / t);
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.6e+201: tmp = (x * y) / z elif z <= -2.1e+44: tmp = x * (t / z) elif z <= 82.0: tmp = x * ((y / z) - t) elif z <= 3.4e+215: tmp = x / (z / t) else: tmp = x * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.6e+201) tmp = Float64(Float64(x * y) / z); elseif (z <= -2.1e+44) tmp = Float64(x * Float64(t / z)); elseif (z <= 82.0) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 3.4e+215) tmp = Float64(x / Float64(z / t)); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.6e+201) tmp = (x * y) / z; elseif (z <= -2.1e+44) tmp = x * (t / z); elseif (z <= 82.0) tmp = x * ((y / z) - t); elseif (z <= 3.4e+215) tmp = x / (z / t); else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.6e+201], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -2.1e+44], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 82.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e+215], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+201}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 82:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+215}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -1.6e201Initial program 87.6%
Taylor expanded in y around inf 72.3%
if -1.6e201 < z < -2.09999999999999987e44Initial program 97.0%
Taylor expanded in z around inf 97.0%
cancel-sign-sub-inv97.0%
metadata-eval97.0%
*-lft-identity97.0%
Simplified97.0%
Taylor expanded in y around 0 68.9%
*-commutative68.9%
*-lft-identity68.9%
times-frac74.0%
/-rgt-identity74.0%
Simplified74.0%
if -2.09999999999999987e44 < z < 82Initial program 94.3%
Taylor expanded in z around 0 91.3%
associate-*l/88.4%
associate-*r*88.4%
neg-mul-188.4%
distribute-rgt-out90.7%
unsub-neg90.7%
Simplified90.7%
if 82 < z < 3.40000000000000018e215Initial program 97.4%
Taylor expanded in z around inf 89.3%
*-commutative89.3%
associate-/l*94.0%
neg-mul-194.0%
Simplified94.0%
Taylor expanded in y around 0 67.0%
if 3.40000000000000018e215 < z Initial program 95.4%
Taylor expanded in y around inf 77.6%
associate-*l/81.8%
Simplified81.8%
Final simplification82.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.02e+200) (and (not (<= z -1150000.0)) (<= z 92000.0))) (* y (/ x z)) (* x (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e+200) || (!(z <= -1150000.0) && (z <= 92000.0))) {
tmp = y * (x / z);
} 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) :: tmp
if ((z <= (-1.02d+200)) .or. (.not. (z <= (-1150000.0d0))) .and. (z <= 92000.0d0)) then
tmp = y * (x / z)
else
tmp = x * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.02e+200) || (!(z <= -1150000.0) && (z <= 92000.0))) {
tmp = y * (x / z);
} else {
tmp = x * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.02e+200) or (not (z <= -1150000.0) and (z <= 92000.0)): tmp = y * (x / z) else: tmp = x * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.02e+200) || (!(z <= -1150000.0) && (z <= 92000.0))) tmp = Float64(y * Float64(x / z)); else tmp = Float64(x * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.02e+200) || (~((z <= -1150000.0)) && (z <= 92000.0))) tmp = y * (x / z); else tmp = x * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.02e+200], And[N[Not[LessEqual[z, -1150000.0]], $MachinePrecision], LessEqual[z, 92000.0]]], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+200} \lor \neg \left(z \leq -1150000\right) \land z \leq 92000:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\end{array}
\end{array}
if z < -1.02000000000000001e200 or -1.15e6 < z < 92000Initial program 92.9%
Taylor expanded in y around inf 69.9%
associate-*l/66.7%
Simplified66.7%
*-commutative66.7%
clear-num66.7%
un-div-inv67.0%
Applied egg-rr67.0%
associate-/r/67.4%
Simplified67.4%
if -1.02000000000000001e200 < z < -1.15e6 or 92000 < z Initial program 97.1%
Taylor expanded in z around inf 95.2%
cancel-sign-sub-inv95.2%
metadata-eval95.2%
*-lft-identity95.2%
Simplified95.2%
Taylor expanded in y around 0 59.8%
*-commutative59.8%
*-lft-identity59.8%
times-frac63.1%
/-rgt-identity63.1%
Simplified63.1%
Final simplification65.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -3000.0) (not (<= z 9e-5))) (* x (/ (+ y t) z)) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -3000.0) || !(z <= 9e-5)) {
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 <= (-3000.0d0)) .or. (.not. (z <= 9d-5))) 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 <= -3000.0) || !(z <= 9e-5)) {
tmp = x * ((y + t) / z);
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -3000.0) or not (z <= 9e-5): tmp = x * ((y + t) / z) else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -3000.0) || !(z <= 9e-5)) 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 <= -3000.0) || ~((z <= 9e-5))) 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, -3000.0], N[Not[LessEqual[z, 9e-5]], $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 -3000 \lor \neg \left(z \leq 9 \cdot 10^{-5}\right):\\
\;\;\;\;x \cdot \frac{y + t}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -3e3 or 9.00000000000000057e-5 < z Initial program 95.4%
Taylor expanded in z around inf 93.9%
cancel-sign-sub-inv93.9%
metadata-eval93.9%
*-lft-identity93.9%
Simplified93.9%
if -3e3 < z < 9.00000000000000057e-5Initial program 93.8%
Taylor expanded in z around 0 94.1%
associate-*l/91.1%
associate-*r*91.1%
neg-mul-191.1%
distribute-rgt-out93.5%
unsub-neg93.5%
Simplified93.5%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.06e-12) (not (<= z 1.0))) (* x (/ t z)) (- (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.06e-12) || !(z <= 1.0)) {
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 <= (-1.06d-12)) .or. (.not. (z <= 1.0d0))) 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 <= -1.06e-12) || !(z <= 1.0)) {
tmp = x * (t / z);
} else {
tmp = -(x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.06e-12) or not (z <= 1.0): tmp = x * (t / z) else: tmp = -(x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.06e-12) || !(z <= 1.0)) tmp = Float64(x * Float64(t / z)); else tmp = Float64(-Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.06e-12) || ~((z <= 1.0))) tmp = x * (t / z); else tmp = -(x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.06e-12], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], (-N[(x * t), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-12} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;-x \cdot t\\
\end{array}
\end{array}
if z < -1.0599999999999999e-12 or 1 < z Initial program 95.5%
Taylor expanded in z around inf 93.9%
cancel-sign-sub-inv93.9%
metadata-eval93.9%
*-lft-identity93.9%
Simplified93.9%
Taylor expanded in y around 0 56.1%
*-commutative56.1%
*-lft-identity56.1%
times-frac58.7%
/-rgt-identity58.7%
Simplified58.7%
if -1.0599999999999999e-12 < z < 1Initial program 93.7%
Taylor expanded in y around 0 37.0%
associate-*r/37.0%
mul-1-neg37.0%
*-commutative37.0%
distribute-rgt-neg-in37.0%
associate-*r/37.1%
neg-mul-137.1%
*-commutative37.1%
associate-*r/37.1%
metadata-eval37.1%
associate-/r*37.1%
neg-mul-137.1%
associate-*r/37.1%
*-rgt-identity37.1%
neg-sub037.1%
associate--r-37.1%
metadata-eval37.1%
Simplified37.1%
clear-num37.0%
un-div-inv36.9%
+-commutative36.9%
Applied egg-rr36.9%
Taylor expanded in z around 0 36.8%
associate-*r*36.8%
neg-mul-136.8%
Simplified36.8%
Final simplification48.4%
(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(-Float64(x * 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 t
\end{array}
Initial program 94.6%
Taylor expanded in y around 0 47.8%
associate-*r/47.8%
mul-1-neg47.8%
*-commutative47.8%
distribute-rgt-neg-in47.8%
associate-*r/49.2%
neg-mul-149.2%
*-commutative49.2%
associate-*r/49.1%
metadata-eval49.1%
associate-/r*49.1%
neg-mul-149.1%
associate-*r/49.2%
*-rgt-identity49.2%
neg-sub049.2%
associate--r-49.2%
metadata-eval49.2%
Simplified49.2%
clear-num48.7%
un-div-inv48.7%
+-commutative48.7%
Applied egg-rr48.7%
Taylor expanded in z around 0 24.3%
associate-*r*24.3%
neg-mul-124.3%
Simplified24.3%
Final simplification24.3%
(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 2023240
(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)))))