
(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 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (* x (+ (/ y t_1) (/ t_3 (* x t_1))))))
(if (<= z -9.5e+51)
t_2
(if (<= z -4.7e-105)
t_4
(if (<= z 2.9e-199)
(/ (+ t_3 (* x y)) t_1)
(if (<= z 90000.0)
t_4
(+
(+ t_2 (* (/ y z) (/ x (- b y))))
(* (/ y z) (/ (- a t) (pow (- b y) 2.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = x * ((y / t_1) + (t_3 / (x * t_1)));
double tmp;
if (z <= -9.5e+51) {
tmp = t_2;
} else if (z <= -4.7e-105) {
tmp = t_4;
} else if (z <= 2.9e-199) {
tmp = (t_3 + (x * y)) / t_1;
} else if (z <= 90000.0) {
tmp = t_4;
} else {
tmp = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / pow((b - y), 2.0)));
}
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) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
t_3 = z * (t - a)
t_4 = x * ((y / t_1) + (t_3 / (x * t_1)))
if (z <= (-9.5d+51)) then
tmp = t_2
else if (z <= (-4.7d-105)) then
tmp = t_4
else if (z <= 2.9d-199) then
tmp = (t_3 + (x * y)) / t_1
else if (z <= 90000.0d0) then
tmp = t_4
else
tmp = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / ((b - y) ** 2.0d0)))
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 t_3 = z * (t - a);
double t_4 = x * ((y / t_1) + (t_3 / (x * t_1)));
double tmp;
if (z <= -9.5e+51) {
tmp = t_2;
} else if (z <= -4.7e-105) {
tmp = t_4;
} else if (z <= 2.9e-199) {
tmp = (t_3 + (x * y)) / t_1;
} else if (z <= 90000.0) {
tmp = t_4;
} else {
tmp = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / Math.pow((b - y), 2.0)));
}
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) t_4 = x * ((y / t_1) + (t_3 / (x * t_1))) tmp = 0 if z <= -9.5e+51: tmp = t_2 elif z <= -4.7e-105: tmp = t_4 elif z <= 2.9e-199: tmp = (t_3 + (x * y)) / t_1 elif z <= 90000.0: tmp = t_4 else: tmp = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / math.pow((b - y), 2.0))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(x * Float64(Float64(y / t_1) + Float64(t_3 / Float64(x * t_1)))) tmp = 0.0 if (z <= -9.5e+51) tmp = t_2; elseif (z <= -4.7e-105) tmp = t_4; elseif (z <= 2.9e-199) tmp = Float64(Float64(t_3 + Float64(x * y)) / t_1); elseif (z <= 90000.0) tmp = t_4; else tmp = Float64(Float64(t_2 + Float64(Float64(y / z) * Float64(x / Float64(b - y)))) + Float64(Float64(y / z) * Float64(Float64(a - t) / (Float64(b - y) ^ 2.0)))); 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); t_4 = x * ((y / t_1) + (t_3 / (x * t_1))); tmp = 0.0; if (z <= -9.5e+51) tmp = t_2; elseif (z <= -4.7e-105) tmp = t_4; elseif (z <= 2.9e-199) tmp = (t_3 + (x * y)) / t_1; elseif (z <= 90000.0) tmp = t_4; else tmp = (t_2 + ((y / z) * (x / (b - y)))) + ((y / z) * ((a - t) / ((b - y) ^ 2.0))); 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$3 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e+51], t$95$2, If[LessEqual[z, -4.7e-105], t$95$4, If[LessEqual[z, 2.9e-199], N[(N[(t$95$3 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 90000.0], t$95$4, N[(N[(t$95$2 + N[(N[(y / z), $MachinePrecision] * N[(x / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / z), $MachinePrecision] * N[(N[(a - t), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := x \cdot \left(\frac{y}{t\_1} + \frac{t\_3}{x \cdot t\_1}\right)\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-105}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-199}:\\
\;\;\;\;\frac{t\_3 + x \cdot y}{t\_1}\\
\mathbf{elif}\;z \leq 90000:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\left(t\_2 + \frac{y}{z} \cdot \frac{x}{b - y}\right) + \frac{y}{z} \cdot \frac{a - t}{{\left(b - y\right)}^{2}}\\
\end{array}
\end{array}
if z < -9.4999999999999999e51Initial program 46.8%
Taylor expanded in z around inf 88.1%
if -9.4999999999999999e51 < z < -4.69999999999999986e-105 or 2.9e-199 < z < 9e4Initial program 78.7%
Taylor expanded in x around inf 92.5%
if -4.69999999999999986e-105 < z < 2.9e-199Initial program 95.6%
if 9e4 < z Initial program 32.8%
Taylor expanded in z around inf 58.5%
associate--r+58.5%
+-commutative58.5%
associate--l+58.5%
*-commutative58.5%
times-frac61.0%
div-sub61.0%
times-frac95.0%
Simplified95.0%
Final simplification93.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y)))))
(if (or (<= z -2.45e+33) (not (<= z 90000.0)))
(+
(/ (- (* x (/ y (- b y))) (* y (/ (- t a) (pow (- b y) 2.0)))) z)
(/ (- 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 <= -2.45e+33) || !(z <= 90000.0)) {
tmp = (((x * (y / (b - y))) - (y * ((t - a) / pow((b - y), 2.0)))) / z) + ((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 <= (-2.45d+33)) .or. (.not. (z <= 90000.0d0))) then
tmp = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ** 2.0d0)))) / z) + ((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 <= -2.45e+33) || !(z <= 90000.0)) {
tmp = (((x * (y / (b - y))) - (y * ((t - a) / Math.pow((b - y), 2.0)))) / z) + ((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 <= -2.45e+33) or not (z <= 90000.0): tmp = (((x * (y / (b - y))) - (y * ((t - a) / math.pow((b - y), 2.0)))) / z) + ((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 <= -2.45e+33) || !(z <= 90000.0)) tmp = Float64(Float64(Float64(Float64(x * Float64(y / Float64(b - y))) - Float64(y * Float64(Float64(t - a) / (Float64(b - y) ^ 2.0)))) / z) + 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 <= -2.45e+33) || ~((z <= 90000.0))) tmp = (((x * (y / (b - y))) - (y * ((t - a) / ((b - y) ^ 2.0)))) / z) + ((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, -2.45e+33], N[Not[LessEqual[z, 90000.0]], $MachinePrecision]], N[(N[(N[(N[(x * N[(y / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(t - a), $MachinePrecision] / N[Power[N[(b - y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
\mathbf{if}\;z \leq -2.45 \cdot 10^{+33} \lor \neg \left(z \leq 90000\right):\\
\;\;\;\;\frac{x \cdot \frac{y}{b - y} - y \cdot \frac{t - a}{{\left(b - y\right)}^{2}}}{z} + \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 < -2.45000000000000007e33 or 9e4 < z Initial program 39.3%
Taylor expanded in z around -inf 66.9%
associate--l+66.9%
mul-1-neg66.9%
distribute-lft-out--66.9%
associate-/l*71.9%
associate-/l*95.0%
div-sub95.0%
Simplified95.0%
if -2.45000000000000007e33 < z < 9e4Initial program 87.9%
Taylor expanded in x around inf 90.8%
Final simplification92.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* z (- b y))))
(t_2 (/ (- t a) (- b y)))
(t_3 (* z (- t a)))
(t_4 (* x (+ (/ y t_1) (/ t_3 (* x t_1))))))
(if (<= z -1.7e+52)
t_2
(if (<= z -1.1e-103)
t_4
(if (<= z 6.5e-196)
(/ (+ t_3 (* x y)) t_1)
(if (<= z 3.4e+22) t_4 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (z * (b - y));
double t_2 = (t - a) / (b - y);
double t_3 = z * (t - a);
double t_4 = x * ((y / t_1) + (t_3 / (x * t_1)));
double tmp;
if (z <= -1.7e+52) {
tmp = t_2;
} else if (z <= -1.1e-103) {
tmp = t_4;
} else if (z <= 6.5e-196) {
tmp = (t_3 + (x * y)) / t_1;
} else if (z <= 3.4e+22) {
tmp = t_4;
} 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (z * (b - y))
t_2 = (t - a) / (b - y)
t_3 = z * (t - a)
t_4 = x * ((y / t_1) + (t_3 / (x * t_1)))
if (z <= (-1.7d+52)) then
tmp = t_2
else if (z <= (-1.1d-103)) then
tmp = t_4
else if (z <= 6.5d-196) then
tmp = (t_3 + (x * y)) / t_1
else if (z <= 3.4d+22) then
tmp = t_4
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 t_3 = z * (t - a);
double t_4 = x * ((y / t_1) + (t_3 / (x * t_1)));
double tmp;
if (z <= -1.7e+52) {
tmp = t_2;
} else if (z <= -1.1e-103) {
tmp = t_4;
} else if (z <= 6.5e-196) {
tmp = (t_3 + (x * y)) / t_1;
} else if (z <= 3.4e+22) {
tmp = t_4;
} 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) t_4 = x * ((y / t_1) + (t_3 / (x * t_1))) tmp = 0 if z <= -1.7e+52: tmp = t_2 elif z <= -1.1e-103: tmp = t_4 elif z <= 6.5e-196: tmp = (t_3 + (x * y)) / t_1 elif z <= 3.4e+22: tmp = t_4 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(z * Float64(b - y))) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(z * Float64(t - a)) t_4 = Float64(x * Float64(Float64(y / t_1) + Float64(t_3 / Float64(x * t_1)))) tmp = 0.0 if (z <= -1.7e+52) tmp = t_2; elseif (z <= -1.1e-103) tmp = t_4; elseif (z <= 6.5e-196) tmp = Float64(Float64(t_3 + Float64(x * y)) / t_1); elseif (z <= 3.4e+22) tmp = t_4; 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); t_4 = x * ((y / t_1) + (t_3 / (x * t_1))); tmp = 0.0; if (z <= -1.7e+52) tmp = t_2; elseif (z <= -1.1e-103) tmp = t_4; elseif (z <= 6.5e-196) tmp = (t_3 + (x * y)) / t_1; elseif (z <= 3.4e+22) tmp = t_4; 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[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(y / t$95$1), $MachinePrecision] + N[(t$95$3 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+52], t$95$2, If[LessEqual[z, -1.1e-103], t$95$4, If[LessEqual[z, 6.5e-196], N[(N[(t$95$3 + N[(x * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[z, 3.4e+22], t$95$4, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \left(b - y\right)\\
t_2 := \frac{t - a}{b - y}\\
t_3 := z \cdot \left(t - a\right)\\
t_4 := x \cdot \left(\frac{y}{t\_1} + \frac{t\_3}{x \cdot t\_1}\right)\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-103}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-196}:\\
\;\;\;\;\frac{t\_3 + x \cdot y}{t\_1}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+22}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.7e52 or 3.4e22 < z Initial program 37.7%
Taylor expanded in z around inf 86.6%
if -1.7e52 < z < -1.1e-103 or 6.5000000000000004e-196 < z < 3.4e22Initial program 78.6%
Taylor expanded in x around inf 91.7%
if -1.1e-103 < z < 6.5000000000000004e-196Initial program 95.6%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* x y) (* z t)) (+ y (* z (- b y)))))
(t_2 (/ (- t a) (- b y))))
(if (<= z -1.5e+20)
t_2
(if (<= z 5.8e-71)
t_1
(if (<= z 3.4e-34) (- x (/ (* z a) y)) (if (<= z 0.0021) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x * y) + (z * t)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.5e+20) {
tmp = t_2;
} else if (z <= 5.8e-71) {
tmp = t_1;
} else if (z <= 3.4e-34) {
tmp = x - ((z * a) / y);
} else if (z <= 0.0021) {
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 = ((x * y) + (z * t)) / (y + (z * (b - y)))
t_2 = (t - a) / (b - y)
if (z <= (-1.5d+20)) then
tmp = t_2
else if (z <= 5.8d-71) then
tmp = t_1
else if (z <= 3.4d-34) then
tmp = x - ((z * a) / y)
else if (z <= 0.0021d0) 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 = ((x * y) + (z * t)) / (y + (z * (b - y)));
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -1.5e+20) {
tmp = t_2;
} else if (z <= 5.8e-71) {
tmp = t_1;
} else if (z <= 3.4e-34) {
tmp = x - ((z * a) / y);
} else if (z <= 0.0021) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x * y) + (z * t)) / (y + (z * (b - y))) t_2 = (t - a) / (b - y) tmp = 0 if z <= -1.5e+20: tmp = t_2 elif z <= 5.8e-71: tmp = t_1 elif z <= 3.4e-34: tmp = x - ((z * a) / y) elif z <= 0.0021: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x * y) + Float64(z * t)) / Float64(y + Float64(z * Float64(b - y)))) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.5e+20) tmp = t_2; elseif (z <= 5.8e-71) tmp = t_1; elseif (z <= 3.4e-34) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 0.0021) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x * y) + (z * t)) / (y + (z * (b - y))); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.5e+20) tmp = t_2; elseif (z <= 5.8e-71) tmp = t_1; elseif (z <= 3.4e-34) tmp = x - ((z * a) / y); elseif (z <= 0.0021) 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[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+20], t$95$2, If[LessEqual[z, 5.8e-71], t$95$1, If[LessEqual[z, 3.4e-34], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0021], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot y + z \cdot t}{y + z \cdot \left(b - y\right)}\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-34}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 0.0021:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.5e20 or 0.00209999999999999987 < z Initial program 42.8%
Taylor expanded in z around inf 85.1%
if -1.5e20 < z < 5.7999999999999997e-71 or 3.4000000000000001e-34 < z < 0.00209999999999999987Initial program 88.8%
Taylor expanded in a around 0 74.0%
if 5.7999999999999997e-71 < z < 3.4000000000000001e-34Initial program 54.4%
Taylor expanded in z around 0 37.4%
Taylor expanded in a around inf 100.0%
mul-1-neg100.0%
associate-/l*99.7%
Simplified99.7%
unsub-neg99.7%
associate-*r/100.0%
*-commutative100.0%
Applied egg-rr100.0%
Final simplification80.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (- t a)) (* x y))) (t_2 (/ (- t a) (- b y))))
(if (<= z -4.1e-79)
t_2
(if (<= z 5.6e-211)
(/ t_1 y)
(if (<= z 3.3e-175)
(/ t_1 (* z b))
(if (<= z 1.7e-5) (+ x (* t (/ z y))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (t - a)) + (x * y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.1e-79) {
tmp = t_2;
} else if (z <= 5.6e-211) {
tmp = t_1 / y;
} else if (z <= 3.3e-175) {
tmp = t_1 / (z * b);
} else if (z <= 1.7e-5) {
tmp = x + (t * (z / y));
} 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)) + (x * y)
t_2 = (t - a) / (b - y)
if (z <= (-4.1d-79)) then
tmp = t_2
else if (z <= 5.6d-211) then
tmp = t_1 / y
else if (z <= 3.3d-175) then
tmp = t_1 / (z * b)
else if (z <= 1.7d-5) then
tmp = x + (t * (z / y))
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)) + (x * y);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -4.1e-79) {
tmp = t_2;
} else if (z <= 5.6e-211) {
tmp = t_1 / y;
} else if (z <= 3.3e-175) {
tmp = t_1 / (z * b);
} else if (z <= 1.7e-5) {
tmp = x + (t * (z / y));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (t - a)) + (x * y) t_2 = (t - a) / (b - y) tmp = 0 if z <= -4.1e-79: tmp = t_2 elif z <= 5.6e-211: tmp = t_1 / y elif z <= 3.3e-175: tmp = t_1 / (z * b) elif z <= 1.7e-5: tmp = x + (t * (z / y)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(t - a)) + Float64(x * y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -4.1e-79) tmp = t_2; elseif (z <= 5.6e-211) tmp = Float64(t_1 / y); elseif (z <= 3.3e-175) tmp = Float64(t_1 / Float64(z * b)); elseif (z <= 1.7e-5) tmp = Float64(x + Float64(t * Float64(z / y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (t - a)) + (x * y); t_2 = (t - a) / (b - y); tmp = 0.0; if (z <= -4.1e-79) tmp = t_2; elseif (z <= 5.6e-211) tmp = t_1 / y; elseif (z <= 3.3e-175) tmp = t_1 / (z * b); elseif (z <= 1.7e-5) tmp = x + (t * (z / y)); 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[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e-79], t$95$2, If[LessEqual[z, 5.6e-211], N[(t$95$1 / y), $MachinePrecision], If[LessEqual[z, 3.3e-175], N[(t$95$1 / N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-5], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right) + x \cdot y\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{-79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-211}:\\
\;\;\;\;\frac{t\_1}{y}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-175}:\\
\;\;\;\;\frac{t\_1}{z \cdot b}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-5}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.09999999999999994e-79 or 1.7e-5 < z Initial program 48.1%
Taylor expanded in z around inf 79.4%
if -4.09999999999999994e-79 < z < 5.5999999999999996e-211Initial program 92.0%
Taylor expanded in z around 0 70.3%
if 5.5999999999999996e-211 < z < 3.29999999999999999e-175Initial program 89.3%
Taylor expanded in y around 0 78.6%
*-commutative78.6%
Simplified78.6%
if 3.29999999999999999e-175 < z < 1.7e-5Initial program 82.5%
Taylor expanded in z around 0 57.8%
Taylor expanded in x around inf 72.1%
Taylor expanded in t around inf 68.2%
associate-/l*65.2%
Simplified65.2%
Final simplification75.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.7e-42)
t_1
(if (<= z 1.1e-226)
(- x (/ (* z a) y))
(if (<= z 9e-153)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z 1.5e-9) (+ x (* t (/ 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 <= -1.7e-42) {
tmp = t_1;
} else if (z <= 1.1e-226) {
tmp = x - ((z * a) / y);
} else if (z <= 9e-153) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 1.5e-9) {
tmp = x + (t * (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 <= (-1.7d-42)) then
tmp = t_1
else if (z <= 1.1d-226) then
tmp = x - ((z * a) / y)
else if (z <= 9d-153) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= 1.5d-9) then
tmp = x + (t * (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 <= -1.7e-42) {
tmp = t_1;
} else if (z <= 1.1e-226) {
tmp = x - ((z * a) / y);
} else if (z <= 9e-153) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 1.5e-9) {
tmp = x + (t * (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 <= -1.7e-42: tmp = t_1 elif z <= 1.1e-226: tmp = x - ((z * a) / y) elif z <= 9e-153: tmp = (x * y) / (y + (z * (b - y))) elif z <= 1.5e-9: tmp = x + (t * (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 <= -1.7e-42) tmp = t_1; elseif (z <= 1.1e-226) tmp = Float64(x - Float64(Float64(z * a) / y)); elseif (z <= 9e-153) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 1.5e-9) tmp = Float64(x + Float64(t * 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 <= -1.7e-42) tmp = t_1; elseif (z <= 1.1e-226) tmp = x - ((z * a) / y); elseif (z <= 9e-153) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= 1.5e-9) tmp = x + (t * (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, -1.7e-42], t$95$1, If[LessEqual[z, 1.1e-226], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-153], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e-9], N[(x + N[(t * 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 -1.7 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-226}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-153}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.70000000000000011e-42 or 1.49999999999999999e-9 < z Initial program 46.5%
Taylor expanded in z around inf 82.1%
if -1.70000000000000011e-42 < z < 1.1e-226Initial program 88.7%
Taylor expanded in z around 0 51.9%
Taylor expanded in a around inf 63.4%
mul-1-neg63.4%
associate-/l*62.5%
Simplified62.5%
unsub-neg62.5%
associate-*r/63.4%
*-commutative63.4%
Applied egg-rr63.4%
if 1.1e-226 < z < 9e-153Initial program 94.7%
Taylor expanded in x around inf 62.5%
*-commutative62.5%
Simplified62.5%
if 9e-153 < z < 1.49999999999999999e-9Initial program 80.0%
Taylor expanded in z around 0 51.9%
Taylor expanded in x around inf 71.6%
Taylor expanded in t around inf 68.1%
associate-/l*68.1%
Simplified68.1%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -4.1e-79)
t_1
(if (<= z 1e-218)
(/ (+ (* z (- t a)) (* x y)) y)
(if (<= z 3.3e-175)
(/ (* x y) (+ y (* z (- b y))))
(if (<= z 4e-9) (+ x (* t (/ 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 <= -4.1e-79) {
tmp = t_1;
} else if (z <= 1e-218) {
tmp = ((z * (t - a)) + (x * y)) / y;
} else if (z <= 3.3e-175) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 4e-9) {
tmp = x + (t * (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 <= (-4.1d-79)) then
tmp = t_1
else if (z <= 1d-218) then
tmp = ((z * (t - a)) + (x * y)) / y
else if (z <= 3.3d-175) then
tmp = (x * y) / (y + (z * (b - y)))
else if (z <= 4d-9) then
tmp = x + (t * (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 <= -4.1e-79) {
tmp = t_1;
} else if (z <= 1e-218) {
tmp = ((z * (t - a)) + (x * y)) / y;
} else if (z <= 3.3e-175) {
tmp = (x * y) / (y + (z * (b - y)));
} else if (z <= 4e-9) {
tmp = x + (t * (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 <= -4.1e-79: tmp = t_1 elif z <= 1e-218: tmp = ((z * (t - a)) + (x * y)) / y elif z <= 3.3e-175: tmp = (x * y) / (y + (z * (b - y))) elif z <= 4e-9: tmp = x + (t * (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 <= -4.1e-79) tmp = t_1; elseif (z <= 1e-218) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / y); elseif (z <= 3.3e-175) tmp = Float64(Float64(x * y) / Float64(y + Float64(z * Float64(b - y)))); elseif (z <= 4e-9) tmp = Float64(x + Float64(t * 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 <= -4.1e-79) tmp = t_1; elseif (z <= 1e-218) tmp = ((z * (t - a)) + (x * y)) / y; elseif (z <= 3.3e-175) tmp = (x * y) / (y + (z * (b - y))); elseif (z <= 4e-9) tmp = x + (t * (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, -4.1e-79], t$95$1, If[LessEqual[z, 1e-218], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.3e-175], N[(N[(x * y), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e-9], N[(x + N[(t * 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 -4.1 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-218}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-175}:\\
\;\;\;\;\frac{x \cdot y}{y + z \cdot \left(b - y\right)}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-9}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.09999999999999994e-79 or 4.00000000000000025e-9 < z Initial program 48.1%
Taylor expanded in z around inf 79.4%
if -4.09999999999999994e-79 < z < 1e-218Initial program 91.8%
Taylor expanded in z around 0 70.8%
if 1e-218 < z < 3.29999999999999999e-175Initial program 91.3%
Taylor expanded in x around inf 64.7%
*-commutative64.7%
Simplified64.7%
if 3.29999999999999999e-175 < z < 4.00000000000000025e-9Initial program 82.5%
Taylor expanded in z around 0 57.8%
Taylor expanded in x around inf 72.1%
Taylor expanded in t around inf 68.2%
associate-/l*65.2%
Simplified65.2%
Final simplification74.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.1e+31) (not (<= z 9e+20))) (/ (- t a) (- b y)) (/ (+ (* z (- t a)) (* x y)) (+ y (* z (- b y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.1e+31) || !(z <= 9e+20)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (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 <= (-3.1d+31)) .or. (.not. (z <= 9d+20))) then
tmp = (t - a) / (b - y)
else
tmp = ((z * (t - a)) + (x * y)) / (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 <= -3.1e+31) || !(z <= 9e+20)) {
tmp = (t - a) / (b - y);
} else {
tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.1e+31) or not (z <= 9e+20): tmp = (t - a) / (b - y) else: tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.1e+31) || !(z <= 9e+20)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(x * y)) / 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 <= -3.1e+31) || ~((z <= 9e+20))) tmp = (t - a) / (b - y); else tmp = ((z * (t - a)) + (x * y)) / (y + (z * (b - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.1e+31], N[Not[LessEqual[z, 9e+20]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+31} \lor \neg \left(z \leq 9 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + x \cdot y}{y + z \cdot \left(b - y\right)}\\
\end{array}
\end{array}
if z < -3.1000000000000002e31 or 9e20 < z Initial program 39.6%
Taylor expanded in z around inf 85.9%
if -3.1000000000000002e31 < z < 9e20Initial program 87.3%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ t (- b y))) (t_2 (/ x (- 1.0 z))))
(if (<= y -1e+98)
t_2
(if (<= y -3.1e-273)
t_1
(if (<= y 1.52e-148) (/ a (- b)) (if (<= y 6.4e+60) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1e+98) {
tmp = t_2;
} else if (y <= -3.1e-273) {
tmp = t_1;
} else if (y <= 1.52e-148) {
tmp = a / -b;
} else if (y <= 6.4e+60) {
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 = t / (b - y)
t_2 = x / (1.0d0 - z)
if (y <= (-1d+98)) then
tmp = t_2
else if (y <= (-3.1d-273)) then
tmp = t_1
else if (y <= 1.52d-148) then
tmp = a / -b
else if (y <= 6.4d+60) 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 = t / (b - y);
double t_2 = x / (1.0 - z);
double tmp;
if (y <= -1e+98) {
tmp = t_2;
} else if (y <= -3.1e-273) {
tmp = t_1;
} else if (y <= 1.52e-148) {
tmp = a / -b;
} else if (y <= 6.4e+60) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t / (b - y) t_2 = x / (1.0 - z) tmp = 0 if y <= -1e+98: tmp = t_2 elif y <= -3.1e-273: tmp = t_1 elif y <= 1.52e-148: tmp = a / -b elif y <= 6.4e+60: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t / Float64(b - y)) t_2 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1e+98) tmp = t_2; elseif (y <= -3.1e-273) tmp = t_1; elseif (y <= 1.52e-148) tmp = Float64(a / Float64(-b)); elseif (y <= 6.4e+60) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t / (b - y); t_2 = x / (1.0 - z); tmp = 0.0; if (y <= -1e+98) tmp = t_2; elseif (y <= -3.1e-273) tmp = t_1; elseif (y <= 1.52e-148) tmp = a / -b; elseif (y <= 6.4e+60) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+98], t$95$2, If[LessEqual[y, -3.1e-273], t$95$1, If[LessEqual[y, 1.52e-148], N[(a / (-b)), $MachinePrecision], If[LessEqual[y, 6.4e+60], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{b - y}\\
t_2 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+98}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-148}:\\
\;\;\;\;\frac{a}{-b}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -9.99999999999999998e97 or 6.39999999999999982e60 < y Initial program 50.2%
Taylor expanded in y around inf 63.0%
mul-1-neg63.0%
unsub-neg63.0%
Simplified63.0%
if -9.99999999999999998e97 < y < -3.09999999999999988e-273 or 1.52000000000000002e-148 < y < 6.39999999999999982e60Initial program 78.6%
Taylor expanded in t around inf 33.5%
*-commutative33.5%
Simplified33.5%
Taylor expanded in z around inf 32.9%
if -3.09999999999999988e-273 < y < 1.52000000000000002e-148Initial program 67.7%
Taylor expanded in a around inf 38.2%
mul-1-neg38.2%
distribute-rgt-neg-in38.2%
Simplified38.2%
Taylor expanded in y around 0 55.9%
associate-*r/55.9%
neg-mul-155.9%
Simplified55.9%
Final simplification47.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.1e+97)
t_1
(if (<= y -490000000.0)
(/ t (- b y))
(if (<= y -1.8e-35) x (if (<= y 1.35e+19) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.1e+97) {
tmp = t_1;
} else if (y <= -490000000.0) {
tmp = t / (b - y);
} else if (y <= -1.8e-35) {
tmp = x;
} else if (y <= 1.35e+19) {
tmp = (t - 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 = x / (1.0d0 - z)
if (y <= (-3.1d+97)) then
tmp = t_1
else if (y <= (-490000000.0d0)) then
tmp = t / (b - y)
else if (y <= (-1.8d-35)) then
tmp = x
else if (y <= 1.35d+19) then
tmp = (t - 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 = x / (1.0 - z);
double tmp;
if (y <= -3.1e+97) {
tmp = t_1;
} else if (y <= -490000000.0) {
tmp = t / (b - y);
} else if (y <= -1.8e-35) {
tmp = x;
} else if (y <= 1.35e+19) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.1e+97: tmp = t_1 elif y <= -490000000.0: tmp = t / (b - y) elif y <= -1.8e-35: tmp = x elif y <= 1.35e+19: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.1e+97) tmp = t_1; elseif (y <= -490000000.0) tmp = Float64(t / Float64(b - y)); elseif (y <= -1.8e-35) tmp = x; elseif (y <= 1.35e+19) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.1e+97) tmp = t_1; elseif (y <= -490000000.0) tmp = t / (b - y); elseif (y <= -1.8e-35) tmp = x; elseif (y <= 1.35e+19) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+97], t$95$1, If[LessEqual[y, -490000000.0], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.8e-35], x, If[LessEqual[y, 1.35e+19], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -490000000:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-35}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+19}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.09999999999999981e97 or 1.35e19 < y Initial program 52.1%
Taylor expanded in y around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
if -3.09999999999999981e97 < y < -4.9e8Initial program 69.9%
Taylor expanded in t around inf 36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in z around inf 47.1%
if -4.9e8 < y < -1.80000000000000009e-35Initial program 79.9%
Taylor expanded in z around 0 31.9%
if -1.80000000000000009e-35 < y < 1.35e19Initial program 77.7%
Taylor expanded in y around 0 59.6%
Final simplification56.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -3.1e+97)
t_1
(if (<= y -2.3e+15)
(/ t (- b y))
(if (<= y -1.3e-35)
(/ a (- y b))
(if (<= y 3.5e+18) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -3.1e+97) {
tmp = t_1;
} else if (y <= -2.3e+15) {
tmp = t / (b - y);
} else if (y <= -1.3e-35) {
tmp = a / (y - b);
} else if (y <= 3.5e+18) {
tmp = (t - 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 = x / (1.0d0 - z)
if (y <= (-3.1d+97)) then
tmp = t_1
else if (y <= (-2.3d+15)) then
tmp = t / (b - y)
else if (y <= (-1.3d-35)) then
tmp = a / (y - b)
else if (y <= 3.5d+18) then
tmp = (t - 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 = x / (1.0 - z);
double tmp;
if (y <= -3.1e+97) {
tmp = t_1;
} else if (y <= -2.3e+15) {
tmp = t / (b - y);
} else if (y <= -1.3e-35) {
tmp = a / (y - b);
} else if (y <= 3.5e+18) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -3.1e+97: tmp = t_1 elif y <= -2.3e+15: tmp = t / (b - y) elif y <= -1.3e-35: tmp = a / (y - b) elif y <= 3.5e+18: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -3.1e+97) tmp = t_1; elseif (y <= -2.3e+15) tmp = Float64(t / Float64(b - y)); elseif (y <= -1.3e-35) tmp = Float64(a / Float64(y - b)); elseif (y <= 3.5e+18) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -3.1e+97) tmp = t_1; elseif (y <= -2.3e+15) tmp = t / (b - y); elseif (y <= -1.3e-35) tmp = a / (y - b); elseif (y <= 3.5e+18) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+97], t$95$1, If[LessEqual[y, -2.3e+15], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.3e-35], N[(a / N[(y - b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+18], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-35}:\\
\;\;\;\;\frac{a}{y - b}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.09999999999999981e97 or 3.5e18 < y Initial program 52.1%
Taylor expanded in y around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
if -3.09999999999999981e97 < y < -2.3e15Initial program 68.0%
Taylor expanded in t around inf 38.7%
*-commutative38.7%
Simplified38.7%
Taylor expanded in z around inf 49.9%
if -2.3e15 < y < -1.30000000000000002e-35Initial program 81.2%
Taylor expanded in a around inf 22.6%
mul-1-neg22.6%
distribute-rgt-neg-in22.6%
Simplified22.6%
Taylor expanded in z around inf 35.1%
associate-*r/35.1%
neg-mul-135.1%
Simplified35.1%
if -1.30000000000000002e-35 < y < 3.5e18Initial program 77.7%
Taylor expanded in y around 0 59.6%
Final simplification57.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (- 1.0 z))))
(if (<= y -1.05e+98)
t_1
(if (<= y -140000000.0)
(/ t (- b y))
(if (<= y -1.4e-35)
(+ x (* t (/ z y)))
(if (<= y 2.1e+19) (/ (- t a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -1.05e+98) {
tmp = t_1;
} else if (y <= -140000000.0) {
tmp = t / (b - y);
} else if (y <= -1.4e-35) {
tmp = x + (t * (z / y));
} else if (y <= 2.1e+19) {
tmp = (t - 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 = x / (1.0d0 - z)
if (y <= (-1.05d+98)) then
tmp = t_1
else if (y <= (-140000000.0d0)) then
tmp = t / (b - y)
else if (y <= (-1.4d-35)) then
tmp = x + (t * (z / y))
else if (y <= 2.1d+19) then
tmp = (t - 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 = x / (1.0 - z);
double tmp;
if (y <= -1.05e+98) {
tmp = t_1;
} else if (y <= -140000000.0) {
tmp = t / (b - y);
} else if (y <= -1.4e-35) {
tmp = x + (t * (z / y));
} else if (y <= 2.1e+19) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -1.05e+98: tmp = t_1 elif y <= -140000000.0: tmp = t / (b - y) elif y <= -1.4e-35: tmp = x + (t * (z / y)) elif y <= 2.1e+19: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -1.05e+98) tmp = t_1; elseif (y <= -140000000.0) tmp = Float64(t / Float64(b - y)); elseif (y <= -1.4e-35) tmp = Float64(x + Float64(t * Float64(z / y))); elseif (y <= 2.1e+19) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -1.05e+98) tmp = t_1; elseif (y <= -140000000.0) tmp = t / (b - y); elseif (y <= -1.4e-35) tmp = x + (t * (z / y)); elseif (y <= 2.1e+19) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+98], t$95$1, If[LessEqual[y, -140000000.0], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-35], N[(x + N[(t * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+19], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -140000000:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-35}:\\
\;\;\;\;x + t \cdot \frac{z}{y}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+19}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.05000000000000002e98 or 2.1e19 < y Initial program 52.1%
Taylor expanded in y around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
if -1.05000000000000002e98 < y < -1.4e8Initial program 69.9%
Taylor expanded in t around inf 36.5%
*-commutative36.5%
Simplified36.5%
Taylor expanded in z around inf 47.1%
if -1.4e8 < y < -1.4e-35Initial program 79.9%
Taylor expanded in z around 0 38.3%
Taylor expanded in x around inf 38.2%
Taylor expanded in t around inf 37.9%
associate-/l*37.9%
Simplified37.9%
if -1.4e-35 < y < 2.1e19Initial program 77.7%
Taylor expanded in y around 0 59.6%
Final simplification57.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (- b))))
(if (<= z -1.4e+51)
t_1
(if (<= z -8e-41) (/ t b) (if (<= z 1.3e-27) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / -b;
double tmp;
if (z <= -1.4e+51) {
tmp = t_1;
} else if (z <= -8e-41) {
tmp = t / b;
} else if (z <= 1.3e-27) {
tmp = x;
} 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 = a / -b
if (z <= (-1.4d+51)) then
tmp = t_1
else if (z <= (-8d-41)) then
tmp = t / b
else if (z <= 1.3d-27) then
tmp = x
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 = a / -b;
double tmp;
if (z <= -1.4e+51) {
tmp = t_1;
} else if (z <= -8e-41) {
tmp = t / b;
} else if (z <= 1.3e-27) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / -b tmp = 0 if z <= -1.4e+51: tmp = t_1 elif z <= -8e-41: tmp = t / b elif z <= 1.3e-27: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(-b)) tmp = 0.0 if (z <= -1.4e+51) tmp = t_1; elseif (z <= -8e-41) tmp = Float64(t / b); elseif (z <= 1.3e-27) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / -b; tmp = 0.0; if (z <= -1.4e+51) tmp = t_1; elseif (z <= -8e-41) tmp = t / b; elseif (z <= 1.3e-27) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / (-b)), $MachinePrecision]}, If[LessEqual[z, -1.4e+51], t$95$1, If[LessEqual[z, -8e-41], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.3e-27], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{-b}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-41}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-27}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.40000000000000002e51 or 1.30000000000000009e-27 < z Initial program 40.4%
Taylor expanded in a around inf 23.7%
mul-1-neg23.7%
distribute-rgt-neg-in23.7%
Simplified23.7%
Taylor expanded in y around 0 29.5%
associate-*r/29.5%
neg-mul-129.5%
Simplified29.5%
if -1.40000000000000002e51 < z < -8.00000000000000005e-41Initial program 82.9%
Taylor expanded in t around inf 34.3%
*-commutative34.3%
Simplified34.3%
Taylor expanded in y around 0 38.5%
if -8.00000000000000005e-41 < z < 1.30000000000000009e-27Initial program 87.4%
Taylor expanded in z around 0 48.3%
Final simplification39.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.8e-47) (not (<= z 4e-28))) (/ (- t a) (- b y)) (- x (/ (* z a) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.8e-47) || !(z <= 4e-28)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-8.8d-47)) .or. (.not. (z <= 4d-28))) then
tmp = (t - a) / (b - y)
else
tmp = x - ((z * a) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.8e-47) || !(z <= 4e-28)) {
tmp = (t - a) / (b - y);
} else {
tmp = x - ((z * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.8e-47) or not (z <= 4e-28): tmp = (t - a) / (b - y) else: tmp = x - ((z * a) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.8e-47) || !(z <= 4e-28)) tmp = Float64(Float64(t - a) / Float64(b - y)); else tmp = Float64(x - Float64(Float64(z * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8.8e-47) || ~((z <= 4e-28))) tmp = (t - a) / (b - y); else tmp = x - ((z * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.8e-47], N[Not[LessEqual[z, 4e-28]], $MachinePrecision]], N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-47} \lor \neg \left(z \leq 4 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{t - a}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot a}{y}\\
\end{array}
\end{array}
if z < -8.80000000000000075e-47 or 3.99999999999999988e-28 < z Initial program 47.2%
Taylor expanded in z around inf 80.9%
if -8.80000000000000075e-47 < z < 3.99999999999999988e-28Initial program 87.4%
Taylor expanded in z around 0 50.9%
Taylor expanded in a around inf 59.8%
mul-1-neg59.8%
associate-/l*58.4%
Simplified58.4%
unsub-neg58.4%
associate-*r/59.8%
*-commutative59.8%
Applied egg-rr59.8%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.55e-41) (not (<= z 9e-28))) (/ t (- b y)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.55e-41) || !(z <= 9e-28)) {
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 <= (-4.55d-41)) .or. (.not. (z <= 9d-28))) 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 <= -4.55e-41) || !(z <= 9e-28)) {
tmp = t / (b - y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.55e-41) or not (z <= 9e-28): tmp = t / (b - y) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.55e-41) || !(z <= 9e-28)) 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 <= -4.55e-41) || ~((z <= 9e-28))) tmp = t / (b - y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.55e-41], N[Not[LessEqual[z, 9e-28]], $MachinePrecision]], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.55 \cdot 10^{-41} \lor \neg \left(z \leq 9 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.55000000000000015e-41 or 8.9999999999999996e-28 < z Initial program 47.2%
Taylor expanded in t around inf 22.3%
*-commutative22.3%
Simplified22.3%
Taylor expanded in z around inf 37.3%
if -4.55000000000000015e-41 < z < 8.9999999999999996e-28Initial program 87.4%
Taylor expanded in z around 0 48.3%
Final simplification42.4%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.2e-36) x (if (<= y 3.7e+18) (/ t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.2e-36) {
tmp = x;
} else if (y <= 3.7e+18) {
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 <= (-2.2d-36)) then
tmp = x
else if (y <= 3.7d+18) 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 <= -2.2e-36) {
tmp = x;
} else if (y <= 3.7e+18) {
tmp = t / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.2e-36: tmp = x elif y <= 3.7e+18: tmp = t / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.2e-36) tmp = x; elseif (y <= 3.7e+18) 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 <= -2.2e-36) tmp = x; elseif (y <= 3.7e+18) tmp = t / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.2e-36], x, If[LessEqual[y, 3.7e+18], N[(t / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+18}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.1999999999999999e-36 or 3.7e18 < y Initial program 57.1%
Taylor expanded in z around 0 37.9%
if -2.1999999999999999e-36 < y < 3.7e18Initial program 77.5%
Taylor expanded in t around inf 35.4%
*-commutative35.4%
Simplified35.4%
Taylor expanded in y around 0 34.9%
Final simplification36.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 65.9%
Taylor expanded in z around 0 24.8%
Final simplification24.8%
(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 2024096
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))