
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (/ (+ t_3 (* y x)) t_1)))
(if (<= t_4 (- INFINITY))
(* y (/ (- x (* a (/ z y))) (fma z (- b y) y)))
(if (<= t_4 -5e-273)
(/ (fma x y t_3) t_1)
(if (<= t_4 0.0)
(-
t_2
(/ (+ (* x (/ y (- y b))) (/ (* y (- t a)) (pow (- b y) 2.0))) z))
(if (<= t_4 2e+292)
(/ (+ (* y x) (- (* z t) (* z a))) t_1)
(if (<= t_4 INFINITY)
(* x (+ (/ y t_1) (/ t_3 (* x t_1))))
t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = (t_3 + (y * x)) / t_1;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = y * ((x - (a * (z / y))) / fma(z, (b - y), y));
} else if (t_4 <= -5e-273) {
tmp = fma(x, y, t_3) / t_1;
} else if (t_4 <= 0.0) {
tmp = t_2 - (((x * (y / (y - b))) + ((y * (t - a)) / pow((b - y), 2.0))) / z);
} else if (t_4 <= 2e+292) {
tmp = ((y * x) + ((z * t) - (z * a))) / t_1;
} else if (t_4 <= ((double) INFINITY)) {
tmp = x * ((y / t_1) + (t_3 / (x * t_1)));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(Float64(t_3 + Float64(y * x)) / t_1) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(x - Float64(a * Float64(z / y))) / fma(z, Float64(b - y), y))); elseif (t_4 <= -5e-273) tmp = Float64(fma(x, y, t_3) / t_1); elseif (t_4 <= 0.0) tmp = Float64(t_2 - Float64(Float64(Float64(x * Float64(y / Float64(y - b))) + Float64(Float64(y * Float64(t - a)) / (Float64(b - y) ^ 2.0))) / z)); elseif (t_4 <= 2e+292) tmp = Float64(Float64(Float64(y * x) + Float64(Float64(z * t) - Float64(z * a))) / t_1); elseif (t_4 <= Inf) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(t_3 / Float64(x * t_1)))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(y * N[(N[(x - N[(a * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -5e-273], N[(N[(x * y + t$95$3), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, 0.0], N[(t$95$2 - N[(N[(N[(x * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e+292], N[(N[(N[(y * x), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$3 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := \frac{t\_3 + y \cdot x}{t\_1}\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;y \cdot \frac{x - a \cdot \frac{z}{y}}{\mathsf{fma}\left(z, b - y, y\right)}\\
\mathbf{elif}\;t\_4 \leq -5 \cdot 10^{-273}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_3\right)}{t\_1}\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2 - \frac{x \cdot \frac{y}{y - b} + \frac{y \cdot \left(t - a\right)}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{y \cdot x + \left(z \cdot t - z \cdot a\right)}{t\_1}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{t\_3}{x \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0Initial program 37.2%
fma-define37.2%
Simplified37.2%
Taylor expanded in y around inf 37.2%
Taylor expanded in t around 0 27.8%
associate-/l*59.1%
mul-1-neg59.1%
unsub-neg59.1%
associate-/l*72.5%
+-commutative72.5%
fma-undefine72.4%
Simplified72.4%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -4.99999999999999965e-273Initial program 99.6%
fma-define99.6%
Simplified99.6%
if -4.99999999999999965e-273 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 26.5%
sub-neg26.5%
distribute-lft-in26.5%
Applied egg-rr26.5%
Taylor expanded in z around -inf 95.6%
mul-1-neg95.6%
unsub-neg95.6%
mul-1-neg95.6%
mul-1-neg95.6%
unsub-neg95.6%
Simplified91.6%
if 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e292Initial program 99.5%
sub-neg99.5%
distribute-lft-in99.6%
Applied egg-rr99.6%
if 2e292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 36.8%
Taylor expanded in x around inf 75.1%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 0.0%
Taylor expanded in z around inf 79.9%
Final simplification91.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -8e+30) (not (<= z 175000000.0)))
(+
(+ (* (/ y z) (/ x (- b y))) (/ (- t a) (- b y)))
(* y (/ (- a t) (* z (pow (- b y) 2.0)))))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -8e+30) || !(z <= 175000000.0)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (b - y))
if ((z <= (-8d+30)) .or. (.not. (z <= 175000000.0d0))) then
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ** 2.0d0))))
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -8e+30) || !(z <= 175000000.0)) {
tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -8e+30) or not (z <= 175000000.0): tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * math.pow((b - y), 2.0)))) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -8e+30) || !(z <= 175000000.0)) tmp = Float64(Float64(Float64(Float64(y / z) * Float64(x / Float64(b - y))) + Float64(Float64(t - a) / Float64(b - y))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0))))); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -8e+30) || ~((z <= 175000000.0))) tmp = (((y / z) * (x / (b - y))) + ((t - a) / (b - y))) + (y * ((a - t) / (z * ((b - y) ^ 2.0)))); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -8e+30], N[Not[LessEqual[z, 175000000.0]], $MachinePrecision]], N[(N[(N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+30} \lor \neg \left(z \leq 175000000\right):\\
\;\;\;\;\left(\frac{y}{z} \cdot \frac{x}{b - y} + \frac{t - a}{b - y}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -8.0000000000000002e30 or 1.75e8 < z Initial program 49.0%
Taylor expanded in z around inf 70.8%
associate--r+70.8%
+-commutative70.8%
associate--l+70.8%
*-commutative70.8%
times-frac76.8%
div-sub77.7%
associate-/l*91.2%
Simplified91.2%
if -8.0000000000000002e30 < z < 1.75e8Initial program 86.1%
Taylor expanded in x around inf 88.7%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -3.1e+51) (not (<= z 2.4e+41)))
(/ (- t a) (- b y))
(* x (+ (/ y t_1) (/ (* z (- t a)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -3.1e+51) || !(z <= 2.4e+41)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (z * (b - y))
if ((z <= (-3.1d+51)) .or. (.not. (z <= 2.4d+41))) then
tmp = (t - a) / (b - y)
else
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double tmp;
if ((z <= -3.1e+51) || !(z <= 2.4e+41)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) tmp = 0 if (z <= -3.1e+51) or not (z <= 2.4e+41): tmp = (t - a) / (b - y) else: tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if ((z <= -3.1e+51) || !(z <= 2.4e+41)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); tmp = 0.0; if ((z <= -3.1e+51) || ~((z <= 2.4e+41))) tmp = (t - a) / (b - y); else tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -3.1e+51], N[Not[LessEqual[z, 2.4e+41]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+51} \lor \neg \left(z \leq 2.4 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -3.10000000000000011e51 or 2.4000000000000002e41 < z Initial program 44.1%
Taylor expanded in z around inf 84.0%
if -3.10000000000000011e51 < z < 2.4000000000000002e41Initial program 86.6%
Taylor expanded in x around inf 87.6%
Final simplification86.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.4e+56) (not (<= z 6e+41))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+56) || !(z <= 6e+41)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-5.4d+56)) .or. (.not. (z <= 6d+41))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.4e+56) || !(z <= 6e+41)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.4e+56) or not (z <= 6e+41): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.4e+56) || !(z <= 6e+41)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.4e+56) || ~((z <= 6e+41))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.4e+56], N[Not[LessEqual[z, 6e+41]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+56} \lor \neg \left(z \leq 6 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -5.40000000000000019e56 or 5.9999999999999997e41 < z Initial program 44.1%
Taylor expanded in z around inf 84.0%
if -5.40000000000000019e56 < z < 5.9999999999999997e41Initial program 86.6%
Final simplification85.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e+33) (not (<= z 7.5e+40))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (+ y (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+33) || !(z <= 7.5e+40)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1d+33)) .or. (.not. (z <= 7.5d+40))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+33) || !(z <= 7.5e+40)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e+33) or not (z <= 7.5e+40): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e+33) || !(z <= 7.5e+40)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1e+33) || ~((z <= 7.5e+40))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e+33], N[Not[LessEqual[z, 7.5e+40]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+33} \lor \neg \left(z \leq 7.5 \cdot 10^{+40}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\
\end{array}
\end{array}
if z < -9.9999999999999995e32 or 7.4999999999999996e40 < z Initial program 45.3%
Taylor expanded in z around inf 83.6%
if -9.9999999999999995e32 < z < 7.4999999999999996e40Initial program 86.9%
Taylor expanded in b around inf 83.9%
*-commutative83.9%
Simplified83.9%
Final simplification83.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4e-12) (not (<= z 1.25e-16))) (/ (- t a) (- b y)) (+ (- x (/ (* z a) y)) (* t (/ z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e-12) || !(z <= 1.25e-16)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x - ((z * a) / y)) + (t * (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-4d-12)) .or. (.not. (z <= 1.25d-16))) then
tmp = (t - a) / (b - y)
else
tmp = (x - ((z * a) / y)) + (t * (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4e-12) || !(z <= 1.25e-16)) {
tmp = (t - a) / (b - y);
} else {
tmp = (x - ((z * a) / y)) + (t * (z / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4e-12) or not (z <= 1.25e-16): tmp = (t - a) / (b - y) else: tmp = (x - ((z * a) / y)) + (t * (z / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4e-12) || !(z <= 1.25e-16)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(x - Float64(Float64(z * a) / y)) + Float64(t * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4e-12) || ~((z <= 1.25e-16))) tmp = (t - a) / (b - y); else tmp = (x - ((z * a) / y)) + (t * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4e-12], N[Not[LessEqual[z, 1.25e-16]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-12} \lor \neg \left(z \leq 1.25 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{z \cdot a}{y}\right) + t \cdot \frac{z}{y}\\
\end{array}
\end{array}
if z < -3.99999999999999992e-12 or 1.2500000000000001e-16 < z Initial program 52.9%
Taylor expanded in z around inf 79.9%
if -3.99999999999999992e-12 < z < 1.2500000000000001e-16Initial program 85.6%
fma-define85.6%
Simplified85.6%
Taylor expanded in y around inf 83.4%
Taylor expanded in z around 0 57.6%
Taylor expanded in t around 0 71.0%
associate-+r+71.0%
mul-1-neg71.0%
unsub-neg71.0%
associate-*r/71.0%
Simplified71.0%
Final simplification75.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.8e-12) (not (<= z 4e-16))) (/ (- t a) (- b y)) (- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e-12) || !(z <= 4e-16)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.8d-12)) .or. (.not. (z <= 4d-16))) then
tmp = (t - a) / (b - y)
else
tmp = x - ((z * a) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e-12) || !(z <= 4e-16)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.8e-12) or not (z <= 4e-16): tmp = (t - a) / (b - y) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.8e-12) || !(z <= 4e-16)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(Float64(z * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.8e-12) || ~((z <= 4e-16))) tmp = (t - a) / (b - y); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.8e-12], N[Not[LessEqual[z, 4e-16]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-12} \lor \neg \left(z \leq 4 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -3.79999999999999996e-12 or 3.9999999999999999e-16 < z Initial program 52.9%
Taylor expanded in z around inf 79.9%
if -3.79999999999999996e-12 < z < 3.9999999999999999e-16Initial program 85.6%
fma-define85.6%
Simplified85.6%
Taylor expanded in y around inf 83.4%
Taylor expanded in z around 0 57.6%
Taylor expanded in t around 0 62.3%
mul-1-neg62.3%
unsub-neg62.3%
Simplified62.3%
Final simplification71.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -0.0003) (not (<= y 3.9e-50))) (/ x (- 1.0 z)) (/ (- t a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.0003) || !(y <= 3.9e-50)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-0.0003d0)) .or. (.not. (y <= 3.9d-50))) then
tmp = x / (1.0d0 - z)
else
tmp = (t - a) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -0.0003) || !(y <= 3.9e-50)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -0.0003) or not (y <= 3.9e-50): tmp = x / (1.0 - z) else: tmp = (t - a) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -0.0003) || !(y <= 3.9e-50)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(Float64(t - a) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -0.0003) || ~((y <= 3.9e-50))) tmp = x / (1.0 - z); else tmp = (t - a) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -0.0003], N[Not[LessEqual[y, 3.9e-50]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0003 \lor \neg \left(y \leq 3.9 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.99999999999999974e-4 or 3.90000000000000021e-50 < y Initial program 54.9%
Taylor expanded in y around inf 57.5%
mul-1-neg57.5%
unsub-neg57.5%
Simplified57.5%
if -2.99999999999999974e-4 < y < 3.90000000000000021e-50Initial program 82.4%
Taylor expanded in y around 0 60.9%
Final simplification59.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3e-10) (not (<= y 4.1e-50))) (/ x (- 1.0 z)) (/ t (- b y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e-10) || !(y <= 4.1e-50)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3d-10)) .or. (.not. (y <= 4.1d-50))) then
tmp = x / (1.0d0 - z)
else
tmp = t / (b - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3e-10) || !(y <= 4.1e-50)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3e-10) or not (y <= 4.1e-50): tmp = x / (1.0 - z) else: tmp = t / (b - y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3e-10) || !(y <= 4.1e-50)) tmp = Float64(x / Float64(1.0 - z)); else tmp = Float64(t / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3e-10) || ~((y <= 4.1e-50))) tmp = x / (1.0 - z); else tmp = t / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3e-10], N[Not[LessEqual[y, 4.1e-50]], $MachinePrecision]], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-10} \lor \neg \left(y \leq 4.1 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -3e-10 or 4.09999999999999985e-50 < y Initial program 54.9%
Taylor expanded in y around inf 57.5%
mul-1-neg57.5%
unsub-neg57.5%
Simplified57.5%
if -3e-10 < y < 4.09999999999999985e-50Initial program 82.4%
Taylor expanded in z around inf 68.6%
Taylor expanded in t around inf 32.3%
Final simplification44.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.05e-27) (not (<= z 4.5e-17))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-27) || !(z <= 4.5e-17)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.05d-27)) .or. (.not. (z <= 4.5d-17))) then
tmp = t / (b - y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e-27) || !(z <= 4.5e-17)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.05e-27) or not (z <= 4.5e-17): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.05e-27) || !(z <= 4.5e-17)) tmp = Float64(t / Float64(b - y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.05e-27) || ~((z <= 4.5e-17))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.05e-27], N[Not[LessEqual[z, 4.5e-17]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-27} \lor \neg \left(z \leq 4.5 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.05000000000000008e-27 or 4.49999999999999978e-17 < z Initial program 53.6%
Taylor expanded in z around inf 78.4%
Taylor expanded in t around inf 36.3%
if -1.05000000000000008e-27 < z < 4.49999999999999978e-17Initial program 85.9%
Taylor expanded in z around 0 51.2%
Final simplification43.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -360000000000.0) x (if (<= y 3e-50) (/ t b) (+ x (* z x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -360000000000.0) {
tmp = x;
} else if (y <= 3e-50) {
tmp = t / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-360000000000.0d0)) then
tmp = x
else if (y <= 3d-50) then
tmp = t / b
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -360000000000.0) {
tmp = x;
} else if (y <= 3e-50) {
tmp = t / b;
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -360000000000.0: tmp = x elif y <= 3e-50: tmp = t / b else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -360000000000.0) tmp = x; elseif (y <= 3e-50) tmp = Float64(t / b); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -360000000000.0) tmp = x; elseif (y <= 3e-50) tmp = t / b; else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -360000000000.0], x, If[LessEqual[y, 3e-50], N[(t / b), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -360000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if y < -3.6e11Initial program 53.8%
Taylor expanded in z around 0 58.3%
if -3.6e11 < y < 2.9999999999999999e-50Initial program 82.6%
fma-define82.6%
Simplified82.6%
Taylor expanded in y around inf 73.7%
Taylor expanded in t around inf 47.6%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in y around 0 27.6%
if 2.9999999999999999e-50 < y Initial program 55.4%
Taylor expanded in y around inf 48.6%
mul-1-neg48.6%
unsub-neg48.6%
Simplified48.6%
Taylor expanded in z around 0 33.6%
Final simplification36.5%
(FPCore (x y z t a b) :precision binary64 (if (<= y -480000000000.0) x (if (<= y 4.1e-50) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -480000000000.0) {
tmp = x;
} else if (y <= 4.1e-50) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-480000000000.0d0)) then
tmp = x
else if (y <= 4.1d-50) then
tmp = t / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -480000000000.0) {
tmp = x;
} else if (y <= 4.1e-50) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -480000000000.0: tmp = x elif y <= 4.1e-50: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -480000000000.0) tmp = x; elseif (y <= 4.1e-50) tmp = Float64(t / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -480000000000.0) tmp = x; elseif (y <= 4.1e-50) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -480000000000.0], x, If[LessEqual[y, 4.1e-50], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -480000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.8e11 or 4.09999999999999985e-50 < y Initial program 54.6%
Taylor expanded in z around 0 45.9%
if -4.8e11 < y < 4.09999999999999985e-50Initial program 82.6%
fma-define82.6%
Simplified82.6%
Taylor expanded in y around inf 73.7%
Taylor expanded in t around inf 47.6%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in y around 0 27.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.0%
Taylor expanded in z around 0 26.5%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024170
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))