
(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 20 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 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
(if (<= t_2 -1e-302)
t_2
(if (<= t_2 1e-259)
(+ t (* (/ (- t x) z) (- a y)))
(fma (- y z) t_1 x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) / (a - z);
double t_2 = x + ((y - z) * t_1);
double tmp;
if (t_2 <= -1e-302) {
tmp = t_2;
} else if (t_2 <= 1e-259) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = fma((y - z), t_1, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) / Float64(a - z)) t_2 = Float64(x + Float64(Float64(y - z) * t_1)) tmp = 0.0 if (t_2 <= -1e-302) tmp = t_2; elseif (t_2 <= 1e-259) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = fma(Float64(y - z), t_1, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-302], t$95$2, If[LessEqual[t$95$2, 1e-259], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := x + \left(y - z\right) \cdot t_1\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-302}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 10^{-259}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t_1, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303Initial program 90.5%
if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.0000000000000001e-259Initial program 6.2%
Taylor expanded in z around inf 83.5%
associate--l+83.5%
distribute-lft-out--83.5%
div-sub83.5%
mul-1-neg83.5%
unsub-neg83.5%
distribute-rgt-out--83.5%
associate-/l*94.3%
Simplified94.3%
associate-/r/99.8%
Applied egg-rr99.8%
if 1.0000000000000001e-259 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 95.4%
+-commutative95.4%
fma-def95.4%
Simplified95.4%
Final simplification93.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-302) (not (<= t_1 1e-259)))
t_1
(+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-302) || !(t_1 <= 1e-259)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-302)) .or. (.not. (t_1 <= 1d-259))) then
tmp = t_1
else
tmp = t + (((t - x) / z) * (a - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-302) || !(t_1 <= 1e-259)) {
tmp = t_1;
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-302) or not (t_1 <= 1e-259): tmp = t_1 else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-302) || !(t_1 <= 1e-259)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -1e-302) || ~((t_1 <= 1e-259))) tmp = t_1; else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-302], N[Not[LessEqual[t$95$1, 1e-259]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-302} \lor \neg \left(t_1 \leq 10^{-259}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999996e-303 or 1.0000000000000001e-259 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.8%
if -9.9999999999999996e-303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.0000000000000001e-259Initial program 6.2%
Taylor expanded in z around inf 83.5%
associate--l+83.5%
distribute-lft-out--83.5%
div-sub83.5%
mul-1-neg83.5%
unsub-neg83.5%
distribute-rgt-out--83.5%
associate-/l*94.3%
Simplified94.3%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification93.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ t (/ a y)))))
(if (<= z -3e+127)
t
(if (<= z -4.2e-58)
t_1
(if (<= z -2.2e-128)
(* y (/ (- t x) a))
(if (<= z 4.4e-272)
t_1
(if (<= z 2.2e-224)
(* x (- 1.0 (/ y a)))
(if (<= z 5.4e+35) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double tmp;
if (z <= -3e+127) {
tmp = t;
} else if (z <= -4.2e-58) {
tmp = t_1;
} else if (z <= -2.2e-128) {
tmp = y * ((t - x) / a);
} else if (z <= 4.4e-272) {
tmp = t_1;
} else if (z <= 2.2e-224) {
tmp = x * (1.0 - (y / a));
} else if (z <= 5.4e+35) {
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 + (t / (a / y))
if (z <= (-3d+127)) then
tmp = t
else if (z <= (-4.2d-58)) then
tmp = t_1
else if (z <= (-2.2d-128)) then
tmp = y * ((t - x) / a)
else if (z <= 4.4d-272) then
tmp = t_1
else if (z <= 2.2d-224) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 5.4d+35) 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 + (t / (a / y));
double tmp;
if (z <= -3e+127) {
tmp = t;
} else if (z <= -4.2e-58) {
tmp = t_1;
} else if (z <= -2.2e-128) {
tmp = y * ((t - x) / a);
} else if (z <= 4.4e-272) {
tmp = t_1;
} else if (z <= 2.2e-224) {
tmp = x * (1.0 - (y / a));
} else if (z <= 5.4e+35) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t / (a / y)) tmp = 0 if z <= -3e+127: tmp = t elif z <= -4.2e-58: tmp = t_1 elif z <= -2.2e-128: tmp = y * ((t - x) / a) elif z <= 4.4e-272: tmp = t_1 elif z <= 2.2e-224: tmp = x * (1.0 - (y / a)) elif z <= 5.4e+35: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t / Float64(a / y))) tmp = 0.0 if (z <= -3e+127) tmp = t; elseif (z <= -4.2e-58) tmp = t_1; elseif (z <= -2.2e-128) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (z <= 4.4e-272) tmp = t_1; elseif (z <= 2.2e-224) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 5.4e+35) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t / (a / y)); tmp = 0.0; if (z <= -3e+127) tmp = t; elseif (z <= -4.2e-58) tmp = t_1; elseif (z <= -2.2e-128) tmp = y * ((t - x) / a); elseif (z <= 4.4e-272) tmp = t_1; elseif (z <= 2.2e-224) tmp = x * (1.0 - (y / a)); elseif (z <= 5.4e+35) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+127], t, If[LessEqual[z, -4.2e-58], t$95$1, If[LessEqual[z, -2.2e-128], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e-272], t$95$1, If[LessEqual[z, 2.2e-224], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e+35], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-128}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-224}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.0000000000000002e127 or 5.40000000000000005e35 < z Initial program 64.1%
Taylor expanded in z around inf 42.2%
if -3.0000000000000002e127 < z < -4.19999999999999975e-58 or -2.20000000000000009e-128 < z < 4.39999999999999976e-272 or 2.2000000000000001e-224 < z < 5.40000000000000005e35Initial program 90.7%
Taylor expanded in z around 0 67.3%
Taylor expanded in t around inf 58.0%
associate-/l*62.4%
Simplified62.4%
if -4.19999999999999975e-58 < z < -2.20000000000000009e-128Initial program 95.3%
Taylor expanded in z around 0 62.5%
Taylor expanded in y around inf 67.9%
div-sub68.2%
Simplified68.2%
if 4.39999999999999976e-272 < z < 2.2000000000000001e-224Initial program 100.0%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around inf 96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
Final simplification56.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ t (/ a y)))))
(if (<= z -1.2e+127)
t
(if (<= z -1.6e-61)
t_1
(if (<= z -2.2e-128)
(* y (/ (- t x) a))
(if (<= z 4.8e-271)
(+ x (/ (* y t) a))
(if (<= z 5e-225)
(* x (- 1.0 (/ y a)))
(if (<= z 2.6e+39) t_1 t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double tmp;
if (z <= -1.2e+127) {
tmp = t;
} else if (z <= -1.6e-61) {
tmp = t_1;
} else if (z <= -2.2e-128) {
tmp = y * ((t - x) / a);
} else if (z <= 4.8e-271) {
tmp = x + ((y * t) / a);
} else if (z <= 5e-225) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.6e+39) {
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 + (t / (a / y))
if (z <= (-1.2d+127)) then
tmp = t
else if (z <= (-1.6d-61)) then
tmp = t_1
else if (z <= (-2.2d-128)) then
tmp = y * ((t - x) / a)
else if (z <= 4.8d-271) then
tmp = x + ((y * t) / a)
else if (z <= 5d-225) then
tmp = x * (1.0d0 - (y / a))
else if (z <= 2.6d+39) 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 + (t / (a / y));
double tmp;
if (z <= -1.2e+127) {
tmp = t;
} else if (z <= -1.6e-61) {
tmp = t_1;
} else if (z <= -2.2e-128) {
tmp = y * ((t - x) / a);
} else if (z <= 4.8e-271) {
tmp = x + ((y * t) / a);
} else if (z <= 5e-225) {
tmp = x * (1.0 - (y / a));
} else if (z <= 2.6e+39) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t / (a / y)) tmp = 0 if z <= -1.2e+127: tmp = t elif z <= -1.6e-61: tmp = t_1 elif z <= -2.2e-128: tmp = y * ((t - x) / a) elif z <= 4.8e-271: tmp = x + ((y * t) / a) elif z <= 5e-225: tmp = x * (1.0 - (y / a)) elif z <= 2.6e+39: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t / Float64(a / y))) tmp = 0.0 if (z <= -1.2e+127) tmp = t; elseif (z <= -1.6e-61) tmp = t_1; elseif (z <= -2.2e-128) tmp = Float64(y * Float64(Float64(t - x) / a)); elseif (z <= 4.8e-271) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 5e-225) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (z <= 2.6e+39) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t / (a / y)); tmp = 0.0; if (z <= -1.2e+127) tmp = t; elseif (z <= -1.6e-61) tmp = t_1; elseif (z <= -2.2e-128) tmp = y * ((t - x) / a); elseif (z <= 4.8e-271) tmp = x + ((y * t) / a); elseif (z <= 5e-225) tmp = x * (1.0 - (y / a)); elseif (z <= 2.6e+39) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e+127], t, If[LessEqual[z, -1.6e-61], t$95$1, If[LessEqual[z, -2.2e-128], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-271], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e-225], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+39], t$95$1, t]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+127}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-128}:\\
\;\;\;\;y \cdot \frac{t - x}{a}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-271}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-225}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.2000000000000001e127 or 2.6e39 < z Initial program 64.1%
Taylor expanded in z around inf 42.2%
if -1.2000000000000001e127 < z < -1.6000000000000001e-61 or 5.0000000000000001e-225 < z < 2.6e39Initial program 89.2%
Taylor expanded in z around 0 60.2%
Taylor expanded in t around inf 53.6%
associate-/l*61.9%
Simplified61.9%
if -1.6000000000000001e-61 < z < -2.20000000000000009e-128Initial program 95.3%
Taylor expanded in z around 0 62.5%
Taylor expanded in y around inf 67.9%
div-sub68.2%
Simplified68.2%
if -2.20000000000000009e-128 < z < 4.8000000000000005e-271Initial program 92.8%
Taylor expanded in z around 0 77.8%
Taylor expanded in t around inf 64.6%
if 4.8000000000000005e-271 < z < 5.0000000000000001e-225Initial program 100.0%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around inf 96.7%
mul-1-neg96.7%
unsub-neg96.7%
Simplified96.7%
Final simplification56.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -9e-12)
t_2
(if (<= z -6.5e-66)
t_1
(if (<= z -4.5e-117)
(* (- y z) (/ t (- a z)))
(if (<= z -1.1e-205)
(* (- t x) (/ y (- a z)))
(if (<= z 4.8e-43) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -9e-12) {
tmp = t_2;
} else if (z <= -6.5e-66) {
tmp = t_1;
} else if (z <= -4.5e-117) {
tmp = (y - z) * (t / (a - z));
} else if (z <= -1.1e-205) {
tmp = (t - x) * (y / (a - z));
} else if (z <= 4.8e-43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) * (y / a))
t_2 = t * ((y - z) / (a - z))
if (z <= (-9d-12)) then
tmp = t_2
else if (z <= (-6.5d-66)) then
tmp = t_1
else if (z <= (-4.5d-117)) then
tmp = (y - z) * (t / (a - z))
else if (z <= (-1.1d-205)) then
tmp = (t - x) * (y / (a - z))
else if (z <= 4.8d-43) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * (y / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -9e-12) {
tmp = t_2;
} else if (z <= -6.5e-66) {
tmp = t_1;
} else if (z <= -4.5e-117) {
tmp = (y - z) * (t / (a - z));
} else if (z <= -1.1e-205) {
tmp = (t - x) * (y / (a - z));
} else if (z <= 4.8e-43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * (y / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -9e-12: tmp = t_2 elif z <= -6.5e-66: tmp = t_1 elif z <= -4.5e-117: tmp = (y - z) * (t / (a - z)) elif z <= -1.1e-205: tmp = (t - x) * (y / (a - z)) elif z <= 4.8e-43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(y / a))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -9e-12) tmp = t_2; elseif (z <= -6.5e-66) tmp = t_1; elseif (z <= -4.5e-117) tmp = Float64(Float64(y - z) * Float64(t / Float64(a - z))); elseif (z <= -1.1e-205) tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z))); elseif (z <= 4.8e-43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * (y / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -9e-12) tmp = t_2; elseif (z <= -6.5e-66) tmp = t_1; elseif (z <= -4.5e-117) tmp = (y - z) * (t / (a - z)); elseif (z <= -1.1e-205) tmp = (t - x) * (y / (a - z)); elseif (z <= 4.8e-43) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-12], t$95$2, If[LessEqual[z, -6.5e-66], t$95$1, If[LessEqual[z, -4.5e-117], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-205], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-43], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -9 \cdot 10^{-12}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-117}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-205}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -8.99999999999999962e-12 or 4.8000000000000004e-43 < z Initial program 71.3%
clear-num69.9%
un-div-inv69.9%
Applied egg-rr69.9%
Taylor expanded in t around inf 60.0%
div-sub60.0%
Simplified60.0%
if -8.99999999999999962e-12 < z < -6.50000000000000024e-66 or -1.10000000000000005e-205 < z < 4.8000000000000004e-43Initial program 92.4%
Taylor expanded in z around 0 84.0%
associate-/l*86.0%
associate-/r/87.0%
Simplified87.0%
if -6.50000000000000024e-66 < z < -4.49999999999999969e-117Initial program 91.5%
Taylor expanded in x around 0 99.6%
associate-/l*85.4%
associate-/r/99.3%
Simplified99.3%
if -4.49999999999999969e-117 < z < -1.10000000000000005e-205Initial program 84.9%
Taylor expanded in y around inf 55.2%
div-sub55.2%
associate-*r/50.5%
associate-/l*55.3%
associate-/r/60.0%
Simplified60.0%
Final simplification71.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))) (t_2 (+ x (/ t (/ a y)))))
(if (<= a -5.7e+41)
t_2
(if (<= a -3.7e-234)
t_1
(if (<= a 1.06e-63)
(* t (/ (- y z) (- a z)))
(if (<= a 1.6e+151) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double t_2 = x + (t / (a / y));
double tmp;
if (a <= -5.7e+41) {
tmp = t_2;
} else if (a <= -3.7e-234) {
tmp = t_1;
} else if (a <= 1.06e-63) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 1.6e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
t_2 = x + (t / (a / y))
if (a <= (-5.7d+41)) then
tmp = t_2
else if (a <= (-3.7d-234)) then
tmp = t_1
else if (a <= 1.06d-63) then
tmp = t * ((y - z) / (a - z))
else if (a <= 1.6d+151) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double t_2 = x + (t / (a / y));
double tmp;
if (a <= -5.7e+41) {
tmp = t_2;
} else if (a <= -3.7e-234) {
tmp = t_1;
} else if (a <= 1.06e-63) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 1.6e+151) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) t_2 = x + (t / (a / y)) tmp = 0 if a <= -5.7e+41: tmp = t_2 elif a <= -3.7e-234: tmp = t_1 elif a <= 1.06e-63: tmp = t * ((y - z) / (a - z)) elif a <= 1.6e+151: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) t_2 = Float64(x + Float64(t / Float64(a / y))) tmp = 0.0 if (a <= -5.7e+41) tmp = t_2; elseif (a <= -3.7e-234) tmp = t_1; elseif (a <= 1.06e-63) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 1.6e+151) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); t_2 = x + (t / (a / y)); tmp = 0.0; if (a <= -5.7e+41) tmp = t_2; elseif (a <= -3.7e-234) tmp = t_1; elseif (a <= 1.06e-63) tmp = t * ((y - z) / (a - z)); elseif (a <= 1.6e+151) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.7e+41], t$95$2, If[LessEqual[a, -3.7e-234], t$95$1, If[LessEqual[a, 1.06e-63], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+151], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -5.7 \cdot 10^{+41}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-234}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -5.70000000000000021e41 or 1.59999999999999997e151 < a Initial program 92.2%
Taylor expanded in z around 0 65.4%
Taylor expanded in t around inf 65.8%
associate-/l*69.9%
Simplified69.9%
if -5.70000000000000021e41 < a < -3.70000000000000012e-234 or 1.06000000000000004e-63 < a < 1.59999999999999997e151Initial program 72.5%
clear-num72.5%
un-div-inv72.4%
Applied egg-rr72.4%
Taylor expanded in y around inf 59.9%
div-sub59.9%
Simplified59.9%
if -3.70000000000000012e-234 < a < 1.06000000000000004e-63Initial program 76.2%
clear-num75.0%
un-div-inv75.1%
Applied egg-rr75.1%
Taylor expanded in t around inf 68.3%
div-sub68.2%
Simplified68.2%
Final simplification66.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ t (/ a y)))))
(if (<= a -4e+44)
t_1
(if (<= a -2.95e-235)
(* (- t x) (/ y (- a z)))
(if (<= a 7.8e-64)
(* t (/ (- y z) (- a z)))
(if (<= a 3.1e+150) (* y (/ (- t x) (- a z))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double tmp;
if (a <= -4e+44) {
tmp = t_1;
} else if (a <= -2.95e-235) {
tmp = (t - x) * (y / (a - z));
} else if (a <= 7.8e-64) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 3.1e+150) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t / (a / y))
if (a <= (-4d+44)) then
tmp = t_1
else if (a <= (-2.95d-235)) then
tmp = (t - x) * (y / (a - z))
else if (a <= 7.8d-64) then
tmp = t * ((y - z) / (a - z))
else if (a <= 3.1d+150) then
tmp = y * ((t - x) / (a - z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t / (a / y));
double tmp;
if (a <= -4e+44) {
tmp = t_1;
} else if (a <= -2.95e-235) {
tmp = (t - x) * (y / (a - z));
} else if (a <= 7.8e-64) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 3.1e+150) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t / (a / y)) tmp = 0 if a <= -4e+44: tmp = t_1 elif a <= -2.95e-235: tmp = (t - x) * (y / (a - z)) elif a <= 7.8e-64: tmp = t * ((y - z) / (a - z)) elif a <= 3.1e+150: tmp = y * ((t - x) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t / Float64(a / y))) tmp = 0.0 if (a <= -4e+44) tmp = t_1; elseif (a <= -2.95e-235) tmp = Float64(Float64(t - x) * Float64(y / Float64(a - z))); elseif (a <= 7.8e-64) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 3.1e+150) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t / (a / y)); tmp = 0.0; if (a <= -4e+44) tmp = t_1; elseif (a <= -2.95e-235) tmp = (t - x) * (y / (a - z)); elseif (a <= 7.8e-64) tmp = t * ((y - z) / (a - z)); elseif (a <= 3.1e+150) tmp = y * ((t - x) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+44], t$95$1, If[LessEqual[a, -2.95e-235], N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e-64], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e+150], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -4 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.95 \cdot 10^{-235}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-64}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+150}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -4.0000000000000004e44 or 3.10000000000000014e150 < a Initial program 92.2%
Taylor expanded in z around 0 65.4%
Taylor expanded in t around inf 65.8%
associate-/l*69.9%
Simplified69.9%
if -4.0000000000000004e44 < a < -2.9500000000000002e-235Initial program 72.7%
Taylor expanded in y around inf 63.5%
div-sub63.5%
associate-*r/61.2%
associate-/l*63.3%
associate-/r/69.9%
Simplified69.9%
if -2.9500000000000002e-235 < a < 7.7999999999999994e-64Initial program 76.2%
clear-num75.0%
un-div-inv75.1%
Applied egg-rr75.1%
Taylor expanded in t around inf 68.3%
div-sub68.2%
Simplified68.2%
if 7.7999999999999994e-64 < a < 3.10000000000000014e150Initial program 72.3%
clear-num72.6%
un-div-inv72.2%
Applied egg-rr72.2%
Taylor expanded in y around inf 56.4%
div-sub56.4%
Simplified56.4%
Final simplification67.1%
(FPCore (x y z t a)
:precision binary64
(if (<= y -3.8e+38)
(/ x (/ z y))
(if (<= y -2.05e-39)
t
(if (<= y -7.7e-72)
(/ (* y t) a)
(if (<= y -2.7e-134) t (if (<= y 2.4e+159) x (/ (- t) (/ z y))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.8e+38) {
tmp = x / (z / y);
} else if (y <= -2.05e-39) {
tmp = t;
} else if (y <= -7.7e-72) {
tmp = (y * t) / a;
} else if (y <= -2.7e-134) {
tmp = t;
} else if (y <= 2.4e+159) {
tmp = x;
} else {
tmp = -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 (y <= (-3.8d+38)) then
tmp = x / (z / y)
else if (y <= (-2.05d-39)) then
tmp = t
else if (y <= (-7.7d-72)) then
tmp = (y * t) / a
else if (y <= (-2.7d-134)) then
tmp = t
else if (y <= 2.4d+159) then
tmp = x
else
tmp = -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 (y <= -3.8e+38) {
tmp = x / (z / y);
} else if (y <= -2.05e-39) {
tmp = t;
} else if (y <= -7.7e-72) {
tmp = (y * t) / a;
} else if (y <= -2.7e-134) {
tmp = t;
} else if (y <= 2.4e+159) {
tmp = x;
} else {
tmp = -t / (z / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.8e+38: tmp = x / (z / y) elif y <= -2.05e-39: tmp = t elif y <= -7.7e-72: tmp = (y * t) / a elif y <= -2.7e-134: tmp = t elif y <= 2.4e+159: tmp = x else: tmp = -t / (z / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.8e+38) tmp = Float64(x / Float64(z / y)); elseif (y <= -2.05e-39) tmp = t; elseif (y <= -7.7e-72) tmp = Float64(Float64(y * t) / a); elseif (y <= -2.7e-134) tmp = t; elseif (y <= 2.4e+159) tmp = x; else tmp = Float64(Float64(-t) / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.8e+38) tmp = x / (z / y); elseif (y <= -2.05e-39) tmp = t; elseif (y <= -7.7e-72) tmp = (y * t) / a; elseif (y <= -2.7e-134) tmp = t; elseif (y <= 2.4e+159) tmp = x; else tmp = -t / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.8e+38], N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.05e-39], t, If[LessEqual[y, -7.7e-72], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.7e-134], t, If[LessEqual[y, 2.4e+159], x, N[((-t) / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-39}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -7.7 \cdot 10^{-72}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-134}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+159}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-t}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -3.7999999999999998e38Initial program 81.8%
Taylor expanded in y around -inf 61.0%
Taylor expanded in a around 0 41.0%
associate-*r/41.0%
mul-1-neg41.0%
distribute-rgt-neg-in41.0%
Simplified41.0%
Taylor expanded in t around 0 28.0%
associate-/l*35.8%
Simplified35.8%
if -3.7999999999999998e38 < y < -2.05e-39 or -7.6999999999999997e-72 < y < -2.6999999999999998e-134Initial program 65.2%
Taylor expanded in z around inf 48.8%
if -2.05e-39 < y < -7.6999999999999997e-72Initial program 95.5%
Taylor expanded in y around -inf 84.4%
Taylor expanded in t around inf 84.4%
associate-/l*72.3%
Simplified72.3%
Taylor expanded in a around inf 60.1%
Taylor expanded in t around 0 72.1%
*-commutative72.1%
Simplified72.1%
if -2.6999999999999998e-134 < y < 2.4e159Initial program 79.4%
Taylor expanded in a around inf 41.1%
if 2.4e159 < y Initial program 92.3%
Taylor expanded in y around -inf 70.4%
Taylor expanded in t around inf 47.6%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in a around 0 38.4%
mul-1-neg38.4%
associate-/l*58.3%
distribute-neg-frac58.3%
Simplified58.3%
Final simplification44.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.00042) (not (<= z 9e-46))) (+ t (* (/ (- t x) z) (- a y))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.00042) || !(z <= 9e-46)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-0.00042d0)) .or. (.not. (z <= 9d-46))) then
tmp = t + (((t - x) / z) * (a - y))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.00042) || !(z <= 9e-46)) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -0.00042) or not (z <= 9e-46): tmp = t + (((t - x) / z) * (a - y)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.00042) || !(z <= 9e-46)) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -0.00042) || ~((z <= 9e-46))) tmp = t + (((t - x) / z) * (a - y)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.00042], N[Not[LessEqual[z, 9e-46]], $MachinePrecision]], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00042 \lor \neg \left(z \leq 9 \cdot 10^{-46}\right):\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -4.2000000000000002e-4 or 9.00000000000000001e-46 < z Initial program 70.4%
Taylor expanded in z around inf 61.6%
associate--l+61.6%
distribute-lft-out--61.6%
div-sub61.7%
mul-1-neg61.7%
unsub-neg61.7%
distribute-rgt-out--61.9%
associate-/l*75.6%
Simplified75.6%
associate-/r/75.7%
Applied egg-rr75.7%
if -4.2000000000000002e-4 < z < 9.00000000000000001e-46Initial program 92.1%
Taylor expanded in z around 0 77.3%
associate-/l*80.3%
associate-/r/80.4%
Simplified80.4%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e-5)
(+ t (/ (- x t) (/ z (- y a))))
(if (<= z 8e-47)
(+ x (* (- t x) (/ y a)))
(+ t (* (/ (- t x) z) (- a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e-5) {
tmp = t + ((x - t) / (z / (y - a)));
} else if (z <= 8e-47) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.7d-5)) then
tmp = t + ((x - t) / (z / (y - a)))
else if (z <= 8d-47) then
tmp = x + ((t - x) * (y / a))
else
tmp = t + (((t - x) / z) * (a - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e-5) {
tmp = t + ((x - t) / (z / (y - a)));
} else if (z <= 8e-47) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + (((t - x) / z) * (a - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e-5: tmp = t + ((x - t) / (z / (y - a))) elif z <= 8e-47: tmp = x + ((t - x) * (y / a)) else: tmp = t + (((t - x) / z) * (a - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e-5) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); elseif (z <= 8e-47) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e-5) tmp = t + ((x - t) / (z / (y - a))); elseif (z <= 8e-47) tmp = x + ((t - x) * (y / a)); else tmp = t + (((t - x) / z) * (a - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e-5], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e-47], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-5}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-47}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if z < -1.7e-5Initial program 73.0%
Taylor expanded in z around inf 57.3%
associate--l+57.3%
distribute-lft-out--57.3%
div-sub57.3%
mul-1-neg57.3%
unsub-neg57.3%
distribute-rgt-out--57.6%
associate-/l*77.7%
Simplified77.7%
if -1.7e-5 < z < 7.9999999999999998e-47Initial program 92.1%
Taylor expanded in z around 0 77.3%
associate-/l*80.3%
associate-/r/80.4%
Simplified80.4%
if 7.9999999999999998e-47 < z Initial program 68.4%
Taylor expanded in z around inf 65.0%
associate--l+65.0%
distribute-lft-out--65.0%
div-sub65.0%
mul-1-neg65.0%
unsub-neg65.0%
distribute-rgt-out--65.2%
associate-/l*74.1%
Simplified74.1%
associate-/r/75.4%
Applied egg-rr75.4%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e-92) (not (<= a 1.05e-31))) (+ x (* (- t x) (/ y a))) (- t (/ y (/ z (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-92) || !(a <= 1.05e-31)) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t - (y / (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) :: tmp
if ((a <= (-5.5d-92)) .or. (.not. (a <= 1.05d-31))) then
tmp = x + ((t - x) * (y / a))
else
tmp = t - (y / (z / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e-92) || !(a <= 1.05e-31)) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t - (y / (z / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e-92) or not (a <= 1.05e-31): tmp = x + ((t - x) * (y / a)) else: tmp = t - (y / (z / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e-92) || !(a <= 1.05e-31)) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t - Float64(y / Float64(z / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.5e-92) || ~((a <= 1.05e-31))) tmp = x + ((t - x) * (y / a)); else tmp = t - (y / (z / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.5e-92], N[Not[LessEqual[a, 1.05e-31]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-92} \lor \neg \left(a \leq 1.05 \cdot 10^{-31}\right):\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\end{array}
\end{array}
if a < -5.5000000000000002e-92 or 1.04999999999999996e-31 < a Initial program 85.8%
Taylor expanded in z around 0 60.7%
associate-/l*67.8%
associate-/r/67.2%
Simplified67.2%
if -5.5000000000000002e-92 < a < 1.04999999999999996e-31Initial program 74.4%
Taylor expanded in z around inf 57.1%
associate--l+57.1%
+-commutative57.1%
associate--l+57.1%
Simplified56.9%
Taylor expanded in a around 0 68.2%
associate-/l*72.4%
Simplified72.4%
Final simplification69.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.75e-6) (not (<= z 1.8e-43))) (- t (/ (- t x) (/ z y))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.75e-6) || !(z <= 1.8e-43)) {
tmp = t - ((t - x) / (z / y));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.75d-6)) .or. (.not. (z <= 1.8d-43))) then
tmp = t - ((t - x) / (z / y))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.75e-6) || !(z <= 1.8e-43)) {
tmp = t - ((t - x) / (z / y));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.75e-6) or not (z <= 1.8e-43): tmp = t - ((t - x) / (z / y)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.75e-6) || !(z <= 1.8e-43)) tmp = Float64(t - Float64(Float64(t - x) / Float64(z / y))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.75e-6) || ~((z <= 1.8e-43))) tmp = t - ((t - x) / (z / y)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.75e-6], N[Not[LessEqual[z, 1.8e-43]], $MachinePrecision]], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{-6} \lor \neg \left(z \leq 1.8 \cdot 10^{-43}\right):\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.7499999999999999e-6 or 1.7999999999999999e-43 < z Initial program 70.4%
Taylor expanded in z around inf 61.6%
associate--l+61.6%
distribute-lft-out--61.6%
div-sub61.7%
mul-1-neg61.7%
unsub-neg61.7%
distribute-rgt-out--61.9%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in y around inf 65.3%
if -2.7499999999999999e-6 < z < 1.7999999999999999e-43Initial program 92.1%
Taylor expanded in z around 0 77.3%
associate-/l*80.3%
associate-/r/80.4%
Simplified80.4%
Final simplification72.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.8e-56) (* x (- 1.0 (/ y a))) (if (<= x 4.5e+148) (* t (/ (- y z) (- a z))) (/ (- x) (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.8e-56) {
tmp = x * (1.0 - (y / a));
} else if (x <= 4.5e+148) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = -x / ((a - 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 (x <= (-6.8d-56)) then
tmp = x * (1.0d0 - (y / a))
else if (x <= 4.5d+148) then
tmp = t * ((y - z) / (a - z))
else
tmp = -x / ((a - 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 (x <= -6.8e-56) {
tmp = x * (1.0 - (y / a));
} else if (x <= 4.5e+148) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = -x / ((a - z) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.8e-56: tmp = x * (1.0 - (y / a)) elif x <= 4.5e+148: tmp = t * ((y - z) / (a - z)) else: tmp = -x / ((a - z) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.8e-56) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (x <= 4.5e+148) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(Float64(-x) / Float64(Float64(a - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.8e-56) tmp = x * (1.0 - (y / a)); elseif (x <= 4.5e+148) tmp = t * ((y - z) / (a - z)); else tmp = -x / ((a - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.8e-56], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+148], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-x) / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-56}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+148}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if x < -6.79999999999999964e-56Initial program 75.7%
Taylor expanded in z around 0 53.1%
Taylor expanded in x around inf 53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
if -6.79999999999999964e-56 < x < 4.49999999999999994e148Initial program 87.4%
clear-num86.1%
un-div-inv86.3%
Applied egg-rr86.3%
Taylor expanded in t around inf 68.2%
div-sub68.2%
Simplified68.2%
if 4.49999999999999994e148 < x Initial program 61.2%
Taylor expanded in y around -inf 52.1%
Taylor expanded in t around 0 52.1%
mul-1-neg52.1%
associate-/l*61.6%
distribute-neg-frac61.6%
Simplified61.6%
Final simplification62.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.2e+128)
t
(if (<= z 1.45e-224)
x
(if (<= z 1.4e-164) (* y (/ t a)) (if (<= z 6.9e-43) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.2e+128) {
tmp = t;
} else if (z <= 1.45e-224) {
tmp = x;
} else if (z <= 1.4e-164) {
tmp = y * (t / a);
} else if (z <= 6.9e-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 <= (-2.2d+128)) then
tmp = t
else if (z <= 1.45d-224) then
tmp = x
else if (z <= 1.4d-164) then
tmp = y * (t / a)
else if (z <= 6.9d-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 <= -2.2e+128) {
tmp = t;
} else if (z <= 1.45e-224) {
tmp = x;
} else if (z <= 1.4e-164) {
tmp = y * (t / a);
} else if (z <= 6.9e-43) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.2e+128: tmp = t elif z <= 1.45e-224: tmp = x elif z <= 1.4e-164: tmp = y * (t / a) elif z <= 6.9e-43: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.2e+128) tmp = t; elseif (z <= 1.45e-224) tmp = x; elseif (z <= 1.4e-164) tmp = Float64(y * Float64(t / a)); elseif (z <= 6.9e-43) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.2e+128) tmp = t; elseif (z <= 1.45e-224) tmp = x; elseif (z <= 1.4e-164) tmp = y * (t / a); elseif (z <= 6.9e-43) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+128], t, If[LessEqual[z, 1.45e-224], x, If[LessEqual[z, 1.4e-164], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.9e-43], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+128}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-224}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-164}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 6.9 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.20000000000000017e128 or 6.89999999999999964e-43 < z Initial program 67.9%
Taylor expanded in z around inf 40.7%
if -2.20000000000000017e128 < z < 1.45e-224 or 1.4000000000000001e-164 < z < 6.89999999999999964e-43Initial program 91.2%
Taylor expanded in a around inf 36.0%
if 1.45e-224 < z < 1.4000000000000001e-164Initial program 89.4%
Taylor expanded in y around -inf 89.1%
Taylor expanded in t around inf 59.0%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in a around inf 68.0%
associate-/r/58.9%
Applied egg-rr58.9%
Final simplification38.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.5e+128)
t
(if (<= z 9e-224)
x
(if (<= z 6.2e-165) (/ t (/ a y)) (if (<= z 4.2e-43) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+128) {
tmp = t;
} else if (z <= 9e-224) {
tmp = x;
} else if (z <= 6.2e-165) {
tmp = t / (a / y);
} else if (z <= 4.2e-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 <= (-8.5d+128)) then
tmp = t
else if (z <= 9d-224) then
tmp = x
else if (z <= 6.2d-165) then
tmp = t / (a / y)
else if (z <= 4.2d-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 <= -8.5e+128) {
tmp = t;
} else if (z <= 9e-224) {
tmp = x;
} else if (z <= 6.2e-165) {
tmp = t / (a / y);
} else if (z <= 4.2e-43) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e+128: tmp = t elif z <= 9e-224: tmp = x elif z <= 6.2e-165: tmp = t / (a / y) elif z <= 4.2e-43: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+128) tmp = t; elseif (z <= 9e-224) tmp = x; elseif (z <= 6.2e-165) tmp = Float64(t / Float64(a / y)); elseif (z <= 4.2e-43) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e+128) tmp = t; elseif (z <= 9e-224) tmp = x; elseif (z <= 6.2e-165) tmp = t / (a / y); elseif (z <= 4.2e-43) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+128], t, If[LessEqual[z, 9e-224], x, If[LessEqual[z, 6.2e-165], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-43], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+128}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-224}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-165}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.50000000000000045e128 or 4.2000000000000001e-43 < z Initial program 67.9%
Taylor expanded in z around inf 40.7%
if -8.50000000000000045e128 < z < 9.0000000000000009e-224 or 6.19999999999999992e-165 < z < 4.2000000000000001e-43Initial program 91.2%
Taylor expanded in a around inf 36.0%
if 9.0000000000000009e-224 < z < 6.19999999999999992e-165Initial program 89.4%
Taylor expanded in y around -inf 89.1%
Taylor expanded in t around inf 59.0%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in a around inf 68.0%
Final simplification39.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4e-104) (not (<= a 4.2e-60))) (+ x (/ t (/ a y))) (/ y (/ z (- x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e-104) || !(a <= 4.2e-60)) {
tmp = x + (t / (a / y));
} else {
tmp = y / (z / (x - 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 ((a <= (-4d-104)) .or. (.not. (a <= 4.2d-60))) then
tmp = x + (t / (a / y))
else
tmp = y / (z / (x - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e-104) || !(a <= 4.2e-60)) {
tmp = x + (t / (a / y));
} else {
tmp = y / (z / (x - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4e-104) or not (a <= 4.2e-60): tmp = x + (t / (a / y)) else: tmp = y / (z / (x - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4e-104) || !(a <= 4.2e-60)) tmp = Float64(x + Float64(t / Float64(a / y))); else tmp = Float64(y / Float64(z / Float64(x - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4e-104) || ~((a <= 4.2e-60))) tmp = x + (t / (a / y)); else tmp = y / (z / (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4e-104], N[Not[LessEqual[a, 4.2e-60]], $MachinePrecision]], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(z / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-104} \lor \neg \left(a \leq 4.2 \cdot 10^{-60}\right):\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{x - t}}\\
\end{array}
\end{array}
if a < -3.99999999999999971e-104 or 4.19999999999999982e-60 < a Initial program 84.9%
Taylor expanded in z around 0 59.3%
Taylor expanded in t around inf 54.5%
associate-/l*57.1%
Simplified57.1%
if -3.99999999999999971e-104 < a < 4.19999999999999982e-60Initial program 74.7%
Taylor expanded in y around -inf 56.6%
Taylor expanded in a around 0 44.1%
associate-*r/44.1%
mul-1-neg44.1%
distribute-rgt-neg-in44.1%
Simplified44.1%
Taylor expanded in y around 0 44.1%
associate-/l*47.0%
Simplified47.0%
Final simplification53.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -8e+126) t (if (<= z 1.15e-42) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+126) {
tmp = t;
} else if (z <= 1.15e-42) {
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 <= (-8d+126)) then
tmp = t
else if (z <= 1.15d-42) 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 <= -8e+126) {
tmp = t;
} else if (z <= 1.15e-42) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+126: tmp = t elif z <= 1.15e-42: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+126) tmp = t; elseif (z <= 1.15e-42) 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 <= -8e+126) tmp = t; elseif (z <= 1.15e-42) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+126], t, If[LessEqual[z, 1.15e-42], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+126}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-42}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.9999999999999994e126 or 1.15000000000000002e-42 < z Initial program 67.9%
Taylor expanded in z around inf 40.7%
if -7.9999999999999994e126 < z < 1.15000000000000002e-42Initial program 91.1%
Taylor expanded in z around 0 72.2%
Taylor expanded in x around inf 53.4%
mul-1-neg53.4%
unsub-neg53.4%
Simplified53.4%
Final simplification47.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+126) t (if (<= z 1.15e-42) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+126) {
tmp = t;
} else if (z <= 1.15e-42) {
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+126)) then
tmp = t
else if (z <= 1.15d-42) 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+126) {
tmp = t;
} else if (z <= 1.15e-42) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+126: tmp = t elif z <= 1.15e-42: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+126) tmp = t; elseif (z <= 1.15e-42) 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+126) tmp = t; elseif (z <= 1.15e-42) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+126], t, If[LessEqual[z, 1.15e-42], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+126}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-42}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.1999999999999998e126 or 1.15000000000000002e-42 < z Initial program 67.9%
Taylor expanded in z around inf 40.7%
if -3.1999999999999998e126 < z < 1.15000000000000002e-42Initial program 91.1%
Taylor expanded in a around inf 34.6%
Final simplification37.2%
(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 81.0%
Taylor expanded in y around 0 33.5%
mul-1-neg33.5%
unsub-neg33.5%
associate-/l*42.5%
associate-/r/42.8%
Simplified42.8%
Taylor expanded in t around 0 24.0%
mul-1-neg24.0%
Simplified24.0%
Taylor expanded in z around inf 2.8%
distribute-rgt1-in2.8%
metadata-eval2.8%
mul0-lft2.8%
Simplified2.8%
Final simplification2.8%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 81.0%
Taylor expanded in z around inf 21.7%
Final simplification21.7%
herbie shell --seed 2023298
(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)))))