
(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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 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(Float64(y - z) * 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[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y z) (- x t)) (- a z)))))
(if (or (<= t_1 -2e-238) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - z) * (x - t)) / (a - z));
double tmp;
if ((t_1 <= -2e-238) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((x - t) / (z / (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) :: t_1
real(8) :: tmp
t_1 = x - (((y - z) * (x - t)) / (a - z))
if ((t_1 <= (-2d-238)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + ((x - t) / (z / (y - a)))
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) * (x - t)) / (a - z));
double tmp;
if ((t_1 <= -2e-238) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((y - z) * (x - t)) / (a - z)) tmp = 0 if (t_1 <= -2e-238) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + ((x - t) / (z / (y - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-238) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((y - z) * (x - t)) / (a - z)); tmp = 0.0; if ((t_1 <= -2e-238) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + ((x - t) / (z / (y - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-238], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-238} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2e-238 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.0%
associate-*l/91.9%
Simplified91.9%
*-commutative91.9%
clear-num91.8%
un-div-inv92.1%
Applied egg-rr92.1%
if -2e-238 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 7.9%
associate-*l/7.9%
Simplified7.9%
Taylor expanded in z around -inf 99.8%
+-commutative99.8%
sub-neg99.8%
mul-1-neg99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
+-commutative99.8%
mul-1-neg99.8%
sub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
expm1-log1p-u91.3%
expm1-udef59.3%
associate-/l*59.3%
Applied egg-rr59.3%
expm1-def91.4%
expm1-log1p99.9%
Simplified99.9%
Final simplification92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y z) (- x t)) (- a z)))))
(if (or (<= t_1 -2e-238) (not (<= t_1 0.0)))
(- x (* (/ (- y z) (- a z)) (- x t)))
(+ t (/ (- x t) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - z) * (x - t)) / (a - z));
double tmp;
if ((t_1 <= -2e-238) || !(t_1 <= 0.0)) {
tmp = x - (((y - z) / (a - z)) * (x - t));
} else {
tmp = t + ((x - t) / (z / (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) :: t_1
real(8) :: tmp
t_1 = x - (((y - z) * (x - t)) / (a - z))
if ((t_1 <= (-2d-238)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x - (((y - z) / (a - z)) * (x - t))
else
tmp = t + ((x - t) / (z / (y - a)))
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) * (x - t)) / (a - z));
double tmp;
if ((t_1 <= -2e-238) || !(t_1 <= 0.0)) {
tmp = x - (((y - z) / (a - z)) * (x - t));
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((y - z) * (x - t)) / (a - z)) tmp = 0 if (t_1 <= -2e-238) or not (t_1 <= 0.0): tmp = x - (((y - z) / (a - z)) * (x - t)) else: tmp = t + ((x - t) / (z / (y - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(a - z))) tmp = 0.0 if ((t_1 <= -2e-238) || !(t_1 <= 0.0)) tmp = Float64(x - Float64(Float64(Float64(y - z) / Float64(a - z)) * Float64(x - t))); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((y - z) * (x - t)) / (a - z)); tmp = 0.0; if ((t_1 <= -2e-238) || ~((t_1 <= 0.0))) tmp = x - (((y - z) / (a - z)) * (x - t)); else tmp = t + ((x - t) / (z / (y - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-238], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-238} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x - \frac{y - z}{a - z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2e-238 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 75.0%
associate-*l/91.9%
Simplified91.9%
if -2e-238 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 7.9%
associate-*l/7.9%
Simplified7.9%
Taylor expanded in z around -inf 99.8%
+-commutative99.8%
sub-neg99.8%
mul-1-neg99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
+-commutative99.8%
mul-1-neg99.8%
sub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
expm1-log1p-u91.3%
expm1-udef59.3%
associate-/l*59.3%
Applied egg-rr59.3%
expm1-def91.4%
expm1-log1p99.9%
Simplified99.9%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (* (/ y a) (- x t)))))
(if (<= z -1.15e+33)
t_1
(if (<= z -8.2e+24)
(/ (- y a) (/ z x))
(if (<= z -3e-25)
t_1
(if (<= z -3.8e-89)
t_2
(if (<= z -2.6e-110)
(* (- y z) (/ t (- a z)))
(if (<= z 2.45e+17)
t_2
(if (<= z 1.6e+90)
t_1
(if (<= z 4.1e+130) t_2 (+ t (/ a (/ z (- t x))))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - ((y / a) * (x - t));
double tmp;
if (z <= -1.15e+33) {
tmp = t_1;
} else if (z <= -8.2e+24) {
tmp = (y - a) / (z / x);
} else if (z <= -3e-25) {
tmp = t_1;
} else if (z <= -3.8e-89) {
tmp = t_2;
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.45e+17) {
tmp = t_2;
} else if (z <= 1.6e+90) {
tmp = t_1;
} else if (z <= 4.1e+130) {
tmp = t_2;
} else {
tmp = t + (a / (z / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x - ((y / a) * (x - t))
if (z <= (-1.15d+33)) then
tmp = t_1
else if (z <= (-8.2d+24)) then
tmp = (y - a) / (z / x)
else if (z <= (-3d-25)) then
tmp = t_1
else if (z <= (-3.8d-89)) then
tmp = t_2
else if (z <= (-2.6d-110)) then
tmp = (y - z) * (t / (a - z))
else if (z <= 2.45d+17) then
tmp = t_2
else if (z <= 1.6d+90) then
tmp = t_1
else if (z <= 4.1d+130) then
tmp = t_2
else
tmp = t + (a / (z / (t - 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 - z));
double t_2 = x - ((y / a) * (x - t));
double tmp;
if (z <= -1.15e+33) {
tmp = t_1;
} else if (z <= -8.2e+24) {
tmp = (y - a) / (z / x);
} else if (z <= -3e-25) {
tmp = t_1;
} else if (z <= -3.8e-89) {
tmp = t_2;
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.45e+17) {
tmp = t_2;
} else if (z <= 1.6e+90) {
tmp = t_1;
} else if (z <= 4.1e+130) {
tmp = t_2;
} else {
tmp = t + (a / (z / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x - ((y / a) * (x - t)) tmp = 0 if z <= -1.15e+33: tmp = t_1 elif z <= -8.2e+24: tmp = (y - a) / (z / x) elif z <= -3e-25: tmp = t_1 elif z <= -3.8e-89: tmp = t_2 elif z <= -2.6e-110: tmp = (y - z) * (t / (a - z)) elif z <= 2.45e+17: tmp = t_2 elif z <= 1.6e+90: tmp = t_1 elif z <= 4.1e+130: tmp = t_2 else: tmp = t + (a / (z / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x - Float64(Float64(y / a) * Float64(x - t))) tmp = 0.0 if (z <= -1.15e+33) tmp = t_1; elseif (z <= -8.2e+24) tmp = Float64(Float64(y - a) / Float64(z / x)); elseif (z <= -3e-25) tmp = t_1; elseif (z <= -3.8e-89) tmp = t_2; elseif (z <= -2.6e-110) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= 2.45e+17) tmp = t_2; elseif (z <= 1.6e+90) tmp = t_1; elseif (z <= 4.1e+130) tmp = t_2; else tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x - ((y / a) * (x - t)); tmp = 0.0; if (z <= -1.15e+33) tmp = t_1; elseif (z <= -8.2e+24) tmp = (y - a) / (z / x); elseif (z <= -3e-25) tmp = t_1; elseif (z <= -3.8e-89) tmp = t_2; elseif (z <= -2.6e-110) tmp = (y - z) * (t / (a - z)); elseif (z <= 2.45e+17) tmp = t_2; elseif (z <= 1.6e+90) tmp = t_1; elseif (z <= 4.1e+130) tmp = t_2; else tmp = t + (a / (z / (t - x))); 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]}, Block[{t$95$2 = N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+33], t$95$1, If[LessEqual[z, -8.2e+24], N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e-25], t$95$1, If[LessEqual[z, -3.8e-89], t$95$2, If[LessEqual[z, -2.6e-110], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e+17], t$95$2, If[LessEqual[z, 1.6e+90], t$95$1, If[LessEqual[z, 4.1e+130], t$95$2, N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+24}:\\
\;\;\;\;\frac{y - a}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-89}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+17}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+130}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\end{array}
\end{array}
if z < -1.15000000000000005e33 or -8.2000000000000002e24 < z < -2.9999999999999998e-25 or 2.45e17 < z < 1.59999999999999999e90Initial program 53.5%
associate-*l/78.6%
Simplified78.6%
Taylor expanded in x around 0 47.2%
associate-*r/68.5%
Simplified68.5%
if -1.15000000000000005e33 < z < -8.2000000000000002e24Initial program 72.3%
associate-*l/72.3%
Simplified72.3%
Taylor expanded in z around -inf 99.6%
+-commutative99.6%
sub-neg99.6%
mul-1-neg99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
+-commutative99.6%
mul-1-neg99.6%
sub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Taylor expanded in t around 0 82.1%
associate-/l*82.3%
Simplified82.3%
if -2.9999999999999998e-25 < z < -3.8000000000000001e-89 or -2.5999999999999999e-110 < z < 2.45e17 or 1.59999999999999999e90 < z < 4.09999999999999978e130Initial program 85.3%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in z around 0 80.5%
if -3.8000000000000001e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
*-commutative76.4%
clear-num72.4%
un-div-inv72.4%
Applied egg-rr72.4%
Taylor expanded in x around 0 94.1%
associate-/l*69.3%
associate-/r/93.9%
Simplified93.9%
if 4.09999999999999978e130 < z Initial program 36.9%
associate-*l/62.9%
Simplified62.9%
Taylor expanded in z around -inf 71.9%
+-commutative71.9%
sub-neg71.9%
mul-1-neg71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
+-commutative71.9%
mul-1-neg71.9%
sub-neg71.9%
distribute-rgt-out--72.1%
Simplified72.1%
Taylor expanded in y around 0 69.2%
sub-neg69.2%
mul-1-neg69.2%
remove-double-neg69.2%
associate-/l*74.4%
Simplified74.4%
Final simplification76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (* (/ y a) (- x t)))))
(if (<= z -1.15e+33)
t_1
(if (<= z -2.4e+23)
(/ (- y a) (/ z x))
(if (<= z -2.15e-19)
t_1
(if (<= z -6.2e-89)
t_2
(if (<= z -2.6e-110)
(* (- y z) (/ t (- a z)))
(if (<= z 2.9e+15)
(+ x (/ (- t x) (/ a y)))
(if (<= z 1.15e+90)
t_1
(if (<= z 2.55e+130) t_2 (+ t (/ a (/ z (- t x))))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - ((y / a) * (x - t));
double tmp;
if (z <= -1.15e+33) {
tmp = t_1;
} else if (z <= -2.4e+23) {
tmp = (y - a) / (z / x);
} else if (z <= -2.15e-19) {
tmp = t_1;
} else if (z <= -6.2e-89) {
tmp = t_2;
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.9e+15) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 1.15e+90) {
tmp = t_1;
} else if (z <= 2.55e+130) {
tmp = t_2;
} else {
tmp = t + (a / (z / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x - ((y / a) * (x - t))
if (z <= (-1.15d+33)) then
tmp = t_1
else if (z <= (-2.4d+23)) then
tmp = (y - a) / (z / x)
else if (z <= (-2.15d-19)) then
tmp = t_1
else if (z <= (-6.2d-89)) then
tmp = t_2
else if (z <= (-2.6d-110)) then
tmp = (y - z) * (t / (a - z))
else if (z <= 2.9d+15) then
tmp = x + ((t - x) / (a / y))
else if (z <= 1.15d+90) then
tmp = t_1
else if (z <= 2.55d+130) then
tmp = t_2
else
tmp = t + (a / (z / (t - 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 - z));
double t_2 = x - ((y / a) * (x - t));
double tmp;
if (z <= -1.15e+33) {
tmp = t_1;
} else if (z <= -2.4e+23) {
tmp = (y - a) / (z / x);
} else if (z <= -2.15e-19) {
tmp = t_1;
} else if (z <= -6.2e-89) {
tmp = t_2;
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.9e+15) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 1.15e+90) {
tmp = t_1;
} else if (z <= 2.55e+130) {
tmp = t_2;
} else {
tmp = t + (a / (z / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x - ((y / a) * (x - t)) tmp = 0 if z <= -1.15e+33: tmp = t_1 elif z <= -2.4e+23: tmp = (y - a) / (z / x) elif z <= -2.15e-19: tmp = t_1 elif z <= -6.2e-89: tmp = t_2 elif z <= -2.6e-110: tmp = (y - z) * (t / (a - z)) elif z <= 2.9e+15: tmp = x + ((t - x) / (a / y)) elif z <= 1.15e+90: tmp = t_1 elif z <= 2.55e+130: tmp = t_2 else: tmp = t + (a / (z / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x - Float64(Float64(y / a) * Float64(x - t))) tmp = 0.0 if (z <= -1.15e+33) tmp = t_1; elseif (z <= -2.4e+23) tmp = Float64(Float64(y - a) / Float64(z / x)); elseif (z <= -2.15e-19) tmp = t_1; elseif (z <= -6.2e-89) tmp = t_2; elseif (z <= -2.6e-110) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= 2.9e+15) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); elseif (z <= 1.15e+90) tmp = t_1; elseif (z <= 2.55e+130) tmp = t_2; else tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x - ((y / a) * (x - t)); tmp = 0.0; if (z <= -1.15e+33) tmp = t_1; elseif (z <= -2.4e+23) tmp = (y - a) / (z / x); elseif (z <= -2.15e-19) tmp = t_1; elseif (z <= -6.2e-89) tmp = t_2; elseif (z <= -2.6e-110) tmp = (y - z) * (t / (a - z)); elseif (z <= 2.9e+15) tmp = x + ((t - x) / (a / y)); elseif (z <= 1.15e+90) tmp = t_1; elseif (z <= 2.55e+130) tmp = t_2; else tmp = t + (a / (z / (t - x))); 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]}, Block[{t$95$2 = N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.15e+33], t$95$1, If[LessEqual[z, -2.4e+23], N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.15e-19], t$95$1, If[LessEqual[z, -6.2e-89], t$95$2, If[LessEqual[z, -2.6e-110], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+15], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e+90], t$95$1, If[LessEqual[z, 2.55e+130], t$95$2, N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+23}:\\
\;\;\;\;\frac{y - a}{\frac{z}{x}}\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-89}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+15}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{+130}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\end{array}
\end{array}
if z < -1.15000000000000005e33 or -2.4e23 < z < -2.15e-19 or 2.9e15 < z < 1.15e90Initial program 53.5%
associate-*l/78.6%
Simplified78.6%
Taylor expanded in x around 0 47.2%
associate-*r/68.5%
Simplified68.5%
if -1.15000000000000005e33 < z < -2.4e23Initial program 72.3%
associate-*l/72.3%
Simplified72.3%
Taylor expanded in z around -inf 99.6%
+-commutative99.6%
sub-neg99.6%
mul-1-neg99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
+-commutative99.6%
mul-1-neg99.6%
sub-neg99.6%
distribute-rgt-out--99.6%
Simplified99.6%
Taylor expanded in t around 0 82.1%
associate-/l*82.3%
Simplified82.3%
if -2.15e-19 < z < -6.19999999999999993e-89 or 1.15e90 < z < 2.5499999999999998e130Initial program 69.9%
associate-*l/87.9%
Simplified87.9%
Taylor expanded in z around 0 70.0%
if -6.19999999999999993e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
*-commutative76.4%
clear-num72.4%
un-div-inv72.4%
Applied egg-rr72.4%
Taylor expanded in x around 0 94.1%
associate-/l*69.3%
associate-/r/93.9%
Simplified93.9%
if -2.5999999999999999e-110 < z < 2.9e15Initial program 88.7%
associate-*l/95.1%
Simplified95.1%
*-commutative95.1%
clear-num95.1%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 83.5%
if 2.5499999999999998e130 < z Initial program 36.9%
associate-*l/62.9%
Simplified62.9%
Taylor expanded in z around -inf 71.9%
+-commutative71.9%
sub-neg71.9%
mul-1-neg71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
+-commutative71.9%
mul-1-neg71.9%
sub-neg71.9%
distribute-rgt-out--72.1%
Simplified72.1%
Taylor expanded in y around 0 69.2%
sub-neg69.2%
mul-1-neg69.2%
remove-double-neg69.2%
associate-/l*74.4%
Simplified74.4%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (- x (* (/ y a) (- x t)))))
(if (<= z -8.8e+61)
t_1
(if (<= z -2.7e-21)
(+ t (/ (* y (- x t)) z))
(if (<= z -3.8e-89)
t_2
(if (<= z -2.6e-110)
(* (- y z) (/ t (- a z)))
(if (<= z 2.7e+15)
(+ x (/ (- t x) (/ a y)))
(if (<= z 1.6e+90)
t_1
(if (<= z 7e+130) t_2 (+ t (/ a (/ z (- t x)))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x - ((y / a) * (x - t));
double tmp;
if (z <= -8.8e+61) {
tmp = t_1;
} else if (z <= -2.7e-21) {
tmp = t + ((y * (x - t)) / z);
} else if (z <= -3.8e-89) {
tmp = t_2;
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.7e+15) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 1.6e+90) {
tmp = t_1;
} else if (z <= 7e+130) {
tmp = t_2;
} else {
tmp = t + (a / (z / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x - ((y / a) * (x - t))
if (z <= (-8.8d+61)) then
tmp = t_1
else if (z <= (-2.7d-21)) then
tmp = t + ((y * (x - t)) / z)
else if (z <= (-3.8d-89)) then
tmp = t_2
else if (z <= (-2.6d-110)) then
tmp = (y - z) * (t / (a - z))
else if (z <= 2.7d+15) then
tmp = x + ((t - x) / (a / y))
else if (z <= 1.6d+90) then
tmp = t_1
else if (z <= 7d+130) then
tmp = t_2
else
tmp = t + (a / (z / (t - 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 - z));
double t_2 = x - ((y / a) * (x - t));
double tmp;
if (z <= -8.8e+61) {
tmp = t_1;
} else if (z <= -2.7e-21) {
tmp = t + ((y * (x - t)) / z);
} else if (z <= -3.8e-89) {
tmp = t_2;
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 2.7e+15) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 1.6e+90) {
tmp = t_1;
} else if (z <= 7e+130) {
tmp = t_2;
} else {
tmp = t + (a / (z / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x - ((y / a) * (x - t)) tmp = 0 if z <= -8.8e+61: tmp = t_1 elif z <= -2.7e-21: tmp = t + ((y * (x - t)) / z) elif z <= -3.8e-89: tmp = t_2 elif z <= -2.6e-110: tmp = (y - z) * (t / (a - z)) elif z <= 2.7e+15: tmp = x + ((t - x) / (a / y)) elif z <= 1.6e+90: tmp = t_1 elif z <= 7e+130: tmp = t_2 else: tmp = t + (a / (z / (t - x))) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x - Float64(Float64(y / a) * Float64(x - t))) tmp = 0.0 if (z <= -8.8e+61) tmp = t_1; elseif (z <= -2.7e-21) tmp = Float64(t + Float64(Float64(y * Float64(x - t)) / z)); elseif (z <= -3.8e-89) tmp = t_2; elseif (z <= -2.6e-110) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= 2.7e+15) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); elseif (z <= 1.6e+90) tmp = t_1; elseif (z <= 7e+130) tmp = t_2; else tmp = Float64(t + Float64(a / Float64(z / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x - ((y / a) * (x - t)); tmp = 0.0; if (z <= -8.8e+61) tmp = t_1; elseif (z <= -2.7e-21) tmp = t + ((y * (x - t)) / z); elseif (z <= -3.8e-89) tmp = t_2; elseif (z <= -2.6e-110) tmp = (y - z) * (t / (a - z)); elseif (z <= 2.7e+15) tmp = x + ((t - x) / (a / y)); elseif (z <= 1.6e+90) tmp = t_1; elseif (z <= 7e+130) tmp = t_2; else tmp = t + (a / (z / (t - x))); 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]}, Block[{t$95$2 = N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.8e+61], t$95$1, If[LessEqual[z, -2.7e-21], N[(t + N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e-89], t$95$2, If[LessEqual[z, -2.6e-110], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+15], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+90], t$95$1, If[LessEqual[z, 7e+130], t$95$2, N[(t + N[(a / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-21}:\\
\;\;\;\;t + \frac{y \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-89}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+130}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t + \frac{a}{\frac{z}{t - x}}\\
\end{array}
\end{array}
if z < -8.8000000000000001e61 or 2.7e15 < z < 1.59999999999999999e90Initial program 48.5%
associate-*l/76.7%
Simplified76.7%
Taylor expanded in x around 0 47.6%
associate-*r/72.4%
Simplified72.4%
if -8.8000000000000001e61 < z < -2.7000000000000001e-21Initial program 74.0%
associate-*l/82.2%
Simplified82.2%
Taylor expanded in z around -inf 73.7%
+-commutative73.7%
sub-neg73.7%
mul-1-neg73.7%
+-commutative73.7%
mul-1-neg73.7%
unsub-neg73.7%
+-commutative73.7%
mul-1-neg73.7%
sub-neg73.7%
distribute-rgt-out--73.7%
Simplified73.7%
Taylor expanded in y around inf 65.6%
if -2.7000000000000001e-21 < z < -3.8000000000000001e-89 or 1.59999999999999999e90 < z < 7.0000000000000002e130Initial program 69.9%
associate-*l/87.9%
Simplified87.9%
Taylor expanded in z around 0 70.0%
if -3.8000000000000001e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
*-commutative76.4%
clear-num72.4%
un-div-inv72.4%
Applied egg-rr72.4%
Taylor expanded in x around 0 94.1%
associate-/l*69.3%
associate-/r/93.9%
Simplified93.9%
if -2.5999999999999999e-110 < z < 2.7e15Initial program 88.7%
associate-*l/95.1%
Simplified95.1%
*-commutative95.1%
clear-num95.1%
un-div-inv95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 83.5%
if 7.0000000000000002e130 < z Initial program 36.9%
associate-*l/62.9%
Simplified62.9%
Taylor expanded in z around -inf 71.9%
+-commutative71.9%
sub-neg71.9%
mul-1-neg71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
+-commutative71.9%
mul-1-neg71.9%
sub-neg71.9%
distribute-rgt-out--72.1%
Simplified72.1%
Taylor expanded in y around 0 69.2%
sub-neg69.2%
mul-1-neg69.2%
remove-double-neg69.2%
associate-/l*74.4%
Simplified74.4%
Final simplification76.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -1.62e+122)
t
(if (<= z -6.1e-232)
t_1
(if (<= z 2.8e-257)
(/ y (/ a t))
(if (<= z 1.05e-113)
t_1
(if (<= z 2.5e-69)
(* y (/ t (- a z)))
(if (<= z 2.5e+46) 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 <= -1.62e+122) {
tmp = t;
} else if (z <= -6.1e-232) {
tmp = t_1;
} else if (z <= 2.8e-257) {
tmp = y / (a / t);
} else if (z <= 1.05e-113) {
tmp = t_1;
} else if (z <= 2.5e-69) {
tmp = y * (t / (a - z));
} else if (z <= 2.5e+46) {
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 <= (-1.62d+122)) then
tmp = t
else if (z <= (-6.1d-232)) then
tmp = t_1
else if (z <= 2.8d-257) then
tmp = y / (a / t)
else if (z <= 1.05d-113) then
tmp = t_1
else if (z <= 2.5d-69) then
tmp = y * (t / (a - z))
else if (z <= 2.5d+46) 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 <= -1.62e+122) {
tmp = t;
} else if (z <= -6.1e-232) {
tmp = t_1;
} else if (z <= 2.8e-257) {
tmp = y / (a / t);
} else if (z <= 1.05e-113) {
tmp = t_1;
} else if (z <= 2.5e-69) {
tmp = y * (t / (a - z));
} else if (z <= 2.5e+46) {
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 <= -1.62e+122: tmp = t elif z <= -6.1e-232: tmp = t_1 elif z <= 2.8e-257: tmp = y / (a / t) elif z <= 1.05e-113: tmp = t_1 elif z <= 2.5e-69: tmp = y * (t / (a - z)) elif z <= 2.5e+46: 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 <= -1.62e+122) tmp = t; elseif (z <= -6.1e-232) tmp = t_1; elseif (z <= 2.8e-257) tmp = Float64(y / Float64(a / t)); elseif (z <= 1.05e-113) tmp = t_1; elseif (z <= 2.5e-69) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (z <= 2.5e+46) 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 <= -1.62e+122) tmp = t; elseif (z <= -6.1e-232) tmp = t_1; elseif (z <= 2.8e-257) tmp = y / (a / t); elseif (z <= 1.05e-113) tmp = t_1; elseif (z <= 2.5e-69) tmp = y * (t / (a - z)); elseif (z <= 2.5e+46) 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, -1.62e+122], t, If[LessEqual[z, -6.1e-232], t$95$1, If[LessEqual[z, 2.8e-257], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-113], t$95$1, If[LessEqual[z, 2.5e-69], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+46], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+122}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -6.1 \cdot 10^{-232}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-257}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-69}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.61999999999999994e122 or 2.5000000000000001e46 < z Initial program 38.7%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in z around inf 60.0%
if -1.61999999999999994e122 < z < -6.1000000000000001e-232 or 2.80000000000000001e-257 < z < 1.05e-113 or 2.50000000000000017e-69 < z < 2.5000000000000001e46Initial program 83.9%
associate-*l/91.6%
Simplified91.6%
Taylor expanded in z around 0 59.8%
Taylor expanded in x around inf 52.8%
*-commutative52.8%
mul-1-neg52.8%
unsub-neg52.8%
Simplified52.8%
if -6.1000000000000001e-232 < z < 2.80000000000000001e-257Initial program 88.5%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around 0 53.9%
Taylor expanded in z around 0 53.9%
associate-/l*65.1%
Simplified65.1%
if 1.05e-113 < z < 2.50000000000000017e-69Initial program 86.3%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in y around inf 73.0%
div-sub73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in t around inf 65.7%
Final simplification57.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.4e+141)
(* t (/ (- y z) (- a z)))
(if (<= z -4.8e-26)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z -3.8e-89)
(- x (* (/ y a) (- x t)))
(if (<= z -2.6e-110)
(/ (* (- y z) t) (- a z))
(if (<= z 2e+24)
(+ x (/ (- t x) (/ a y)))
(+ t (/ (- x t) (/ z y)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.4e+141) {
tmp = t * ((y - z) / (a - z));
} else if (z <= -4.8e-26) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= -3.8e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 2e+24) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t + ((x - t) / (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 <= (-8.4d+141)) then
tmp = t * ((y - z) / (a - z))
else if (z <= (-4.8d-26)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= (-3.8d-89)) then
tmp = x - ((y / a) * (x - t))
else if (z <= (-2.6d-110)) then
tmp = ((y - z) * t) / (a - z)
else if (z <= 2d+24) then
tmp = x + ((t - x) / (a / y))
else
tmp = t + ((x - t) / (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 <= -8.4e+141) {
tmp = t * ((y - z) / (a - z));
} else if (z <= -4.8e-26) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= -3.8e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 2e+24) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t + ((x - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.4e+141: tmp = t * ((y - z) / (a - z)) elif z <= -4.8e-26: tmp = t + (((t - x) * (a - y)) / z) elif z <= -3.8e-89: tmp = x - ((y / a) * (x - t)) elif z <= -2.6e-110: tmp = ((y - z) * t) / (a - z) elif z <= 2e+24: tmp = x + ((t - x) / (a / y)) else: tmp = t + ((x - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.4e+141) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= -4.8e-26) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= -3.8e-89) tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t))); elseif (z <= -2.6e-110) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); elseif (z <= 2e+24) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.4e+141) tmp = t * ((y - z) / (a - z)); elseif (z <= -4.8e-26) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= -3.8e-89) tmp = x - ((y / a) * (x - t)); elseif (z <= -2.6e-110) tmp = ((y - z) * t) / (a - z); elseif (z <= 2e+24) tmp = x + ((t - x) / (a / y)); else tmp = t + ((x - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.4e+141], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.8e-26], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.8e-89], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-110], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+24], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.4 \cdot 10^{+141}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-26}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if z < -8.3999999999999994e141Initial program 30.0%
associate-*l/71.9%
Simplified71.9%
Taylor expanded in x around 0 43.5%
associate-*r/84.7%
Simplified84.7%
if -8.3999999999999994e141 < z < -4.8000000000000002e-26Initial program 61.5%
associate-*l/74.7%
Simplified74.7%
Taylor expanded in z around -inf 65.3%
+-commutative65.3%
sub-neg65.3%
mul-1-neg65.3%
+-commutative65.3%
mul-1-neg65.3%
unsub-neg65.3%
+-commutative65.3%
mul-1-neg65.3%
sub-neg65.3%
distribute-rgt-out--65.3%
Simplified65.3%
if -4.8000000000000002e-26 < z < -3.8000000000000001e-89Initial program 86.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.4%
if -3.8000000000000001e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
Taylor expanded in x around 0 94.1%
if -2.5999999999999999e-110 < z < 2e24Initial program 88.9%
associate-*l/95.2%
Simplified95.2%
*-commutative95.2%
clear-num95.2%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 82.9%
if 2e24 < z Initial program 48.0%
associate-*l/71.6%
Simplified71.6%
Taylor expanded in z around -inf 68.7%
+-commutative68.7%
sub-neg68.7%
mul-1-neg68.7%
+-commutative68.7%
mul-1-neg68.7%
unsub-neg68.7%
+-commutative68.7%
mul-1-neg68.7%
sub-neg68.7%
distribute-rgt-out--68.9%
Simplified68.9%
expm1-log1p-u51.2%
expm1-udef46.4%
associate-/l*51.4%
Applied egg-rr51.4%
expm1-def56.2%
expm1-log1p82.2%
Simplified82.2%
Taylor expanded in y around inf 75.6%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (- x t) (/ z (- y a))))))
(if (<= z -4e-26)
t_1
(if (<= z -3.8e-89)
(- x (* (/ y a) (- x t)))
(if (<= z -2.6e-110)
(/ (* (- y z) t) (- a z))
(if (<= z 9.2e+22) (+ x (/ (- t x) (/ a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / (y - a)));
double tmp;
if (z <= -4e-26) {
tmp = t_1;
} else if (z <= -3.8e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 9.2e+22) {
tmp = x + ((t - x) / (a / y));
} 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 + ((x - t) / (z / (y - a)))
if (z <= (-4d-26)) then
tmp = t_1
else if (z <= (-3.8d-89)) then
tmp = x - ((y / a) * (x - t))
else if (z <= (-2.6d-110)) then
tmp = ((y - z) * t) / (a - z)
else if (z <= 9.2d+22) then
tmp = x + ((t - x) / (a / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / (y - a)));
double tmp;
if (z <= -4e-26) {
tmp = t_1;
} else if (z <= -3.8e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 9.2e+22) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((x - t) / (z / (y - a))) tmp = 0 if z <= -4e-26: tmp = t_1 elif z <= -3.8e-89: tmp = x - ((y / a) * (x - t)) elif z <= -2.6e-110: tmp = ((y - z) * t) / (a - z) elif z <= 9.2e+22: tmp = x + ((t - x) / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -4e-26) tmp = t_1; elseif (z <= -3.8e-89) tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t))); elseif (z <= -2.6e-110) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); elseif (z <= 9.2e+22) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((x - t) / (z / (y - a))); tmp = 0.0; if (z <= -4e-26) tmp = t_1; elseif (z <= -3.8e-89) tmp = x - ((y / a) * (x - t)); elseif (z <= -2.6e-110) tmp = ((y - z) * t) / (a - z); elseif (z <= 9.2e+22) tmp = x + ((t - x) / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e-26], t$95$1, If[LessEqual[z, -3.8e-89], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-110], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+22], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+22}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.0000000000000002e-26 or 9.2000000000000008e22 < z Initial program 48.2%
associate-*l/72.6%
Simplified72.6%
Taylor expanded in z around -inf 68.1%
+-commutative68.1%
sub-neg68.1%
mul-1-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
unsub-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
sub-neg68.1%
distribute-rgt-out--68.2%
Simplified68.2%
expm1-log1p-u51.3%
expm1-udef44.5%
associate-/l*50.2%
Applied egg-rr50.2%
expm1-def57.1%
expm1-log1p79.2%
Simplified79.2%
if -4.0000000000000002e-26 < z < -3.8000000000000001e-89Initial program 86.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.4%
if -3.8000000000000001e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
Taylor expanded in x around 0 94.1%
if -2.5999999999999999e-110 < z < 9.2000000000000008e22Initial program 88.9%
associate-*l/95.2%
Simplified95.2%
*-commutative95.2%
clear-num95.2%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 82.9%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (- x t) (/ z (- y a))))))
(if (<= z -2.35e-23)
t_1
(if (<= z -5.5e-89)
(+ x (/ (- z y) (/ (- a z) x)))
(if (<= z -2.5e-110)
(/ (* (- y z) t) (- a z))
(if (<= z 1.25e+23) (+ x (/ (- t x) (/ a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / (y - a)));
double tmp;
if (z <= -2.35e-23) {
tmp = t_1;
} else if (z <= -5.5e-89) {
tmp = x + ((z - y) / ((a - z) / x));
} else if (z <= -2.5e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 1.25e+23) {
tmp = x + ((t - x) / (a / y));
} 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 + ((x - t) / (z / (y - a)))
if (z <= (-2.35d-23)) then
tmp = t_1
else if (z <= (-5.5d-89)) then
tmp = x + ((z - y) / ((a - z) / x))
else if (z <= (-2.5d-110)) then
tmp = ((y - z) * t) / (a - z)
else if (z <= 1.25d+23) then
tmp = x + ((t - x) / (a / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / (y - a)));
double tmp;
if (z <= -2.35e-23) {
tmp = t_1;
} else if (z <= -5.5e-89) {
tmp = x + ((z - y) / ((a - z) / x));
} else if (z <= -2.5e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 1.25e+23) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((x - t) / (z / (y - a))) tmp = 0 if z <= -2.35e-23: tmp = t_1 elif z <= -5.5e-89: tmp = x + ((z - y) / ((a - z) / x)) elif z <= -2.5e-110: tmp = ((y - z) * t) / (a - z) elif z <= 1.25e+23: tmp = x + ((t - x) / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -2.35e-23) tmp = t_1; elseif (z <= -5.5e-89) tmp = Float64(x + Float64(Float64(z - y) / Float64(Float64(a - z) / x))); elseif (z <= -2.5e-110) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); elseif (z <= 1.25e+23) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((x - t) / (z / (y - a))); tmp = 0.0; if (z <= -2.35e-23) tmp = t_1; elseif (z <= -5.5e-89) tmp = x + ((z - y) / ((a - z) / x)); elseif (z <= -2.5e-110) tmp = ((y - z) * t) / (a - z); elseif (z <= 1.25e+23) tmp = x + ((t - x) / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.35e-23], t$95$1, If[LessEqual[z, -5.5e-89], N[(x + N[(N[(z - y), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.5e-110], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+23], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -2.35 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{z - y}{\frac{a - z}{x}}\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-110}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.35e-23 or 1.25e23 < z Initial program 48.2%
associate-*l/72.6%
Simplified72.6%
Taylor expanded in z around -inf 68.1%
+-commutative68.1%
sub-neg68.1%
mul-1-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
unsub-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
sub-neg68.1%
distribute-rgt-out--68.2%
Simplified68.2%
expm1-log1p-u51.3%
expm1-udef44.5%
associate-/l*50.2%
Applied egg-rr50.2%
expm1-def57.1%
expm1-log1p79.2%
Simplified79.2%
if -2.35e-23 < z < -5.50000000000000012e-89Initial program 86.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around 0 73.1%
+-commutative73.1%
mul-1-neg73.1%
unsub-neg73.1%
associate-/l*86.1%
Simplified86.1%
if -5.50000000000000012e-89 < z < -2.5e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
Taylor expanded in x around 0 94.1%
if -2.5e-110 < z < 1.25e23Initial program 88.9%
associate-*l/95.2%
Simplified95.2%
*-commutative95.2%
clear-num95.2%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 82.9%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= x -3.4e+113)
t_1
(if (<= x -2.3e+61)
(* x (/ (- y a) z))
(if (or (<= x -4.5e+23) (not (<= x 4.4e+129)))
t_1
(* t (/ (- y z) (- a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (x <= -3.4e+113) {
tmp = t_1;
} else if (x <= -2.3e+61) {
tmp = x * ((y - a) / z);
} else if ((x <= -4.5e+23) || !(x <= 4.4e+129)) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - 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 * (1.0d0 - (y / a))
if (x <= (-3.4d+113)) then
tmp = t_1
else if (x <= (-2.3d+61)) then
tmp = x * ((y - a) / z)
else if ((x <= (-4.5d+23)) .or. (.not. (x <= 4.4d+129))) then
tmp = t_1
else
tmp = t * ((y - z) / (a - 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 * (1.0 - (y / a));
double tmp;
if (x <= -3.4e+113) {
tmp = t_1;
} else if (x <= -2.3e+61) {
tmp = x * ((y - a) / z);
} else if ((x <= -4.5e+23) || !(x <= 4.4e+129)) {
tmp = t_1;
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if x <= -3.4e+113: tmp = t_1 elif x <= -2.3e+61: tmp = x * ((y - a) / z) elif (x <= -4.5e+23) or not (x <= 4.4e+129): tmp = t_1 else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -3.4e+113) tmp = t_1; elseif (x <= -2.3e+61) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif ((x <= -4.5e+23) || !(x <= 4.4e+129)) tmp = t_1; else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -3.4e+113) tmp = t_1; elseif (x <= -2.3e+61) tmp = x * ((y - a) / z); elseif ((x <= -4.5e+23) || ~((x <= 4.4e+129))) tmp = t_1; else tmp = t * ((y - z) / (a - z)); 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[x, -3.4e+113], t$95$1, If[LessEqual[x, -2.3e+61], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -4.5e+23], N[Not[LessEqual[x, 4.4e+129]], $MachinePrecision]], t$95$1, N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{+61}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{+23} \lor \neg \left(x \leq 4.4 \cdot 10^{+129}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -3.40000000000000019e113 or -2.3e61 < x < -4.49999999999999979e23 or 4.3999999999999999e129 < x Initial program 61.7%
associate-*l/80.8%
Simplified80.8%
Taylor expanded in z around 0 63.0%
Taylor expanded in x around inf 64.2%
*-commutative64.2%
mul-1-neg64.2%
unsub-neg64.2%
Simplified64.2%
if -3.40000000000000019e113 < x < -2.3e61Initial program 39.1%
associate-*l/38.4%
Simplified38.4%
Taylor expanded in z around -inf 83.2%
+-commutative83.2%
sub-neg83.2%
mul-1-neg83.2%
+-commutative83.2%
mul-1-neg83.2%
unsub-neg83.2%
+-commutative83.2%
mul-1-neg83.2%
sub-neg83.2%
distribute-rgt-out--83.2%
Simplified83.2%
Taylor expanded in t around 0 71.0%
associate-/l*83.1%
Simplified83.1%
associate-/r/83.3%
Applied egg-rr83.3%
if -4.49999999999999979e23 < x < 4.3999999999999999e129Initial program 73.2%
associate-*l/87.1%
Simplified87.1%
Taylor expanded in x around 0 59.7%
associate-*r/72.9%
Simplified72.9%
Final simplification70.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (- x t) (/ z y)))))
(if (<= z -8.5e-16)
t_1
(if (<= z -4e-89)
(- x (* (/ y a) (- x t)))
(if (<= z -2.6e-110)
(* (- y z) (/ t (- a z)))
(if (<= z 9.2e+22) (+ x (/ (- t x) (/ a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / y));
double tmp;
if (z <= -8.5e-16) {
tmp = t_1;
} else if (z <= -4e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 9.2e+22) {
tmp = x + ((t - x) / (a / y));
} 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 + ((x - t) / (z / y))
if (z <= (-8.5d-16)) then
tmp = t_1
else if (z <= (-4d-89)) then
tmp = x - ((y / a) * (x - t))
else if (z <= (-2.6d-110)) then
tmp = (y - z) * (t / (a - z))
else if (z <= 9.2d+22) then
tmp = x + ((t - x) / (a / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / y));
double tmp;
if (z <= -8.5e-16) {
tmp = t_1;
} else if (z <= -4e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = (y - z) * (t / (a - z));
} else if (z <= 9.2e+22) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((x - t) / (z / y)) tmp = 0 if z <= -8.5e-16: tmp = t_1 elif z <= -4e-89: tmp = x - ((y / a) * (x - t)) elif z <= -2.6e-110: tmp = (y - z) * (t / (a - z)) elif z <= 9.2e+22: tmp = x + ((t - x) / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / y))) tmp = 0.0 if (z <= -8.5e-16) tmp = t_1; elseif (z <= -4e-89) tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t))); elseif (z <= -2.6e-110) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= 9.2e+22) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((x - t) / (z / y)); tmp = 0.0; if (z <= -8.5e-16) tmp = t_1; elseif (z <= -4e-89) tmp = x - ((y / a) * (x - t)); elseif (z <= -2.6e-110) tmp = (y - z) * (t / (a - z)); elseif (z <= 9.2e+22) tmp = x + ((t - x) / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e-16], t$95$1, If[LessEqual[z, -4e-89], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-110], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+22], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x - t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+22}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -8.5000000000000001e-16 or 9.2000000000000008e22 < z Initial program 48.2%
associate-*l/72.6%
Simplified72.6%
Taylor expanded in z around -inf 68.1%
+-commutative68.1%
sub-neg68.1%
mul-1-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
unsub-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
sub-neg68.1%
distribute-rgt-out--68.2%
Simplified68.2%
expm1-log1p-u51.3%
expm1-udef44.5%
associate-/l*50.2%
Applied egg-rr50.2%
expm1-def57.1%
expm1-log1p79.2%
Simplified79.2%
Taylor expanded in y around inf 71.4%
if -8.5000000000000001e-16 < z < -4.00000000000000015e-89Initial program 86.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.4%
if -4.00000000000000015e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
*-commutative76.4%
clear-num72.4%
un-div-inv72.4%
Applied egg-rr72.4%
Taylor expanded in x around 0 94.1%
associate-/l*69.3%
associate-/r/93.9%
Simplified93.9%
if -2.5999999999999999e-110 < z < 9.2000000000000008e22Initial program 88.9%
associate-*l/95.2%
Simplified95.2%
*-commutative95.2%
clear-num95.2%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 82.9%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (- x t) (/ z y)))))
(if (<= z -7.5e-20)
t_1
(if (<= z -5e-89)
(- x (* (/ y a) (- x t)))
(if (<= z -2.6e-110)
(/ (* (- y z) t) (- a z))
(if (<= z 1e+24) (+ x (/ (- t x) (/ a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / y));
double tmp;
if (z <= -7.5e-20) {
tmp = t_1;
} else if (z <= -5e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 1e+24) {
tmp = x + ((t - x) / (a / y));
} 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 + ((x - t) / (z / y))
if (z <= (-7.5d-20)) then
tmp = t_1
else if (z <= (-5d-89)) then
tmp = x - ((y / a) * (x - t))
else if (z <= (-2.6d-110)) then
tmp = ((y - z) * t) / (a - z)
else if (z <= 1d+24) then
tmp = x + ((t - x) / (a / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / y));
double tmp;
if (z <= -7.5e-20) {
tmp = t_1;
} else if (z <= -5e-89) {
tmp = x - ((y / a) * (x - t));
} else if (z <= -2.6e-110) {
tmp = ((y - z) * t) / (a - z);
} else if (z <= 1e+24) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((x - t) / (z / y)) tmp = 0 if z <= -7.5e-20: tmp = t_1 elif z <= -5e-89: tmp = x - ((y / a) * (x - t)) elif z <= -2.6e-110: tmp = ((y - z) * t) / (a - z) elif z <= 1e+24: tmp = x + ((t - x) / (a / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / y))) tmp = 0.0 if (z <= -7.5e-20) tmp = t_1; elseif (z <= -5e-89) tmp = Float64(x - Float64(Float64(y / a) * Float64(x - t))); elseif (z <= -2.6e-110) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); elseif (z <= 1e+24) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((x - t) / (z / y)); tmp = 0.0; if (z <= -7.5e-20) tmp = t_1; elseif (z <= -5e-89) tmp = x - ((y / a) * (x - t)); elseif (z <= -2.6e-110) tmp = ((y - z) * t) / (a - z); elseif (z <= 1e+24) tmp = x + ((t - x) / (a / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e-20], t$95$1, If[LessEqual[z, -5e-89], N[(x - N[(N[(y / a), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e-110], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+24], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x - t}{\frac{z}{y}}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-89}:\\
\;\;\;\;x - \frac{y}{a} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-110}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 10^{+24}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -7.49999999999999981e-20 or 9.9999999999999998e23 < z Initial program 48.2%
associate-*l/72.6%
Simplified72.6%
Taylor expanded in z around -inf 68.1%
+-commutative68.1%
sub-neg68.1%
mul-1-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
unsub-neg68.1%
+-commutative68.1%
mul-1-neg68.1%
sub-neg68.1%
distribute-rgt-out--68.2%
Simplified68.2%
expm1-log1p-u51.3%
expm1-udef44.5%
associate-/l*50.2%
Applied egg-rr50.2%
expm1-def57.1%
expm1-log1p79.2%
Simplified79.2%
Taylor expanded in y around inf 71.4%
if -7.49999999999999981e-20 < z < -4.99999999999999967e-89Initial program 86.5%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.4%
if -4.99999999999999967e-89 < z < -2.5999999999999999e-110Initial program 99.6%
associate-*l/76.4%
Simplified76.4%
Taylor expanded in x around 0 94.1%
if -2.5999999999999999e-110 < z < 9.9999999999999998e23Initial program 88.9%
associate-*l/95.2%
Simplified95.2%
*-commutative95.2%
clear-num95.2%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in z around 0 82.9%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -1.62e+122)
t
(if (<= z -3.9e-230)
t_1
(if (<= z 2.4e-257) (/ y (/ a t)) (if (<= z 7e+46) 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 <= -1.62e+122) {
tmp = t;
} else if (z <= -3.9e-230) {
tmp = t_1;
} else if (z <= 2.4e-257) {
tmp = y / (a / t);
} else if (z <= 7e+46) {
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 <= (-1.62d+122)) then
tmp = t
else if (z <= (-3.9d-230)) then
tmp = t_1
else if (z <= 2.4d-257) then
tmp = y / (a / t)
else if (z <= 7d+46) 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 <= -1.62e+122) {
tmp = t;
} else if (z <= -3.9e-230) {
tmp = t_1;
} else if (z <= 2.4e-257) {
tmp = y / (a / t);
} else if (z <= 7e+46) {
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 <= -1.62e+122: tmp = t elif z <= -3.9e-230: tmp = t_1 elif z <= 2.4e-257: tmp = y / (a / t) elif z <= 7e+46: 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 <= -1.62e+122) tmp = t; elseif (z <= -3.9e-230) tmp = t_1; elseif (z <= 2.4e-257) tmp = Float64(y / Float64(a / t)); elseif (z <= 7e+46) 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 <= -1.62e+122) tmp = t; elseif (z <= -3.9e-230) tmp = t_1; elseif (z <= 2.4e-257) tmp = y / (a / t); elseif (z <= 7e+46) 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, -1.62e+122], t, If[LessEqual[z, -3.9e-230], t$95$1, If[LessEqual[z, 2.4e-257], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+46], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+122}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-230}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-257}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.61999999999999994e122 or 6.9999999999999997e46 < z Initial program 38.7%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in z around inf 60.0%
if -1.61999999999999994e122 < z < -3.9000000000000002e-230 or 2.40000000000000017e-257 < z < 6.9999999999999997e46Initial program 84.1%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in z around 0 61.7%
Taylor expanded in x around inf 51.2%
*-commutative51.2%
mul-1-neg51.2%
unsub-neg51.2%
Simplified51.2%
if -3.9000000000000002e-230 < z < 2.40000000000000017e-257Initial program 88.5%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in x around 0 53.9%
Taylor expanded in z around 0 53.9%
associate-/l*65.1%
Simplified65.1%
Final simplification55.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -1.8e+122)
t
(if (<= z -5.5e-193)
t_1
(if (<= z 2.8e-257) (* y (/ (- t x) a)) (if (<= z 9.5e+46) 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 <= -1.8e+122) {
tmp = t;
} else if (z <= -5.5e-193) {
tmp = t_1;
} else if (z <= 2.8e-257) {
tmp = y * ((t - x) / a);
} else if (z <= 9.5e+46) {
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 <= (-1.8d+122)) then
tmp = t
else if (z <= (-5.5d-193)) then
tmp = t_1
else if (z <= 2.8d-257) then
tmp = y * ((t - x) / a)
else if (z <= 9.5d+46) 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 <= -1.8e+122) {
tmp = t;
} else if (z <= -5.5e-193) {
tmp = t_1;
} else if (z <= 2.8e-257) {
tmp = y * ((t - x) / a);
} else if (z <= 9.5e+46) {
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 <= -1.8e+122: tmp = t elif z <= -5.5e-193: tmp = t_1 elif z <= 2.8e-257: tmp = y * ((t - x) / a) elif z <= 9.5e+46: 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 <= -1.8e+122) tmp = t; elseif (z <= -5.5e-193) tmp = t_1; elseif (z <= 2.8e-257) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (z <= 9.5e+46) 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 <= -1.8e+122) tmp = t; elseif (z <= -5.5e-193) tmp = t_1; elseif (z <= 2.8e-257) tmp = y * ((t - x) / a); elseif (z <= 9.5e+46) 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, -1.8e+122], t, If[LessEqual[z, -5.5e-193], t$95$1, If[LessEqual[z, 2.8e-257], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+46], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+122}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-193}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-257}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.8000000000000001e122 or 9.5000000000000008e46 < z Initial program 38.7%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in z around inf 60.0%
if -1.8000000000000001e122 < z < -5.50000000000000014e-193 or 2.80000000000000001e-257 < z < 9.5000000000000008e46Initial program 84.5%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in z around 0 60.9%
Taylor expanded in x around inf 50.8%
*-commutative50.8%
mul-1-neg50.8%
unsub-neg50.8%
Simplified50.8%
if -5.50000000000000014e-193 < z < 2.80000000000000001e-257Initial program 86.4%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in z around 0 96.5%
Taylor expanded in y around inf 75.4%
div-sub79.0%
*-commutative79.0%
Simplified79.0%
Final simplification57.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e+122)
t
(if (<= z -5.8e-24)
(/ (- y) (/ z (- t x)))
(if (<= z -1.25e-224)
(* x (- 1.0 (/ y a)))
(if (<= z 1.8e+43) (+ x (/ (* y t) a)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+122) {
tmp = t;
} else if (z <= -5.8e-24) {
tmp = -y / (z / (t - x));
} else if (z <= -1.25e-224) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.8e+43) {
tmp = x + ((y * t) / a);
} 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 <= (-2.2d+122)) then
tmp = t
else if (z <= (-5.8d-24)) then
tmp = -y / (z / (t - x))
else if (z <= (-1.25d-224)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 1.8d+43) then
tmp = x + ((y * t) / a)
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 <= -2.2e+122) {
tmp = t;
} else if (z <= -5.8e-24) {
tmp = -y / (z / (t - x));
} else if (z <= -1.25e-224) {
tmp = x * (1.0 - (y / a));
} else if (z <= 1.8e+43) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+122: tmp = t elif z <= -5.8e-24: tmp = -y / (z / (t - x)) elif z <= -1.25e-224: tmp = x * (1.0 - (y / a)) elif z <= 1.8e+43: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+122) tmp = t; elseif (z <= -5.8e-24) tmp = Float64(Float64(-y) / Float64(z / Float64(t - x))); elseif (z <= -1.25e-224) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 1.8e+43) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+122) tmp = t; elseif (z <= -5.8e-24) tmp = -y / (z / (t - x)); elseif (z <= -1.25e-224) tmp = x * (1.0 - (y / a)); elseif (z <= 1.8e+43) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+122], t, If[LessEqual[z, -5.8e-24], N[((-y) / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.25e-224], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e+43], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+122}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-24}:\\
\;\;\;\;\frac{-y}{\frac{z}{t - x}}\\
\mathbf{elif}\;z \leq -1.25 \cdot 10^{-224}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+43}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.1999999999999999e122 or 1.80000000000000005e43 < z Initial program 39.3%
associate-*l/67.7%
Simplified67.7%
Taylor expanded in z around inf 59.4%
if -2.1999999999999999e122 < z < -5.7999999999999997e-24Initial program 69.3%
associate-*l/82.9%
Simplified82.9%
Taylor expanded in z around -inf 57.3%
+-commutative57.3%
sub-neg57.3%
mul-1-neg57.3%
+-commutative57.3%
mul-1-neg57.3%
unsub-neg57.3%
+-commutative57.3%
mul-1-neg57.3%
sub-neg57.3%
distribute-rgt-out--57.3%
Simplified57.3%
Taylor expanded in y around -inf 35.3%
mul-1-neg35.3%
associate-/l*43.4%
Simplified43.4%
if -5.7999999999999997e-24 < z < -1.25e-224Initial program 87.7%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in z around 0 72.4%
Taylor expanded in x around inf 63.8%
*-commutative63.8%
mul-1-neg63.8%
unsub-neg63.8%
Simplified63.8%
if -1.25e-224 < z < 1.80000000000000005e43Initial program 89.3%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in z around 0 79.0%
Taylor expanded in t around inf 63.2%
Final simplification59.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.1e+15) t (if (<= z -4.8e-193) x (if (<= z 7e+24) (* t (/ (- y z) a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+15) {
tmp = t;
} else if (z <= -4.8e-193) {
tmp = x;
} else if (z <= 7e+24) {
tmp = t * ((y - z) / a);
} 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 <= (-3.1d+15)) then
tmp = t
else if (z <= (-4.8d-193)) then
tmp = x
else if (z <= 7d+24) then
tmp = t * ((y - z) / a)
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 <= -3.1e+15) {
tmp = t;
} else if (z <= -4.8e-193) {
tmp = x;
} else if (z <= 7e+24) {
tmp = t * ((y - z) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+15: tmp = t elif z <= -4.8e-193: tmp = x elif z <= 7e+24: tmp = t * ((y - z) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+15) tmp = t; elseif (z <= -4.8e-193) tmp = x; elseif (z <= 7e+24) tmp = Float64(t * Float64(Float64(y - z) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+15) tmp = t; elseif (z <= -4.8e-193) tmp = x; elseif (z <= 7e+24) tmp = t * ((y - z) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+15], t, If[LessEqual[z, -4.8e-193], x, If[LessEqual[z, 7e+24], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+15}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-193}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+24}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.1e15 or 7.0000000000000004e24 < z Initial program 47.7%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in z around inf 49.3%
if -3.1e15 < z < -4.8e-193Initial program 86.0%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in a around inf 33.6%
if -4.8e-193 < z < 7.0000000000000004e24Initial program 89.3%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in x around 0 49.3%
associate-*r/51.5%
Simplified51.5%
Taylor expanded in a around inf 46.8%
Final simplification45.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.62e+122)
t
(if (<= z -2.55e-228)
(* x (- 1.0 (/ y a)))
(if (<= z 7.9e+43) (+ x (/ (* y t) a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.62e+122) {
tmp = t;
} else if (z <= -2.55e-228) {
tmp = x * (1.0 - (y / a));
} else if (z <= 7.9e+43) {
tmp = x + ((y * t) / a);
} 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 <= (-1.62d+122)) then
tmp = t
else if (z <= (-2.55d-228)) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 7.9d+43) then
tmp = x + ((y * t) / a)
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 <= -1.62e+122) {
tmp = t;
} else if (z <= -2.55e-228) {
tmp = x * (1.0 - (y / a));
} else if (z <= 7.9e+43) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.62e+122: tmp = t elif z <= -2.55e-228: tmp = x * (1.0 - (y / a)) elif z <= 7.9e+43: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.62e+122) tmp = t; elseif (z <= -2.55e-228) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 7.9e+43) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.62e+122) tmp = t; elseif (z <= -2.55e-228) tmp = x * (1.0 - (y / a)); elseif (z <= 7.9e+43) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.62e+122], t, If[LessEqual[z, -2.55e-228], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.9e+43], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.62 \cdot 10^{+122}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-228}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 7.9 \cdot 10^{+43}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.61999999999999994e122 or 7.89999999999999963e43 < z Initial program 39.3%
associate-*l/67.7%
Simplified67.7%
Taylor expanded in z around inf 59.4%
if -1.61999999999999994e122 < z < -2.5500000000000001e-228Initial program 79.9%
associate-*l/89.4%
Simplified89.4%
Taylor expanded in z around 0 54.1%
Taylor expanded in x around inf 49.2%
*-commutative49.2%
mul-1-neg49.2%
unsub-neg49.2%
Simplified49.2%
if -2.5500000000000001e-228 < z < 7.89999999999999963e43Initial program 89.3%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in z around 0 79.0%
Taylor expanded in t around inf 63.2%
Final simplification57.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e+17) t (if (<= z -2.15e-193) x (if (<= z 1.95e+23) (* t (/ y a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+17) {
tmp = t;
} else if (z <= -2.15e-193) {
tmp = x;
} else if (z <= 1.95e+23) {
tmp = t * (y / a);
} 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 <= (-9.5d+17)) then
tmp = t
else if (z <= (-2.15d-193)) then
tmp = x
else if (z <= 1.95d+23) then
tmp = t * (y / a)
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 <= -9.5e+17) {
tmp = t;
} else if (z <= -2.15e-193) {
tmp = x;
} else if (z <= 1.95e+23) {
tmp = t * (y / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+17: tmp = t elif z <= -2.15e-193: tmp = x elif z <= 1.95e+23: tmp = t * (y / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+17) tmp = t; elseif (z <= -2.15e-193) tmp = x; elseif (z <= 1.95e+23) tmp = Float64(t * Float64(y / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+17) tmp = t; elseif (z <= -2.15e-193) tmp = x; elseif (z <= 1.95e+23) tmp = t * (y / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+17], t, If[LessEqual[z, -2.15e-193], x, If[LessEqual[z, 1.95e+23], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+17}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.15 \cdot 10^{-193}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+23}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.5e17 or 1.95e23 < z Initial program 47.7%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in z around inf 49.3%
if -9.5e17 < z < -2.1500000000000001e-193Initial program 86.0%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in a around inf 33.6%
if -2.1500000000000001e-193 < z < 1.95e23Initial program 89.3%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in x around 0 49.3%
associate-*r/51.5%
Simplified51.5%
Taylor expanded in z around 0 43.1%
Final simplification44.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.5e+16) t (if (<= z -3.3e-193) x (if (<= z 2e+24) (/ y (/ a t)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+16) {
tmp = t;
} else if (z <= -3.3e-193) {
tmp = x;
} else if (z <= 2e+24) {
tmp = y / (a / t);
} 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.5d+16)) then
tmp = t
else if (z <= (-3.3d-193)) then
tmp = x
else if (z <= 2d+24) then
tmp = y / (a / t)
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.5e+16) {
tmp = t;
} else if (z <= -3.3e-193) {
tmp = x;
} else if (z <= 2e+24) {
tmp = y / (a / t);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e+16: tmp = t elif z <= -3.3e-193: tmp = x elif z <= 2e+24: tmp = y / (a / t) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e+16) tmp = t; elseif (z <= -3.3e-193) tmp = x; elseif (z <= 2e+24) tmp = Float64(y / Float64(a / t)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e+16) tmp = t; elseif (z <= -3.3e-193) tmp = x; elseif (z <= 2e+24) tmp = y / (a / t); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+16], t, If[LessEqual[z, -3.3e-193], x, If[LessEqual[z, 2e+24], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+16}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-193}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+24}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.5e16 or 2e24 < z Initial program 47.7%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in z around inf 49.3%
if -4.5e16 < z < -3.2999999999999999e-193Initial program 86.0%
associate-*l/90.4%
Simplified90.4%
Taylor expanded in a around inf 33.6%
if -3.2999999999999999e-193 < z < 2e24Initial program 89.3%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in x around 0 49.3%
Taylor expanded in z around 0 40.9%
associate-/l*43.2%
Simplified43.2%
Final simplification44.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1e+17) t (if (<= z 1.6e+43) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1e+17) {
tmp = t;
} else if (z <= 1.6e+43) {
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 <= (-1d+17)) then
tmp = t
else if (z <= 1.6d+43) 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 <= -1e+17) {
tmp = t;
} else if (z <= 1.6e+43) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1e+17: tmp = t elif z <= 1.6e+43: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1e+17) tmp = t; elseif (z <= 1.6e+43) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1e+17) tmp = t; elseif (z <= 1.6e+43) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1e+17], t, If[LessEqual[z, 1.6e+43], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+17}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+43}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1e17 or 1.60000000000000007e43 < z Initial program 46.8%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in z around inf 50.0%
if -1e17 < z < 1.60000000000000007e43Initial program 87.7%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in a around inf 30.2%
Final simplification39.6%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 68.2%
associate-*l/83.4%
Simplified83.4%
Taylor expanded in t around 0 35.6%
+-commutative35.6%
mul-1-neg35.6%
unsub-neg35.6%
associate-/l*40.0%
Simplified40.0%
Taylor expanded in y around 0 20.8%
sub-neg20.8%
mul-1-neg20.8%
remove-double-neg20.8%
associate-/l*22.4%
associate-/r/21.6%
Simplified21.6%
Taylor expanded in z around inf 2.7%
distribute-lft1-in2.7%
metadata-eval2.7%
mul0-lft2.7%
Simplified2.7%
Final simplification2.7%
(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 68.2%
associate-*l/83.4%
Simplified83.4%
Taylor expanded in z around inf 27.1%
Final simplification27.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} 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) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); 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[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023185
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))