
(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 12 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 (- 1.0 z)))))
(if (<= t_1 (- INFINITY))
(/ (* y x) z)
(if (<= t_1 5e+291) (* x t_1) (* y (/ x z))))))
double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * x) / z;
} else if (t_1 <= 5e+291) {
tmp = x * t_1;
} else {
tmp = y * (x / z);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (y / z) - (t / (1.0 - z));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y * x) / z;
} else if (t_1 <= 5e+291) {
tmp = x * t_1;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (y / z) - (t / (1.0 - z)) tmp = 0 if t_1 <= -math.inf: tmp = (y * x) / z elif t_1 <= 5e+291: tmp = x * t_1 else: tmp = y * (x / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y / z) - Float64(t / Float64(1.0 - z))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * x) / z); elseif (t_1 <= 5e+291) tmp = Float64(x * t_1); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y / z) - (t / (1.0 - z)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y * x) / z; elseif (t_1 <= 5e+291) tmp = x * t_1; 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[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 5e+291], N[(x * t$95$1), $MachinePrecision], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z} - \frac{t}{1 - z}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;x \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < -inf.0Initial program 56.9%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6456.9
Applied rewrites56.9%
Applied rewrites99.9%
if -inf.0 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) < 5.0000000000000001e291Initial program 97.3%
if 5.0000000000000001e291 < (-.f64 (/.f64 y z) (/.f64 t (-.f64 #s(literal 1 binary64) z))) Initial program 61.9%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.9
Applied rewrites61.9%
Applied rewrites99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* t x) (+ -1.0 z))))
(if (<= t -4.8e+153)
t_1
(if (<= t -4.1e-249)
(* y (/ x z))
(if (<= t 7.5e+131) (/ (* y x) z) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (t * x) / (-1.0 + z);
double tmp;
if (t <= -4.8e+153) {
tmp = t_1;
} else if (t <= -4.1e-249) {
tmp = y * (x / z);
} else if (t <= 7.5e+131) {
tmp = (y * x) / 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 = (t * x) / ((-1.0d0) + z)
if (t <= (-4.8d+153)) then
tmp = t_1
else if (t <= (-4.1d-249)) then
tmp = y * (x / z)
else if (t <= 7.5d+131) then
tmp = (y * x) / 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 = (t * x) / (-1.0 + z);
double tmp;
if (t <= -4.8e+153) {
tmp = t_1;
} else if (t <= -4.1e-249) {
tmp = y * (x / z);
} else if (t <= 7.5e+131) {
tmp = (y * x) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (t * x) / (-1.0 + z) tmp = 0 if t <= -4.8e+153: tmp = t_1 elif t <= -4.1e-249: tmp = y * (x / z) elif t <= 7.5e+131: tmp = (y * x) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t * x) / Float64(-1.0 + z)) tmp = 0.0 if (t <= -4.8e+153) tmp = t_1; elseif (t <= -4.1e-249) tmp = Float64(y * Float64(x / z)); elseif (t <= 7.5e+131) tmp = Float64(Float64(y * x) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t * x) / (-1.0 + z); tmp = 0.0; if (t <= -4.8e+153) tmp = t_1; elseif (t <= -4.1e-249) tmp = y * (x / z); elseif (t <= 7.5e+131) tmp = (y * x) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * x), $MachinePrecision] / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e+153], t$95$1, If[LessEqual[t, -4.1e-249], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+131], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot x}{-1 + z}\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+131}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.79999999999999985e153 or 7.4999999999999995e131 < t Initial program 98.2%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-*.f64N/A
*-lft-identityN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f6488.0
Applied rewrites88.0%
if -4.79999999999999985e153 < t < -4.10000000000000004e-249Initial program 89.0%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6469.0
Applied rewrites69.0%
Applied rewrites73.5%
if -4.10000000000000004e-249 < t < 7.4999999999999995e131Initial program 91.5%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
Applied rewrites75.1%
(FPCore (x y z t) :precision binary64 (if (<= z -550000000.0) (/ (* (+ t y) x) z) (if (<= z 3.3e-7) (/ (* x (- y (* t z))) z) (* x (/ (+ t y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -550000000.0) {
tmp = ((t + y) * x) / z;
} else if (z <= 3.3e-7) {
tmp = (x * (y - (t * z))) / z;
} else {
tmp = x * ((t + 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 <= (-550000000.0d0)) then
tmp = ((t + y) * x) / z
else if (z <= 3.3d-7) then
tmp = (x * (y - (t * z))) / z
else
tmp = x * ((t + y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -550000000.0) {
tmp = ((t + y) * x) / z;
} else if (z <= 3.3e-7) {
tmp = (x * (y - (t * z))) / z;
} else {
tmp = x * ((t + y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -550000000.0: tmp = ((t + y) * x) / z elif z <= 3.3e-7: tmp = (x * (y - (t * z))) / z else: tmp = x * ((t + y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -550000000.0) tmp = Float64(Float64(Float64(t + y) * x) / z); elseif (z <= 3.3e-7) tmp = Float64(Float64(x * Float64(y - Float64(t * z))) / z); else tmp = Float64(x * Float64(Float64(t + y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -550000000.0) tmp = ((t + y) * x) / z; elseif (z <= 3.3e-7) tmp = (x * (y - (t * z))) / z; else tmp = x * ((t + y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -550000000.0], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.3e-7], N[(N[(x * N[(y - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -550000000:\\
\;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-7}:\\
\;\;\;\;\frac{x \cdot \left(y - t \cdot z\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t + y}{z}\\
\end{array}
\end{array}
if z < -5.5e8Initial program 94.0%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
lower-+.f6494.1
Applied rewrites94.1%
if -5.5e8 < z < 3.3000000000000002e-7Initial program 88.4%
Taylor expanded in z around 0
lower-/.f64N/A
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
lower--.f64N/A
lower-*.f6492.2
Applied rewrites92.2%
if 3.3000000000000002e-7 < z Initial program 97.0%
Taylor expanded in z around inf
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
lower-+.f6497.0
Applied rewrites97.0%
(FPCore (x y z t)
:precision binary64
(if (<= t -6.5e+174)
(/ (* x t) z)
(if (<= t -4.1e-249)
(* y (/ x z))
(if (<= t 3.2e+132) (/ (* y x) z) (* x (- t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -6.5e+174) {
tmp = (x * t) / z;
} else if (t <= -4.1e-249) {
tmp = y * (x / z);
} else if (t <= 3.2e+132) {
tmp = (y * 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 (t <= (-6.5d+174)) then
tmp = (x * t) / z
else if (t <= (-4.1d-249)) then
tmp = y * (x / z)
else if (t <= 3.2d+132) then
tmp = (y * 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 (t <= -6.5e+174) {
tmp = (x * t) / z;
} else if (t <= -4.1e-249) {
tmp = y * (x / z);
} else if (t <= 3.2e+132) {
tmp = (y * x) / z;
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -6.5e+174: tmp = (x * t) / z elif t <= -4.1e-249: tmp = y * (x / z) elif t <= 3.2e+132: tmp = (y * x) / z else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -6.5e+174) tmp = Float64(Float64(x * t) / z); elseif (t <= -4.1e-249) tmp = Float64(y * Float64(x / z)); elseif (t <= 3.2e+132) tmp = Float64(Float64(y * x) / z); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -6.5e+174) tmp = (x * t) / z; elseif (t <= -4.1e-249) tmp = y * (x / z); elseif (t <= 3.2e+132) tmp = (y * x) / z; else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -6.5e+174], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, -4.1e-249], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+132], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+174}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+132}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -6.5000000000000001e174Initial program 99.5%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
frac-subN/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
*-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6433.0
Applied rewrites33.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f6433.1
Applied rewrites33.1%
Taylor expanded in z around -inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f6479.3
Applied rewrites79.3%
Taylor expanded in y around 0
Applied rewrites73.8%
if -6.5000000000000001e174 < t < -4.10000000000000004e-249Initial program 89.8%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6467.3
Applied rewrites67.3%
Applied rewrites71.5%
if -4.10000000000000004e-249 < t < 3.1999999999999997e132Initial program 91.5%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
Applied rewrites75.1%
if 3.1999999999999997e132 < t Initial program 96.4%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6465.6
Applied rewrites65.6%
Taylor expanded in y around 0
Applied rewrites61.2%
Final simplification72.0%
(FPCore (x y z t)
:precision binary64
(if (<= t -5.6e+174)
(* (/ x z) t)
(if (<= t -4.1e-249)
(* y (/ x z))
(if (<= t 3.2e+132) (/ (* y x) z) (* x (- t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.6e+174) {
tmp = (x / z) * t;
} else if (t <= -4.1e-249) {
tmp = y * (x / z);
} else if (t <= 3.2e+132) {
tmp = (y * 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 (t <= (-5.6d+174)) then
tmp = (x / z) * t
else if (t <= (-4.1d-249)) then
tmp = y * (x / z)
else if (t <= 3.2d+132) then
tmp = (y * 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 (t <= -5.6e+174) {
tmp = (x / z) * t;
} else if (t <= -4.1e-249) {
tmp = y * (x / z);
} else if (t <= 3.2e+132) {
tmp = (y * x) / z;
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.6e+174: tmp = (x / z) * t elif t <= -4.1e-249: tmp = y * (x / z) elif t <= 3.2e+132: tmp = (y * x) / z else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.6e+174) tmp = Float64(Float64(x / z) * t); elseif (t <= -4.1e-249) tmp = Float64(y * Float64(x / z)); elseif (t <= 3.2e+132) tmp = Float64(Float64(y * x) / z); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5.6e+174) tmp = (x / z) * t; elseif (t <= -4.1e-249) tmp = y * (x / z); elseif (t <= 3.2e+132) tmp = (y * x) / z; else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.6e+174], N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, -4.1e-249], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+132], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{z} \cdot t\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-249}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+132}:\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -5.5999999999999999e174Initial program 99.5%
Taylor expanded in t around inf
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-out--N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
mul-1-negN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites69.5%
Taylor expanded in y around 0
Applied rewrites69.5%
Taylor expanded in z around inf
Applied rewrites55.8%
if -5.5999999999999999e174 < t < -4.10000000000000004e-249Initial program 89.8%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6467.3
Applied rewrites67.3%
Applied rewrites71.5%
if -4.10000000000000004e-249 < t < 3.1999999999999997e132Initial program 91.5%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6470.3
Applied rewrites70.3%
Applied rewrites75.1%
if 3.1999999999999997e132 < t Initial program 96.4%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6465.6
Applied rewrites65.6%
Taylor expanded in y around 0
Applied rewrites61.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -550000000.0) (not (<= z 2.6e-8))) (/ (* (+ t y) x) z) (* x (- (/ y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -550000000.0) || !(z <= 2.6e-8)) {
tmp = ((t + y) * x) / 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 <= (-550000000.0d0)) .or. (.not. (z <= 2.6d-8))) then
tmp = ((t + y) * x) / 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 <= -550000000.0) || !(z <= 2.6e-8)) {
tmp = ((t + y) * x) / z;
} else {
tmp = x * ((y / z) - t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -550000000.0) or not (z <= 2.6e-8): tmp = ((t + y) * x) / z else: tmp = x * ((y / z) - t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -550000000.0) || !(z <= 2.6e-8)) tmp = Float64(Float64(Float64(t + y) * x) / 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 <= -550000000.0) || ~((z <= 2.6e-8))) tmp = ((t + y) * x) / z; else tmp = x * ((y / z) - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -550000000.0], N[Not[LessEqual[z, 2.6e-8]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -550000000 \lor \neg \left(z \leq 2.6 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\end{array}
\end{array}
if z < -5.5e8 or 2.6000000000000001e-8 < z Initial program 95.0%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
lower-+.f6491.8
Applied rewrites91.8%
if -5.5e8 < z < 2.6000000000000001e-8Initial program 89.1%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6487.7
Applied rewrites87.7%
Final simplification89.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.4e-204) (not (<= y 3.1e-137))) (/ (* (+ t y) x) z) (/ (* t x) (+ -1.0 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.4e-204) || !(y <= 3.1e-137)) {
tmp = ((t + y) * x) / z;
} else {
tmp = (t * x) / (-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 ((y <= (-4.4d-204)) .or. (.not. (y <= 3.1d-137))) then
tmp = ((t + y) * x) / z
else
tmp = (t * x) / ((-1.0d0) + z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.4e-204) || !(y <= 3.1e-137)) {
tmp = ((t + y) * x) / z;
} else {
tmp = (t * x) / (-1.0 + z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.4e-204) or not (y <= 3.1e-137): tmp = ((t + y) * x) / z else: tmp = (t * x) / (-1.0 + z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.4e-204) || !(y <= 3.1e-137)) tmp = Float64(Float64(Float64(t + y) * x) / z); else tmp = Float64(Float64(t * x) / Float64(-1.0 + z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.4e-204) || ~((y <= 3.1e-137))) tmp = ((t + y) * x) / z; else tmp = (t * x) / (-1.0 + z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.4e-204], N[Not[LessEqual[y, 3.1e-137]], $MachinePrecision]], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], N[(N[(t * x), $MachinePrecision] / N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-204} \lor \neg \left(y \leq 3.1 \cdot 10^{-137}\right):\\
\;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot x}{-1 + z}\\
\end{array}
\end{array}
if y < -4.3999999999999997e-204 or 3.09999999999999978e-137 < y Initial program 92.1%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
lower-+.f6482.6
Applied rewrites82.6%
if -4.3999999999999997e-204 < y < 3.09999999999999978e-137Initial program 92.6%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-*.f64N/A
*-lft-identityN/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-neg-inN/A
metadata-evalN/A
remove-double-negN/A
lower-+.f6491.1
Applied rewrites91.1%
Final simplification84.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.6e-168) (not (<= y 1.02e-81))) (/ (* y x) z) (* (/ x (- z 1.0)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e-168) || !(y <= 1.02e-81)) {
tmp = (y * x) / z;
} else {
tmp = (x / (z - 1.0)) * 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 ((y <= (-2.6d-168)) .or. (.not. (y <= 1.02d-81))) then
tmp = (y * x) / z
else
tmp = (x / (z - 1.0d0)) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e-168) || !(y <= 1.02e-81)) {
tmp = (y * x) / z;
} else {
tmp = (x / (z - 1.0)) * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.6e-168) or not (y <= 1.02e-81): tmp = (y * x) / z else: tmp = (x / (z - 1.0)) * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.6e-168) || !(y <= 1.02e-81)) tmp = Float64(Float64(y * x) / z); else tmp = Float64(Float64(x / Float64(z - 1.0)) * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.6e-168) || ~((y <= 1.02e-81))) tmp = (y * x) / z; else tmp = (x / (z - 1.0)) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.6e-168], N[Not[LessEqual[y, 1.02e-81]], $MachinePrecision]], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{-168} \lor \neg \left(y \leq 1.02 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{y \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z - 1} \cdot t\\
\end{array}
\end{array}
if y < -2.6000000000000001e-168 or 1.01999999999999998e-81 < y Initial program 91.3%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6466.6
Applied rewrites66.6%
Applied rewrites70.3%
if -2.6000000000000001e-168 < y < 1.01999999999999998e-81Initial program 94.3%
Taylor expanded in t around inf
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-out--N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
mul-1-negN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites83.6%
Taylor expanded in y around 0
Applied rewrites84.7%
Final simplification74.7%
(FPCore (x y z t) :precision binary64 (if (<= z -550000000.0) (/ (* (+ t y) x) z) (if (<= z 2.6e-8) (* x (- (/ y z) t)) (* x (/ (+ t y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -550000000.0) {
tmp = ((t + y) * x) / z;
} else if (z <= 2.6e-8) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((t + 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 <= (-550000000.0d0)) then
tmp = ((t + y) * x) / z
else if (z <= 2.6d-8) then
tmp = x * ((y / z) - t)
else
tmp = x * ((t + y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -550000000.0) {
tmp = ((t + y) * x) / z;
} else if (z <= 2.6e-8) {
tmp = x * ((y / z) - t);
} else {
tmp = x * ((t + y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -550000000.0: tmp = ((t + y) * x) / z elif z <= 2.6e-8: tmp = x * ((y / z) - t) else: tmp = x * ((t + y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -550000000.0) tmp = Float64(Float64(Float64(t + y) * x) / z); elseif (z <= 2.6e-8) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = Float64(x * Float64(Float64(t + y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -550000000.0) tmp = ((t + y) * x) / z; elseif (z <= 2.6e-8) tmp = x * ((y / z) - t); else tmp = x * ((t + y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -550000000.0], N[(N[(N[(t + y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.6e-8], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -550000000:\\
\;\;\;\;\frac{\left(t + y\right) \cdot x}{z}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t + y}{z}\\
\end{array}
\end{array}
if z < -5.5e8Initial program 94.0%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
lower-+.f6494.1
Applied rewrites94.1%
if -5.5e8 < z < 2.6000000000000001e-8Initial program 89.1%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6487.7
Applied rewrites87.7%
if 2.6000000000000001e-8 < z Initial program 95.8%
Taylor expanded in z around inf
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
lower-+.f6495.9
Applied rewrites95.9%
(FPCore (x y z t) :precision binary64 (if (or (<= z -550000000.0) (not (<= z 2.6e-8))) (* (/ x z) t) (* (- (fma z x x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -550000000.0) || !(z <= 2.6e-8)) {
tmp = (x / z) * t;
} else {
tmp = -fma(z, x, x) * t;
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((z <= -550000000.0) || !(z <= 2.6e-8)) tmp = Float64(Float64(x / z) * t); else tmp = Float64(Float64(-fma(z, x, x)) * t); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -550000000.0], N[Not[LessEqual[z, 2.6e-8]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision], N[((-N[(z * x + x), $MachinePrecision]) * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -550000000 \lor \neg \left(z \leq 2.6 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x}{z} \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(-\mathsf{fma}\left(z, x, x\right)\right) \cdot t\\
\end{array}
\end{array}
if z < -5.5e8 or 2.6000000000000001e-8 < z Initial program 95.0%
Taylor expanded in t around inf
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-out--N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
mul-1-negN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.9%
Taylor expanded in y around 0
Applied rewrites51.1%
Taylor expanded in z around inf
Applied rewrites50.8%
if -5.5e8 < z < 2.6000000000000001e-8Initial program 89.1%
Taylor expanded in t around inf
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-out--N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
mul-1-negN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites85.6%
Taylor expanded in y around 0
Applied rewrites41.4%
Taylor expanded in z around 0
Applied rewrites40.5%
Final simplification46.0%
(FPCore (x y z t) :precision binary64 (if (<= t -5.6e+174) (* (/ x z) t) (if (<= t 1.26e+113) (* y (/ x z)) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.6e+174) {
tmp = (x / z) * t;
} else if (t <= 1.26e+113) {
tmp = y * (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 (t <= (-5.6d+174)) then
tmp = (x / z) * t
else if (t <= 1.26d+113) then
tmp = y * (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 (t <= -5.6e+174) {
tmp = (x / z) * t;
} else if (t <= 1.26e+113) {
tmp = y * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.6e+174: tmp = (x / z) * t elif t <= 1.26e+113: tmp = y * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.6e+174) tmp = Float64(Float64(x / z) * t); elseif (t <= 1.26e+113) tmp = Float64(y * 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 (t <= -5.6e+174) tmp = (x / z) * t; elseif (t <= 1.26e+113) tmp = y * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.6e+174], N[(N[(x / z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, 1.26e+113], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{z} \cdot t\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{+113}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -5.5999999999999999e174Initial program 99.5%
Taylor expanded in t around inf
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
mul-1-negN/A
distribute-rgt-out--N/A
*-commutativeN/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
mul-1-negN/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites69.5%
Taylor expanded in y around 0
Applied rewrites69.5%
Taylor expanded in z around inf
Applied rewrites55.8%
if -5.5999999999999999e174 < t < 1.2599999999999999e113Initial program 90.5%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6468.7
Applied rewrites68.7%
Applied rewrites71.0%
if 1.2599999999999999e113 < t Initial program 96.8%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6465.7
Applied rewrites65.7%
Taylor expanded in y around 0
Applied rewrites60.1%
(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 92.2%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-signN/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6459.9
Applied rewrites59.9%
Taylor expanded in y around 0
Applied rewrites23.9%
(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 2024338
(FPCore (x y z t)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, C"
:precision binary64
:alt
(! :herbie-platform default (if (< (* x (- (/ y z) (/ t (- 1 z)))) -3811613151656021/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* x (- (/ y z) (* t (/ 1 (- 1 z))))) (if (< (* x (- (/ y z) (/ t (- 1 z)))) 7066972463851151/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (/ (* y x) z) (- (/ (* t x) (- 1 z)))) (* x (- (/ y z) (* t (/ 1 (- 1 z))))))))
(* x (- (/ y z) (/ t (- 1.0 z)))))