
(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 19 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 -1e-274) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ t (* (/ (- t x) z) (- a y))))))
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 <= -1e-274) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t + (((t - x) / z) * (a - y));
}
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 <= -1e-274) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return 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, -1e-274], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $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 -1 \cdot 10^{-274} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999966e-275 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.9%
+-commutative92.9%
remove-double-neg92.9%
unsub-neg92.9%
*-commutative92.9%
associate-*l/77.5%
associate-/l*95.9%
fma-neg95.9%
remove-double-neg95.9%
Simplified95.9%
if -9.99999999999999966e-275 < (+.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.8%
associate--l+89.8%
distribute-lft-out--89.8%
div-sub89.7%
mul-1-neg89.7%
unsub-neg89.7%
div-sub89.8%
associate-/l*94.9%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification96.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-163) (not (<= t_1 0.0)))
t_1
(* x (+ (/ t x) (/ (* (- y a) (- 1.0 (/ t x))) 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 <= -5e-163) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = x * ((t / x) + (((y - a) * (1.0 - (t / x))) / 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 <= (-5d-163)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = x * ((t / x) + (((y - a) * (1.0d0 - (t / x))) / 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 <= -5e-163) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = x * ((t / x) + (((y - a) * (1.0 - (t / x))) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-163) or not (t_1 <= 0.0): tmp = t_1 else: tmp = x * ((t / x) + (((y - a) * (1.0 - (t / x))) / 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 <= -5e-163) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(x * Float64(Float64(t / x) + Float64(Float64(Float64(y - a) * Float64(1.0 - Float64(t / x))) / 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 <= -5e-163) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = x * ((t / x) + (((y - a) * (1.0 - (t / x))) / 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, -5e-163], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(x * N[(N[(t / x), $MachinePrecision] + N[(N[(N[(y - a), $MachinePrecision] * N[(1.0 - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $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 -5 \cdot 10^{-163} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{t}{x} + \frac{\left(y - a\right) \cdot \left(1 - \frac{t}{x}\right)}{z}\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999977e-163 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.7%
if -4.99999999999999977e-163 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 8.4%
Taylor expanded in x around inf 19.9%
times-frac20.2%
distribute-rgt-out20.1%
Simplified20.1%
Taylor expanded in z around -inf 91.0%
+-commutative91.0%
mul-1-neg91.0%
unsub-neg91.0%
distribute-rgt-out--91.0%
sub-neg91.0%
metadata-eval91.0%
+-commutative91.0%
Simplified91.0%
Final simplification94.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* y (/ (- t x) a))))
(if (<= z -6e+151)
t
(if (<= z -4.9e+25)
(* x (/ (- y a) z))
(if (<= z -1.15e-67)
t_1
(if (<= z -2.4e-110)
t_2
(if (<= z -2.9e-168)
t_1
(if (<= z -4.4e-187)
(* t (/ (- y z) a))
(if (<= z -2.9e-236) t_2 (if (<= z 7.2e+25) t_1 t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = y * ((t - x) / a);
double tmp;
if (z <= -6e+151) {
tmp = t;
} else if (z <= -4.9e+25) {
tmp = x * ((y - a) / z);
} else if (z <= -1.15e-67) {
tmp = t_1;
} else if (z <= -2.4e-110) {
tmp = t_2;
} else if (z <= -2.9e-168) {
tmp = t_1;
} else if (z <= -4.4e-187) {
tmp = t * ((y - z) / a);
} else if (z <= -2.9e-236) {
tmp = t_2;
} else if (z <= 7.2e+25) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
t_2 = y * ((t - x) / a)
if (z <= (-6d+151)) then
tmp = t
else if (z <= (-4.9d+25)) then
tmp = x * ((y - a) / z)
else if (z <= (-1.15d-67)) then
tmp = t_1
else if (z <= (-2.4d-110)) then
tmp = t_2
else if (z <= (-2.9d-168)) then
tmp = t_1
else if (z <= (-4.4d-187)) then
tmp = t * ((y - z) / a)
else if (z <= (-2.9d-236)) then
tmp = t_2
else if (z <= 7.2d+25) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = y * ((t - x) / a);
double tmp;
if (z <= -6e+151) {
tmp = t;
} else if (z <= -4.9e+25) {
tmp = x * ((y - a) / z);
} else if (z <= -1.15e-67) {
tmp = t_1;
} else if (z <= -2.4e-110) {
tmp = t_2;
} else if (z <= -2.9e-168) {
tmp = t_1;
} else if (z <= -4.4e-187) {
tmp = t * ((y - z) / a);
} else if (z <= -2.9e-236) {
tmp = t_2;
} else if (z <= 7.2e+25) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = y * ((t - x) / a) tmp = 0 if z <= -6e+151: tmp = t elif z <= -4.9e+25: tmp = x * ((y - a) / z) elif z <= -1.15e-67: tmp = t_1 elif z <= -2.4e-110: tmp = t_2 elif z <= -2.9e-168: tmp = t_1 elif z <= -4.4e-187: tmp = t * ((y - z) / a) elif z <= -2.9e-236: tmp = t_2 elif z <= 7.2e+25: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) t_2 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (z <= -6e+151) tmp = t; elseif (z <= -4.9e+25) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= -1.15e-67) tmp = t_1; elseif (z <= -2.4e-110) tmp = t_2; elseif (z <= -2.9e-168) tmp = t_1; elseif (z <= -4.4e-187) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= -2.9e-236) tmp = t_2; elseif (z <= 7.2e+25) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); t_2 = y * ((t - x) / a); tmp = 0.0; if (z <= -6e+151) tmp = t; elseif (z <= -4.9e+25) tmp = x * ((y - a) / z); elseif (z <= -1.15e-67) tmp = t_1; elseif (z <= -2.4e-110) tmp = t_2; elseif (z <= -2.9e-168) tmp = t_1; elseif (z <= -4.4e-187) tmp = t * ((y - z) / a); elseif (z <= -2.9e-236) tmp = t_2; elseif (z <= 7.2e+25) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+151], t, If[LessEqual[z, -4.9e+25], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.15e-67], t$95$1, If[LessEqual[z, -2.4e-110], t$95$2, If[LessEqual[z, -2.9e-168], t$95$1, If[LessEqual[z, -4.4e-187], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.9e-236], t$95$2, If[LessEqual[z, 7.2e+25], t$95$1, t]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+151}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-110}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-187}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-236}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.9999999999999998e151 or 7.20000000000000031e25 < z Initial program 59.9%
Taylor expanded in z around inf 49.4%
if -5.9999999999999998e151 < z < -4.9000000000000001e25Initial program 74.7%
Taylor expanded in x around inf 31.2%
mul-1-neg31.2%
unsub-neg31.2%
Simplified31.2%
Taylor expanded in z around inf 37.3%
associate-*r/37.3%
mul-1-neg37.3%
neg-mul-137.3%
sub-neg37.3%
Simplified37.3%
Taylor expanded in x around 0 31.6%
associate-/l*37.3%
Simplified37.3%
if -4.9000000000000001e25 < z < -1.15e-67 or -2.40000000000000006e-110 < z < -2.8999999999999998e-168 or -2.9e-236 < z < 7.20000000000000031e25Initial program 97.1%
Taylor expanded in x around inf 62.9%
mul-1-neg62.9%
unsub-neg62.9%
Simplified62.9%
Taylor expanded in z around 0 60.7%
if -1.15e-67 < z < -2.40000000000000006e-110 or -4.40000000000000016e-187 < z < -2.9e-236Initial program 94.8%
Taylor expanded in y around inf 82.1%
div-sub82.1%
Simplified82.1%
Taylor expanded in a around inf 72.0%
if -2.8999999999999998e-168 < z < -4.40000000000000016e-187Initial program 89.6%
Taylor expanded in x around 0 45.4%
Taylor expanded in a around inf 56.9%
associate-/l*67.8%
Simplified67.8%
Final simplification54.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-227) (not (<= t_1 0.0)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
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 <= -5e-227) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - 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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-227)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - 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 t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-227) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-227) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) 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 <= -5e-227) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); 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 <= -5e-227) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); 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, -5e-227], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $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 -5 \cdot 10^{-227} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.5%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 6.5%
Taylor expanded in z around inf 88.4%
associate--l+88.4%
distribute-lft-out--88.4%
div-sub88.4%
mul-1-neg88.4%
unsub-neg88.4%
div-sub88.4%
associate-/l*92.9%
associate-/l*95.5%
distribute-rgt-out--95.5%
Simplified95.5%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y (- a z)))))
(if (<= z -1.05e+72)
t
(if (<= z -1.02e-63)
x
(if (<= z -8.5e-240)
t_1
(if (<= z 7.4e-112) x (if (<= z 5.2e+85) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / (a - z));
double tmp;
if (z <= -1.05e+72) {
tmp = t;
} else if (z <= -1.02e-63) {
tmp = x;
} else if (z <= -8.5e-240) {
tmp = t_1;
} else if (z <= 7.4e-112) {
tmp = x;
} else if (z <= 5.2e+85) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / (a - z))
if (z <= (-1.05d+72)) then
tmp = t
else if (z <= (-1.02d-63)) then
tmp = x
else if (z <= (-8.5d-240)) then
tmp = t_1
else if (z <= 7.4d-112) then
tmp = x
else if (z <= 5.2d+85) then
tmp = t_1
else
tmp = t
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 / (a - z));
double tmp;
if (z <= -1.05e+72) {
tmp = t;
} else if (z <= -1.02e-63) {
tmp = x;
} else if (z <= -8.5e-240) {
tmp = t_1;
} else if (z <= 7.4e-112) {
tmp = x;
} else if (z <= 5.2e+85) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / (a - z)) tmp = 0 if z <= -1.05e+72: tmp = t elif z <= -1.02e-63: tmp = x elif z <= -8.5e-240: tmp = t_1 elif z <= 7.4e-112: tmp = x elif z <= 5.2e+85: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(a - z))) tmp = 0.0 if (z <= -1.05e+72) tmp = t; elseif (z <= -1.02e-63) tmp = x; elseif (z <= -8.5e-240) tmp = t_1; elseif (z <= 7.4e-112) tmp = x; elseif (z <= 5.2e+85) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / (a - z)); tmp = 0.0; if (z <= -1.05e+72) tmp = t; elseif (z <= -1.02e-63) tmp = x; elseif (z <= -8.5e-240) tmp = t_1; elseif (z <= 7.4e-112) tmp = x; elseif (z <= 5.2e+85) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+72], t, If[LessEqual[z, -1.02e-63], x, If[LessEqual[z, -8.5e-240], t$95$1, If[LessEqual[z, 7.4e-112], x, If[LessEqual[z, 5.2e+85], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a - z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-63}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-240}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-112}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.0500000000000001e72 or 5.20000000000000021e85 < z Initial program 59.9%
Taylor expanded in z around inf 47.8%
if -1.0500000000000001e72 < z < -1.01999999999999997e-63 or -8.5e-240 < z < 7.3999999999999996e-112Initial program 93.1%
Taylor expanded in a around inf 45.2%
if -1.01999999999999997e-63 < z < -8.5e-240 or 7.3999999999999996e-112 < z < 5.20000000000000021e85Initial program 93.0%
Taylor expanded in y around inf 63.9%
div-sub66.3%
Simplified66.3%
Taylor expanded in t around inf 38.1%
associate-/l*46.1%
Simplified46.1%
Final simplification46.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -6e+151)
t
(if (<= z -6e+25)
(* x (/ (- y a) z))
(if (<= z -4e-63)
t_1
(if (<= z -1.05e-108)
(* t (/ y (- a z)))
(if (<= z 2e+25) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -6e+151) {
tmp = t;
} else if (z <= -6e+25) {
tmp = x * ((y - a) / z);
} else if (z <= -4e-63) {
tmp = t_1;
} else if (z <= -1.05e-108) {
tmp = t * (y / (a - z));
} else if (z <= 2e+25) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-6d+151)) then
tmp = t
else if (z <= (-6d+25)) then
tmp = x * ((y - a) / z)
else if (z <= (-4d-63)) then
tmp = t_1
else if (z <= (-1.05d-108)) then
tmp = t * (y / (a - z))
else if (z <= 2d+25) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -6e+151) {
tmp = t;
} else if (z <= -6e+25) {
tmp = x * ((y - a) / z);
} else if (z <= -4e-63) {
tmp = t_1;
} else if (z <= -1.05e-108) {
tmp = t * (y / (a - z));
} else if (z <= 2e+25) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -6e+151: tmp = t elif z <= -6e+25: tmp = x * ((y - a) / z) elif z <= -4e-63: tmp = t_1 elif z <= -1.05e-108: tmp = t * (y / (a - z)) elif z <= 2e+25: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -6e+151) tmp = t; elseif (z <= -6e+25) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= -4e-63) tmp = t_1; elseif (z <= -1.05e-108) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 2e+25) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -6e+151) tmp = t; elseif (z <= -6e+25) tmp = x * ((y - a) / z); elseif (z <= -4e-63) tmp = t_1; elseif (z <= -1.05e-108) tmp = t * (y / (a - z)); elseif (z <= 2e+25) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+151], t, If[LessEqual[z, -6e+25], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e-63], t$95$1, If[LessEqual[z, -1.05e-108], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+25], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{+151}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-108}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -5.9999999999999998e151 or 2.00000000000000018e25 < z Initial program 59.9%
Taylor expanded in z around inf 49.4%
if -5.9999999999999998e151 < z < -6.00000000000000011e25Initial program 74.7%
Taylor expanded in x around inf 31.2%
mul-1-neg31.2%
unsub-neg31.2%
Simplified31.2%
Taylor expanded in z around inf 37.3%
associate-*r/37.3%
mul-1-neg37.3%
neg-mul-137.3%
sub-neg37.3%
Simplified37.3%
Taylor expanded in x around 0 31.6%
associate-/l*37.3%
Simplified37.3%
if -6.00000000000000011e25 < z < -4.00000000000000027e-63 or -1.05e-108 < z < 2.00000000000000018e25Initial program 96.5%
Taylor expanded in x around inf 62.2%
mul-1-neg62.2%
unsub-neg62.2%
Simplified62.2%
Taylor expanded in z around 0 57.6%
if -4.00000000000000027e-63 < z < -1.05e-108Initial program 93.6%
Taylor expanded in y around inf 81.3%
div-sub81.3%
Simplified81.3%
Taylor expanded in t around inf 58.9%
associate-/l*65.6%
Simplified65.6%
Final simplification52.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= z -4.4e+72)
t
(if (<= z -1.3e-58)
x
(if (<= z -7e-236)
t_1
(if (<= z 8.5e-111)
x
(if (<= z 1.75e-28) t_1 (if (<= z 2.6e+14) x t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (z <= -4.4e+72) {
tmp = t;
} else if (z <= -1.3e-58) {
tmp = x;
} else if (z <= -7e-236) {
tmp = t_1;
} else if (z <= 8.5e-111) {
tmp = x;
} else if (z <= 1.75e-28) {
tmp = t_1;
} else if (z <= 2.6e+14) {
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) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (z <= (-4.4d+72)) then
tmp = t
else if (z <= (-1.3d-58)) then
tmp = x
else if (z <= (-7d-236)) then
tmp = t_1
else if (z <= 8.5d-111) then
tmp = x
else if (z <= 1.75d-28) then
tmp = t_1
else if (z <= 2.6d+14) 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 t_1 = t * (y / a);
double tmp;
if (z <= -4.4e+72) {
tmp = t;
} else if (z <= -1.3e-58) {
tmp = x;
} else if (z <= -7e-236) {
tmp = t_1;
} else if (z <= 8.5e-111) {
tmp = x;
} else if (z <= 1.75e-28) {
tmp = t_1;
} else if (z <= 2.6e+14) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if z <= -4.4e+72: tmp = t elif z <= -1.3e-58: tmp = x elif z <= -7e-236: tmp = t_1 elif z <= 8.5e-111: tmp = x elif z <= 1.75e-28: tmp = t_1 elif z <= 2.6e+14: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (z <= -4.4e+72) tmp = t; elseif (z <= -1.3e-58) tmp = x; elseif (z <= -7e-236) tmp = t_1; elseif (z <= 8.5e-111) tmp = x; elseif (z <= 1.75e-28) tmp = t_1; elseif (z <= 2.6e+14) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (z <= -4.4e+72) tmp = t; elseif (z <= -1.3e-58) tmp = x; elseif (z <= -7e-236) tmp = t_1; elseif (z <= 8.5e-111) tmp = x; elseif (z <= 1.75e-28) tmp = t_1; elseif (z <= 2.6e+14) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+72], t, If[LessEqual[z, -1.3e-58], x, If[LessEqual[z, -7e-236], t$95$1, If[LessEqual[z, 8.5e-111], x, If[LessEqual[z, 1.75e-28], t$95$1, If[LessEqual[z, 2.6e+14], x, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-111}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.4e72 or 2.6e14 < z Initial program 64.0%
Taylor expanded in z around inf 45.3%
if -4.4e72 < z < -1.30000000000000003e-58 or -6.99999999999999988e-236 < z < 8.5000000000000003e-111 or 1.75e-28 < z < 2.6e14Initial program 93.5%
Taylor expanded in a around inf 46.2%
if -1.30000000000000003e-58 < z < -6.99999999999999988e-236 or 8.5000000000000003e-111 < z < 1.75e-28Initial program 93.6%
Taylor expanded in y around inf 68.3%
div-sub71.6%
Simplified71.6%
Taylor expanded in t around inf 43.9%
Taylor expanded in a around inf 34.2%
associate-/l*45.4%
Simplified45.4%
Final simplification45.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -2e+72)
t
(if (<= z -3.5e-65)
t_1
(if (<= z -6.5e-111) (* t (/ y (- a z))) (if (<= z 6e+25) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -2e+72) {
tmp = t;
} else if (z <= -3.5e-65) {
tmp = t_1;
} else if (z <= -6.5e-111) {
tmp = t * (y / (a - z));
} else if (z <= 6e+25) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-2d+72)) then
tmp = t
else if (z <= (-3.5d-65)) then
tmp = t_1
else if (z <= (-6.5d-111)) then
tmp = t * (y / (a - z))
else if (z <= 6d+25) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -2e+72) {
tmp = t;
} else if (z <= -3.5e-65) {
tmp = t_1;
} else if (z <= -6.5e-111) {
tmp = t * (y / (a - z));
} else if (z <= 6e+25) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -2e+72: tmp = t elif z <= -3.5e-65: tmp = t_1 elif z <= -6.5e-111: tmp = t * (y / (a - z)) elif z <= 6e+25: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -2e+72) tmp = t; elseif (z <= -3.5e-65) tmp = t_1; elseif (z <= -6.5e-111) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 6e+25) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -2e+72) tmp = t; elseif (z <= -3.5e-65) tmp = t_1; elseif (z <= -6.5e-111) tmp = t * (y / (a - z)); elseif (z <= 6e+25) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+72], t, If[LessEqual[z, -3.5e-65], t$95$1, If[LessEqual[z, -6.5e-111], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e+25], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-111}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.99999999999999989e72 or 6.00000000000000011e25 < z Initial program 62.4%
Taylor expanded in z around inf 46.3%
if -1.99999999999999989e72 < z < -3.50000000000000005e-65 or -6.49999999999999974e-111 < z < 6.00000000000000011e25Initial program 93.8%
Taylor expanded in x around inf 59.4%
mul-1-neg59.4%
unsub-neg59.4%
Simplified59.4%
Taylor expanded in z around 0 53.3%
if -3.50000000000000005e-65 < z < -6.49999999999999974e-111Initial program 93.6%
Taylor expanded in y around inf 81.3%
div-sub81.3%
Simplified81.3%
Taylor expanded in t around inf 58.9%
associate-/l*65.6%
Simplified65.6%
Final simplification50.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -4.4e+38)
t_2
(if (<= a -4e-177)
t_1
(if (<= a -1.65e-295)
(* y (/ (- x t) z))
(if (<= a 8.8e-29) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.4e+38) {
tmp = t_2;
} else if (a <= -4e-177) {
tmp = t_1;
} else if (a <= -1.65e-295) {
tmp = y * ((x - t) / z);
} else if (a <= 8.8e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t * ((z - y) / z)
t_2 = x * (1.0d0 - (y / a))
if (a <= (-4.4d+38)) then
tmp = t_2
else if (a <= (-4d-177)) then
tmp = t_1
else if (a <= (-1.65d-295)) then
tmp = y * ((x - t) / z)
else if (a <= 8.8d-29) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.4e+38) {
tmp = t_2;
} else if (a <= -4e-177) {
tmp = t_1;
} else if (a <= -1.65e-295) {
tmp = y * ((x - t) / z);
} else if (a <= 8.8e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -4.4e+38: tmp = t_2 elif a <= -4e-177: tmp = t_1 elif a <= -1.65e-295: tmp = y * ((x - t) / z) elif a <= 8.8e-29: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -4.4e+38) tmp = t_2; elseif (a <= -4e-177) tmp = t_1; elseif (a <= -1.65e-295) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (a <= 8.8e-29) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -4.4e+38) tmp = t_2; elseif (a <= -4e-177) tmp = t_1; elseif (a <= -1.65e-295) tmp = y * ((x - t) / z); elseif (a <= 8.8e-29) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.4e+38], t$95$2, If[LessEqual[a, -4e-177], t$95$1, If[LessEqual[a, -1.65e-295], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.8e-29], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-295}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.40000000000000013e38 or 8.79999999999999961e-29 < a Initial program 86.9%
Taylor expanded in x around inf 55.7%
mul-1-neg55.7%
unsub-neg55.7%
Simplified55.7%
Taylor expanded in z around 0 50.3%
if -4.40000000000000013e38 < a < -3.99999999999999981e-177 or -1.6499999999999999e-295 < a < 8.79999999999999961e-29Initial program 74.1%
Taylor expanded in x around 0 61.2%
Taylor expanded in a around 0 53.6%
mul-1-neg53.6%
associate-/l*67.1%
distribute-lft-neg-in67.1%
Simplified67.1%
if -3.99999999999999981e-177 < a < -1.6499999999999999e-295Initial program 71.7%
Taylor expanded in y around inf 61.4%
div-sub65.1%
Simplified65.1%
Taylor expanded in a around 0 61.2%
mul-1-neg61.2%
distribute-neg-frac261.2%
Simplified61.2%
Final simplification58.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -4.1e+38)
t_2
(if (<= a -1.04e-175)
t_1
(if (<= a -2.55e-259)
(* (- x t) (/ y z))
(if (<= a 9.6e-32) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.1e+38) {
tmp = t_2;
} else if (a <= -1.04e-175) {
tmp = t_1;
} else if (a <= -2.55e-259) {
tmp = (x - t) * (y / z);
} else if (a <= 9.6e-32) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t * ((z - y) / z)
t_2 = x * (1.0d0 - (y / a))
if (a <= (-4.1d+38)) then
tmp = t_2
else if (a <= (-1.04d-175)) then
tmp = t_1
else if (a <= (-2.55d-259)) then
tmp = (x - t) * (y / z)
else if (a <= 9.6d-32) 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 t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -4.1e+38) {
tmp = t_2;
} else if (a <= -1.04e-175) {
tmp = t_1;
} else if (a <= -2.55e-259) {
tmp = (x - t) * (y / z);
} else if (a <= 9.6e-32) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -4.1e+38: tmp = t_2 elif a <= -1.04e-175: tmp = t_1 elif a <= -2.55e-259: tmp = (x - t) * (y / z) elif a <= 9.6e-32: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -4.1e+38) tmp = t_2; elseif (a <= -1.04e-175) tmp = t_1; elseif (a <= -2.55e-259) tmp = Float64(Float64(x - t) * Float64(y / z)); elseif (a <= 9.6e-32) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -4.1e+38) tmp = t_2; elseif (a <= -1.04e-175) tmp = t_1; elseif (a <= -2.55e-259) tmp = (x - t) * (y / z); elseif (a <= 9.6e-32) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.1e+38], t$95$2, If[LessEqual[a, -1.04e-175], t$95$1, If[LessEqual[a, -2.55e-259], N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.6e-32], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -4.1 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.04 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.55 \cdot 10^{-259}:\\
\;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.1000000000000003e38 or 9.6000000000000005e-32 < a Initial program 86.9%
Taylor expanded in x around inf 55.7%
mul-1-neg55.7%
unsub-neg55.7%
Simplified55.7%
Taylor expanded in z around 0 50.3%
if -4.1000000000000003e38 < a < -1.03999999999999997e-175 or -2.5499999999999999e-259 < a < 9.6000000000000005e-32Initial program 72.9%
Taylor expanded in x around 0 59.4%
Taylor expanded in a around 0 52.5%
mul-1-neg52.5%
associate-/l*65.3%
distribute-lft-neg-in65.3%
Simplified65.3%
if -1.03999999999999997e-175 < a < -2.5499999999999999e-259Initial program 79.4%
Taylor expanded in y around inf 66.7%
div-sub73.8%
Simplified73.8%
clear-num73.8%
div-inv73.8%
Applied egg-rr73.8%
associate-/r/80.5%
Simplified80.5%
Taylor expanded in a around 0 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
Final simplification58.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- z y) z))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= a -3.5e+38)
t_2
(if (<= a -5.5e-217)
t_1
(if (<= a -9.2e-297)
(/ (* y (- x t)) z)
(if (<= a 7.5e-29) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -3.5e+38) {
tmp = t_2;
} else if (a <= -5.5e-217) {
tmp = t_1;
} else if (a <= -9.2e-297) {
tmp = (y * (x - t)) / z;
} else if (a <= 7.5e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = t * ((z - y) / z)
t_2 = x * (1.0d0 - (y / a))
if (a <= (-3.5d+38)) then
tmp = t_2
else if (a <= (-5.5d-217)) then
tmp = t_1
else if (a <= (-9.2d-297)) then
tmp = (y * (x - t)) / z
else if (a <= 7.5d-29) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((z - y) / z);
double t_2 = x * (1.0 - (y / a));
double tmp;
if (a <= -3.5e+38) {
tmp = t_2;
} else if (a <= -5.5e-217) {
tmp = t_1;
} else if (a <= -9.2e-297) {
tmp = (y * (x - t)) / z;
} else if (a <= 7.5e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((z - y) / z) t_2 = x * (1.0 - (y / a)) tmp = 0 if a <= -3.5e+38: tmp = t_2 elif a <= -5.5e-217: tmp = t_1 elif a <= -9.2e-297: tmp = (y * (x - t)) / z elif a <= 7.5e-29: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(z - y) / z)) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -3.5e+38) tmp = t_2; elseif (a <= -5.5e-217) tmp = t_1; elseif (a <= -9.2e-297) tmp = Float64(Float64(y * Float64(x - t)) / z); elseif (a <= 7.5e-29) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((z - y) / z); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -3.5e+38) tmp = t_2; elseif (a <= -5.5e-217) tmp = t_1; elseif (a <= -9.2e-297) tmp = (y * (x - t)) / z; elseif (a <= 7.5e-29) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+38], t$95$2, If[LessEqual[a, -5.5e-217], t$95$1, If[LessEqual[a, -9.2e-297], N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[a, 7.5e-29], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z - y}{z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-217}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-297}:\\
\;\;\;\;\frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3.50000000000000002e38 or 7.50000000000000006e-29 < a Initial program 86.9%
Taylor expanded in x around inf 55.7%
mul-1-neg55.7%
unsub-neg55.7%
Simplified55.7%
Taylor expanded in z around 0 50.3%
if -3.50000000000000002e38 < a < -5.49999999999999975e-217 or -9.1999999999999996e-297 < a < 7.50000000000000006e-29Initial program 75.0%
Taylor expanded in x around 0 60.9%
Taylor expanded in a around 0 52.6%
mul-1-neg52.6%
associate-/l*66.5%
distribute-lft-neg-in66.5%
Simplified66.5%
if -5.49999999999999975e-217 < a < -9.1999999999999996e-297Initial program 66.8%
Taylor expanded in y around inf 58.5%
div-sub62.8%
Simplified62.8%
Taylor expanded in a around 0 70.2%
associate-*r/70.2%
neg-mul-170.2%
distribute-rgt-neg-in70.2%
Simplified70.2%
Final simplification59.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.56e+72)
t_1
(if (<= z -9.5e+23)
(* y (/ (- t x) (- a z)))
(if (<= z 2.5e+21) (+ x (* y (/ (- t x) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.56e+72) {
tmp = t_1;
} else if (z <= -9.5e+23) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 2.5e+21) {
tmp = x + (y * ((t - x) / a));
} 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 * ((y - z) / (a - z))
if (z <= (-1.56d+72)) then
tmp = t_1
else if (z <= (-9.5d+23)) then
tmp = y * ((t - x) / (a - z))
else if (z <= 2.5d+21) then
tmp = x + (y * ((t - x) / a))
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 * ((y - z) / (a - z));
double tmp;
if (z <= -1.56e+72) {
tmp = t_1;
} else if (z <= -9.5e+23) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 2.5e+21) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.56e+72: tmp = t_1 elif z <= -9.5e+23: tmp = y * ((t - x) / (a - z)) elif z <= 2.5e+21: tmp = x + (y * ((t - x) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.56e+72) tmp = t_1; elseif (z <= -9.5e+23) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 2.5e+21) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.56e+72) tmp = t_1; elseif (z <= -9.5e+23) tmp = y * ((t - x) / (a - z)); elseif (z <= 2.5e+21) tmp = x + (y * ((t - x) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.56e+72], t$95$1, If[LessEqual[z, -9.5e+23], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+21], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.56 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{+23}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.56e72 or 2.5e21 < z Initial program 63.4%
Taylor expanded in x around 0 43.3%
associate-/l*67.2%
Simplified67.2%
if -1.56e72 < z < -9.50000000000000038e23Initial program 73.9%
Taylor expanded in y around inf 74.9%
div-sub74.9%
Simplified74.9%
if -9.50000000000000038e23 < z < 2.5e21Initial program 96.1%
Taylor expanded in z around 0 70.9%
associate-/l*76.7%
Simplified76.7%
Final simplification72.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -4.2e+71)
t_1
(if (<= z -1.15e+24)
(/ (- t x) (/ (- a z) y))
(if (<= z 2.8e+21) (+ x (* y (/ (- t x) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -4.2e+71) {
tmp = t_1;
} else if (z <= -1.15e+24) {
tmp = (t - x) / ((a - z) / y);
} else if (z <= 2.8e+21) {
tmp = x + (y * ((t - x) / a));
} 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 * ((y - z) / (a - z))
if (z <= (-4.2d+71)) then
tmp = t_1
else if (z <= (-1.15d+24)) then
tmp = (t - x) / ((a - z) / y)
else if (z <= 2.8d+21) then
tmp = x + (y * ((t - x) / a))
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 * ((y - z) / (a - z));
double tmp;
if (z <= -4.2e+71) {
tmp = t_1;
} else if (z <= -1.15e+24) {
tmp = (t - x) / ((a - z) / y);
} else if (z <= 2.8e+21) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -4.2e+71: tmp = t_1 elif z <= -1.15e+24: tmp = (t - x) / ((a - z) / y) elif z <= 2.8e+21: tmp = x + (y * ((t - x) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -4.2e+71) tmp = t_1; elseif (z <= -1.15e+24) tmp = Float64(Float64(t - x) / Float64(Float64(a - z) / y)); elseif (z <= 2.8e+21) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -4.2e+71) tmp = t_1; elseif (z <= -1.15e+24) tmp = (t - x) / ((a - z) / y); elseif (z <= 2.8e+21) tmp = x + (y * ((t - x) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+71], t$95$1, If[LessEqual[z, -1.15e+24], N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+21], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+24}:\\
\;\;\;\;\frac{t - x}{\frac{a - z}{y}}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+21}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.19999999999999978e71 or 2.8e21 < z Initial program 63.4%
Taylor expanded in x around 0 43.3%
associate-/l*67.2%
Simplified67.2%
if -4.19999999999999978e71 < z < -1.15e24Initial program 73.9%
Taylor expanded in y around inf 74.9%
div-sub74.9%
Simplified74.9%
clear-num74.7%
div-inv74.9%
Applied egg-rr74.9%
associate-/r/74.9%
Simplified74.9%
*-commutative74.9%
clear-num74.7%
un-div-inv75.0%
Applied egg-rr75.0%
if -1.15e24 < z < 2.8e21Initial program 96.1%
Taylor expanded in z around 0 70.9%
associate-/l*76.7%
Simplified76.7%
Final simplification72.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= a -1.9e+38)
t_1
(if (<= a -5e-96) t (if (<= a 4.8e-7) (* y (/ (- x t) z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (a <= -1.9e+38) {
tmp = t_1;
} else if (a <= -5e-96) {
tmp = t;
} else if (a <= 4.8e-7) {
tmp = y * ((x - t) / 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 = x * (1.0d0 - (y / a))
if (a <= (-1.9d+38)) then
tmp = t_1
else if (a <= (-5d-96)) then
tmp = t
else if (a <= 4.8d-7) then
tmp = y * ((x - t) / 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 = x * (1.0 - (y / a));
double tmp;
if (a <= -1.9e+38) {
tmp = t_1;
} else if (a <= -5e-96) {
tmp = t;
} else if (a <= 4.8e-7) {
tmp = y * ((x - t) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if a <= -1.9e+38: tmp = t_1 elif a <= -5e-96: tmp = t elif a <= 4.8e-7: tmp = y * ((x - t) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (a <= -1.9e+38) tmp = t_1; elseif (a <= -5e-96) tmp = t; elseif (a <= 4.8e-7) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (a <= -1.9e+38) tmp = t_1; elseif (a <= -5e-96) tmp = t; elseif (a <= 4.8e-7) tmp = y * ((x - t) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.9e+38], t$95$1, If[LessEqual[a, -5e-96], t, If[LessEqual[a, 4.8e-7], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;a \leq -1.9 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-96}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.8999999999999999e38 or 4.79999999999999957e-7 < a Initial program 87.1%
Taylor expanded in x around inf 55.2%
mul-1-neg55.2%
unsub-neg55.2%
Simplified55.2%
Taylor expanded in z around 0 51.3%
if -1.8999999999999999e38 < a < -4.99999999999999995e-96Initial program 61.7%
Taylor expanded in z around inf 42.8%
if -4.99999999999999995e-96 < a < 4.79999999999999957e-7Initial program 76.8%
Taylor expanded in y around inf 59.6%
div-sub62.2%
Simplified62.2%
Taylor expanded in a around 0 56.1%
mul-1-neg56.1%
distribute-neg-frac256.1%
Simplified56.1%
Final simplification52.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -122.0) (not (<= z 2.8e+21))) (+ t (* (/ (- t x) z) (- a y))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -122.0) || !(z <= 2.8e+21)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + (y * ((t - x) / 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 <= (-122.0d0)) .or. (.not. (z <= 2.8d+21))) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = x + (y * ((t - x) / 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 <= -122.0) || !(z <= 2.8e+21)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -122.0) or not (z <= 2.8e+21): tmp = t + (((t - x) / z) * (a - y)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -122.0) || !(z <= 2.8e+21)) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -122.0) || ~((z <= 2.8e+21))) tmp = t + (((t - x) / z) * (a - y)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -122.0], N[Not[LessEqual[z, 2.8e+21]], $MachinePrecision]], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -122 \lor \neg \left(z \leq 2.8 \cdot 10^{+21}\right):\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -122 or 2.8e21 < z Initial program 65.3%
Taylor expanded in z around inf 65.9%
associate--l+65.9%
distribute-lft-out--65.9%
div-sub65.9%
mul-1-neg65.9%
unsub-neg65.9%
div-sub65.9%
associate-/l*73.6%
associate-/l*79.9%
distribute-rgt-out--80.0%
Simplified80.0%
if -122 < z < 2.8e21Initial program 96.0%
Taylor expanded in z around 0 71.7%
associate-/l*77.7%
Simplified77.7%
Final simplification78.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.1e-23) (not (<= t 3e-85))) (* t (/ (- y z) (- a z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.1e-23) || !(t <= 3e-85)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (1.0 - (y / 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 ((t <= (-5.1d-23)) .or. (.not. (t <= 3d-85))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.1e-23) || !(t <= 3e-85)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.1e-23) or not (t <= 3e-85): tmp = t * ((y - z) / (a - z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.1e-23) || !(t <= 3e-85)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.1e-23) || ~((t <= 3e-85))) tmp = t * ((y - z) / (a - z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.1e-23], N[Not[LessEqual[t, 3e-85]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.1 \cdot 10^{-23} \lor \neg \left(t \leq 3 \cdot 10^{-85}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if t < -5.10000000000000011e-23 or 3.00000000000000022e-85 < t Initial program 85.5%
Taylor expanded in x around 0 51.0%
associate-/l*72.1%
Simplified72.1%
if -5.10000000000000011e-23 < t < 3.00000000000000022e-85Initial program 71.9%
Taylor expanded in x around inf 61.2%
mul-1-neg61.2%
unsub-neg61.2%
Simplified61.2%
Taylor expanded in z around 0 52.7%
Final simplification63.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.2e+102) (* y (/ (- t x) (- a z))) (if (<= x 1.3e+19) (* t (/ (- y z) (- a z))) (* x (+ (/ (- z y) a) 1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.2e+102) {
tmp = y * ((t - x) / (a - z));
} else if (x <= 1.3e+19) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (((z - y) / a) + 1.0);
}
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 (x <= (-1.2d+102)) then
tmp = y * ((t - x) / (a - z))
else if (x <= 1.3d+19) then
tmp = t * ((y - z) / (a - z))
else
tmp = x * (((z - y) / a) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.2e+102) {
tmp = y * ((t - x) / (a - z));
} else if (x <= 1.3e+19) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x * (((z - y) / a) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.2e+102: tmp = y * ((t - x) / (a - z)) elif x <= 1.3e+19: tmp = t * ((y - z) / (a - z)) else: tmp = x * (((z - y) / a) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.2e+102) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (x <= 1.3e+19) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x * Float64(Float64(Float64(z - y) / a) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.2e+102) tmp = y * ((t - x) / (a - z)); elseif (x <= 1.3e+19) tmp = t * ((y - z) / (a - z)); else tmp = x * (((z - y) / a) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.2e+102], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+19], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+102}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{z - y}{a} + 1\right)\\
\end{array}
\end{array}
if x < -1.19999999999999997e102Initial program 69.9%
Taylor expanded in y around inf 55.4%
div-sub62.5%
Simplified62.5%
if -1.19999999999999997e102 < x < 1.3e19Initial program 83.3%
Taylor expanded in x around 0 53.6%
associate-/l*68.2%
Simplified68.2%
if 1.3e19 < x Initial program 76.6%
Taylor expanded in x around inf 59.9%
mul-1-neg59.9%
unsub-neg59.9%
Simplified59.9%
Taylor expanded in a around -inf 53.0%
mul-1-neg53.0%
unsub-neg53.0%
Simplified53.0%
Final simplification64.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.1e+71) t (if (<= z 68000000000000.0) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.1e+71) {
tmp = t;
} else if (z <= 68000000000000.0) {
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 <= (-4.1d+71)) then
tmp = t
else if (z <= 68000000000000.0d0) 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 <= -4.1e+71) {
tmp = t;
} else if (z <= 68000000000000.0) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.1e+71: tmp = t elif z <= 68000000000000.0: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.1e+71) tmp = t; elseif (z <= 68000000000000.0) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.1e+71) tmp = t; elseif (z <= 68000000000000.0) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+71], t, If[LessEqual[z, 68000000000000.0], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+71}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 68000000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.1000000000000002e71 or 6.8e13 < z Initial program 64.0%
Taylor expanded in z around inf 45.3%
if -4.1000000000000002e71 < z < 6.8e13Initial program 93.6%
Taylor expanded in a around inf 34.1%
Final simplification39.3%
(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 79.7%
Taylor expanded in z around inf 24.7%
Final simplification24.7%
herbie shell --seed 2024096
(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)))))