
(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 16 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 -4e-255) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(- t (* (/ (- t x) z) (- y a))))))
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 <= -4e-255) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = t - (((t - x) / z) * (y - a));
}
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 <= -4e-255) || !(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(y - a))); 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, -4e-255], 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[(y - a), $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 -4 \cdot 10^{-255} \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(y - a\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-255 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.4%
+-commutative94.4%
remove-double-neg94.4%
unsub-neg94.4%
*-commutative94.4%
associate-*l/75.9%
associate-/l*95.9%
fma-neg95.9%
remove-double-neg95.9%
Simplified95.9%
if -4e-255 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
Taylor expanded in z around inf 83.3%
associate--l+83.3%
distribute-lft-out--83.3%
div-sub83.3%
mul-1-neg83.3%
unsub-neg83.3%
div-sub83.3%
associate-/l*90.4%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification96.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -4e-255) (not (<= t_1 0.0)))
t_1
(- t (* (/ (- t x) z) (- y a))))))
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 <= -4e-255) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t - (((t - x) / 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) * ((t - x) / (a - z)))
if ((t_1 <= (-4d-255)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t - (((t - x) / 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) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -4e-255) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t - (((t - x) / z) * (y - a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -4e-255) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t - (((t - x) / z) * (y - a)) 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 <= -4e-255) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); 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 <= -4e-255) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t - (((t - x) / z) * (y - a)); 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, -4e-255], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $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 -4 \cdot 10^{-255} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-255 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.4%
if -4e-255 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.7%
Taylor expanded in z around inf 83.3%
associate--l+83.3%
distribute-lft-out--83.3%
div-sub83.3%
mul-1-neg83.3%
unsub-neg83.3%
div-sub83.3%
associate-/l*90.4%
associate-/l*99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification95.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ z (- z a)))))
(if (<= z -2.25e+92)
t_1
(if (<= z -1.08e+55)
(* x (/ (- y a) z))
(if (<= z -4.7e-45)
t_1
(if (<= z 5e-220)
(+ x (* y (/ t a)))
(if (<= z 3.8e+96) (* x (- 1.0 (/ y a))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (z / (z - a));
double tmp;
if (z <= -2.25e+92) {
tmp = t_1;
} else if (z <= -1.08e+55) {
tmp = x * ((y - a) / z);
} else if (z <= -4.7e-45) {
tmp = t_1;
} else if (z <= 5e-220) {
tmp = x + (y * (t / a));
} else if (z <= 3.8e+96) {
tmp = x * (1.0 - (y / 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 * (z / (z - a))
if (z <= (-2.25d+92)) then
tmp = t_1
else if (z <= (-1.08d+55)) then
tmp = x * ((y - a) / z)
else if (z <= (-4.7d-45)) then
tmp = t_1
else if (z <= 5d-220) then
tmp = x + (y * (t / a))
else if (z <= 3.8d+96) then
tmp = x * (1.0d0 - (y / 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 * (z / (z - a));
double tmp;
if (z <= -2.25e+92) {
tmp = t_1;
} else if (z <= -1.08e+55) {
tmp = x * ((y - a) / z);
} else if (z <= -4.7e-45) {
tmp = t_1;
} else if (z <= 5e-220) {
tmp = x + (y * (t / a));
} else if (z <= 3.8e+96) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (z / (z - a)) tmp = 0 if z <= -2.25e+92: tmp = t_1 elif z <= -1.08e+55: tmp = x * ((y - a) / z) elif z <= -4.7e-45: tmp = t_1 elif z <= 5e-220: tmp = x + (y * (t / a)) elif z <= 3.8e+96: tmp = x * (1.0 - (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(z / Float64(z - a))) tmp = 0.0 if (z <= -2.25e+92) tmp = t_1; elseif (z <= -1.08e+55) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= -4.7e-45) tmp = t_1; elseif (z <= 5e-220) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 3.8e+96) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (z / (z - a)); tmp = 0.0; if (z <= -2.25e+92) tmp = t_1; elseif (z <= -1.08e+55) tmp = x * ((y - a) / z); elseif (z <= -4.7e-45) tmp = t_1; elseif (z <= 5e-220) tmp = x + (y * (t / a)); elseif (z <= 3.8e+96) tmp = x * (1.0 - (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.25e+92], t$95$1, If[LessEqual[z, -1.08e+55], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.7e-45], t$95$1, If[LessEqual[z, 5e-220], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+96], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{+55}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-220}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+96}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.25e92 or -1.08000000000000004e55 < z < -4.6999999999999998e-45 or 3.8000000000000002e96 < z Initial program 65.3%
Taylor expanded in x around 0 36.4%
Taylor expanded in y around 0 33.5%
mul-1-neg33.5%
associate-/l*60.6%
distribute-rgt-neg-in60.6%
distribute-neg-frac60.6%
Simplified60.6%
if -2.25e92 < z < -1.08000000000000004e55Initial program 67.5%
Taylor expanded in z around inf 58.5%
associate--l+58.5%
distribute-lft-out--58.5%
div-sub58.5%
mul-1-neg58.5%
unsub-neg58.5%
div-sub58.5%
associate-/l*74.1%
associate-/l*74.1%
distribute-rgt-out--82.4%
Simplified82.4%
Taylor expanded in t around 0 43.2%
associate-/l*58.7%
Simplified58.7%
if -4.6999999999999998e-45 < z < 5.0000000000000002e-220Initial program 95.2%
Taylor expanded in z around 0 83.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 76.3%
if 5.0000000000000002e-220 < z < 3.8000000000000002e96Initial program 89.4%
Taylor expanded in z around 0 61.9%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in x around inf 57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
Final simplification64.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.9e+88)
(+ t (* a (/ (- t x) z)))
(if (<= z -2.75e-45)
t_1
(if (<= z 5.2e-219)
(+ x (* y (/ t a)))
(if (<= z 1.85e+29) (* x (- 1.0 (/ y 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.9e+88) {
tmp = t + (a * ((t - x) / z));
} else if (z <= -2.75e-45) {
tmp = t_1;
} else if (z <= 5.2e-219) {
tmp = x + (y * (t / a));
} else if (z <= 1.85e+29) {
tmp = x * (1.0 - (y / 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.9d+88)) then
tmp = t + (a * ((t - x) / z))
else if (z <= (-2.75d-45)) then
tmp = t_1
else if (z <= 5.2d-219) then
tmp = x + (y * (t / a))
else if (z <= 1.85d+29) then
tmp = x * (1.0d0 - (y / 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.9e+88) {
tmp = t + (a * ((t - x) / z));
} else if (z <= -2.75e-45) {
tmp = t_1;
} else if (z <= 5.2e-219) {
tmp = x + (y * (t / a));
} else if (z <= 1.85e+29) {
tmp = x * (1.0 - (y / 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.9e+88: tmp = t + (a * ((t - x) / z)) elif z <= -2.75e-45: tmp = t_1 elif z <= 5.2e-219: tmp = x + (y * (t / a)) elif z <= 1.85e+29: tmp = x * (1.0 - (y / 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.9e+88) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif (z <= -2.75e-45) tmp = t_1; elseif (z <= 5.2e-219) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.85e+29) tmp = Float64(x * Float64(1.0 - Float64(y / 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.9e+88) tmp = t + (a * ((t - x) / z)); elseif (z <= -2.75e-45) tmp = t_1; elseif (z <= 5.2e-219) tmp = x + (y * (t / a)); elseif (z <= 1.85e+29) tmp = x * (1.0 - (y / 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.9e+88], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.75e-45], t$95$1, If[LessEqual[z, 5.2e-219], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+29], N[(x * N[(1.0 - N[(y / 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.9 \cdot 10^{+88}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-219}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8999999999999998e88Initial program 59.9%
Taylor expanded in z around inf 63.2%
associate--l+63.2%
distribute-lft-out--63.2%
div-sub63.2%
mul-1-neg63.2%
unsub-neg63.2%
div-sub63.2%
associate-/l*69.6%
associate-/l*84.2%
distribute-rgt-out--84.2%
Simplified84.2%
Taylor expanded in y around 0 57.8%
mul-1-neg57.8%
associate-/l*70.5%
distribute-lft-neg-out70.5%
cancel-sign-sub70.5%
Simplified70.5%
if -1.8999999999999998e88 < z < -2.75000000000000015e-45 or 1.84999999999999987e29 < z Initial program 73.3%
Taylor expanded in x around 0 42.5%
associate-/l*62.4%
Simplified62.4%
if -2.75000000000000015e-45 < z < 5.20000000000000004e-219Initial program 95.2%
Taylor expanded in z around 0 83.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 76.3%
if 5.20000000000000004e-219 < z < 1.84999999999999987e29Initial program 87.3%
Taylor expanded in z around 0 64.7%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in x around inf 61.1%
mul-1-neg61.1%
unsub-neg61.1%
Simplified61.1%
Final simplification68.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ (- t x) z) (- y a)))))
(if (<= z -7e-46)
t_1
(if (<= z 1.55e-112)
(+ x (* y (/ (- t x) a)))
(if (<= z 1e+205) (+ x (* (- y z) (/ -1.0 (/ (- z a) t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) / z) * (y - a));
double tmp;
if (z <= -7e-46) {
tmp = t_1;
} else if (z <= 1.55e-112) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 1e+205) {
tmp = x + ((y - z) * (-1.0 / ((z - a) / t)));
} 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 - (((t - x) / z) * (y - a))
if (z <= (-7d-46)) then
tmp = t_1
else if (z <= 1.55d-112) then
tmp = x + (y * ((t - x) / a))
else if (z <= 1d+205) then
tmp = x + ((y - z) * ((-1.0d0) / ((z - a) / t)))
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 - (((t - x) / z) * (y - a));
double tmp;
if (z <= -7e-46) {
tmp = t_1;
} else if (z <= 1.55e-112) {
tmp = x + (y * ((t - x) / a));
} else if (z <= 1e+205) {
tmp = x + ((y - z) * (-1.0 / ((z - a) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (((t - x) / z) * (y - a)) tmp = 0 if z <= -7e-46: tmp = t_1 elif z <= 1.55e-112: tmp = x + (y * ((t - x) / a)) elif z <= 1e+205: tmp = x + ((y - z) * (-1.0 / ((z - a) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))) tmp = 0.0 if (z <= -7e-46) tmp = t_1; elseif (z <= 1.55e-112) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); elseif (z <= 1e+205) tmp = Float64(x + Float64(Float64(y - z) * Float64(-1.0 / Float64(Float64(z - a) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (((t - x) / z) * (y - a)); tmp = 0.0; if (z <= -7e-46) tmp = t_1; elseif (z <= 1.55e-112) tmp = x + (y * ((t - x) / a)); elseif (z <= 1e+205) tmp = x + ((y - z) * (-1.0 / ((z - a) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e-46], t$95$1, If[LessEqual[z, 1.55e-112], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+205], N[(x + N[(N[(y - z), $MachinePrecision] * N[(-1.0 / N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-112}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 10^{+205}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{-1}{\frac{z - a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.0000000000000004e-46 or 1.00000000000000002e205 < z Initial program 62.6%
Taylor expanded in z around inf 63.2%
associate--l+63.2%
distribute-lft-out--63.2%
div-sub63.2%
mul-1-neg63.2%
unsub-neg63.2%
div-sub63.2%
associate-/l*71.1%
associate-/l*80.8%
distribute-rgt-out--81.7%
Simplified81.7%
if -7.0000000000000004e-46 < z < 1.5499999999999999e-112Initial program 94.1%
Taylor expanded in z around 0 84.6%
associate-/l*87.7%
Simplified87.7%
if 1.5499999999999999e-112 < z < 1.00000000000000002e205Initial program 87.5%
clear-num87.4%
inv-pow87.4%
Applied egg-rr87.4%
unpow-187.4%
Simplified87.4%
Taylor expanded in t around inf 72.6%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.55e+88)
(+ t (* a (/ (- t x) z)))
(if (or (<= z -5e-45) (not (<= z 5.5e+45)))
(* t (/ (- y z) (- a z)))
(+ x (* y (/ (- t x) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+88) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -5e-45) || !(z <= 5.5e+45)) {
tmp = t * ((y - z) / (a - z));
} 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 <= (-1.55d+88)) then
tmp = t + (a * ((t - x) / z))
else if ((z <= (-5d-45)) .or. (.not. (z <= 5.5d+45))) then
tmp = t * ((y - z) / (a - z))
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 <= -1.55e+88) {
tmp = t + (a * ((t - x) / z));
} else if ((z <= -5e-45) || !(z <= 5.5e+45)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e+88: tmp = t + (a * ((t - x) / z)) elif (z <= -5e-45) or not (z <= 5.5e+45): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e+88) tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); elseif ((z <= -5e-45) || !(z <= 5.5e+45)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); 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 <= -1.55e+88) tmp = t + (a * ((t - x) / z)); elseif ((z <= -5e-45) || ~((z <= 5.5e+45))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e+88], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5e-45], N[Not[LessEqual[z, 5.5e+45]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $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 -1.55 \cdot 10^{+88}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-45} \lor \neg \left(z \leq 5.5 \cdot 10^{+45}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -1.5500000000000001e88Initial program 59.9%
Taylor expanded in z around inf 63.2%
associate--l+63.2%
distribute-lft-out--63.2%
div-sub63.2%
mul-1-neg63.2%
unsub-neg63.2%
div-sub63.2%
associate-/l*69.6%
associate-/l*84.2%
distribute-rgt-out--84.2%
Simplified84.2%
Taylor expanded in y around 0 57.8%
mul-1-neg57.8%
associate-/l*70.5%
distribute-lft-neg-out70.5%
cancel-sign-sub70.5%
Simplified70.5%
if -1.5500000000000001e88 < z < -4.99999999999999976e-45 or 5.5000000000000001e45 < z Initial program 72.3%
Taylor expanded in x around 0 42.8%
associate-/l*63.5%
Simplified63.5%
if -4.99999999999999976e-45 < z < 5.5000000000000001e45Initial program 92.5%
Taylor expanded in z around 0 76.5%
associate-/l*80.3%
Simplified80.3%
Final simplification73.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -6.8e-46)
t_1
(if (<= z 5.2e-215)
(+ x (* y (/ t a)))
(if (<= z 1.85e+28) (* x (- 1.0 (/ y 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 <= -6.8e-46) {
tmp = t_1;
} else if (z <= 5.2e-215) {
tmp = x + (y * (t / a));
} else if (z <= 1.85e+28) {
tmp = x * (1.0 - (y / 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 <= (-6.8d-46)) then
tmp = t_1
else if (z <= 5.2d-215) then
tmp = x + (y * (t / a))
else if (z <= 1.85d+28) then
tmp = x * (1.0d0 - (y / 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 <= -6.8e-46) {
tmp = t_1;
} else if (z <= 5.2e-215) {
tmp = x + (y * (t / a));
} else if (z <= 1.85e+28) {
tmp = x * (1.0 - (y / 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 <= -6.8e-46: tmp = t_1 elif z <= 5.2e-215: tmp = x + (y * (t / a)) elif z <= 1.85e+28: tmp = x * (1.0 - (y / 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 <= -6.8e-46) tmp = t_1; elseif (z <= 5.2e-215) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.85e+28) tmp = Float64(x * Float64(1.0 - Float64(y / 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 <= -6.8e-46) tmp = t_1; elseif (z <= 5.2e-215) tmp = x + (y * (t / a)); elseif (z <= 1.85e+28) tmp = x * (1.0 - (y / 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, -6.8e-46], t$95$1, If[LessEqual[z, 5.2e-215], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+28], N[(x * N[(1.0 - N[(y / 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 -6.8 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-215}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+28}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.79999999999999992e-46 or 1.85e28 < z Initial program 67.9%
Taylor expanded in x around 0 36.7%
associate-/l*62.2%
Simplified62.2%
if -6.79999999999999992e-46 < z < 5.2e-215Initial program 95.2%
Taylor expanded in z around 0 83.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in t around inf 76.3%
if 5.2e-215 < z < 1.85e28Initial program 87.3%
Taylor expanded in z around 0 64.7%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in x around inf 61.1%
mul-1-neg61.1%
unsub-neg61.1%
Simplified61.1%
Final simplification66.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+96)
t
(if (<= z 1.25e-233)
x
(if (<= z 2.45e-107) (* t (/ y (- a z))) (if (<= z 5.3e+98) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+96) {
tmp = t;
} else if (z <= 1.25e-233) {
tmp = x;
} else if (z <= 2.45e-107) {
tmp = t * (y / (a - z));
} else if (z <= 5.3e+98) {
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 <= (-3.2d+96)) then
tmp = t
else if (z <= 1.25d-233) then
tmp = x
else if (z <= 2.45d-107) then
tmp = t * (y / (a - z))
else if (z <= 5.3d+98) 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 <= -3.2e+96) {
tmp = t;
} else if (z <= 1.25e-233) {
tmp = x;
} else if (z <= 2.45e-107) {
tmp = t * (y / (a - z));
} else if (z <= 5.3e+98) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+96: tmp = t elif z <= 1.25e-233: tmp = x elif z <= 2.45e-107: tmp = t * (y / (a - z)) elif z <= 5.3e+98: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+96) tmp = t; elseif (z <= 1.25e-233) tmp = x; elseif (z <= 2.45e-107) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 5.3e+98) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+96) tmp = t; elseif (z <= 1.25e-233) tmp = x; elseif (z <= 2.45e-107) tmp = t * (y / (a - z)); elseif (z <= 5.3e+98) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+96], t, If[LessEqual[z, 1.25e-233], x, If[LessEqual[z, 2.45e-107], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+98], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+96}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-233}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-107}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.20000000000000006e96 or 5.29999999999999997e98 < z Initial program 61.5%
Taylor expanded in z around inf 59.8%
if -3.20000000000000006e96 < z < 1.25000000000000003e-233 or 2.4499999999999999e-107 < z < 5.29999999999999997e98Initial program 90.1%
Taylor expanded in a around inf 41.4%
if 1.25000000000000003e-233 < z < 2.4499999999999999e-107Initial program 92.2%
Taylor expanded in y around inf 69.3%
div-sub69.3%
Simplified69.3%
Taylor expanded in t around inf 42.0%
associate-/l*45.6%
Simplified45.6%
Final simplification48.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.4e+119)
t
(if (<= z 8.8e-222)
(+ x (* y (/ t a)))
(if (<= z 1.25e+100) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e+119) {
tmp = t;
} else if (z <= 8.8e-222) {
tmp = x + (y * (t / a));
} else if (z <= 1.25e+100) {
tmp = x * (1.0 - (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 <= (-4.4d+119)) then
tmp = t
else if (z <= 8.8d-222) then
tmp = x + (y * (t / a))
else if (z <= 1.25d+100) then
tmp = x * (1.0d0 - (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 <= -4.4e+119) {
tmp = t;
} else if (z <= 8.8e-222) {
tmp = x + (y * (t / a));
} else if (z <= 1.25e+100) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.4e+119: tmp = t elif z <= 8.8e-222: tmp = x + (y * (t / a)) elif z <= 1.25e+100: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.4e+119) tmp = t; elseif (z <= 8.8e-222) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.25e+100) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.4e+119) tmp = t; elseif (z <= 8.8e-222) tmp = x + (y * (t / a)); elseif (z <= 1.25e+100) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.4e+119], t, If[LessEqual[z, 8.8e-222], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+100], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+119}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-222}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.4000000000000003e119 or 1.25e100 < z Initial program 61.1%
Taylor expanded in z around inf 61.5%
if -4.4000000000000003e119 < z < 8.8000000000000001e-222Initial program 89.7%
Taylor expanded in z around 0 67.4%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in t around inf 62.6%
if 8.8000000000000001e-222 < z < 1.25e100Initial program 89.4%
Taylor expanded in z around 0 61.9%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in x around inf 57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.05e+96)
t
(if (<= z 1.25e-231)
x
(if (<= z 1.12e-107) (* t (/ y a)) (if (<= z 8.5e+96) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.05e+96) {
tmp = t;
} else if (z <= 1.25e-231) {
tmp = x;
} else if (z <= 1.12e-107) {
tmp = t * (y / a);
} else if (z <= 8.5e+96) {
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 <= (-1.05d+96)) then
tmp = t
else if (z <= 1.25d-231) then
tmp = x
else if (z <= 1.12d-107) then
tmp = t * (y / a)
else if (z <= 8.5d+96) 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 <= -1.05e+96) {
tmp = t;
} else if (z <= 1.25e-231) {
tmp = x;
} else if (z <= 1.12e-107) {
tmp = t * (y / a);
} else if (z <= 8.5e+96) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.05e+96: tmp = t elif z <= 1.25e-231: tmp = x elif z <= 1.12e-107: tmp = t * (y / a) elif z <= 8.5e+96: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.05e+96) tmp = t; elseif (z <= 1.25e-231) tmp = x; elseif (z <= 1.12e-107) tmp = Float64(t * Float64(y / a)); elseif (z <= 8.5e+96) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.05e+96) tmp = t; elseif (z <= 1.25e-231) tmp = x; elseif (z <= 1.12e-107) tmp = t * (y / a); elseif (z <= 8.5e+96) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e+96], t, If[LessEqual[z, 1.25e-231], x, If[LessEqual[z, 1.12e-107], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+96], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+96}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-231}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-107}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.0500000000000001e96 or 8.50000000000000025e96 < z Initial program 61.5%
Taylor expanded in z around inf 59.8%
if -1.0500000000000001e96 < z < 1.25000000000000006e-231 or 1.12e-107 < z < 8.50000000000000025e96Initial program 90.1%
Taylor expanded in a around inf 41.4%
if 1.25000000000000006e-231 < z < 1.12e-107Initial program 92.2%
Taylor expanded in y around inf 69.3%
div-sub69.3%
Simplified69.3%
Taylor expanded in t around inf 42.0%
Taylor expanded in a around inf 37.8%
associate-/l*41.4%
Simplified41.4%
Final simplification48.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.9e+95)
t
(if (<= z 1.48e-235)
x
(if (<= z 1.9e-107) (/ t (/ a y)) (if (<= z 5.2e+97) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.9e+95) {
tmp = t;
} else if (z <= 1.48e-235) {
tmp = x;
} else if (z <= 1.9e-107) {
tmp = t / (a / y);
} else if (z <= 5.2e+97) {
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 <= (-3.9d+95)) then
tmp = t
else if (z <= 1.48d-235) then
tmp = x
else if (z <= 1.9d-107) then
tmp = t / (a / y)
else if (z <= 5.2d+97) 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 <= -3.9e+95) {
tmp = t;
} else if (z <= 1.48e-235) {
tmp = x;
} else if (z <= 1.9e-107) {
tmp = t / (a / y);
} else if (z <= 5.2e+97) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.9e+95: tmp = t elif z <= 1.48e-235: tmp = x elif z <= 1.9e-107: tmp = t / (a / y) elif z <= 5.2e+97: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.9e+95) tmp = t; elseif (z <= 1.48e-235) tmp = x; elseif (z <= 1.9e-107) tmp = Float64(t / Float64(a / y)); elseif (z <= 5.2e+97) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.9e+95) tmp = t; elseif (z <= 1.48e-235) tmp = x; elseif (z <= 1.9e-107) tmp = t / (a / y); elseif (z <= 5.2e+97) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.9e+95], t, If[LessEqual[z, 1.48e-235], x, If[LessEqual[z, 1.9e-107], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+97], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{+95}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.48 \cdot 10^{-235}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-107}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+97}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.8999999999999997e95 or 5.2e97 < z Initial program 61.5%
Taylor expanded in z around inf 59.8%
if -3.8999999999999997e95 < z < 1.48000000000000008e-235 or 1.9000000000000001e-107 < z < 5.2e97Initial program 90.1%
Taylor expanded in a around inf 41.4%
if 1.48000000000000008e-235 < z < 1.9000000000000001e-107Initial program 92.2%
Taylor expanded in y around inf 69.3%
div-sub69.3%
Simplified69.3%
Taylor expanded in t around inf 42.0%
Taylor expanded in a around inf 37.8%
associate-/l*41.4%
Simplified41.4%
clear-num41.4%
un-div-inv41.4%
Applied egg-rr41.4%
Final simplification48.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.32e-45) (not (<= z 2.3e+41))) (- t (* (/ (- t x) z) (- y a))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.32e-45) || !(z <= 2.3e+41)) {
tmp = t - (((t - x) / z) * (y - a));
} 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 <= (-1.32d-45)) .or. (.not. (z <= 2.3d+41))) then
tmp = t - (((t - x) / z) * (y - a))
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 <= -1.32e-45) || !(z <= 2.3e+41)) {
tmp = t - (((t - x) / z) * (y - a));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.32e-45) or not (z <= 2.3e+41): tmp = t - (((t - x) / z) * (y - a)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.32e-45) || !(z <= 2.3e+41)) tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a))); 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 <= -1.32e-45) || ~((z <= 2.3e+41))) tmp = t - (((t - x) / z) * (y - a)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.32e-45], N[Not[LessEqual[z, 2.3e+41]], $MachinePrecision]], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $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 -1.32 \cdot 10^{-45} \lor \neg \left(z \leq 2.3 \cdot 10^{+41}\right):\\
\;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -1.32000000000000005e-45 or 2.2999999999999998e41 < z Initial program 67.4%
Taylor expanded in z around inf 61.8%
associate--l+61.8%
distribute-lft-out--61.8%
div-sub61.8%
mul-1-neg61.8%
unsub-neg61.8%
div-sub61.8%
associate-/l*69.6%
associate-/l*78.7%
distribute-rgt-out--79.5%
Simplified79.5%
if -1.32000000000000005e-45 < z < 2.2999999999999998e41Initial program 92.4%
Taylor expanded in z around 0 77.1%
associate-/l*80.8%
Simplified80.8%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e-45) (not (<= z 1.25e+38))) (- t (* y (/ (- t x) z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e-45) || !(z <= 1.25e+38)) {
tmp = t - (y * ((t - x) / z));
} 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 <= (-5.2d-45)) .or. (.not. (z <= 1.25d+38))) then
tmp = t - (y * ((t - x) / z))
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 <= -5.2e-45) || !(z <= 1.25e+38)) {
tmp = t - (y * ((t - x) / z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e-45) or not (z <= 1.25e+38): tmp = t - (y * ((t - x) / z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e-45) || !(z <= 1.25e+38)) tmp = Float64(t - Float64(y * Float64(Float64(t - x) / z))); 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 <= -5.2e-45) || ~((z <= 1.25e+38))) tmp = t - (y * ((t - x) / z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e-45], N[Not[LessEqual[z, 1.25e+38]], $MachinePrecision]], N[(t - N[(y * N[(N[(t - x), $MachinePrecision] / z), $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 -5.2 \cdot 10^{-45} \lor \neg \left(z \leq 1.25 \cdot 10^{+38}\right):\\
\;\;\;\;t - y \cdot \frac{t - x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -5.19999999999999973e-45 or 1.24999999999999992e38 < z Initial program 67.4%
Taylor expanded in z around inf 61.8%
associate--l+61.8%
distribute-lft-out--61.8%
div-sub61.8%
mul-1-neg61.8%
unsub-neg61.8%
div-sub61.8%
associate-/l*69.6%
associate-/l*78.7%
distribute-rgt-out--79.5%
Simplified79.5%
Taylor expanded in y around inf 59.1%
associate-*r/68.6%
Simplified68.6%
if -5.19999999999999973e-45 < z < 1.24999999999999992e38Initial program 92.4%
Taylor expanded in z around 0 77.1%
associate-/l*80.8%
Simplified80.8%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.3e+120) t (if (<= z 1.2e+100) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+120) {
tmp = t;
} else if (z <= 1.2e+100) {
tmp = x * (1.0 - (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 <= (-2.3d+120)) then
tmp = t
else if (z <= 1.2d+100) then
tmp = x * (1.0d0 - (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 <= -2.3e+120) {
tmp = t;
} else if (z <= 1.2e+100) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+120: tmp = t elif z <= 1.2e+100: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+120) tmp = t; elseif (z <= 1.2e+100) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+120) tmp = t; elseif (z <= 1.2e+100) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+120], t, If[LessEqual[z, 1.2e+100], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+120}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.29999999999999993e120 or 1.20000000000000006e100 < z Initial program 61.1%
Taylor expanded in z around inf 61.5%
if -2.29999999999999993e120 < z < 1.20000000000000006e100Initial program 89.6%
Taylor expanded in z around 0 65.6%
associate-/l*69.0%
Simplified69.0%
Taylor expanded in x around inf 55.3%
mul-1-neg55.3%
unsub-neg55.3%
Simplified55.3%
Final simplification57.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.3e+96) t (if (<= z 7e+96) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+96) {
tmp = t;
} else if (z <= 7e+96) {
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 <= (-3.3d+96)) then
tmp = t
else if (z <= 7d+96) 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 <= -3.3e+96) {
tmp = t;
} else if (z <= 7e+96) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.3e+96: tmp = t elif z <= 7e+96: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e+96) tmp = t; elseif (z <= 7e+96) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.3e+96) tmp = t; elseif (z <= 7e+96) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+96], t, If[LessEqual[z, 7e+96], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+96}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.29999999999999984e96 or 6.9999999999999998e96 < z Initial program 61.5%
Taylor expanded in z around inf 59.8%
if -3.29999999999999984e96 < z < 6.9999999999999998e96Initial program 90.4%
Taylor expanded in a around inf 38.3%
Final simplification46.1%
(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.9%
Taylor expanded in z around inf 26.8%
Final simplification26.8%
herbie shell --seed 2024066
(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)))))