
(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 13 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 (+ z -1.0)))))
double code(double x, double y, double z, double t) {
return x * ((y / z) + (t / (z + -1.0)));
}
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 / (z + (-1.0d0))))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y / z) + (t / (z + -1.0)));
}
def code(x, y, z, t): return x * ((y / z) + (t / (z + -1.0)))
function code(x, y, z, t) return Float64(x * Float64(Float64(y / z) + Float64(t / Float64(z + -1.0)))) end
function tmp = code(x, y, z, t) tmp = x * ((y / z) + (t / (z + -1.0))); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y / z), $MachinePrecision] + N[(t / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\frac{y}{z} + \frac{t}{z + -1}\right)
\end{array}
Initial program 97.1%
Final simplification97.1%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (- (/ y z) (/ t (- z)))))) (if (<= z -4.1e+29) t_1 (if (<= z 1.0) (/ (* x (- y (* z t))) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y / z) - (t / -z));
double tmp;
if (z <= -4.1e+29) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = (x * (y - (z * t))) / 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 * ((y / z) - (t / -z))
if (z <= (-4.1d+29)) then
tmp = t_1
else if (z <= 1.0d0) then
tmp = (x * (y - (z * t))) / 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 / -z));
double tmp;
if (z <= -4.1e+29) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = (x * (y - (z * t))) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y / z) - (t / -z)) tmp = 0 if z <= -4.1e+29: tmp = t_1 elif z <= 1.0: tmp = (x * (y - (z * t))) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y / z) - Float64(t / Float64(-z)))) tmp = 0.0 if (z <= -4.1e+29) tmp = t_1; elseif (z <= 1.0) tmp = Float64(Float64(x * Float64(y - Float64(z * t))) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y / z) - (t / -z)); tmp = 0.0; if (z <= -4.1e+29) tmp = t_1; elseif (z <= 1.0) tmp = (x * (y - (z * t))) / 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 / (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+29], t$95$1, If[LessEqual[z, 1.0], N[(N[(x * N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\frac{y}{z} - \frac{t}{-z}\right)\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.1000000000000003e29 or 1 < z Initial program 98.1%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6496.9
Applied rewrites96.9%
if -4.1000000000000003e29 < z < 1Initial program 96.1%
Taylor expanded in z around 0
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-out--N/A
unsub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6496.5
Applied rewrites96.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (+ y t) (/ x z))))
(if (<= z -9e+33)
t_1
(if (<= z 1.0)
(* x (- (/ y z) t))
(if (<= z 8.5e+209) t_1 (/ (* x (+ y t)) z))))))
double code(double x, double y, double z, double t) {
double t_1 = (y + t) * (x / z);
double tmp;
if (z <= -9e+33) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else if (z <= 8.5e+209) {
tmp = t_1;
} else {
tmp = (x * (y + t)) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y + t) * (x / z)
if (z <= (-9d+33)) then
tmp = t_1
else if (z <= 1.0d0) then
tmp = x * ((y / z) - t)
else if (z <= 8.5d+209) then
tmp = t_1
else
tmp = (x * (y + t)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y + t) * (x / z);
double tmp;
if (z <= -9e+33) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else if (z <= 8.5e+209) {
tmp = t_1;
} else {
tmp = (x * (y + t)) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y + t) * (x / z) tmp = 0 if z <= -9e+33: tmp = t_1 elif z <= 1.0: tmp = x * ((y / z) - t) elif z <= 8.5e+209: tmp = t_1 else: tmp = (x * (y + t)) / z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y + t) * Float64(x / z)) tmp = 0.0 if (z <= -9e+33) tmp = t_1; elseif (z <= 1.0) tmp = Float64(x * Float64(Float64(y / z) - t)); elseif (z <= 8.5e+209) tmp = t_1; else tmp = Float64(Float64(x * Float64(y + t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y + t) * (x / z); tmp = 0.0; if (z <= -9e+33) tmp = t_1; elseif (z <= 1.0) tmp = x * ((y / z) - t); elseif (z <= 8.5e+209) tmp = t_1; else tmp = (x * (y + t)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+33], t$95$1, If[LessEqual[z, 1.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+209], t$95$1, N[(N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y + t\right)}{z}\\
\end{array}
\end{array}
if z < -9.0000000000000001e33 or 1 < z < 8.50000000000000062e209Initial program 98.7%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6449.2
Applied rewrites49.2%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6489.3
Applied rewrites89.3%
if -9.0000000000000001e33 < z < 1Initial program 96.2%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
lower-+.f6432.6
Applied rewrites32.6%
Taylor expanded in z around 0
mul-1-negN/A
sub-negN/A
div-subN/A
associate-/l*N/A
*-lft-identityN/A
associate-*l/N/A
lft-mult-inverseN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6495.7
Applied rewrites95.7%
if 8.50000000000000062e209 < z Initial program 94.5%
Taylor expanded in z around inf
*-commutativeN/A
remove-double-negN/A
neg-mul-1N/A
distribute-lft-out--N/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
Applied rewrites99.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (+ y t) (/ x z))))
(if (<= z -1.4e-131)
t_1
(if (<= z 2.7e-13)
(/ (* x y) z)
(if (<= z 8.5e+209) t_1 (/ (* x (+ y t)) z))))))
double code(double x, double y, double z, double t) {
double t_1 = (y + t) * (x / z);
double tmp;
if (z <= -1.4e-131) {
tmp = t_1;
} else if (z <= 2.7e-13) {
tmp = (x * y) / z;
} else if (z <= 8.5e+209) {
tmp = t_1;
} else {
tmp = (x * (y + t)) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y + t) * (x / z)
if (z <= (-1.4d-131)) then
tmp = t_1
else if (z <= 2.7d-13) then
tmp = (x * y) / z
else if (z <= 8.5d+209) then
tmp = t_1
else
tmp = (x * (y + t)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y + t) * (x / z);
double tmp;
if (z <= -1.4e-131) {
tmp = t_1;
} else if (z <= 2.7e-13) {
tmp = (x * y) / z;
} else if (z <= 8.5e+209) {
tmp = t_1;
} else {
tmp = (x * (y + t)) / z;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y + t) * (x / z) tmp = 0 if z <= -1.4e-131: tmp = t_1 elif z <= 2.7e-13: tmp = (x * y) / z elif z <= 8.5e+209: tmp = t_1 else: tmp = (x * (y + t)) / z return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y + t) * Float64(x / z)) tmp = 0.0 if (z <= -1.4e-131) tmp = t_1; elseif (z <= 2.7e-13) tmp = Float64(Float64(x * y) / z); elseif (z <= 8.5e+209) tmp = t_1; else tmp = Float64(Float64(x * Float64(y + t)) / z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y + t) * (x / z); tmp = 0.0; if (z <= -1.4e-131) tmp = t_1; elseif (z <= 2.7e-13) tmp = (x * y) / z; elseif (z <= 8.5e+209) tmp = t_1; else tmp = (x * (y + t)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e-131], t$95$1, If[LessEqual[z, 2.7e-13], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 8.5e+209], t$95$1, N[(N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y + t\right)}{z}\\
\end{array}
\end{array}
if z < -1.4e-131 or 2.70000000000000011e-13 < z < 8.50000000000000062e209Initial program 98.9%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6451.0
Applied rewrites51.0%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6484.4
Applied rewrites84.4%
if -1.4e-131 < z < 2.70000000000000011e-13Initial program 95.0%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6479.4
Applied rewrites79.4%
if 8.50000000000000062e209 < z Initial program 94.5%
Taylor expanded in z around inf
*-commutativeN/A
remove-double-negN/A
neg-mul-1N/A
distribute-lft-out--N/A
neg-mul-1N/A
mul-1-negN/A
remove-double-negN/A
distribute-lft-neg-inN/A
*-commutativeN/A
mul-1-negN/A
lower-/.f64N/A
Applied rewrites99.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ (+ y t) z)))) (if (<= z -4.1e+29) t_1 (if (<= z 1.0) (/ (* x (- y (* z t))) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + t) / z);
double tmp;
if (z <= -4.1e+29) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = (x * (y - (z * t))) / 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 * ((y + t) / z)
if (z <= (-4.1d+29)) then
tmp = t_1
else if (z <= 1.0d0) then
tmp = (x * (y - (z * t))) / 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 + t) / z);
double tmp;
if (z <= -4.1e+29) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = (x * (y - (z * t))) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + t) / z) tmp = 0 if z <= -4.1e+29: tmp = t_1 elif z <= 1.0: tmp = (x * (y - (z * t))) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + t) / z)) tmp = 0.0 if (z <= -4.1e+29) tmp = t_1; elseif (z <= 1.0) tmp = Float64(Float64(x * Float64(y - Float64(z * t))) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + t) / z); tmp = 0.0; if (z <= -4.1e+29) tmp = t_1; elseif (z <= 1.0) tmp = (x * (y - (z * t))) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+29], t$95$1, If[LessEqual[z, 1.0], N[(N[(x * N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y + t}{z}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{x \cdot \left(y - z \cdot t\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.1000000000000003e29 or 1 < z Initial program 98.1%
Taylor expanded in z around inf
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-+.f6496.9
Applied rewrites96.9%
if -4.1000000000000003e29 < z < 1Initial program 96.1%
Taylor expanded in z around 0
lower-/.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-out--N/A
unsub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6496.5
Applied rewrites96.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ (+ y t) z)))) (if (<= z -9e+33) t_1 (if (<= z 1.0) (* x (- (/ y z) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + t) / z);
double tmp;
if (z <= -9e+33) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} 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 * ((y + t) / z)
if (z <= (-9d+33)) then
tmp = t_1
else if (z <= 1.0d0) then
tmp = x * ((y / z) - t)
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 + t) / z);
double tmp;
if (z <= -9e+33) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = x * ((y / z) - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + t) / z) tmp = 0 if z <= -9e+33: tmp = t_1 elif z <= 1.0: tmp = x * ((y / z) - t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + t) / z)) tmp = 0.0 if (z <= -9e+33) tmp = t_1; elseif (z <= 1.0) tmp = Float64(x * Float64(Float64(y / z) - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + t) / z); tmp = 0.0; if (z <= -9e+33) tmp = t_1; elseif (z <= 1.0) tmp = x * ((y / z) - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+33], t$95$1, If[LessEqual[z, 1.0], N[(x * N[(N[(y / z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y + t}{z}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.0000000000000001e33 or 1 < z Initial program 98.1%
Taylor expanded in z around inf
lower-/.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
lower-+.f6496.8
Applied rewrites96.8%
if -9.0000000000000001e33 < z < 1Initial program 96.2%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
lower-+.f6432.6
Applied rewrites32.6%
Taylor expanded in z around 0
mul-1-negN/A
sub-negN/A
div-subN/A
associate-/l*N/A
*-lft-identityN/A
associate-*l/N/A
lft-mult-inverseN/A
*-rgt-identityN/A
lower--.f64N/A
lower-/.f6495.7
Applied rewrites95.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (+ y t) (/ x z)))) (if (<= z -1.4e-131) t_1 (if (<= z 2.7e-13) (/ (* x y) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (y + t) * (x / z);
double tmp;
if (z <= -1.4e-131) {
tmp = t_1;
} else if (z <= 2.7e-13) {
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 = (y + t) * (x / z)
if (z <= (-1.4d-131)) then
tmp = t_1
else if (z <= 2.7d-13) 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 = (y + t) * (x / z);
double tmp;
if (z <= -1.4e-131) {
tmp = t_1;
} else if (z <= 2.7e-13) {
tmp = (x * y) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y + t) * (x / z) tmp = 0 if z <= -1.4e-131: tmp = t_1 elif z <= 2.7e-13: tmp = (x * y) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y + t) * Float64(x / z)) tmp = 0.0 if (z <= -1.4e-131) tmp = t_1; elseif (z <= 2.7e-13) tmp = Float64(Float64(x * y) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y + t) * (x / z); tmp = 0.0; if (z <= -1.4e-131) tmp = t_1; elseif (z <= 2.7e-13) tmp = (x * y) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y + t), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e-131], t$95$1, If[LessEqual[z, 2.7e-13], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + t\right) \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4e-131 or 2.70000000000000011e-13 < z Initial program 98.4%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6451.1
Applied rewrites51.1%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6482.8
Applied rewrites82.8%
if -1.4e-131 < z < 2.70000000000000011e-13Initial program 95.0%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6479.4
Applied rewrites79.4%
(FPCore (x y z t) :precision binary64 (if (<= t -8.8e+86) (* x (/ t z)) (if (<= t 9.5e+146) (* x (/ y z)) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.8e+86) {
tmp = x * (t / z);
} else if (t <= 9.5e+146) {
tmp = x * (y / 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 <= (-8.8d+86)) then
tmp = x * (t / z)
else if (t <= 9.5d+146) then
tmp = x * (y / 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 <= -8.8e+86) {
tmp = x * (t / z);
} else if (t <= 9.5e+146) {
tmp = x * (y / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -8.8e+86: tmp = x * (t / z) elif t <= 9.5e+146: tmp = x * (y / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -8.8e+86) tmp = Float64(x * Float64(t / z)); elseif (t <= 9.5e+146) tmp = Float64(x * Float64(y / z)); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -8.8e+86) tmp = x * (t / z); elseif (t <= 9.5e+146) tmp = x * (y / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -8.8e+86], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+146], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{+86}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+146}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -8.80000000000000013e86Initial program 99.7%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
lower-+.f6489.1
Applied rewrites89.1%
Taylor expanded in z around inf
Applied rewrites74.3%
if -8.80000000000000013e86 < t < 9.49999999999999926e146Initial program 95.9%
Taylor expanded in y around inf
lower-/.f6481.2
Applied rewrites81.2%
if 9.49999999999999926e146 < t Initial program 99.9%
Taylor expanded in z around 0
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
Taylor expanded in y around 0
Applied rewrites55.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1.22e+87) (* x (/ t z)) (if (<= t 9.5e+146) (/ (* x y) z) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.22e+87) {
tmp = x * (t / z);
} else if (t <= 9.5e+146) {
tmp = (x * y) / 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 <= (-1.22d+87)) then
tmp = x * (t / z)
else if (t <= 9.5d+146) then
tmp = (x * y) / 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 <= -1.22e+87) {
tmp = x * (t / z);
} else if (t <= 9.5e+146) {
tmp = (x * y) / z;
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.22e+87: tmp = x * (t / z) elif t <= 9.5e+146: tmp = (x * y) / z else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.22e+87) tmp = Float64(x * Float64(t / z)); elseif (t <= 9.5e+146) tmp = Float64(Float64(x * y) / z); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.22e+87) tmp = x * (t / z); elseif (t <= 9.5e+146) tmp = (x * y) / z; else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.22e+87], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+146], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+87}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+146}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -1.2200000000000001e87Initial program 99.7%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
lower-+.f6489.1
Applied rewrites89.1%
Taylor expanded in z around inf
Applied rewrites74.3%
if -1.2200000000000001e87 < t < 9.49999999999999926e146Initial program 95.9%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6479.3
Applied rewrites79.3%
if 9.49999999999999926e146 < t Initial program 99.9%
Taylor expanded in z around 0
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
Taylor expanded in y around 0
Applied rewrites55.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1.22e+87) (/ (* x t) z) (if (<= t 9.5e+146) (/ (* x y) z) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.22e+87) {
tmp = (x * t) / z;
} else if (t <= 9.5e+146) {
tmp = (x * y) / 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 <= (-1.22d+87)) then
tmp = (x * t) / z
else if (t <= 9.5d+146) then
tmp = (x * y) / 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 <= -1.22e+87) {
tmp = (x * t) / z;
} else if (t <= 9.5e+146) {
tmp = (x * y) / z;
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.22e+87: tmp = (x * t) / z elif t <= 9.5e+146: tmp = (x * y) / z else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.22e+87) tmp = Float64(Float64(x * t) / z); elseif (t <= 9.5e+146) tmp = Float64(Float64(x * y) / z); else tmp = Float64(x * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.22e+87) tmp = (x * t) / z; elseif (t <= 9.5e+146) tmp = (x * y) / z; else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.22e+87], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 9.5e+146], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+87}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+146}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -1.2200000000000001e87Initial program 99.7%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6419.6
Applied rewrites19.6%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6470.1
Applied rewrites70.1%
Taylor expanded in y around 0
Applied rewrites58.2%
if -1.2200000000000001e87 < t < 9.49999999999999926e146Initial program 95.9%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6479.3
Applied rewrites79.3%
if 9.49999999999999926e146 < t Initial program 99.9%
Taylor expanded in z around 0
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
Taylor expanded in y around 0
Applied rewrites55.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1.22e+87) (/ (* x t) z) (if (<= t 1.7e+244) (* y (/ x z)) (* x (- t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.22e+87) {
tmp = (x * t) / z;
} else if (t <= 1.7e+244) {
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 <= (-1.22d+87)) then
tmp = (x * t) / z
else if (t <= 1.7d+244) 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 <= -1.22e+87) {
tmp = (x * t) / z;
} else if (t <= 1.7e+244) {
tmp = y * (x / z);
} else {
tmp = x * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.22e+87: tmp = (x * t) / z elif t <= 1.7e+244: tmp = y * (x / z) else: tmp = x * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.22e+87) tmp = Float64(Float64(x * t) / z); elseif (t <= 1.7e+244) 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 <= -1.22e+87) tmp = (x * t) / z; elseif (t <= 1.7e+244) tmp = y * (x / z); else tmp = x * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.22e+87], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 1.7e+244], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x * (-t)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+87}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+244}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-t\right)\\
\end{array}
\end{array}
if t < -1.2200000000000001e87Initial program 99.7%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6419.6
Applied rewrites19.6%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6470.1
Applied rewrites70.1%
Taylor expanded in y around 0
Applied rewrites58.2%
if -1.2200000000000001e87 < t < 1.70000000000000005e244Initial program 96.3%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6475.3
Applied rewrites75.3%
Applied rewrites72.8%
if 1.70000000000000005e244 < t Initial program 100.0%
Taylor expanded in z around 0
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6467.6
Applied rewrites67.6%
Taylor expanded in y around 0
Applied rewrites68.1%
Final simplification69.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (* x t) z))) (if (<= z -0.75) t_1 (if (<= z 1.0) (* x (- (fma z t t))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x * t) / z;
double tmp;
if (z <= -0.75) {
tmp = t_1;
} else if (z <= 1.0) {
tmp = x * -fma(z, t, t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x * t) / z) tmp = 0.0 if (z <= -0.75) tmp = t_1; elseif (z <= 1.0) tmp = Float64(x * Float64(-fma(z, t, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -0.75], t$95$1, If[LessEqual[z, 1.0], N[(x * (-N[(z * t + t), $MachinePrecision])), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot t}{z}\\
\mathbf{if}\;z \leq -0.75:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(-\mathsf{fma}\left(z, t, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -0.75 or 1 < z Initial program 98.2%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6450.2
Applied rewrites50.2%
Taylor expanded in z around inf
*-commutativeN/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6487.0
Applied rewrites87.0%
Taylor expanded in y around 0
Applied rewrites51.2%
if -0.75 < z < 1Initial program 96.0%
Taylor expanded in y around 0
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
distribute-neg-inN/A
mul-1-negN/A
remove-double-negN/A
metadata-evalN/A
lower-+.f6432.7
Applied rewrites32.7%
Taylor expanded in z around 0
Applied rewrites32.5%
(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 97.1%
Taylor expanded in z around 0
lower-/.f64N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f6463.9
Applied rewrites63.9%
Taylor expanded in y around 0
Applied rewrites21.6%
(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 2024238
(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)))))