
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
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
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
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
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-213) (not (<= t_1 0.0)))
t_1
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-213) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-213)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-213) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-213) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-213) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-213) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-213], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-213} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.9999999999999999e-213 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.3%
if -1.9999999999999999e-213 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 89.3%
+-commutative89.3%
associate--l+89.3%
associate-*r/89.3%
associate-*r/89.3%
div-sub89.4%
distribute-lft-out--89.4%
mul-1-neg89.4%
distribute-neg-frac89.4%
unsub-neg89.4%
distribute-rgt-out--89.5%
Simplified89.5%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) a))))
(if (<= a -4.4e+160)
x
(if (<= a -3e-130)
t_1
(if (<= a -9e-256)
t
(if (<= a 7e-237)
(* y (/ (- t) z))
(if (<= a 1.5e+86) (+ x t) (if (<= a 5.5e+142) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (a <= -4.4e+160) {
tmp = x;
} else if (a <= -3e-130) {
tmp = t_1;
} else if (a <= -9e-256) {
tmp = t;
} else if (a <= 7e-237) {
tmp = y * (-t / z);
} else if (a <= 1.5e+86) {
tmp = x + t;
} else if (a <= 5.5e+142) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / a)
if (a <= (-4.4d+160)) then
tmp = x
else if (a <= (-3d-130)) then
tmp = t_1
else if (a <= (-9d-256)) then
tmp = t
else if (a <= 7d-237) then
tmp = y * (-t / z)
else if (a <= 1.5d+86) then
tmp = x + t
else if (a <= 5.5d+142) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (a <= -4.4e+160) {
tmp = x;
} else if (a <= -3e-130) {
tmp = t_1;
} else if (a <= -9e-256) {
tmp = t;
} else if (a <= 7e-237) {
tmp = y * (-t / z);
} else if (a <= 1.5e+86) {
tmp = x + t;
} else if (a <= 5.5e+142) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / a) tmp = 0 if a <= -4.4e+160: tmp = x elif a <= -3e-130: tmp = t_1 elif a <= -9e-256: tmp = t elif a <= 7e-237: tmp = y * (-t / z) elif a <= 1.5e+86: tmp = x + t elif a <= 5.5e+142: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / a)) tmp = 0.0 if (a <= -4.4e+160) tmp = x; elseif (a <= -3e-130) tmp = t_1; elseif (a <= -9e-256) tmp = t; elseif (a <= 7e-237) tmp = Float64(y * Float64(Float64(-t) / z)); elseif (a <= 1.5e+86) tmp = Float64(x + t); elseif (a <= 5.5e+142) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / a); tmp = 0.0; if (a <= -4.4e+160) tmp = x; elseif (a <= -3e-130) tmp = t_1; elseif (a <= -9e-256) tmp = t; elseif (a <= 7e-237) tmp = y * (-t / z); elseif (a <= 1.5e+86) tmp = x + t; elseif (a <= 5.5e+142) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.4e+160], x, If[LessEqual[a, -3e-130], t$95$1, If[LessEqual[a, -9e-256], t, If[LessEqual[a, 7e-237], N[(y * N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e+86], N[(x + t), $MachinePrecision], If[LessEqual[a, 5.5e+142], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+160}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -9 \cdot 10^{-256}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-237}:\\
\;\;\;\;y \cdot \frac{-t}{z}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+86}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.39999999999999984e160 or 5.50000000000000035e142 < a Initial program 93.1%
Taylor expanded in a around inf 67.4%
if -4.39999999999999984e160 < a < -2.99999999999999986e-130 or 1.49999999999999988e86 < a < 5.50000000000000035e142Initial program 83.4%
Taylor expanded in t around inf 55.0%
div-sub55.0%
Simplified55.0%
Taylor expanded in a around inf 38.5%
if -2.99999999999999986e-130 < a < -9.0000000000000005e-256Initial program 62.7%
Taylor expanded in z around inf 57.3%
if -9.0000000000000005e-256 < a < 6.99999999999999966e-237Initial program 74.3%
Taylor expanded in x around 0 64.4%
associate-/l*74.4%
Simplified74.4%
Taylor expanded in y around inf 59.6%
Taylor expanded in a around 0 54.6%
mul-1-neg54.6%
associate-*r/59.6%
distribute-rgt-neg-in59.6%
distribute-frac-neg59.6%
Simplified59.6%
if 6.99999999999999966e-237 < a < 1.49999999999999988e86Initial program 76.9%
Taylor expanded in t around inf 58.5%
Taylor expanded in z around inf 37.9%
Final simplification50.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) a))))
(if (<= a -1.8e+161)
x
(if (<= a -6.5e+69)
t_1
(if (<= a -2.8e-25)
(+ x t)
(if (<= a 2.9e+78)
(* t (- 1.0 (/ y z)))
(if (<= a 6.2e+142) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (a <= -1.8e+161) {
tmp = x;
} else if (a <= -6.5e+69) {
tmp = t_1;
} else if (a <= -2.8e-25) {
tmp = x + t;
} else if (a <= 2.9e+78) {
tmp = t * (1.0 - (y / z));
} else if (a <= 6.2e+142) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / a)
if (a <= (-1.8d+161)) then
tmp = x
else if (a <= (-6.5d+69)) then
tmp = t_1
else if (a <= (-2.8d-25)) then
tmp = x + t
else if (a <= 2.9d+78) then
tmp = t * (1.0d0 - (y / z))
else if (a <= 6.2d+142) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (a <= -1.8e+161) {
tmp = x;
} else if (a <= -6.5e+69) {
tmp = t_1;
} else if (a <= -2.8e-25) {
tmp = x + t;
} else if (a <= 2.9e+78) {
tmp = t * (1.0 - (y / z));
} else if (a <= 6.2e+142) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / a) tmp = 0 if a <= -1.8e+161: tmp = x elif a <= -6.5e+69: tmp = t_1 elif a <= -2.8e-25: tmp = x + t elif a <= 2.9e+78: tmp = t * (1.0 - (y / z)) elif a <= 6.2e+142: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / a)) tmp = 0.0 if (a <= -1.8e+161) tmp = x; elseif (a <= -6.5e+69) tmp = t_1; elseif (a <= -2.8e-25) tmp = Float64(x + t); elseif (a <= 2.9e+78) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (a <= 6.2e+142) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / a); tmp = 0.0; if (a <= -1.8e+161) tmp = x; elseif (a <= -6.5e+69) tmp = t_1; elseif (a <= -2.8e-25) tmp = x + t; elseif (a <= 2.9e+78) tmp = t * (1.0 - (y / z)); elseif (a <= 6.2e+142) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.8e+161], x, If[LessEqual[a, -6.5e+69], t$95$1, If[LessEqual[a, -2.8e-25], N[(x + t), $MachinePrecision], If[LessEqual[a, 2.9e+78], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e+142], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{+161}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-25}:\\
\;\;\;\;x + t\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+78}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.79999999999999992e161 or 6.1999999999999998e142 < a Initial program 93.1%
Taylor expanded in a around inf 67.4%
if -1.79999999999999992e161 < a < -6.5000000000000001e69 or 2.90000000000000017e78 < a < 6.1999999999999998e142Initial program 87.2%
Taylor expanded in t around inf 68.8%
div-sub68.8%
Simplified68.8%
Taylor expanded in a around inf 50.2%
if -6.5000000000000001e69 < a < -2.79999999999999988e-25Initial program 84.7%
Taylor expanded in t around inf 60.2%
Taylor expanded in z around inf 35.0%
if -2.79999999999999988e-25 < a < 2.90000000000000017e78Initial program 73.1%
Taylor expanded in x around 0 50.0%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in a around 0 57.0%
associate-*r/57.0%
mul-1-neg57.0%
Simplified57.0%
Taylor expanded in z around 0 52.8%
+-commutative52.8%
mul-1-neg52.8%
unsub-neg52.8%
associate-*r/55.5%
Simplified55.5%
Taylor expanded in t around 0 57.7%
Final simplification57.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ (- a z) (- y z)))))
(if (<= z -9.5e-7)
t_1
(if (<= z 6e-137)
(+ x (/ y (/ a (- t x))))
(if (<= z 7e+180) (+ x (* (- y z) (/ t (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / ((a - z) / (y - z));
double tmp;
if (z <= -9.5e-7) {
tmp = t_1;
} else if (z <= 6e-137) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 7e+180) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = t / ((a - z) / (y - z))
if (z <= (-9.5d-7)) then
tmp = t_1
else if (z <= 6d-137) then
tmp = x + (y / (a / (t - x)))
else if (z <= 7d+180) then
tmp = x + ((y - z) * (t / (a - z)))
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 t_1 = t / ((a - z) / (y - z));
double tmp;
if (z <= -9.5e-7) {
tmp = t_1;
} else if (z <= 6e-137) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 7e+180) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / ((a - z) / (y - z)) tmp = 0 if z <= -9.5e-7: tmp = t_1 elif z <= 6e-137: tmp = x + (y / (a / (t - x))) elif z <= 7e+180: tmp = x + ((y - z) * (t / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(Float64(a - z) / Float64(y - z))) tmp = 0.0 if (z <= -9.5e-7) tmp = t_1; elseif (z <= 6e-137) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 7e+180) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / ((a - z) / (y - z)); tmp = 0.0; if (z <= -9.5e-7) tmp = t_1; elseif (z <= 6e-137) tmp = x + (y / (a / (t - x))); elseif (z <= 7e+180) tmp = x + ((y - z) * (t / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e-7], t$95$1, If[LessEqual[z, 6e-137], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+180], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a - z}{y - z}}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-137}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+180}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.5000000000000001e-7 or 6.9999999999999996e180 < z Initial program 58.9%
Taylor expanded in x around 0 46.7%
associate-/l*70.7%
Simplified70.7%
if -9.5000000000000001e-7 < z < 5.9999999999999996e-137Initial program 95.9%
Taylor expanded in z around 0 79.9%
+-commutative79.9%
associate-/l*87.6%
Simplified87.6%
if 5.9999999999999996e-137 < z < 6.9999999999999996e180Initial program 92.1%
Taylor expanded in t around inf 70.9%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y z) (/ t a))))
(if (<= a -4e+160)
x
(if (<= a -2.35e-46)
t_1
(if (<= a 9e+70) (* t (- 1.0 (/ y z))) (if (<= a 5.6e+142) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) * (t / a);
double tmp;
if (a <= -4e+160) {
tmp = x;
} else if (a <= -2.35e-46) {
tmp = t_1;
} else if (a <= 9e+70) {
tmp = t * (1.0 - (y / z));
} else if (a <= 5.6e+142) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t / a)
if (a <= (-4d+160)) then
tmp = x
else if (a <= (-2.35d-46)) then
tmp = t_1
else if (a <= 9d+70) then
tmp = t * (1.0d0 - (y / z))
else if (a <= 5.6d+142) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) * (t / a);
double tmp;
if (a <= -4e+160) {
tmp = x;
} else if (a <= -2.35e-46) {
tmp = t_1;
} else if (a <= 9e+70) {
tmp = t * (1.0 - (y / z));
} else if (a <= 5.6e+142) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) * (t / a) tmp = 0 if a <= -4e+160: tmp = x elif a <= -2.35e-46: tmp = t_1 elif a <= 9e+70: tmp = t * (1.0 - (y / z)) elif a <= 5.6e+142: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) * Float64(t / a)) tmp = 0.0 if (a <= -4e+160) tmp = x; elseif (a <= -2.35e-46) tmp = t_1; elseif (a <= 9e+70) tmp = Float64(t * Float64(1.0 - Float64(y / z))); elseif (a <= 5.6e+142) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) * (t / a); tmp = 0.0; if (a <= -4e+160) tmp = x; elseif (a <= -2.35e-46) tmp = t_1; elseif (a <= 9e+70) tmp = t * (1.0 - (y / z)); elseif (a <= 5.6e+142) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+160], x, If[LessEqual[a, -2.35e-46], t$95$1, If[LessEqual[a, 9e+70], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+142], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{if}\;a \leq -4 \cdot 10^{+160}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.35 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.00000000000000003e160 or 5.6e142 < a Initial program 93.1%
Taylor expanded in a around inf 67.4%
if -4.00000000000000003e160 < a < -2.34999999999999983e-46 or 8.9999999999999999e70 < a < 5.6e142Initial program 84.1%
Taylor expanded in t around inf 51.9%
div-sub51.9%
Simplified51.9%
Taylor expanded in a around inf 34.5%
associate-/l*39.3%
associate-/r/39.5%
Simplified39.5%
if -2.34999999999999983e-46 < a < 8.9999999999999999e70Initial program 73.5%
Taylor expanded in x around 0 50.3%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in a around 0 58.3%
associate-*r/58.3%
mul-1-neg58.3%
Simplified58.3%
Taylor expanded in z around 0 53.8%
+-commutative53.8%
mul-1-neg53.8%
unsub-neg53.8%
associate-*r/56.7%
Simplified56.7%
Taylor expanded in t around 0 59.0%
Final simplification57.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.6e-27) (not (<= a 4e-58))) (+ x (* (- y z) (/ t (- a z)))) (+ t (/ (* (- t x) (- a y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e-27) || !(a <= 4e-58)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((a <= (-7.6d-27)) .or. (.not. (a <= 4d-58))) then
tmp = x + ((y - z) * (t / (a - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.6e-27) || !(a <= 4e-58)) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.6e-27) or not (a <= 4e-58): tmp = x + ((y - z) * (t / (a - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.6e-27) || !(a <= 4e-58)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.6e-27) || ~((a <= 4e-58))) tmp = x + ((y - z) * (t / (a - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.6e-27], N[Not[LessEqual[a, 4e-58]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{-27} \lor \neg \left(a \leq 4 \cdot 10^{-58}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if a < -7.60000000000000001e-27 or 4.0000000000000001e-58 < a Initial program 87.9%
Taylor expanded in t around inf 76.6%
if -7.60000000000000001e-27 < a < 4.0000000000000001e-58Initial program 71.0%
Taylor expanded in z around inf 81.5%
+-commutative81.5%
associate--l+81.5%
associate-*r/81.5%
associate-*r/81.5%
div-sub82.5%
distribute-lft-out--82.5%
mul-1-neg82.5%
distribute-neg-frac82.5%
unsub-neg82.5%
distribute-rgt-out--82.5%
Simplified82.5%
Final simplification78.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.05e+18) (not (<= z 6.5e-128))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.05e+18) || !(z <= 6.5e-128)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-2.05d+18)) .or. (.not. (z <= 6.5d-128))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.05e+18) || !(z <= 6.5e-128)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.05e+18) or not (z <= 6.5e-128): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.05e+18) || !(z <= 6.5e-128)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.05e+18) || ~((z <= 6.5e-128))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.05e+18], N[Not[LessEqual[z, 6.5e-128]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+18} \lor \neg \left(z \leq 6.5 \cdot 10^{-128}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -2.05e18 or 6.49999999999999977e-128 < z Initial program 72.4%
Taylor expanded in t around inf 62.4%
div-sub62.3%
Simplified62.3%
if -2.05e18 < z < 6.49999999999999977e-128Initial program 95.0%
Taylor expanded in t around inf 79.1%
Taylor expanded in z around 0 69.7%
+-commutative69.7%
associate-/l*75.4%
Simplified75.4%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -19000.0) (not (<= z 5.8e-29))) (* t (/ (- y z) (- a z))) (+ x (* (- y z) (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -19000.0) || !(z <= 5.8e-29)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y - z) * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-19000.0d0)) .or. (.not. (z <= 5.8d-29))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((y - z) * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -19000.0) || !(z <= 5.8e-29)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((y - z) * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -19000.0) or not (z <= 5.8e-29): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((y - z) * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -19000.0) || !(z <= 5.8e-29)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -19000.0) || ~((z <= 5.8e-29))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((y - z) * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -19000.0], N[Not[LessEqual[z, 5.8e-29]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -19000 \lor \neg \left(z \leq 5.8 \cdot 10^{-29}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -19000 or 5.80000000000000048e-29 < z Initial program 69.3%
Taylor expanded in t around inf 64.9%
div-sub64.9%
Simplified64.9%
if -19000 < z < 5.80000000000000048e-29Initial program 94.9%
clear-num94.9%
inv-pow94.9%
Applied egg-rr94.9%
unpow-194.9%
Simplified94.9%
Taylor expanded in t around inf 78.1%
Taylor expanded in a around inf 72.8%
Final simplification68.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.0037) (not (<= z 5.7e-30))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.0037) || !(z <= 5.7e-30)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-0.0037d0)) .or. (.not. (z <= 5.7d-30))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.0037) || !(z <= 5.7e-30)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.0037) or not (z <= 5.7e-30): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.0037) || !(z <= 5.7e-30)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -0.0037) || ~((z <= 5.7e-30))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.0037], N[Not[LessEqual[z, 5.7e-30]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0037 \lor \neg \left(z \leq 5.7 \cdot 10^{-30}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -0.0037000000000000002 or 5.69999999999999977e-30 < z Initial program 68.9%
Taylor expanded in t around inf 64.5%
div-sub64.5%
Simplified64.5%
if -0.0037000000000000002 < z < 5.69999999999999977e-30Initial program 95.7%
Taylor expanded in z around 0 75.8%
+-commutative75.8%
associate-/l*82.2%
Simplified82.2%
Final simplification72.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.1e-6) (not (<= z 650.0))) (/ t (/ (- a z) (- y z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.1e-6) || !(z <= 650.0)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-5.1d-6)) .or. (.not. (z <= 650.0d0))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.1e-6) || !(z <= 650.0)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.1e-6) or not (z <= 650.0): tmp = t / ((a - z) / (y - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.1e-6) || !(z <= 650.0)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.1e-6) || ~((z <= 650.0))) tmp = t / ((a - z) / (y - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.1e-6], N[Not[LessEqual[z, 650.0]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.1 \cdot 10^{-6} \lor \neg \left(z \leq 650\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -5.1000000000000003e-6 or 650 < z Initial program 67.4%
Taylor expanded in x around 0 45.0%
associate-/l*64.4%
Simplified64.4%
if -5.1000000000000003e-6 < z < 650Initial program 95.9%
Taylor expanded in z around 0 75.4%
+-commutative75.4%
associate-/l*81.5%
Simplified81.5%
Final simplification72.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -70000000000.0)
t
(if (<= z 4.5e-259)
x
(if (<= z 5.4e-204) (* y (/ t a)) (if (<= z 1.3e+147) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -70000000000.0) {
tmp = t;
} else if (z <= 4.5e-259) {
tmp = x;
} else if (z <= 5.4e-204) {
tmp = y * (t / a);
} else if (z <= 1.3e+147) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-70000000000.0d0)) then
tmp = t
else if (z <= 4.5d-259) then
tmp = x
else if (z <= 5.4d-204) then
tmp = y * (t / a)
else if (z <= 1.3d+147) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -70000000000.0) {
tmp = t;
} else if (z <= 4.5e-259) {
tmp = x;
} else if (z <= 5.4e-204) {
tmp = y * (t / a);
} else if (z <= 1.3e+147) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -70000000000.0: tmp = t elif z <= 4.5e-259: tmp = x elif z <= 5.4e-204: tmp = y * (t / a) elif z <= 1.3e+147: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -70000000000.0) tmp = t; elseif (z <= 4.5e-259) tmp = x; elseif (z <= 5.4e-204) tmp = Float64(y * Float64(t / a)); elseif (z <= 1.3e+147) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -70000000000.0) tmp = t; elseif (z <= 4.5e-259) tmp = x; elseif (z <= 5.4e-204) tmp = y * (t / a); elseif (z <= 1.3e+147) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -70000000000.0], t, If[LessEqual[z, 4.5e-259], x, If[LessEqual[z, 5.4e-204], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+147], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -70000000000:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-259}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-204}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+147}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7e10 or 1.2999999999999999e147 < z Initial program 61.2%
Taylor expanded in z around inf 49.3%
if -7e10 < z < 4.49999999999999974e-259 or 5.39999999999999983e-204 < z < 1.2999999999999999e147Initial program 94.1%
Taylor expanded in a around inf 43.2%
if 4.49999999999999974e-259 < z < 5.39999999999999983e-204Initial program 99.9%
Taylor expanded in x around 0 60.5%
associate-/l*60.2%
Simplified60.2%
Taylor expanded in z around 0 54.9%
associate-/r/55.0%
Applied egg-rr55.0%
Final simplification46.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.8e+15)
t
(if (<= z 2.8e-259)
x
(if (<= z 5.5e-204) (/ y (/ a t)) (if (<= z 1.2e+148) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+15) {
tmp = t;
} else if (z <= 2.8e-259) {
tmp = x;
} else if (z <= 5.5e-204) {
tmp = y / (a / t);
} else if (z <= 1.2e+148) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-6.8d+15)) then
tmp = t
else if (z <= 2.8d-259) then
tmp = x
else if (z <= 5.5d-204) then
tmp = y / (a / t)
else if (z <= 1.2d+148) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.8e+15) {
tmp = t;
} else if (z <= 2.8e-259) {
tmp = x;
} else if (z <= 5.5e-204) {
tmp = y / (a / t);
} else if (z <= 1.2e+148) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.8e+15: tmp = t elif z <= 2.8e-259: tmp = x elif z <= 5.5e-204: tmp = y / (a / t) elif z <= 1.2e+148: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.8e+15) tmp = t; elseif (z <= 2.8e-259) tmp = x; elseif (z <= 5.5e-204) tmp = Float64(y / Float64(a / t)); elseif (z <= 1.2e+148) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.8e+15) tmp = t; elseif (z <= 2.8e-259) tmp = x; elseif (z <= 5.5e-204) tmp = y / (a / t); elseif (z <= 1.2e+148) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.8e+15], t, If[LessEqual[z, 2.8e-259], x, If[LessEqual[z, 5.5e-204], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e+148], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+15}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-259}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-204}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+148}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.8e15 or 1.19999999999999997e148 < z Initial program 61.2%
Taylor expanded in z around inf 49.3%
if -6.8e15 < z < 2.8e-259 or 5.4999999999999999e-204 < z < 1.19999999999999997e148Initial program 94.1%
Taylor expanded in a around inf 43.2%
if 2.8e-259 < z < 5.4999999999999999e-204Initial program 99.9%
Taylor expanded in x around 0 60.5%
associate-/l*60.2%
Simplified60.2%
Taylor expanded in z around 0 55.0%
associate-/l*55.1%
Simplified55.1%
Final simplification46.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e+17) (not (<= z 190000000.0))) (* t (- 1.0 (/ y z))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+17) || !(z <= 190000000.0)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-2d+17)) .or. (.not. (z <= 190000000.0d0))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+17) || !(z <= 190000000.0)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e+17) or not (z <= 190000000.0): tmp = t * (1.0 - (y / z)) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e+17) || !(z <= 190000000.0)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e+17) || ~((z <= 190000000.0))) tmp = t * (1.0 - (y / z)); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+17], N[Not[LessEqual[z, 190000000.0]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+17} \lor \neg \left(z \leq 190000000\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -2e17 or 1.9e8 < z Initial program 67.7%
Taylor expanded in x around 0 45.6%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in a around 0 57.1%
associate-*r/57.1%
mul-1-neg57.1%
Simplified57.1%
Taylor expanded in z around 0 52.1%
+-commutative52.1%
mul-1-neg52.1%
unsub-neg52.1%
associate-*r/56.3%
Simplified56.3%
Taylor expanded in t around 0 57.1%
if -2e17 < z < 1.9e8Initial program 95.2%
Taylor expanded in t around inf 77.9%
Taylor expanded in z around 0 64.4%
+-commutative64.4%
associate-/l*69.6%
Simplified69.6%
Final simplification63.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -41000000.0) (- t (* y (/ t z))) (if (<= z 205000000.0) (+ x (/ y (/ a t))) (* t (- 1.0 (/ y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -41000000.0) {
tmp = t - (y * (t / z));
} else if (z <= 205000000.0) {
tmp = x + (y / (a / t));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-41000000.0d0)) then
tmp = t - (y * (t / z))
else if (z <= 205000000.0d0) then
tmp = x + (y / (a / t))
else
tmp = t * (1.0d0 - (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -41000000.0) {
tmp = t - (y * (t / z));
} else if (z <= 205000000.0) {
tmp = x + (y / (a / t));
} else {
tmp = t * (1.0 - (y / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -41000000.0: tmp = t - (y * (t / z)) elif z <= 205000000.0: tmp = x + (y / (a / t)) else: tmp = t * (1.0 - (y / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -41000000.0) tmp = Float64(t - Float64(y * Float64(t / z))); elseif (z <= 205000000.0) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(t * Float64(1.0 - Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -41000000.0) tmp = t - (y * (t / z)); elseif (z <= 205000000.0) tmp = x + (y / (a / t)); else tmp = t * (1.0 - (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -41000000.0], N[(t - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 205000000.0], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -41000000:\\
\;\;\;\;t - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 205000000:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -4.1e7Initial program 60.3%
Taylor expanded in x around 0 51.1%
associate-/l*68.3%
Simplified68.3%
Taylor expanded in a around 0 59.4%
associate-*r/59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in z around 0 56.4%
+-commutative56.4%
mul-1-neg56.4%
unsub-neg56.4%
associate-*r/59.5%
Simplified59.5%
if -4.1e7 < z < 2.05e8Initial program 95.2%
Taylor expanded in t around inf 77.9%
Taylor expanded in z around 0 64.4%
+-commutative64.4%
associate-/l*69.6%
Simplified69.6%
if 2.05e8 < z Initial program 75.5%
Taylor expanded in x around 0 39.8%
associate-/l*60.7%
Simplified60.7%
Taylor expanded in a around 0 54.6%
associate-*r/54.6%
mul-1-neg54.6%
Simplified54.6%
Taylor expanded in z around 0 47.5%
+-commutative47.5%
mul-1-neg47.5%
unsub-neg47.5%
associate-*r/53.0%
Simplified53.0%
Taylor expanded in t around 0 54.6%
Final simplification63.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e+20) (- t (* y (/ t z))) (if (<= z 48000.0) (+ x (/ y (/ a t))) (/ t (/ z (- z y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+20) {
tmp = t - (y * (t / z));
} else if (z <= 48000.0) {
tmp = x + (y / (a / t));
} else {
tmp = t / (z / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-3d+20)) then
tmp = t - (y * (t / z))
else if (z <= 48000.0d0) then
tmp = x + (y / (a / t))
else
tmp = t / (z / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e+20) {
tmp = t - (y * (t / z));
} else if (z <= 48000.0) {
tmp = x + (y / (a / t));
} else {
tmp = t / (z / (z - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e+20: tmp = t - (y * (t / z)) elif z <= 48000.0: tmp = x + (y / (a / t)) else: tmp = t / (z / (z - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e+20) tmp = Float64(t - Float64(y * Float64(t / z))); elseif (z <= 48000.0) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(t / Float64(z / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e+20) tmp = t - (y * (t / z)); elseif (z <= 48000.0) tmp = x + (y / (a / t)); else tmp = t / (z / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+20], N[(t - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 48000.0], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+20}:\\
\;\;\;\;t - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 48000:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z}{z - y}}\\
\end{array}
\end{array}
if z < -3e20Initial program 60.3%
Taylor expanded in x around 0 51.1%
associate-/l*68.3%
Simplified68.3%
Taylor expanded in a around 0 59.4%
associate-*r/59.4%
mul-1-neg59.4%
Simplified59.4%
Taylor expanded in z around 0 56.4%
+-commutative56.4%
mul-1-neg56.4%
unsub-neg56.4%
associate-*r/59.5%
Simplified59.5%
if -3e20 < z < 48000Initial program 95.2%
Taylor expanded in t around inf 77.9%
Taylor expanded in z around 0 64.4%
+-commutative64.4%
associate-/l*69.6%
Simplified69.6%
if 48000 < z Initial program 75.5%
Taylor expanded in x around 0 39.8%
associate-/l*60.7%
Simplified60.7%
Taylor expanded in a around 0 54.6%
associate-*r/54.6%
mul-1-neg54.6%
Simplified54.6%
frac-2neg54.6%
div-inv54.5%
remove-double-neg54.5%
sub-neg54.5%
distribute-neg-in54.5%
remove-double-neg54.5%
Applied egg-rr54.5%
associate-*r/54.6%
*-rgt-identity54.6%
+-commutative54.6%
unsub-neg54.6%
Simplified54.6%
Final simplification63.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.2e+23) t (if (<= z 1.65e+149) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+23) {
tmp = t;
} else if (z <= 1.65e+149) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-7.2d+23)) then
tmp = t
else if (z <= 1.65d+149) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+23) {
tmp = t;
} else if (z <= 1.65e+149) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.2e+23: tmp = t elif z <= 1.65e+149: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.2e+23) tmp = t; elseif (z <= 1.65e+149) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.2e+23) tmp = t; elseif (z <= 1.65e+149) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+23], t, If[LessEqual[z, 1.65e+149], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+23}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+149}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.1999999999999997e23 or 1.65e149 < z Initial program 61.2%
Taylor expanded in z around inf 49.3%
if -7.1999999999999997e23 < z < 1.65e149Initial program 94.7%
Taylor expanded in a around inf 41.3%
Final simplification44.5%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
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
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 81.2%
Taylor expanded in z around inf 24.5%
Final simplification24.5%
herbie shell --seed 2023195
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))