
(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 23 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 (* z (- y b)))
(t_2 (- y t_1))
(t_3
(+
(- (/ (- t a) (- b y)) (* (/ y z) (/ x (- y b))))
(* y (/ (- a t) (* z (pow (- b y) 2.0))))))
(t_4 (/ (+ (* z (- t a)) (* y x)) t_2))
(t_5
(*
x
(+
(/ y t_2)
(/ (* a (+ (/ (* z t) (* a t_2)) (/ z (- t_1 y)))) x)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-238)
t_4
(if (<= t_4 0.0)
t_3
(if (<= t_4 2e+292) t_4 (if (<= t_4 INFINITY) t_5 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y - b);
double t_2 = y - t_1;
double t_3 = (((t - a) / (b - y)) - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * pow((b - y), 2.0))));
double t_4 = ((z * (t - a)) + (y * x)) / t_2;
double t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-238) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_3;
} else if (t_4 <= 2e+292) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y - b);
double t_2 = y - t_1;
double t_3 = (((t - a) / (b - y)) - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * Math.pow((b - y), 2.0))));
double t_4 = ((z * (t - a)) + (y * x)) / t_2;
double t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -2e-238) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_3;
} else if (t_4 <= 2e+292) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y - b) t_2 = y - t_1 t_3 = (((t - a) / (b - y)) - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * math.pow((b - y), 2.0)))) t_4 = ((z * (t - a)) + (y * x)) / t_2 t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -2e-238: tmp = t_4 elif t_4 <= 0.0: tmp = t_3 elif t_4 <= 2e+292: tmp = t_4 elif t_4 <= math.inf: tmp = t_5 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y - b)) t_2 = Float64(y - t_1) t_3 = Float64(Float64(Float64(Float64(t - a) / Float64(b - y)) - Float64(Float64(y / z) * Float64(x / Float64(y - b)))) + Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0))))) t_4 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_2) t_5 = Float64(x * Float64(Float64(y / t_2) + Float64(Float64(a * Float64(Float64(Float64(z * t) / Float64(a * t_2)) + Float64(z / Float64(t_1 - y)))) / x))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-238) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_3; elseif (t_4 <= 2e+292) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y - b); t_2 = y - t_1; t_3 = (((t - a) / (b - y)) - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * ((b - y) ^ 2.0)))); t_4 = ((z * (t - a)) + (y * x)) / t_2; t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -2e-238) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_3; elseif (t_4 <= 2e+292) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * N[(x / N[(y - b), $MachinePrecision]), $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]}, Block[{t$95$4 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(a * N[(N[(N[(z * t), $MachinePrecision] / N[(a * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t$95$1 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-238], t$95$4, If[LessEqual[t$95$4, 0.0], t$95$3, If[LessEqual[t$95$4, 2e+292], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$5, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y - b\right)\\
t_2 := y - t\_1\\
t_3 := \left(\frac{t - a}{b - y} - \frac{y}{z} \cdot \frac{x}{y - b}\right) + y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}}\\
t_4 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_2}\\
t_5 := x \cdot \left(\frac{y}{t\_2} + \frac{a \cdot \left(\frac{z \cdot t}{a \cdot t\_2} + \frac{z}{t\_1 - y}\right)}{x}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-238}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2e292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.9%
Taylor expanded in a around -inf 40.9%
associate-*r*40.9%
neg-mul-140.9%
fma-define40.9%
Simplified77.2%
Taylor expanded in x around inf 80.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-238 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e292Initial program 99.5%
if -2e-238 < (/.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 10.9%
Taylor expanded in z around inf 47.6%
associate--r+47.6%
+-commutative47.6%
associate--l+47.6%
*-commutative47.6%
times-frac63.9%
div-sub63.9%
associate-/l*99.7%
Simplified99.7%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- y b)))
(t_2 (- y t_1))
(t_3 (/ (+ (* z (- t a)) (* y x)) t_2))
(t_4
(*
x
(+
(/ y t_2)
(/ (* a (+ (/ (* z t) (* a t_2)) (/ z (- t_1 y)))) x)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -2e-301)
t_3
(if (<= t_3 0.0)
(+
(/ t (- b y))
(/ (- (/ (* y x) (- b y)) (/ (* t y) (pow (- b y) 2.0))) z))
(if (<= t_3 2e+292)
t_3
(if (<= t_3 INFINITY) t_4 (/ (- t a) (- b y)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y - b);
double t_2 = y - t_1;
double t_3 = ((z * (t - a)) + (y * x)) / t_2;
double t_4 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -2e-301) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (t / (b - y)) + ((((y * x) / (b - y)) - ((t * y) / pow((b - y), 2.0))) / z);
} else if (t_3 <= 2e+292) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y - b);
double t_2 = y - t_1;
double t_3 = ((z * (t - a)) + (y * x)) / t_2;
double t_4 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= -2e-301) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (t / (b - y)) + ((((y * x) / (b - y)) - ((t * y) / Math.pow((b - y), 2.0))) / z);
} else if (t_3 <= 2e+292) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = (t - a) / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y - b) t_2 = y - t_1 t_3 = ((z * (t - a)) + (y * x)) / t_2 t_4 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x)) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= -2e-301: tmp = t_3 elif t_3 <= 0.0: tmp = (t / (b - y)) + ((((y * x) / (b - y)) - ((t * y) / math.pow((b - y), 2.0))) / z) elif t_3 <= 2e+292: tmp = t_3 elif t_3 <= math.inf: tmp = t_4 else: tmp = (t - a) / (b - y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y - b)) t_2 = Float64(y - t_1) t_3 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_2) t_4 = Float64(x * Float64(Float64(y / t_2) + Float64(Float64(a * Float64(Float64(Float64(z * t) / Float64(a * t_2)) + Float64(z / Float64(t_1 - y)))) / x))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -2e-301) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(Float64(t / Float64(b - y)) + Float64(Float64(Float64(Float64(y * x) / Float64(b - y)) - Float64(Float64(t * y) / (Float64(b - y) ^ 2.0))) / z)); elseif (t_3 <= 2e+292) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; 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 = z * (y - b); t_2 = y - t_1; t_3 = ((z * (t - a)) + (y * x)) / t_2; t_4 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x)); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= -2e-301) tmp = t_3; elseif (t_3 <= 0.0) tmp = (t / (b - y)) + ((((y * x) / (b - y)) - ((t * y) / ((b - y) ^ 2.0))) / z); elseif (t_3 <= 2e+292) tmp = t_3; elseif (t_3 <= Inf) tmp = t_4; else tmp = (t - a) / (b - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(a * N[(N[(N[(z * t), $MachinePrecision] / N[(a * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t$95$1 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -2e-301], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(y * x), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision] - N[(N[(t * y), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+292], t$95$3, If[LessEqual[t$95$3, Infinity], t$95$4, N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y - b\right)\\
t_2 := y - t\_1\\
t_3 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_2}\\
t_4 := x \cdot \left(\frac{y}{t\_2} + \frac{a \cdot \left(\frac{z \cdot t}{a \cdot t\_2} + \frac{z}{t\_1 - y}\right)}{x}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t}{b - y} + \frac{\frac{y \cdot x}{b - y} - \frac{t \cdot y}{{\left(b - y\right)}^{2}}}{z}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b - y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2e292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.9%
Taylor expanded in a around -inf 40.9%
associate-*r*40.9%
neg-mul-140.9%
fma-define40.9%
Simplified77.2%
Taylor expanded in x around inf 80.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2.00000000000000013e-301 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e292Initial program 99.5%
if -2.00000000000000013e-301 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 0.0Initial program 26.5%
Taylor expanded in t around inf 26.5%
Taylor expanded in z around -inf 84.6%
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 77.4%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- y b)))
(t_2 (- y t_1))
(t_3 (/ (- t a) (- b y)))
(t_4 (/ (+ (* z (- t a)) (* y x)) t_2))
(t_5
(*
x
(+
(/ y t_2)
(/ (* a (+ (/ (* z t) (* a t_2)) (/ z (- t_1 y)))) x)))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -2e-238)
t_4
(if (<= t_4 0.0)
t_3
(if (<= t_4 2e+292) t_4 (if (<= t_4 INFINITY) t_5 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y - b);
double t_2 = y - t_1;
double t_3 = (t - a) / (b - y);
double t_4 = ((z * (t - a)) + (y * x)) / t_2;
double t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -2e-238) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_3;
} else if (t_4 <= 2e+292) {
tmp = t_4;
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y - b);
double t_2 = y - t_1;
double t_3 = (t - a) / (b - y);
double t_4 = ((z * (t - a)) + (y * x)) / t_2;
double t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= -2e-238) {
tmp = t_4;
} else if (t_4 <= 0.0) {
tmp = t_3;
} else if (t_4 <= 2e+292) {
tmp = t_4;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y - b) t_2 = y - t_1 t_3 = (t - a) / (b - y) t_4 = ((z * (t - a)) + (y * x)) / t_2 t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x)) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= -2e-238: tmp = t_4 elif t_4 <= 0.0: tmp = t_3 elif t_4 <= 2e+292: tmp = t_4 elif t_4 <= math.inf: tmp = t_5 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y - b)) t_2 = Float64(y - t_1) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / t_2) t_5 = Float64(x * Float64(Float64(y / t_2) + Float64(Float64(a * Float64(Float64(Float64(z * t) / Float64(a * t_2)) + Float64(z / Float64(t_1 - y)))) / x))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -2e-238) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_3; elseif (t_4 <= 2e+292) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y - b); t_2 = y - t_1; t_3 = (t - a) / (b - y); t_4 = ((z * (t - a)) + (y * x)) / t_2; t_5 = x * ((y / t_2) + ((a * (((z * t) / (a * t_2)) + (z / (t_1 - y)))) / x)); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= -2e-238) tmp = t_4; elseif (t_4 <= 0.0) tmp = t_3; elseif (t_4 <= 2e+292) tmp = t_4; elseif (t_4 <= Inf) tmp = t_5; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(x * N[(N[(y / t$95$2), $MachinePrecision] + N[(N[(a * N[(N[(N[(z * t), $MachinePrecision] / N[(a * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t$95$1 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -2e-238], t$95$4, If[LessEqual[t$95$4, 0.0], t$95$3, If[LessEqual[t$95$4, 2e+292], t$95$4, If[LessEqual[t$95$4, Infinity], t$95$5, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y - b\right)\\
t_2 := y - t\_1\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{z \cdot \left(t - a\right) + y \cdot x}{t\_2}\\
t_5 := x \cdot \left(\frac{y}{t\_2} + \frac{a \cdot \left(\frac{z \cdot t}{a \cdot t\_2} + \frac{z}{t\_1 - y}\right)}{x}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -2 \cdot 10^{-238}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 2e292 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 28.9%
Taylor expanded in a around -inf 40.9%
associate-*r*40.9%
neg-mul-140.9%
fma-define40.9%
Simplified77.2%
Taylor expanded in x around inf 80.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -2e-238 or 0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 2e292Initial program 99.5%
if -2e-238 < (/.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 10.9%
Taylor expanded in z around inf 78.4%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b)))))
(if (or (<= z -320000000.0) (not (<= z 1.6e-6)))
(+
(+ (/ t (- b y)) (* (/ x z) (/ y (- b y))))
(+ (* y (/ (- a t) (* z (pow (- b y) 2.0)))) (/ a (- y b))))
(* x (- (/ y t_1) (/ (* z (- a t)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double tmp;
if ((z <= -320000000.0) || !(z <= 1.6e-6)) {
tmp = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + ((y * ((a - t) / (z * pow((b - y), 2.0)))) + (a / (y - b)));
} else {
tmp = x * ((y / t_1) - ((z * (a - t)) / (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 * (y - b))
if ((z <= (-320000000.0d0)) .or. (.not. (z <= 1.6d-6))) then
tmp = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + ((y * ((a - t) / (z * ((b - y) ** 2.0d0)))) + (a / (y - b)))
else
tmp = x * ((y / t_1) - ((z * (a - t)) / (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 * (y - b));
double tmp;
if ((z <= -320000000.0) || !(z <= 1.6e-6)) {
tmp = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + ((y * ((a - t) / (z * Math.pow((b - y), 2.0)))) + (a / (y - b)));
} else {
tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) tmp = 0 if (z <= -320000000.0) or not (z <= 1.6e-6): tmp = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + ((y * ((a - t) / (z * math.pow((b - y), 2.0)))) + (a / (y - b))) else: tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) tmp = 0.0 if ((z <= -320000000.0) || !(z <= 1.6e-6)) tmp = Float64(Float64(Float64(t / Float64(b - y)) + Float64(Float64(x / z) * Float64(y / Float64(b - y)))) + Float64(Float64(y * Float64(Float64(a - t) / Float64(z * (Float64(b - y) ^ 2.0)))) + Float64(a / Float64(y - b)))); else tmp = Float64(x * Float64(Float64(y / t_1) - Float64(Float64(z * Float64(a - t)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); tmp = 0.0; if ((z <= -320000000.0) || ~((z <= 1.6e-6))) tmp = ((t / (b - y)) + ((x / z) * (y / (b - y)))) + ((y * ((a - t) / (z * ((b - y) ^ 2.0)))) + (a / (y - b))); else tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -320000000.0], N[Not[LessEqual[z, 1.6e-6]], $MachinePrecision]], N[(N[(N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
\mathbf{if}\;z \leq -320000000 \lor \neg \left(z \leq 1.6 \cdot 10^{-6}\right):\\
\;\;\;\;\left(\frac{t}{b - y} + \frac{x}{z} \cdot \frac{y}{b - y}\right) + \left(y \cdot \frac{a - t}{z \cdot {\left(b - y\right)}^{2}} + \frac{a}{y - b}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} - \frac{z \cdot \left(a - t\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -3.2e8 or 1.5999999999999999e-6 < z Initial program 41.3%
Taylor expanded in z around inf 66.7%
times-frac75.9%
associate-/l*95.8%
Simplified95.8%
if -3.2e8 < z < 1.5999999999999999e-6Initial program 87.0%
Taylor expanded in x around inf 89.4%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b))))
(t_2 (/ (- t a) (- b y)))
(t_3 (pow (- b y) 2.0)))
(if (<= z -4200000000.0)
(+ (- t_2 (* (/ y z) (/ x (- y b)))) (* y (/ (- a t) (* z t_3))))
(if (<= z 1.6e-6)
(* x (- (/ y t_1) (/ (* z (- a t)) (* x t_1))))
(- t_2 (/ (- (* x (/ y (- y b))) (* y (/ (- a t) t_3))) z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = (t - a) / (b - y);
double t_3 = pow((b - y), 2.0);
double tmp;
if (z <= -4200000000.0) {
tmp = (t_2 - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * t_3)));
} else if (z <= 1.6e-6) {
tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1)));
} else {
tmp = t_2 - (((x * (y / (y - b))) - (y * ((a - t) / t_3))) / 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y - (z * (y - b))
t_2 = (t - a) / (b - y)
t_3 = (b - y) ** 2.0d0
if (z <= (-4200000000.0d0)) then
tmp = (t_2 - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * t_3)))
else if (z <= 1.6d-6) then
tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1)))
else
tmp = t_2 - (((x * (y / (y - b))) - (y * ((a - t) / t_3))) / z)
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 * (y - b));
double t_2 = (t - a) / (b - y);
double t_3 = Math.pow((b - y), 2.0);
double tmp;
if (z <= -4200000000.0) {
tmp = (t_2 - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * t_3)));
} else if (z <= 1.6e-6) {
tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1)));
} else {
tmp = t_2 - (((x * (y / (y - b))) - (y * ((a - t) / t_3))) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) t_2 = (t - a) / (b - y) t_3 = math.pow((b - y), 2.0) tmp = 0 if z <= -4200000000.0: tmp = (t_2 - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * t_3))) elif z <= 1.6e-6: tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1))) else: tmp = t_2 - (((x * (y / (y - b))) - (y * ((a - t) / t_3))) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(b - y) ^ 2.0 tmp = 0.0 if (z <= -4200000000.0) tmp = Float64(Float64(t_2 - Float64(Float64(y / z) * Float64(x / Float64(y - b)))) + Float64(y * Float64(Float64(a - t) / Float64(z * t_3)))); elseif (z <= 1.6e-6) tmp = Float64(x * Float64(Float64(y / t_1) - Float64(Float64(z * Float64(a - t)) / Float64(x * t_1)))); else tmp = Float64(t_2 - Float64(Float64(Float64(x * Float64(y / Float64(y - b))) - Float64(y * Float64(Float64(a - t) / t_3))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); t_2 = (t - a) / (b - y); t_3 = (b - y) ^ 2.0; tmp = 0.0; if (z <= -4200000000.0) tmp = (t_2 - ((y / z) * (x / (y - b)))) + (y * ((a - t) / (z * t_3))); elseif (z <= 1.6e-6) tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1))); else tmp = t_2 - (((x * (y / (y - b))) - (y * ((a - t) / t_3))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[z, -4200000000.0], N[(N[(t$95$2 - N[(N[(y / z), $MachinePrecision] * N[(x / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(a - t), $MachinePrecision] / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-6], N[(x * N[(N[(y / t$95$1), $MachinePrecision] - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - N[(N[(N[(x * N[(y / N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(a - t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := {\left(b - y\right)}^{2}\\
\mathbf{if}\;z \leq -4200000000:\\
\;\;\;\;\left(t\_2 - \frac{y}{z} \cdot \frac{x}{y - b}\right) + y \cdot \frac{a - t}{z \cdot t\_3}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} - \frac{z \cdot \left(a - t\right)}{x \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2 - \frac{x \cdot \frac{y}{y - b} - y \cdot \frac{a - t}{t\_3}}{z}\\
\end{array}
\end{array}
if z < -4.2e9Initial program 38.1%
Taylor expanded in z around inf 66.3%
associate--r+66.3%
+-commutative66.3%
associate--l+66.3%
*-commutative66.3%
times-frac78.6%
div-sub78.6%
associate-/l*93.5%
Simplified93.5%
if -4.2e9 < z < 1.5999999999999999e-6Initial program 87.0%
Taylor expanded in x around inf 89.4%
if 1.5999999999999999e-6 < z Initial program 43.4%
Taylor expanded in z around -inf 70.1%
associate--l+70.1%
mul-1-neg70.1%
distribute-lft-out--70.1%
associate-/l*74.3%
associate-/l*93.2%
div-sub93.2%
Simplified93.2%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b)))))
(if (or (<= z -3.2e+48) (not (<= z 5.6e+63)))
(/ (- t a) (- b y))
(* x (- (/ y t_1) (/ (* z (- a t)) (* x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double tmp;
if ((z <= -3.2e+48) || !(z <= 5.6e+63)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) - ((z * (a - t)) / (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 * (y - b))
if ((z <= (-3.2d+48)) .or. (.not. (z <= 5.6d+63))) then
tmp = (t - a) / (b - y)
else
tmp = x * ((y / t_1) - ((z * (a - t)) / (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 * (y - b));
double tmp;
if ((z <= -3.2e+48) || !(z <= 5.6e+63)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) tmp = 0 if (z <= -3.2e+48) or not (z <= 5.6e+63): tmp = (t - a) / (b - y) else: tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) tmp = 0.0 if ((z <= -3.2e+48) || !(z <= 5.6e+63)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(Float64(y / t_1) - Float64(Float64(z * Float64(a - t)) / Float64(x * t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); tmp = 0.0; if ((z <= -3.2e+48) || ~((z <= 5.6e+63))) tmp = (t - a) / (b - y); else tmp = x * ((y / t_1) - ((z * (a - t)) / (x * t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -3.2e+48], N[Not[LessEqual[z, 5.6e+63]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] - N[(N[(z * N[(a - t), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+48} \lor \neg \left(z \leq 5.6 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t\_1} - \frac{z \cdot \left(a - t\right)}{x \cdot t\_1}\right)\\
\end{array}
\end{array}
if z < -3.2000000000000001e48 or 5.59999999999999974e63 < z Initial program 32.1%
Taylor expanded in z around inf 80.8%
if -3.2000000000000001e48 < z < 5.59999999999999974e63Initial program 86.8%
Taylor expanded in x around inf 87.7%
Final simplification85.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* z (- t a)) (- y (* z (- y b))))) (t_2 (/ (- t a) (- b y))))
(if (<= z -78000000.0)
t_2
(if (<= z -8.2e-169)
t_1
(if (<= z 6.5e-136)
(* x (- 1.0 (/ (* z a) (* y x))))
(if (<= z 2.2e+29) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) / (y - (z * (y - b)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -78000000.0) {
tmp = t_2;
} else if (z <= -8.2e-169) {
tmp = t_1;
} else if (z <= 6.5e-136) {
tmp = x * (1.0 - ((z * a) / (y * x)));
} else if (z <= 2.2e+29) {
tmp = 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 = (z * (t - a)) / (y - (z * (y - b)))
t_2 = (t - a) / (b - y)
if (z <= (-78000000.0d0)) then
tmp = t_2
else if (z <= (-8.2d-169)) then
tmp = t_1
else if (z <= 6.5d-136) then
tmp = x * (1.0d0 - ((z * a) / (y * x)))
else if (z <= 2.2d+29) then
tmp = 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 = (z * (t - a)) / (y - (z * (y - b)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -78000000.0) {
tmp = t_2;
} else if (z <= -8.2e-169) {
tmp = t_1;
} else if (z <= 6.5e-136) {
tmp = x * (1.0 - ((z * a) / (y * x)));
} else if (z <= 2.2e+29) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) / (y - (z * (y - b))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -78000000.0: tmp = t_2 elif z <= -8.2e-169: tmp = t_1 elif z <= 6.5e-136: tmp = x * (1.0 - ((z * a) / (y * x))) elif z <= 2.2e+29: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) / Float64(y - Float64(z * Float64(y - b)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -78000000.0) tmp = t_2; elseif (z <= -8.2e-169) tmp = t_1; elseif (z <= 6.5e-136) tmp = Float64(x * Float64(1.0 - Float64(Float64(z * a) / Float64(y * x)))); elseif (z <= 2.2e+29) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (t - a)) / (y - (z * (y - b))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -78000000.0) tmp = t_2; elseif (z <= -8.2e-169) tmp = t_1; elseif (z <= 6.5e-136) tmp = x * (1.0 - ((z * a) / (y * x))); elseif (z <= 2.2e+29) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -78000000.0], t$95$2, If[LessEqual[z, -8.2e-169], t$95$1, If[LessEqual[z, 6.5e-136], N[(x * N[(1.0 - N[(N[(z * a), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+29], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(t - a\right)}{y - z \cdot \left(y - b\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -78000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-136}:\\
\;\;\;\;x \cdot \left(1 - \frac{z \cdot a}{y \cdot x}\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.8e7 or 2.2000000000000001e29 < z Initial program 37.2%
Taylor expanded in z around inf 78.8%
if -7.8e7 < z < -8.1999999999999996e-169 or 6.50000000000000011e-136 < z < 2.2000000000000001e29Initial program 90.6%
Taylor expanded in x around 0 65.8%
if -8.1999999999999996e-169 < z < 6.50000000000000011e-136Initial program 82.8%
Taylor expanded in t around 0 70.7%
+-commutative70.7%
mul-1-neg70.7%
unsub-neg70.7%
*-commutative70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in z around 0 58.8%
Taylor expanded in x around -inf 68.4%
associate-*r*68.4%
mul-1-neg68.4%
sub-neg68.4%
*-commutative68.4%
*-commutative68.4%
metadata-eval68.4%
Simplified68.4%
Final simplification71.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5e-64)
t_1
(if (<= z -2.3e-215)
(/ (* y x) (- y (* z (- y b))))
(if (<= z 9e-169)
(* a (- (/ x a) (/ z y)))
(if (<= z 7.5) (/ (- (+ t (/ (* y x) z)) a) 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-64) {
tmp = t_1;
} else if (z <= -2.3e-215) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 9e-169) {
tmp = a * ((x / a) - (z / y));
} else if (z <= 7.5) {
tmp = ((t + ((y * x) / z)) - a) / 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-64)) then
tmp = t_1
else if (z <= (-2.3d-215)) then
tmp = (y * x) / (y - (z * (y - b)))
else if (z <= 9d-169) then
tmp = a * ((x / a) - (z / y))
else if (z <= 7.5d0) then
tmp = ((t + ((y * x) / z)) - a) / 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-64) {
tmp = t_1;
} else if (z <= -2.3e-215) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 9e-169) {
tmp = a * ((x / a) - (z / y));
} else if (z <= 7.5) {
tmp = ((t + ((y * x) / z)) - a) / 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-64: tmp = t_1 elif z <= -2.3e-215: tmp = (y * x) / (y - (z * (y - b))) elif z <= 9e-169: tmp = a * ((x / a) - (z / y)) elif z <= 7.5: tmp = ((t + ((y * x) / z)) - a) / 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-64) tmp = t_1; elseif (z <= -2.3e-215) tmp = Float64(Float64(y * x) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 9e-169) tmp = Float64(a * Float64(Float64(x / a) - Float64(z / y))); elseif (z <= 7.5) tmp = Float64(Float64(Float64(t + Float64(Float64(y * x) / z)) - a) / 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-64) tmp = t_1; elseif (z <= -2.3e-215) tmp = (y * x) / (y - (z * (y - b))); elseif (z <= 9e-169) tmp = a * ((x / a) - (z / y)); elseif (z <= 7.5) tmp = ((t + ((y * x) / z)) - a) / 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-64], t$95$1, If[LessEqual[z, -2.3e-215], N[(N[(y * x), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-169], N[(a * N[(N[(x / a), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5], N[(N[(N[(t + N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-215}:\\
\;\;\;\;\frac{y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-169}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - \frac{z}{y}\right)\\
\mathbf{elif}\;z \leq 7.5:\\
\;\;\;\;\frac{\left(t + \frac{y \cdot x}{z}\right) - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.00000000000000033e-64 or 7.5 < z Initial program 45.1%
Taylor expanded in z around inf 77.5%
if -5.00000000000000033e-64 < z < -2.2999999999999999e-215Initial program 87.1%
Taylor expanded in x around inf 46.4%
*-commutative46.4%
Simplified46.4%
if -2.2999999999999999e-215 < z < 8.9999999999999997e-169Initial program 83.6%
Taylor expanded in t around 0 71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
*-commutative71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in z around 0 66.2%
Taylor expanded in a around inf 67.5%
if 8.9999999999999997e-169 < z < 7.5Initial program 90.4%
Taylor expanded in z around inf 46.7%
associate--r+46.7%
+-commutative46.7%
associate--l+46.7%
*-commutative46.7%
times-frac46.7%
div-sub46.7%
associate-/l*42.4%
Simplified42.4%
Taylor expanded in b around inf 50.7%
Final simplification66.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4e-64)
t_1
(if (<= z -1.12e-216)
(/ (* y x) (- y (* z (- y b))))
(if (<= z 1.48e-167)
(* a (- (/ x a) (/ z y)))
(if (<= z 6.5) (/ (- t (- a (* 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 <= -4e-64) {
tmp = t_1;
} else if (z <= -1.12e-216) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 1.48e-167) {
tmp = a * ((x / a) - (z / y));
} else if (z <= 6.5) {
tmp = (t - (a - (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 <= (-4d-64)) then
tmp = t_1
else if (z <= (-1.12d-216)) then
tmp = (y * x) / (y - (z * (y - b)))
else if (z <= 1.48d-167) then
tmp = a * ((x / a) - (z / y))
else if (z <= 6.5d0) then
tmp = (t - (a - (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 <= -4e-64) {
tmp = t_1;
} else if (z <= -1.12e-216) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 1.48e-167) {
tmp = a * ((x / a) - (z / y));
} else if (z <= 6.5) {
tmp = (t - (a - (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 <= -4e-64: tmp = t_1 elif z <= -1.12e-216: tmp = (y * x) / (y - (z * (y - b))) elif z <= 1.48e-167: tmp = a * ((x / a) - (z / y)) elif z <= 6.5: tmp = (t - (a - (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 <= -4e-64) tmp = t_1; elseif (z <= -1.12e-216) tmp = Float64(Float64(y * x) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 1.48e-167) tmp = Float64(a * Float64(Float64(x / a) - Float64(z / y))); elseif (z <= 6.5) tmp = Float64(Float64(t - Float64(a - Float64(x * Float64(y / 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 <= -4e-64) tmp = t_1; elseif (z <= -1.12e-216) tmp = (y * x) / (y - (z * (y - b))); elseif (z <= 1.48e-167) tmp = a * ((x / a) - (z / y)); elseif (z <= 6.5) tmp = (t - (a - (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, -4e-64], t$95$1, If[LessEqual[z, -1.12e-216], N[(N[(y * x), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.48e-167], N[(a * N[(N[(x / a), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5], N[(N[(t - N[(a - N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-216}:\\
\;\;\;\;\frac{y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 1.48 \cdot 10^{-167}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - \frac{z}{y}\right)\\
\mathbf{elif}\;z \leq 6.5:\\
\;\;\;\;\frac{t - \left(a - x \cdot \frac{y}{z}\right)}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.99999999999999986e-64 or 6.5 < z Initial program 45.1%
Taylor expanded in z around inf 77.5%
if -3.99999999999999986e-64 < z < -1.12e-216Initial program 87.1%
Taylor expanded in x around inf 46.4%
*-commutative46.4%
Simplified46.4%
if -1.12e-216 < z < 1.47999999999999999e-167Initial program 83.6%
Taylor expanded in t around 0 71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
*-commutative71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in z around 0 66.2%
Taylor expanded in a around inf 67.5%
if 1.47999999999999999e-167 < z < 6.5Initial program 90.4%
Taylor expanded in z around inf 46.7%
associate--r+46.7%
+-commutative46.7%
associate--l+46.7%
*-commutative46.7%
times-frac46.7%
div-sub46.7%
associate-/l*42.4%
Simplified42.4%
Taylor expanded in b around inf 50.7%
associate--l+50.7%
associate-/l*50.5%
Simplified50.5%
Final simplification66.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- y (* z (- y b)))) (t_2 (/ (- t a) (- b y))))
(if (<= z -4.6e-64)
t_2
(if (<= z 1.6e-138)
(/ (- (* y x) (* z a)) t_1)
(if (<= z 2.2e+29) (/ (* z (- t a)) t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y - (z * (y - b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.6e-64) {
tmp = t_2;
} else if (z <= 1.6e-138) {
tmp = ((y * x) - (z * a)) / t_1;
} else if (z <= 2.2e+29) {
tmp = (z * (t - a)) / 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 * (y - b))
t_2 = (t - a) / (b - y)
if (z <= (-4.6d-64)) then
tmp = t_2
else if (z <= 1.6d-138) then
tmp = ((y * x) - (z * a)) / t_1
else if (z <= 2.2d+29) then
tmp = (z * (t - a)) / 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 * (y - b));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.6e-64) {
tmp = t_2;
} else if (z <= 1.6e-138) {
tmp = ((y * x) - (z * a)) / t_1;
} else if (z <= 2.2e+29) {
tmp = (z * (t - a)) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y - (z * (y - b)) t_2 = (t - a) / (b - y) tmp = 0 if z <= -4.6e-64: tmp = t_2 elif z <= 1.6e-138: tmp = ((y * x) - (z * a)) / t_1 elif z <= 2.2e+29: tmp = (z * (t - a)) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y - Float64(z * Float64(y - b))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.6e-64) tmp = t_2; elseif (z <= 1.6e-138) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / t_1); elseif (z <= 2.2e+29) tmp = Float64(Float64(z * Float64(t - a)) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y - (z * (y - b)); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.6e-64) tmp = t_2; elseif (z <= 1.6e-138) tmp = ((y * x) - (z * a)) / t_1; elseif (z <= 2.2e+29) tmp = (z * (t - a)) / 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[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e-64], t$95$2, If[LessEqual[z, 1.6e-138], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 2.2e+29], N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \left(y - b\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-138}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{t\_1}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right)}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.6000000000000003e-64 or 2.2000000000000001e29 < z Initial program 42.2%
Taylor expanded in z around inf 77.6%
if -4.6000000000000003e-64 < z < 1.60000000000000005e-138Initial program 84.7%
Taylor expanded in t around 0 67.2%
+-commutative67.2%
mul-1-neg67.2%
unsub-neg67.2%
*-commutative67.2%
*-commutative67.2%
Simplified67.2%
if 1.60000000000000005e-138 < z < 2.2000000000000001e29Initial program 91.2%
Taylor expanded in x around 0 70.0%
Final simplification72.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.5e+42) (not (<= z 4.4e+63))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* y x)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.5e+42) || !(z <= 4.4e+63)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - 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 <= (-2.5d+42)) .or. (.not. (z <= 4.4d+63))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - 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 <= -2.5e+42) || !(z <= 4.4e+63)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.5e+42) or not (z <= 4.4e+63): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.5e+42) || !(z <= 4.4e+63)) 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(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.5e+42) || ~((z <= 4.4e+63))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (y * x)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.5e+42], N[Not[LessEqual[z, 4.4e+63]], $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[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+42} \lor \neg \left(z \leq 4.4 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -2.50000000000000003e42 or 4.3999999999999997e63 < z Initial program 32.1%
Taylor expanded in z around inf 80.8%
if -2.50000000000000003e42 < z < 4.3999999999999997e63Initial program 86.8%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-64) (not (<= z 1.55e-6))) (/ (- t a) (- b y)) (/ (+ (* y x) (* z t)) (- y (* z (- y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-64) || !(z <= 1.55e-6)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * t)) / (y - (z * (y - 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 <= (-6d-64)) .or. (.not. (z <= 1.55d-6))) then
tmp = (t - a) / (b - y)
else
tmp = ((y * x) + (z * t)) / (y - (z * (y - 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 <= -6e-64) || !(z <= 1.55e-6)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((y * x) + (z * t)) / (y - (z * (y - b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-64) or not (z <= 1.55e-6): tmp = (t - a) / (b - y) else: tmp = ((y * x) + (z * t)) / (y - (z * (y - b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-64) || !(z <= 1.55e-6)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / Float64(y - Float64(z * Float64(y - b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-64) || ~((z <= 1.55e-6))) tmp = (t - a) / (b - y); else tmp = ((y * x) + (z * t)) / (y - (z * (y - b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-64], N[Not[LessEqual[z, 1.55e-6]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-64} \lor \neg \left(z \leq 1.55 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y - z \cdot \left(y - b\right)}\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64 or 1.55e-6 < z Initial program 46.0%
Taylor expanded in z around inf 77.1%
if -6.0000000000000001e-64 < z < 1.55e-6Initial program 86.5%
Taylor expanded in t around inf 64.7%
Final simplification70.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5e-64)
t_1
(if (<= z -3.1e-216)
(/ (* y x) (- y (* z (- y b))))
(if (<= z 1.38e-167) (* a (- (/ x a) (/ z 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 <= -5e-64) {
tmp = t_1;
} else if (z <= -3.1e-216) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 1.38e-167) {
tmp = a * ((x / a) - (z / 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 <= (-5d-64)) then
tmp = t_1
else if (z <= (-3.1d-216)) then
tmp = (y * x) / (y - (z * (y - b)))
else if (z <= 1.38d-167) then
tmp = a * ((x / a) - (z / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -5e-64) {
tmp = t_1;
} else if (z <= -3.1e-216) {
tmp = (y * x) / (y - (z * (y - b)));
} else if (z <= 1.38e-167) {
tmp = a * ((x / a) - (z / 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 <= -5e-64: tmp = t_1 elif z <= -3.1e-216: tmp = (y * x) / (y - (z * (y - b))) elif z <= 1.38e-167: tmp = a * ((x / a) - (z / 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 <= -5e-64) tmp = t_1; elseif (z <= -3.1e-216) tmp = Float64(Float64(y * x) / Float64(y - Float64(z * Float64(y - b)))); elseif (z <= 1.38e-167) tmp = Float64(a * Float64(Float64(x / a) - Float64(z / 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 <= -5e-64) tmp = t_1; elseif (z <= -3.1e-216) tmp = (y * x) / (y - (z * (y - b))); elseif (z <= 1.38e-167) tmp = a * ((x / a) - (z / 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, -5e-64], t$95$1, If[LessEqual[z, -3.1e-216], N[(N[(y * x), $MachinePrecision] / N[(y - N[(z * N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.38e-167], N[(a * N[(N[(x / a), $MachinePrecision] - N[(z / y), $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^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-216}:\\
\;\;\;\;\frac{y \cdot x}{y - z \cdot \left(y - b\right)}\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{-167}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - \frac{z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.00000000000000033e-64 or 1.38e-167 < z Initial program 56.2%
Taylor expanded in z around inf 68.5%
if -5.00000000000000033e-64 < z < -3.1000000000000002e-216Initial program 87.1%
Taylor expanded in x around inf 46.4%
*-commutative46.4%
Simplified46.4%
if -3.1000000000000002e-216 < z < 1.38e-167Initial program 83.6%
Taylor expanded in t around 0 71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
*-commutative71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in z around 0 66.2%
Taylor expanded in a around inf 67.5%
Final simplification65.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5.6e-64)
t_1
(if (<= z -6.2e-216)
(/ (+ (* y x) (* z t)) y)
(if (<= z 4.45e-169) (* a (- (/ x a) (/ z 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 <= -5.6e-64) {
tmp = t_1;
} else if (z <= -6.2e-216) {
tmp = ((y * x) + (z * t)) / y;
} else if (z <= 4.45e-169) {
tmp = a * ((x / a) - (z / 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 <= (-5.6d-64)) then
tmp = t_1
else if (z <= (-6.2d-216)) then
tmp = ((y * x) + (z * t)) / y
else if (z <= 4.45d-169) then
tmp = a * ((x / a) - (z / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -5.6e-64) {
tmp = t_1;
} else if (z <= -6.2e-216) {
tmp = ((y * x) + (z * t)) / y;
} else if (z <= 4.45e-169) {
tmp = a * ((x / a) - (z / 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 <= -5.6e-64: tmp = t_1 elif z <= -6.2e-216: tmp = ((y * x) + (z * t)) / y elif z <= 4.45e-169: tmp = a * ((x / a) - (z / 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 <= -5.6e-64) tmp = t_1; elseif (z <= -6.2e-216) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / y); elseif (z <= 4.45e-169) tmp = Float64(a * Float64(Float64(x / a) - Float64(z / 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 <= -5.6e-64) tmp = t_1; elseif (z <= -6.2e-216) tmp = ((y * x) + (z * t)) / y; elseif (z <= 4.45e-169) tmp = a * ((x / a) - (z / 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, -5.6e-64], t$95$1, If[LessEqual[z, -6.2e-216], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 4.45e-169], N[(a * N[(N[(x / a), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-216}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y}\\
\mathbf{elif}\;z \leq 4.45 \cdot 10^{-169}:\\
\;\;\;\;a \cdot \left(\frac{x}{a} - \frac{z}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.60000000000000008e-64 or 4.44999999999999971e-169 < z Initial program 56.2%
Taylor expanded in z around inf 68.5%
if -5.60000000000000008e-64 < z < -6.2000000000000004e-216Initial program 87.1%
Taylor expanded in t around inf 70.9%
Taylor expanded in z around 0 44.6%
if -6.2000000000000004e-216 < z < 4.44999999999999971e-169Initial program 83.6%
Taylor expanded in t around 0 71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
*-commutative71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in z around 0 66.2%
Taylor expanded in a around inf 67.5%
Final simplification64.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -5.6e-64)
t_1
(if (<= z -7e-199)
(/ (+ (* y x) (* z t)) y)
(if (<= z 1.38e-167) (/ (- (* y x) (* z a)) 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 <= -5.6e-64) {
tmp = t_1;
} else if (z <= -7e-199) {
tmp = ((y * x) + (z * t)) / y;
} else if (z <= 1.38e-167) {
tmp = ((y * x) - (z * a)) / 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 <= (-5.6d-64)) then
tmp = t_1
else if (z <= (-7d-199)) then
tmp = ((y * x) + (z * t)) / y
else if (z <= 1.38d-167) then
tmp = ((y * x) - (z * a)) / 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 <= -5.6e-64) {
tmp = t_1;
} else if (z <= -7e-199) {
tmp = ((y * x) + (z * t)) / y;
} else if (z <= 1.38e-167) {
tmp = ((y * x) - (z * a)) / 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 <= -5.6e-64: tmp = t_1 elif z <= -7e-199: tmp = ((y * x) + (z * t)) / y elif z <= 1.38e-167: tmp = ((y * x) - (z * a)) / 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 <= -5.6e-64) tmp = t_1; elseif (z <= -7e-199) tmp = Float64(Float64(Float64(y * x) + Float64(z * t)) / y); elseif (z <= 1.38e-167) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / 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 <= -5.6e-64) tmp = t_1; elseif (z <= -7e-199) tmp = ((y * x) + (z * t)) / y; elseif (z <= 1.38e-167) tmp = ((y * x) - (z * a)) / 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, -5.6e-64], t$95$1, If[LessEqual[z, -7e-199], N[(N[(N[(y * x), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 1.38e-167], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-199}:\\
\;\;\;\;\frac{y \cdot x + z \cdot t}{y}\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{-167}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.60000000000000008e-64 or 1.38e-167 < z Initial program 56.2%
Taylor expanded in z around inf 68.5%
if -5.60000000000000008e-64 < z < -6.9999999999999998e-199Initial program 85.1%
Taylor expanded in t around inf 66.4%
Taylor expanded in z around 0 42.0%
if -6.9999999999999998e-199 < z < 1.38e-167Initial program 85.0%
Taylor expanded in t around 0 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
*-commutative74.3%
*-commutative74.3%
Simplified74.3%
Taylor expanded in z around 0 65.8%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.8e-64) (not (<= z 1.2e-43))) (/ (- t a) (- b y)) (* x (- 1.0 (/ (* z a) (* y x))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.8e-64) || !(z <= 1.2e-43)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (1.0 - ((z * a) / (y * 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 <= (-2.8d-64)) .or. (.not. (z <= 1.2d-43))) then
tmp = (t - a) / (b - y)
else
tmp = x * (1.0d0 - ((z * a) / (y * 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 <= -2.8e-64) || !(z <= 1.2e-43)) {
tmp = (t - a) / (b - y);
} else {
tmp = x * (1.0 - ((z * a) / (y * x)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.8e-64) or not (z <= 1.2e-43): tmp = (t - a) / (b - y) else: tmp = x * (1.0 - ((z * a) / (y * x))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.8e-64) || !(z <= 1.2e-43)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x * Float64(1.0 - Float64(Float64(z * a) / Float64(y * x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.8e-64) || ~((z <= 1.2e-43))) tmp = (t - a) / (b - y); else tmp = x * (1.0 - ((z * a) / (y * x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.8e-64], N[Not[LessEqual[z, 1.2e-43]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(N[(z * a), $MachinePrecision] / N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-64} \lor \neg \left(z \leq 1.2 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z \cdot a}{y \cdot x}\right)\\
\end{array}
\end{array}
if z < -2.80000000000000004e-64 or 1.2000000000000001e-43 < z Initial program 48.8%
Taylor expanded in z around inf 75.5%
if -2.80000000000000004e-64 < z < 1.2000000000000001e-43Initial program 85.8%
Taylor expanded in t around 0 63.7%
+-commutative63.7%
mul-1-neg63.7%
unsub-neg63.7%
*-commutative63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in z around 0 46.9%
Taylor expanded in x around -inf 56.7%
associate-*r*56.7%
mul-1-neg56.7%
sub-neg56.7%
*-commutative56.7%
*-commutative56.7%
metadata-eval56.7%
Simplified56.7%
Final simplification66.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.8e-32) x (if (<= y 8.8e-196) (/ t b) (if (<= y 0.000215) (/ a (- b)) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.8e-32) {
tmp = x;
} else if (y <= 8.8e-196) {
tmp = t / b;
} else if (y <= 0.000215) {
tmp = a / -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 <= (-1.8d-32)) then
tmp = x
else if (y <= 8.8d-196) then
tmp = t / b
else if (y <= 0.000215d0) then
tmp = a / -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 <= -1.8e-32) {
tmp = x;
} else if (y <= 8.8e-196) {
tmp = t / b;
} else if (y <= 0.000215) {
tmp = a / -b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.8e-32: tmp = x elif y <= 8.8e-196: tmp = t / b elif y <= 0.000215: tmp = a / -b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.8e-32) tmp = x; elseif (y <= 8.8e-196) tmp = Float64(t / b); elseif (y <= 0.000215) tmp = Float64(a / Float64(-b)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.8e-32) tmp = x; elseif (y <= 8.8e-196) tmp = t / b; elseif (y <= 0.000215) tmp = a / -b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.8e-32], x, If[LessEqual[y, 8.8e-196], N[(t / b), $MachinePrecision], If[LessEqual[y, 0.000215], N[(a / (-b)), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-32}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-196}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;y \leq 0.000215:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.79999999999999996e-32 or 2.14999999999999995e-4 < y Initial program 53.4%
Taylor expanded in z around 0 37.8%
if -1.79999999999999996e-32 < y < 8.8000000000000006e-196Initial program 80.2%
Taylor expanded in t around inf 53.7%
Taylor expanded in y around 0 43.8%
if 8.8000000000000006e-196 < y < 2.14999999999999995e-4Initial program 81.6%
Taylor expanded in t around 0 57.5%
+-commutative57.5%
mul-1-neg57.5%
unsub-neg57.5%
*-commutative57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in y around 0 33.4%
associate-*r/33.4%
mul-1-neg33.4%
Simplified33.4%
Final simplification39.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.8e-64) (not (<= z 8.5e-139))) (/ (- t a) (- b y)) (/ x (- 1.0 z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.8e-64) || !(z <= 8.5e-139)) {
tmp = (t - a) / (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 <= (-5.8d-64)) .or. (.not. (z <= 8.5d-139))) then
tmp = (t - a) / (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 <= -5.8e-64) || !(z <= 8.5e-139)) {
tmp = (t - a) / (b - y);
} else {
tmp = x / (1.0 - z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.8e-64) or not (z <= 8.5e-139): tmp = (t - a) / (b - y) else: tmp = x / (1.0 - z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.8e-64) || !(z <= 8.5e-139)) tmp = Float64(Float64(t - a) / 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 <= -5.8e-64) || ~((z <= 8.5e-139))) tmp = (t - a) / (b - y); else tmp = x / (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.8e-64], N[Not[LessEqual[z, 8.5e-139]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{-64} \lor \neg \left(z \leq 8.5 \cdot 10^{-139}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 - z}\\
\end{array}
\end{array}
if z < -5.7999999999999998e-64 or 8.5000000000000003e-139 < z Initial program 55.8%
Taylor expanded in z around inf 69.0%
if -5.7999999999999998e-64 < z < 8.5000000000000003e-139Initial program 84.7%
Taylor expanded in y around inf 51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
Final simplification62.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2e-32) (not (<= y 0.00035))) (/ 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 <= -2e-32) || !(y <= 0.00035)) {
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 <= (-2d-32)) .or. (.not. (y <= 0.00035d0))) 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 <= -2e-32) || !(y <= 0.00035)) {
tmp = x / (1.0 - z);
} else {
tmp = (t - a) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2e-32) or not (y <= 0.00035): 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 <= -2e-32) || !(y <= 0.00035)) 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 <= -2e-32) || ~((y <= 0.00035))) 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, -2e-32], N[Not[LessEqual[y, 0.00035]], $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 -2 \cdot 10^{-32} \lor \neg \left(y \leq 0.00035\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t - a}{b}\\
\end{array}
\end{array}
if y < -2.00000000000000011e-32 or 3.49999999999999996e-4 < y Initial program 53.4%
Taylor expanded in y around inf 49.9%
mul-1-neg49.9%
unsub-neg49.9%
Simplified49.9%
if -2.00000000000000011e-32 < y < 3.49999999999999996e-4Initial program 80.6%
Taylor expanded in y around 0 59.1%
Final simplification54.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.2e+38) (not (<= y 14000.0))) (/ 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 <= -5.2e+38) || !(y <= 14000.0)) {
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 <= (-5.2d+38)) .or. (.not. (y <= 14000.0d0))) 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 <= -5.2e+38) || !(y <= 14000.0)) {
tmp = x / (1.0 - z);
} else {
tmp = t / (b - y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.2e+38) or not (y <= 14000.0): 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 <= -5.2e+38) || !(y <= 14000.0)) 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 <= -5.2e+38) || ~((y <= 14000.0))) 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, -5.2e+38], N[Not[LessEqual[y, 14000.0]], $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 -5.2 \cdot 10^{+38} \lor \neg \left(y \leq 14000\right):\\
\;\;\;\;\frac{x}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b - y}\\
\end{array}
\end{array}
if y < -5.1999999999999998e38 or 14000 < y Initial program 52.7%
Taylor expanded in y around inf 54.7%
mul-1-neg54.7%
unsub-neg54.7%
Simplified54.7%
if -5.1999999999999998e38 < y < 14000Initial program 77.7%
Taylor expanded in t around inf 51.3%
Taylor expanded in z around inf 39.5%
Final simplification46.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-64) (not (<= z 1.05e-44))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-64) || !(z <= 1.05e-44)) {
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 <= (-6d-64)) .or. (.not. (z <= 1.05d-44))) 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 <= -6e-64) || !(z <= 1.05e-44)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-64) or not (z <= 1.05e-44): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-64) || !(z <= 1.05e-44)) 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 <= -6e-64) || ~((z <= 1.05e-44))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-64], N[Not[LessEqual[z, 1.05e-44]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-64} \lor \neg \left(z \leq 1.05 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.0000000000000001e-64 or 1.05000000000000001e-44 < z Initial program 48.8%
Taylor expanded in t around inf 33.9%
Taylor expanded in z around inf 42.8%
if -6.0000000000000001e-64 < z < 1.05000000000000001e-44Initial program 85.8%
Taylor expanded in z around 0 46.2%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e-32) x (if (<= y 4.4e-48) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e-32) {
tmp = x;
} else if (y <= 4.4e-48) {
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 <= (-1.7d-32)) then
tmp = x
else if (y <= 4.4d-48) 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 <= -1.7e-32) {
tmp = x;
} else if (y <= 4.4e-48) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e-32: tmp = x elif y <= 4.4e-48: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e-32) tmp = x; elseif (y <= 4.4e-48) 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 <= -1.7e-32) tmp = x; elseif (y <= 4.4e-48) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e-32], x, If[LessEqual[y, 4.4e-48], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-32}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-48}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.69999999999999989e-32 or 4.40000000000000025e-48 < y Initial program 54.4%
Taylor expanded in z around 0 35.6%
if -1.69999999999999989e-32 < y < 4.40000000000000025e-48Initial program 81.6%
Taylor expanded in t around inf 54.8%
Taylor expanded in y around 0 39.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.3%
Taylor expanded in z around 0 23.9%
(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 2024137
(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)))))