
(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 17 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 (+ (/ b y) -1.0)) (t_2 (+ y (* z (- b y)))))
(if (<= z -480000000.0)
(+
(/ (- t a) (* y t_1))
(/ (+ (/ (/ (- a t) y) (pow (- 1.0 (/ b y)) 2.0)) (/ x t_1)) z))
(if (<= z 6.5e+89)
(* x (+ (/ y t_2) (/ (* z (- t a)) (* x t_2))))
(/ (- t a) (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (b / y) + -1.0;
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -480000000.0) {
tmp = ((t - a) / (y * t_1)) + (((((a - t) / y) / pow((1.0 - (b / y)), 2.0)) + (x / t_1)) / z);
} else if (z <= 6.5e+89) {
tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2)));
} else {
tmp = (t - a) / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b / y) + (-1.0d0)
t_2 = y + (z * (b - y))
if (z <= (-480000000.0d0)) then
tmp = ((t - a) / (y * t_1)) + (((((a - t) / y) / ((1.0d0 - (b / y)) ** 2.0d0)) + (x / t_1)) / z)
else if (z <= 6.5d+89) then
tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2)))
else
tmp = (t - a) / (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 t_1 = (b / y) + -1.0;
double t_2 = y + (z * (b - y));
double tmp;
if (z <= -480000000.0) {
tmp = ((t - a) / (y * t_1)) + (((((a - t) / y) / Math.pow((1.0 - (b / y)), 2.0)) + (x / t_1)) / z);
} else if (z <= 6.5e+89) {
tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2)));
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (b / y) + -1.0 t_2 = y + (z * (b - y)) tmp = 0 if z <= -480000000.0: tmp = ((t - a) / (y * t_1)) + (((((a - t) / y) / math.pow((1.0 - (b / y)), 2.0)) + (x / t_1)) / z) elif z <= 6.5e+89: tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2))) else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(b / y) + -1.0) t_2 = Float64(y + Float64(z * Float64(b - y))) tmp = 0.0 if (z <= -480000000.0) tmp = Float64(Float64(Float64(t - a) / Float64(y * t_1)) + Float64(Float64(Float64(Float64(Float64(a - t) / y) / (Float64(1.0 - Float64(b / y)) ^ 2.0)) + Float64(x / t_1)) / z)); elseif (z <= 6.5e+89) tmp = Float64(x * Float64(Float64(y / t_2) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_2)))); else tmp = Float64(Float64(t - a) / Float64(b - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (b / y) + -1.0; t_2 = y + (z * (b - y)); tmp = 0.0; if (z <= -480000000.0) tmp = ((t - a) / (y * t_1)) + (((((a - t) / y) / ((1.0 - (b / y)) ^ 2.0)) + (x / t_1)) / z); elseif (z <= 6.5e+89) tmp = x * ((y / t_2) + ((z * (t - a)) / (x * t_2))); else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b / y), $MachinePrecision] + -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -480000000.0], N[(N[(N[(t - a), $MachinePrecision] / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision] / N[Power[N[(1.0 - N[(b / y), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+89], N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{y} + -1\\
t_2 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -480000000:\\
\;\;\;\;\frac{t - a}{y \cdot t\_1} + \frac{\frac{\frac{a - t}{y}}{{\left(1 - \frac{b}{y}\right)}^{2}} + \frac{x}{t\_1}}{z}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+89}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_2} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_2}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if z < -4.8e8Initial program 34.8%
Taylor expanded in y around inf 28.5%
+-commutative28.5%
mul-1-neg28.5%
unsub-neg28.5%
associate-/l*24.0%
Simplified24.0%
Taylor expanded in z around -inf 91.8%
mul-1-neg91.8%
unsub-neg91.8%
mul-1-neg91.8%
mul-1-neg91.8%
sub-neg91.8%
Simplified83.9%
if -4.8e8 < z < 6.4999999999999996e89Initial program 87.1%
Taylor expanded in x around inf 95.2%
if 6.4999999999999996e89 < z Initial program 42.1%
Taylor expanded in z around inf 100.0%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -1.6e+54)
(+ t_2 (/ (+ (/ (* y x) (- b y)) (* y (/ (- a t) (pow (- b y) 2.0)))) z))
(if (<= z 2.25e+91)
(* x (+ (/ y t_1) (/ (* z (- t a)) (* 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 tmp;
if (z <= -1.6e+54) {
tmp = t_2 + ((((y * x) / (b - y)) + (y * ((a - t) / pow((b - y), 2.0)))) / z);
} else if (z <= 2.25e+91) {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
if (z <= (-1.6d+54)) then
tmp = t_2 + ((((y * x) / (b - y)) + (y * ((a - t) / ((b - y) ** 2.0d0)))) / z)
else if (z <= 2.25d+91) then
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)))
else
tmp = t_2
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 t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.6e+54) {
tmp = t_2 + ((((y * x) / (b - y)) + (y * ((a - t) / Math.pow((b - y), 2.0)))) / z);
} else if (z <= 2.25e+91) {
tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.6e+54: tmp = t_2 + ((((y * x) / (b - y)) + (y * ((a - t) / math.pow((b - y), 2.0)))) / z) elif z <= 2.25e+91: tmp = x * ((y / t_1) + ((z * (t - a)) / (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)) tmp = 0.0 if (z <= -1.6e+54) tmp = Float64(t_2 + Float64(Float64(Float64(Float64(y * x) / Float64(b - y)) + Float64(y * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))) / z)); elseif (z <= 2.25e+91) tmp = Float64(x * Float64(Float64(y / t_1) + Float64(Float64(z * Float64(t - a)) / Float64(x * t_1)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.6e+54) tmp = t_2 + ((((y * x) / (b - y)) + (y * ((a - t) / ((b - y) ^ 2.0)))) / z); elseif (z <= 2.25e+91) tmp = x * ((y / t_1) + ((z * (t - a)) / (x * t_1))); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+54], N[(t$95$2 + N[(N[(N[(N[(y * x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+91], 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], 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}\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+54}:\\
\;\;\;\;t\_2 + \frac{\frac{y \cdot x}{b - y} + y \cdot \frac{a - t}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} + \frac{z \cdot \left(t - a\right)}{x \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.6e54Initial program 27.9%
Taylor expanded in z around -inf 66.4%
associate--l+66.4%
mul-1-neg66.4%
distribute-lft-out--66.4%
*-commutative66.4%
associate-/l*77.4%
div-sub77.4%
Simplified77.4%
if -1.6e54 < z < 2.25e91Initial program 86.6%
Taylor expanded in x around inf 93.6%
if 2.25e91 < z Initial program 42.1%
Taylor expanded in z around inf 100.0%
Final simplification91.1%
(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)) (* y x)) t_1))
(t_4 (/ y t_1)))
(if (<= t_3 (- INFINITY))
(* x (+ t_4 (/ (- t a) (* y (- (/ x z) x)))))
(if (<= t_3 -1e-268)
t_3
(if (<= t_3 0.0)
t_2
(if (<= t_3 2e+256)
t_3
(if (<= t_3 INFINITY)
(* x (+ t_4 (/ (/ (- a t) x) (- y b))))
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)) + (y * x)) / t_1;
double t_4 = y / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x))));
} else if (t_3 <= -1e-268) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+256) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = x * (t_4 + (((a - t) / x) / (y - b)));
} else {
tmp = t_2;
}
return tmp;
}
public static 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)) + (y * x)) / t_1;
double t_4 = y / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x))));
} else if (t_3 <= -1e-268) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 2e+256) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = x * (t_4 + (((a - t) / x) / (y - b)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) t_3 = ((z * (t - a)) + (y * x)) / t_1 t_4 = y / t_1 tmp = 0 if t_3 <= -math.inf: tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x)))) elif t_3 <= -1e-268: tmp = t_3 elif t_3 <= 0.0: tmp = t_2 elif t_3 <= 2e+256: tmp = t_3 elif t_3 <= math.inf: tmp = x * (t_4 + (((a - t) / x) / (y - b))) 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(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_1) t_4 = Float64(y / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(x * Float64(t_4 + Float64(Float64(t - a) / Float64(y * Float64(Float64(x / z) - x))))); elseif (t_3 <= -1e-268) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+256) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(x * Float64(t_4 + Float64(Float64(Float64(a - t) / x) / Float64(y - b)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); t_3 = ((z * (t - a)) + (y * x)) / t_1; t_4 = y / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = x * (t_4 + ((t - a) / (y * ((x / z) - x)))); elseif (t_3 <= -1e-268) tmp = t_3; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 2e+256) tmp = t_3; elseif (t_3 <= Inf) tmp = x * (t_4 + (((a - t) / x) / (y - b))); else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(y / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(x * N[(t$95$4 + N[(N[(t - a), $MachinePrecision] / N[(y * N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-268], t$95$3, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 2e+256], t$95$3, If[LessEqual[t$95$3, Infinity], N[(x * N[(t$95$4 + N[(N[(N[(a - t), $MachinePrecision] / x), $MachinePrecision] / N[(y - b), $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 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_1}\\
t_4 := \frac{y}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(t\_4 + \frac{t - a}{y \cdot \left(\frac{x}{z} - x\right)}\right)\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+256}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;x \cdot \left(t\_4 + \frac{\frac{a - t}{x}}{y - b}\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 40.5%
Taylor expanded in x around inf 65.4%
Taylor expanded in z around inf 41.5%
Taylor expanded in y around inf 81.2%
+-commutative81.2%
mul-1-neg81.2%
unsub-neg81.2%
Simplified81.2%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999958e-269 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e256Initial program 99.6%
if -9.99999999999999958e-269 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 12.5%
Taylor expanded in z around inf 78.1%
if 2.0000000000000001e256 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 26.3%
Taylor expanded in x around inf 75.0%
Taylor expanded in z around inf 40.4%
Taylor expanded in z around inf 95.4%
associate-/r*91.5%
Simplified91.5%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* x (+ (/ y t_1) (/ (/ (- a t) x) (- y b)))))
(t_4 (/ (+ (* z (- t a)) (* y x)) t_1)))
(if (<= t_4 -5e+302)
t_3
(if (<= t_4 -1e-268)
t_4
(if (<= t_4 0.0)
t_2
(if (<= t_4 2e+256) t_4 (if (<= t_4 INFINITY) t_3 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 = x * ((y / t_1) + (((a - t) / x) / (y - b)));
double t_4 = ((z * (t - a)) + (y * x)) / t_1;
double tmp;
if (t_4 <= -5e+302) {
tmp = t_3;
} else if (t_4 <= -1e-268) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 2e+256) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
public static 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 = x * ((y / t_1) + (((a - t) / x) / (y - b)));
double t_4 = ((z * (t - a)) + (y * x)) / t_1;
double tmp;
if (t_4 <= -5e+302) {
tmp = t_3;
} else if (t_4 <= -1e-268) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_2;
} else if (t_4 <= 2e+256) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (z * (b - y)) t_2 = (t - a) / (b - y) t_3 = x * ((y / t_1) + (((a - t) / x) / (y - b))) t_4 = ((z * (t - a)) + (y * x)) / t_1 tmp = 0 if t_4 <= -5e+302: tmp = t_3 elif t_4 <= -1e-268: tmp = t_4 elif t_4 <= 0.0: tmp = t_2 elif t_4 <= 2e+256: tmp = t_4 elif t_4 <= math.inf: tmp = t_3 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(x * Float64(Float64(y / t_1) + Float64(Float64(Float64(a - t) / x) / Float64(y - b)))) t_4 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_1) tmp = 0.0 if (t_4 <= -5e+302) tmp = t_3; elseif (t_4 <= -1e-268) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 2e+256) tmp = t_4; elseif (t_4 <= Inf) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (z * (b - y)); t_2 = (t - a) / (b - y); t_3 = x * ((y / t_1) + (((a - t) / x) / (y - b))); t_4 = ((z * (t - a)) + (y * x)) / t_1; tmp = 0.0; if (t_4 <= -5e+302) tmp = t_3; elseif (t_4 <= -1e-268) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_2; elseif (t_4 <= 2e+256) tmp = t_4; elseif (t_4 <= Inf) tmp = t_3; else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(N[(a - t), $MachinePrecision] / x), $MachinePrecision] / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$4, -5e+302], t$95$3, If[LessEqual[t$95$4, -1e-268], t$95$4, If[LessEqual[t$95$4, 0.0], t$95$2, If[LessEqual[t$95$4, 2e+256], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$3, 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 := x \cdot \left(\frac{y}{t\_1} + \frac{\frac{a - t}{x}}{y - b}\right)\\
t_4 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_1}\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+302}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq -1 \cdot 10^{-268}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+256}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_3\\
\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)))) < -5e302 or 2.0000000000000001e256 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 36.3%
Taylor expanded in x around inf 71.2%
Taylor expanded in z around inf 43.3%
Taylor expanded in z around inf 86.2%
associate-/r*82.5%
Simplified82.5%
if -5e302 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -9.99999999999999958e-269 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2.0000000000000001e256Initial program 99.6%
if -9.99999999999999958e-269 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0 or +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 12.5%
Taylor expanded in z around inf 78.1%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -3.55e+56) (not (<= z 1.6e+89)))
(/ (- 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.55e+56) || !(z <= 1.6e+89)) {
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.55d+56)) .or. (.not. (z <= 1.6d+89))) 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.55e+56) || !(z <= 1.6e+89)) {
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.55e+56) or not (z <= 1.6e+89): 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.55e+56) || !(z <= 1.6e+89)) 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.55e+56) || ~((z <= 1.6e+89))) 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.55e+56], N[Not[LessEqual[z, 1.6e+89]], $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.55 \cdot 10^{+56} \lor \neg \left(z \leq 1.6 \cdot 10^{+89}\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.55e56 or 1.59999999999999994e89 < z Initial program 33.6%
Taylor expanded in z around inf 84.7%
if -3.55e56 < z < 1.59999999999999994e89Initial program 86.2%
Taylor expanded in x around inf 93.1%
Final simplification90.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.4e+54) (not (<= z 2.6e+90))) (/ (- 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 <= -2.4e+54) || !(z <= 2.6e+90)) {
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 <= (-2.4d+54)) .or. (.not. (z <= 2.6d+90))) 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 <= -2.4e+54) || !(z <= 2.6e+90)) {
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 <= -2.4e+54) or not (z <= 2.6e+90): 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 <= -2.4e+54) || !(z <= 2.6e+90)) 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 <= -2.4e+54) || ~((z <= 2.6e+90))) 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, -2.4e+54], N[Not[LessEqual[z, 2.6e+90]], $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 -2.4 \cdot 10^{+54} \lor \neg \left(z \leq 2.6 \cdot 10^{+90}\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 < -2.39999999999999998e54 or 2.5999999999999998e90 < z Initial program 34.0%
Taylor expanded in z around inf 84.0%
if -2.39999999999999998e54 < z < 2.5999999999999998e90Initial program 86.6%
Final simplification85.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.65e-31)
t_1
(if (<= z 1e-161)
(+ x (/ (* z (- t a)) y))
(if (<= z 4.8e-42) (/ (* y x) (+ y (* z (- b y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.65e-31) {
tmp = t_1;
} else if (z <= 1e-161) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 4.8e-42) {
tmp = (y * x) / (y + (z * (b - y)));
} else {
tmp = 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 = (t - a) / (b - y)
if (z <= (-1.65d-31)) then
tmp = t_1
else if (z <= 1d-161) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 4.8d-42) then
tmp = (y * x) / (y + (z * (b - y)))
else
tmp = 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 = (t - a) / (b - y);
double tmp;
if (z <= -1.65e-31) {
tmp = t_1;
} else if (z <= 1e-161) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 4.8e-42) {
tmp = (y * x) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.65e-31: tmp = t_1 elif z <= 1e-161: tmp = x + ((z * (t - a)) / y) elif z <= 4.8e-42: tmp = (y * x) / (y + (z * (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.65e-31) tmp = t_1; elseif (z <= 1e-161) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 4.8e-42) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.65e-31) tmp = t_1; elseif (z <= 1e-161) tmp = x + ((z * (t - a)) / y); elseif (z <= 4.8e-42) tmp = (y * x) / (y + (z * (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e-31], t$95$1, If[LessEqual[z, 1e-161], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-42], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-161}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-42}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.65e-31 or 4.80000000000000005e-42 < z Initial program 46.6%
Taylor expanded in z around inf 75.9%
if -1.65e-31 < z < 1.00000000000000003e-161Initial program 85.6%
Taylor expanded in z around 0 66.7%
Taylor expanded in x around 0 80.9%
if 1.00000000000000003e-161 < z < 4.80000000000000005e-42Initial program 99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around inf 68.2%
*-commutative68.2%
Simplified68.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5e-32)
t_1
(if (<= z 1e-161)
(+ x (/ (* z (- t a)) y))
(if (<= z 1.02e-33) (/ (* y x) (+ y (* z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -5e-32) {
tmp = t_1;
} else if (z <= 1e-161) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.02e-33) {
tmp = (y * x) / (y + (z * b));
} else {
tmp = 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 = (t - a) / (b - y)
if (z <= (-5d-32)) then
tmp = t_1
else if (z <= 1d-161) then
tmp = x + ((z * (t - a)) / y)
else if (z <= 1.02d-33) then
tmp = (y * x) / (y + (z * b))
else
tmp = 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 = (t - a) / (b - y);
double tmp;
if (z <= -5e-32) {
tmp = t_1;
} else if (z <= 1e-161) {
tmp = x + ((z * (t - a)) / y);
} else if (z <= 1.02e-33) {
tmp = (y * x) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -5e-32: tmp = t_1 elif z <= 1e-161: tmp = x + ((z * (t - a)) / y) elif z <= 1.02e-33: tmp = (y * x) / (y + (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -5e-32) tmp = t_1; elseif (z <= 1e-161) tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 1.02e-33) tmp = Float64(Float64(y * x) / Float64(y + Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -5e-32) tmp = t_1; elseif (z <= 1e-161) tmp = x + ((z * (t - a)) / y); elseif (z <= 1.02e-33) tmp = (y * x) / (y + (z * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e-32], t$95$1, If[LessEqual[z, 1e-161], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e-33], N[(N[(y * x), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-161}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-33}:\\
\;\;\;\;\frac{y \cdot x}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5e-32 or 1.02e-33 < z Initial program 46.6%
Taylor expanded in z around inf 75.9%
if -5e-32 < z < 1.00000000000000003e-161Initial program 85.6%
Taylor expanded in z around 0 66.7%
Taylor expanded in x around 0 80.9%
if 1.00000000000000003e-161 < z < 1.02e-33Initial program 99.7%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around inf 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in b around inf 68.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.5e-44) (not (<= z 3.5e-50))) (/ (- t a) (- b y)) (+ x (/ (* z (- t a)) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e-44) || !(z <= 3.5e-50)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - 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 <= (-5.5d-44)) .or. (.not. (z <= 3.5d-50))) then
tmp = (t - a) / (b - y)
else
tmp = x + ((z * (t - 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 <= -5.5e-44) || !(z <= 3.5e-50)) {
tmp = (t - a) / (b - y);
} else {
tmp = x + ((z * (t - a)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.5e-44) or not (z <= 3.5e-50): tmp = (t - a) / (b - y) else: tmp = x + ((z * (t - a)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.5e-44) || !(z <= 3.5e-50)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x + Float64(Float64(z * Float64(t - a)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.5e-44) || ~((z <= 3.5e-50))) tmp = (t - a) / (b - y); else tmp = x + ((z * (t - a)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.5e-44], N[Not[LessEqual[z, 3.5e-50]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-44} \lor \neg \left(z \leq 3.5 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot \left(t - a\right)}{y}\\
\end{array}
\end{array}
if z < -5.49999999999999993e-44 or 3.49999999999999997e-50 < z Initial program 47.8%
Taylor expanded in z around inf 75.0%
if -5.49999999999999993e-44 < z < 3.49999999999999997e-50Initial program 88.0%
Taylor expanded in z around 0 64.1%
Taylor expanded in x around 0 76.0%
Final simplification75.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.35e-58) (not (<= z 3.8e-51))) (/ (- t a) (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.35e-58) || !(z <= 3.8e-51)) {
tmp = (t - a) / (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.35d-58)) .or. (.not. (z <= 3.8d-51))) then
tmp = (t - a) / (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.35e-58) || !(z <= 3.8e-51)) {
tmp = (t - a) / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.35e-58) or not (z <= 3.8e-51): tmp = (t - a) / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.35e-58) || !(z <= 3.8e-51)) tmp = Float64(Float64(t - a) / 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.35e-58) || ~((z <= 3.8e-51))) tmp = (t - a) / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.35e-58], N[Not[LessEqual[z, 3.8e-51]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-58} \lor \neg \left(z \leq 3.8 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.3499999999999999e-58 or 3.80000000000000003e-51 < z Initial program 48.2%
Taylor expanded in z around inf 74.2%
if -1.3499999999999999e-58 < z < 3.80000000000000003e-51Initial program 88.5%
Taylor expanded in z around 0 56.9%
Final simplification66.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.5e-46) (not (<= y 1.26e+53))) (/ 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 <= -9.5e-46) || !(y <= 1.26e+53)) {
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 <= (-9.5d-46)) .or. (.not. (y <= 1.26d+53))) 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 <= -9.5e-46) || !(y <= 1.26e+53)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.5e-46) or not (y <= 1.26e+53): 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 <= -9.5e-46) || !(y <= 1.26e+53)) 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 <= -9.5e-46) || ~((y <= 1.26e+53))) 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, -9.5e-46], N[Not[LessEqual[y, 1.26e+53]], $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 -9.5 \cdot 10^{-46} \lor \neg \left(y \leq 1.26 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -9.49999999999999993e-46 or 1.25999999999999999e53 < y Initial program 53.8%
Taylor expanded in y around inf 60.3%
mul-1-neg60.3%
unsub-neg60.3%
Simplified60.3%
if -9.49999999999999993e-46 < y < 1.25999999999999999e53Initial program 78.3%
Taylor expanded in y around 0 52.9%
Final simplification56.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.96e+71) (not (<= z 1.2e-50))) (/ t (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.96e+71) || !(z <= 1.2e-50)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
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.96d+71)) .or. (.not. (z <= 1.2d-50))) then
tmp = t / (b - y)
else
tmp = x / (1.0d0 - z)
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.96e+71) || !(z <= 1.2e-50)) {
tmp = t / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.96e+71) or not (z <= 1.2e-50): tmp = t / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.96e+71) || !(z <= 1.2e-50)) tmp = Float64(t / Float64(b - y)); else tmp = Float64(x / Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.96e+71) || ~((z <= 1.2e-50))) tmp = t / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.96e+71], N[Not[LessEqual[z, 1.2e-50]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.96 \cdot 10^{+71} \lor \neg \left(z \leq 1.2 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -1.96000000000000011e71 or 1.20000000000000001e-50 < z Initial program 42.4%
Taylor expanded in x around inf 43.8%
Taylor expanded in z around inf 43.1%
Taylor expanded in z around inf 73.1%
associate-/r*62.6%
Simplified62.6%
Taylor expanded in t around inf 47.2%
if -1.96000000000000011e71 < z < 1.20000000000000001e-50Initial program 85.8%
Taylor expanded in y around inf 54.5%
mul-1-neg54.5%
unsub-neg54.5%
Simplified54.5%
Final simplification51.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.1) (not (<= z 5.4e-51))) (/ t (- b y)) (+ x (* z x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.1) || !(z <= 5.4e-51)) {
tmp = t / (b - y);
} 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 ((z <= (-0.1d0)) .or. (.not. (z <= 5.4d-51))) then
tmp = t / (b - y)
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 ((z <= -0.1) || !(z <= 5.4e-51)) {
tmp = t / (b - y);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.1) or not (z <= 5.4e-51): tmp = t / (b - y) else: tmp = x + (z * x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.1) || !(z <= 5.4e-51)) tmp = Float64(t / Float64(b - y)); 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 ((z <= -0.1) || ~((z <= 5.4e-51))) tmp = t / (b - y); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.1], N[Not[LessEqual[z, 5.4e-51]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.1 \lor \neg \left(z \leq 5.4 \cdot 10^{-51}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if z < -0.10000000000000001 or 5.3999999999999994e-51 < z Initial program 44.6%
Taylor expanded in x around inf 45.8%
Taylor expanded in z around inf 46.0%
Taylor expanded in z around inf 72.2%
associate-/r*63.6%
Simplified63.6%
Taylor expanded in t around inf 45.8%
if -0.10000000000000001 < z < 5.3999999999999994e-51Initial program 88.7%
Taylor expanded in y around inf 55.2%
mul-1-neg55.2%
unsub-neg55.2%
Simplified55.2%
Taylor expanded in z around 0 54.6%
*-commutative54.6%
Simplified54.6%
Final simplification50.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -0.76) (- (/ x z)) (if (<= z 18000.0) (+ x (* z x)) (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -0.76) {
tmp = -(x / z);
} else if (z <= 18000.0) {
tmp = x + (z * x);
} else {
tmp = 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 <= (-0.76d0)) then
tmp = -(x / z)
else if (z <= 18000.0d0) then
tmp = x + (z * x)
else
tmp = 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 <= -0.76) {
tmp = -(x / z);
} else if (z <= 18000.0) {
tmp = x + (z * x);
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -0.76: tmp = -(x / z) elif z <= 18000.0: tmp = x + (z * x) else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -0.76) tmp = Float64(-Float64(x / z)); elseif (z <= 18000.0) tmp = Float64(x + Float64(z * x)); else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -0.76) tmp = -(x / z); elseif (z <= 18000.0) tmp = x + (z * x); else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -0.76], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, 18000.0], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.76:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq 18000:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -0.76000000000000001Initial program 35.8%
Taylor expanded in y around inf 27.1%
mul-1-neg27.1%
unsub-neg27.1%
Simplified27.1%
Taylor expanded in z around inf 25.6%
associate-*r/25.6%
mul-1-neg25.6%
Simplified25.6%
if -0.76000000000000001 < z < 18000Initial program 88.1%
Taylor expanded in y around inf 52.5%
mul-1-neg52.5%
unsub-neg52.5%
Simplified52.5%
Taylor expanded in z around 0 52.0%
*-commutative52.0%
Simplified52.0%
if 18000 < z Initial program 48.7%
Taylor expanded in b around 0 29.9%
mul-1-neg29.9%
*-commutative29.9%
distribute-lft-neg-in29.9%
Simplified29.9%
Taylor expanded in t around 0 19.9%
mul-1-neg19.9%
distribute-lft-neg-out19.9%
*-commutative19.9%
Simplified19.9%
Taylor expanded in z around inf 25.4%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.4e+54) (not (<= z 18000.0))) (/ a y) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.4e+54) || !(z <= 18000.0)) {
tmp = a / 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 <= (-3.4d+54)) .or. (.not. (z <= 18000.0d0))) then
tmp = a / 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 <= -3.4e+54) || !(z <= 18000.0)) {
tmp = a / y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.4e+54) or not (z <= 18000.0): tmp = a / y else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.4e+54) || !(z <= 18000.0)) tmp = Float64(a / y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.4e+54) || ~((z <= 18000.0))) tmp = a / y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.4e+54], N[Not[LessEqual[z, 18000.0]], $MachinePrecision]], N[(a / y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+54} \lor \neg \left(z \leq 18000\right):\\
\;\;\;\;\frac{a}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.4000000000000001e54 or 18000 < z Initial program 38.3%
Taylor expanded in b around 0 23.9%
mul-1-neg23.9%
*-commutative23.9%
distribute-lft-neg-in23.9%
Simplified23.9%
Taylor expanded in t around 0 17.4%
mul-1-neg17.4%
distribute-lft-neg-out17.4%
*-commutative17.4%
Simplified17.4%
Taylor expanded in z around inf 24.2%
if -3.4000000000000001e54 < z < 18000Initial program 87.0%
Taylor expanded in z around 0 48.3%
Final simplification38.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.0) (- (/ x z)) (if (<= z 18000.0) x (/ a y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.0) {
tmp = -(x / z);
} else if (z <= 18000.0) {
tmp = x;
} else {
tmp = 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 <= (-1.0d0)) then
tmp = -(x / z)
else if (z <= 18000.0d0) then
tmp = x
else
tmp = 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 <= -1.0) {
tmp = -(x / z);
} else if (z <= 18000.0) {
tmp = x;
} else {
tmp = a / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.0: tmp = -(x / z) elif z <= 18000.0: tmp = x else: tmp = a / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.0) tmp = Float64(-Float64(x / z)); elseif (z <= 18000.0) tmp = x; else tmp = Float64(a / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.0) tmp = -(x / z); elseif (z <= 18000.0) tmp = x; else tmp = a / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.0], (-N[(x / z), $MachinePrecision]), If[LessEqual[z, 18000.0], x, N[(a / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;-\frac{x}{z}\\
\mathbf{elif}\;z \leq 18000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y}\\
\end{array}
\end{array}
if z < -1Initial program 35.8%
Taylor expanded in y around inf 27.1%
mul-1-neg27.1%
unsub-neg27.1%
Simplified27.1%
Taylor expanded in z around inf 25.6%
associate-*r/25.6%
mul-1-neg25.6%
Simplified25.6%
if -1 < z < 18000Initial program 88.1%
Taylor expanded in z around 0 51.7%
if 18000 < z Initial program 48.7%
Taylor expanded in b around 0 29.9%
mul-1-neg29.9%
*-commutative29.9%
distribute-lft-neg-in29.9%
Simplified29.9%
Taylor expanded in t around 0 19.9%
mul-1-neg19.9%
distribute-lft-neg-out19.9%
*-commutative19.9%
Simplified19.9%
Taylor expanded in z around inf 25.4%
Final simplification39.5%
(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 66.5%
Taylor expanded in z around 0 29.4%
(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 2024146
(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)))))