
(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))))) (t_2 (/ z (- t x))))
(if (<= t_1 -2e-296)
(+ x (/ (- t x) (/ (- a z) (- y z))))
(if (<= t_1 0.0)
(+ (- t (/ y t_2)) (/ a t_2))
(fma (/ (- y z) (- a z)) (- t x) x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if (t_1 <= -2e-296) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else if (t_1 <= 0.0) {
tmp = (t - (y / t_2)) + (a / t_2);
} else {
tmp = fma(((y - z) / (a - z)), (t - x), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(z / Float64(t - x)) tmp = 0.0 if (t_1 <= -2e-296) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); elseif (t_1 <= 0.0) tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); else tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); 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]}, Block[{t$95$2 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-296], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-296}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296Initial program 89.2%
associate-*r/78.4%
*-commutative78.4%
associate-/l*92.2%
Applied egg-rr92.2%
if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.9%
Taylor expanded in z around inf 79.5%
sub-neg79.5%
+-commutative79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/l*93.0%
mul-1-neg93.0%
remove-double-neg93.0%
associate-/l*99.8%
Simplified99.8%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.6%
+-commutative91.6%
remove-double-neg91.6%
unsub-neg91.6%
associate-*r/72.9%
associate-/l*92.3%
associate-/r/95.0%
fma-neg95.0%
remove-double-neg95.0%
Simplified95.0%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))) (t_2 (/ z (- t x))))
(if (or (<= t_1 -2e-296) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ (- t (/ y t_2)) (/ a t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -2e-296) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = (t - (y / t_2)) + (a / 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 + ((y - z) * ((t - x) / (a - z)))
t_2 = z / (t - x)
if ((t_1 <= (-2d-296)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = (t - (y / t_2)) + (a / 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 + ((y - z) * ((t - x) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -2e-296) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) t_2 = z / (t - x) tmp = 0 if (t_1 <= -2e-296) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = (t - (y / t_2)) + (a / t_2) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) t_2 = Float64(z / Float64(t - x)) tmp = 0.0 if ((t_1 <= -2e-296) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); t_2 = z / (t - x); tmp = 0.0; if ((t_1 <= -2e-296) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = (t - (y / t_2)) + (a / t_2); 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]}, Block[{t$95$2 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-296], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-296} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.5%
associate-*r/75.5%
*-commutative75.5%
associate-/l*93.6%
Applied egg-rr93.6%
if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.9%
Taylor expanded in z around inf 79.5%
sub-neg79.5%
+-commutative79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/l*93.0%
mul-1-neg93.0%
remove-double-neg93.0%
associate-/l*99.8%
Simplified99.8%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-227) (not (<= t_1 0.0)))
t_1
(+ t (/ (- y a) (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-227) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-227)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + ((y - a) / (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-227) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-227) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + ((y - a) / (z / x)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-227) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(y - a) / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -5e-227) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + ((y - a) / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-227], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-227} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.6%
if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 7.2%
Taylor expanded in z around -inf 79.0%
+-commutative79.0%
mul-1-neg79.0%
unsub-neg79.0%
distribute-rgt-out--79.0%
Simplified79.0%
Taylor expanded in t around 0 79.0%
mul-1-neg79.0%
associate-/l*96.8%
distribute-neg-frac96.8%
Simplified96.8%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-296) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (- y a) (/ z x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-296) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-296)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + ((y - a) / (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-296) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-296) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + ((y - a) / (z / x)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-296) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(y - a) / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-296) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + ((y - a) / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-296], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $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 -2 \cdot 10^{-296} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.5%
associate-*r/75.5%
*-commutative75.5%
associate-/l*93.6%
Applied egg-rr93.6%
if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.9%
Taylor expanded in z around -inf 79.4%
+-commutative79.4%
mul-1-neg79.4%
unsub-neg79.4%
distribute-rgt-out--79.4%
Simplified79.4%
Taylor expanded in t around 0 79.4%
mul-1-neg79.4%
associate-/l*99.8%
distribute-neg-frac99.8%
Simplified99.8%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ t (- a z))))) (t_2 (+ t (/ (- y a) (/ z x)))))
(if (<= z -5.6e+63)
t_2
(if (<= z -3.8e-93)
t_1
(if (<= z 1.55e-84)
(+ x (/ y (/ a (- t x))))
(if (<= z 1.6e+43) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double t_2 = t + ((y - a) / (z / x));
double tmp;
if (z <= -5.6e+63) {
tmp = t_2;
} else if (z <= -3.8e-93) {
tmp = t_1;
} else if (z <= 1.55e-84) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 1.6e+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 + ((y - z) * (t / (a - z)))
t_2 = t + ((y - a) / (z / x))
if (z <= (-5.6d+63)) then
tmp = t_2
else if (z <= (-3.8d-93)) then
tmp = t_1
else if (z <= 1.55d-84) then
tmp = x + (y / (a / (t - x)))
else if (z <= 1.6d+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 + ((y - z) * (t / (a - z)));
double t_2 = t + ((y - a) / (z / x));
double tmp;
if (z <= -5.6e+63) {
tmp = t_2;
} else if (z <= -3.8e-93) {
tmp = t_1;
} else if (z <= 1.55e-84) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 1.6e+43) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (t / (a - z))) t_2 = t + ((y - a) / (z / x)) tmp = 0 if z <= -5.6e+63: tmp = t_2 elif z <= -3.8e-93: tmp = t_1 elif z <= 1.55e-84: tmp = x + (y / (a / (t - x))) elif z <= 1.6e+43: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) t_2 = Float64(t + Float64(Float64(y - a) / Float64(z / x))) tmp = 0.0 if (z <= -5.6e+63) tmp = t_2; elseif (z <= -3.8e-93) tmp = t_1; elseif (z <= 1.55e-84) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 1.6e+43) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (t / (a - z))); t_2 = t + ((y - a) / (z / x)); tmp = 0.0; if (z <= -5.6e+63) tmp = t_2; elseif (z <= -3.8e-93) tmp = t_1; elseif (z <= 1.55e-84) tmp = x + (y / (a / (t - x))); elseif (z <= 1.6e+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[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e+63], t$95$2, If[LessEqual[z, -3.8e-93], t$95$1, If[LessEqual[z, 1.55e-84], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+43], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
t_2 := t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+63}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.59999999999999974e63 or 1.60000000000000007e43 < z Initial program 61.5%
Taylor expanded in z around -inf 63.3%
+-commutative63.3%
mul-1-neg63.3%
unsub-neg63.3%
distribute-rgt-out--63.5%
Simplified63.5%
Taylor expanded in t around 0 68.6%
mul-1-neg68.6%
associate-/l*78.5%
distribute-neg-frac78.5%
Simplified78.5%
if -5.59999999999999974e63 < z < -3.7999999999999999e-93 or 1.55000000000000001e-84 < z < 1.60000000000000007e43Initial program 86.5%
Taylor expanded in t around inf 72.9%
if -3.7999999999999999e-93 < z < 1.55000000000000001e-84Initial program 95.5%
Taylor expanded in z around 0 77.8%
+-commutative77.8%
associate-/l*87.9%
Simplified87.9%
Final simplification81.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ t (- a z))))))
(if (<= z -4.8e+64)
(- t (* (- t x) (/ (- y a) z)))
(if (<= z -5.5e-99)
t_1
(if (<= z 2.45e-85)
(+ x (/ y (/ a (- t x))))
(if (<= z 6.3e+47) t_1 (+ t (/ (- y a) (/ z x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double tmp;
if (z <= -4.8e+64) {
tmp = t - ((t - x) * ((y - a) / z));
} else if (z <= -5.5e-99) {
tmp = t_1;
} else if (z <= 2.45e-85) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 6.3e+47) {
tmp = t_1;
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * (t / (a - z)))
if (z <= (-4.8d+64)) then
tmp = t - ((t - x) * ((y - a) / z))
else if (z <= (-5.5d-99)) then
tmp = t_1
else if (z <= 2.45d-85) then
tmp = x + (y / (a / (t - x)))
else if (z <= 6.3d+47) then
tmp = t_1
else
tmp = t + ((y - a) / (z / x))
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 / (a - z)));
double tmp;
if (z <= -4.8e+64) {
tmp = t - ((t - x) * ((y - a) / z));
} else if (z <= -5.5e-99) {
tmp = t_1;
} else if (z <= 2.45e-85) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 6.3e+47) {
tmp = t_1;
} else {
tmp = t + ((y - a) / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (t / (a - z))) tmp = 0 if z <= -4.8e+64: tmp = t - ((t - x) * ((y - a) / z)) elif z <= -5.5e-99: tmp = t_1 elif z <= 2.45e-85: tmp = x + (y / (a / (t - x))) elif z <= 6.3e+47: tmp = t_1 else: tmp = t + ((y - a) / (z / x)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) tmp = 0.0 if (z <= -4.8e+64) tmp = Float64(t - Float64(Float64(t - x) * Float64(Float64(y - a) / z))); elseif (z <= -5.5e-99) tmp = t_1; elseif (z <= 2.45e-85) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 6.3e+47) tmp = t_1; else tmp = Float64(t + Float64(Float64(y - a) / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (t / (a - z))); tmp = 0.0; if (z <= -4.8e+64) tmp = t - ((t - x) * ((y - a) / z)); elseif (z <= -5.5e-99) tmp = t_1; elseif (z <= 2.45e-85) tmp = x + (y / (a / (t - x))); elseif (z <= 6.3e+47) tmp = t_1; else tmp = t + ((y - a) / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+64], N[(t - N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-99], t$95$1, If[LessEqual[z, 2.45e-85], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.3e+47], t$95$1, N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+64}:\\
\;\;\;\;t - \left(t - x\right) \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-85}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -4.79999999999999999e64Initial program 57.9%
associate-*r/38.9%
*-commutative38.9%
associate-/l*61.3%
Applied egg-rr61.3%
Taylor expanded in z around -inf 63.9%
+-commutative63.9%
mul-1-neg63.9%
distribute-rgt-out--64.1%
unsub-neg64.1%
associate-*r/80.1%
Simplified80.1%
if -4.79999999999999999e64 < z < -5.49999999999999991e-99 or 2.45000000000000007e-85 < z < 6.30000000000000003e47Initial program 86.5%
Taylor expanded in t around inf 72.9%
if -5.49999999999999991e-99 < z < 2.45000000000000007e-85Initial program 95.5%
Taylor expanded in z around 0 77.8%
+-commutative77.8%
associate-/l*87.9%
Simplified87.9%
if 6.30000000000000003e47 < z Initial program 65.0%
Taylor expanded in z around -inf 62.7%
+-commutative62.7%
mul-1-neg62.7%
unsub-neg62.7%
distribute-rgt-out--63.0%
Simplified63.0%
Taylor expanded in t around 0 70.9%
mul-1-neg70.9%
associate-/l*81.0%
distribute-neg-frac81.0%
Simplified81.0%
Final simplification82.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.5e+104) (not (<= z 3.5e-45))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+104) || !(z <= 3.5e-45)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8.5d+104)) .or. (.not. (z <= 3.5d-45))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+104) || !(z <= 3.5e-45)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e+104) or not (z <= 3.5e-45): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e+104) || !(z <= 3.5e-45)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8.5e+104) || ~((z <= 3.5e-45))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.5e+104], N[Not[LessEqual[z, 3.5e-45]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+104} \lor \neg \left(z \leq 3.5 \cdot 10^{-45}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -8.4999999999999999e104 or 3.5e-45 < z Initial program 65.4%
Taylor expanded in x around 0 41.7%
associate-*r/60.2%
Simplified60.2%
if -8.4999999999999999e104 < z < 3.5e-45Initial program 91.6%
Taylor expanded in z around 0 68.2%
+-commutative68.2%
associate-/l*78.0%
Simplified78.0%
Final simplification70.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e-39) (not (<= z 1.02e-66))) (+ t (* (/ y z) (- x t))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-39) || !(z <= 1.02e-66)) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-8d-39)) .or. (.not. (z <= 1.02d-66))) then
tmp = t + ((y / z) * (x - t))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e-39) || !(z <= 1.02e-66)) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e-39) or not (z <= 1.02e-66): tmp = t + ((y / z) * (x - t)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e-39) || !(z <= 1.02e-66)) tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e-39) || ~((z <= 1.02e-66))) tmp = t + ((y / z) * (x - t)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e-39], N[Not[LessEqual[z, 1.02e-66]], $MachinePrecision]], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-39} \lor \neg \left(z \leq 1.02 \cdot 10^{-66}\right):\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -7.99999999999999943e-39 or 1.01999999999999996e-66 < z Initial program 68.5%
associate-*r/50.8%
*-commutative50.8%
associate-/l*73.1%
Applied egg-rr73.1%
Taylor expanded in z around -inf 60.7%
+-commutative60.7%
mul-1-neg60.7%
distribute-rgt-out--61.0%
unsub-neg61.0%
associate-*r/73.2%
Simplified73.2%
Taylor expanded in y around inf 65.6%
if -7.99999999999999943e-39 < z < 1.01999999999999996e-66Initial program 94.4%
Taylor expanded in z around 0 74.5%
+-commutative74.5%
associate-/l*84.4%
Simplified84.4%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5e+63) (not (<= z 2.6e-58))) (+ t (/ (- y a) (/ z x))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5e+63) || !(z <= 2.6e-58)) {
tmp = t + ((y - a) / (z / x));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-5d+63)) .or. (.not. (z <= 2.6d-58))) then
tmp = t + ((y - a) / (z / x))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5e+63) || !(z <= 2.6e-58)) {
tmp = t + ((y - a) / (z / x));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5e+63) or not (z <= 2.6e-58): tmp = t + ((y - a) / (z / x)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5e+63) || !(z <= 2.6e-58)) tmp = Float64(t + Float64(Float64(y - a) / Float64(z / x))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5e+63) || ~((z <= 2.6e-58))) tmp = t + ((y - a) / (z / x)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5e+63], N[Not[LessEqual[z, 2.6e-58]], $MachinePrecision]], N[(t + N[(N[(y - a), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+63} \lor \neg \left(z \leq 2.6 \cdot 10^{-58}\right):\\
\;\;\;\;t + \frac{y - a}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -5.00000000000000011e63 or 2.60000000000000007e-58 < z Initial program 65.5%
Taylor expanded in z around -inf 61.7%
+-commutative61.7%
mul-1-neg61.7%
unsub-neg61.7%
distribute-rgt-out--61.9%
Simplified61.9%
Taylor expanded in t around 0 65.4%
mul-1-neg65.4%
associate-/l*73.7%
distribute-neg-frac73.7%
Simplified73.7%
if -5.00000000000000011e63 < z < 2.60000000000000007e-58Initial program 93.7%
Taylor expanded in z around 0 70.2%
+-commutative70.2%
associate-/l*80.9%
Simplified80.9%
Final simplification77.6%
(FPCore (x y z t a) :precision binary64 (if (<= x -8e-20) (- x (* x (/ y a))) (if (<= x 420000000000.0) (* t (/ (- y z) (- a z))) (- x (/ y (/ a x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8e-20) {
tmp = x - (x * (y / a));
} else if (x <= 420000000000.0) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x - (y / (a / 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 (x <= (-8d-20)) then
tmp = x - (x * (y / a))
else if (x <= 420000000000.0d0) then
tmp = t * ((y - z) / (a - z))
else
tmp = x - (y / (a / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -8e-20) {
tmp = x - (x * (y / a));
} else if (x <= 420000000000.0) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x - (y / (a / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -8e-20: tmp = x - (x * (y / a)) elif x <= 420000000000.0: tmp = t * ((y - z) / (a - z)) else: tmp = x - (y / (a / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -8e-20) tmp = Float64(x - Float64(x * Float64(y / a))); elseif (x <= 420000000000.0) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x - Float64(y / Float64(a / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -8e-20) tmp = x - (x * (y / a)); elseif (x <= 420000000000.0) tmp = t * ((y - z) / (a - z)); else tmp = x - (y / (a / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -8e-20], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 420000000000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-20}:\\
\;\;\;\;x - x \cdot \frac{y}{a}\\
\mathbf{elif}\;x \leq 420000000000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if x < -7.99999999999999956e-20Initial program 71.8%
Taylor expanded in z around 0 45.7%
Taylor expanded in t around 0 42.9%
mul-1-neg42.9%
associate-/l*52.6%
distribute-neg-frac52.6%
Simplified52.6%
Taylor expanded in y around 0 42.9%
+-commutative42.9%
mul-1-neg42.9%
associate-*l/52.7%
sub-neg52.7%
*-commutative52.7%
Simplified52.7%
if -7.99999999999999956e-20 < x < 4.2e11Initial program 86.0%
Taylor expanded in x around 0 58.1%
associate-*r/71.8%
Simplified71.8%
if 4.2e11 < x Initial program 81.0%
Taylor expanded in z around 0 55.6%
Taylor expanded in t around 0 50.6%
mul-1-neg50.6%
associate-/l*60.6%
distribute-neg-frac60.6%
Simplified60.6%
Final simplification64.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -7.2e+42) (* y (/ (- t x) (- a z))) (if (<= x 1950000000.0) (* t (/ (- y z) (- a z))) (- x (/ y (/ a x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.2e+42) {
tmp = y * ((t - x) / (a - z));
} else if (x <= 1950000000.0) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x - (y / (a / 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 (x <= (-7.2d+42)) then
tmp = y * ((t - x) / (a - z))
else if (x <= 1950000000.0d0) then
tmp = t * ((y - z) / (a - z))
else
tmp = x - (y / (a / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -7.2e+42) {
tmp = y * ((t - x) / (a - z));
} else if (x <= 1950000000.0) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x - (y / (a / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -7.2e+42: tmp = y * ((t - x) / (a - z)) elif x <= 1950000000.0: tmp = t * ((y - z) / (a - z)) else: tmp = x - (y / (a / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -7.2e+42) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (x <= 1950000000.0) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x - Float64(y / Float64(a / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -7.2e+42) tmp = y * ((t - x) / (a - z)); elseif (x <= 1950000000.0) tmp = t * ((y - z) / (a - z)); else tmp = x - (y / (a / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -7.2e+42], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1950000000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;x \leq 1950000000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{x}}\\
\end{array}
\end{array}
if x < -7.2000000000000002e42Initial program 69.8%
Taylor expanded in y around inf 53.2%
div-sub54.9%
*-commutative54.9%
Simplified54.9%
if -7.2000000000000002e42 < x < 1.95e9Initial program 85.7%
Taylor expanded in x around 0 56.4%
associate-*r/69.7%
Simplified69.7%
if 1.95e9 < x Initial program 81.0%
Taylor expanded in z around 0 55.6%
Taylor expanded in t around 0 50.6%
mul-1-neg50.6%
associate-/l*60.6%
distribute-neg-frac60.6%
Simplified60.6%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.2e-39) (+ t (* (/ y z) (- x t))) (if (<= z 1.8e-57) (+ x (/ y (/ a (- t x)))) (- t (/ y (/ z (- t x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e-39) {
tmp = t + ((y / z) * (x - t));
} else if (z <= 1.8e-57) {
tmp = x + (y / (a / (t - x)));
} 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 (z <= (-7.2d-39)) then
tmp = t + ((y / z) * (x - t))
else if (z <= 1.8d-57) then
tmp = x + (y / (a / (t - x)))
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 (z <= -7.2e-39) {
tmp = t + ((y / z) * (x - t));
} else if (z <= 1.8e-57) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t - (y / (z / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.2e-39: tmp = t + ((y / z) * (x - t)) elif z <= 1.8e-57: tmp = x + (y / (a / (t - x))) else: tmp = t - (y / (z / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.2e-39) tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t))); elseif (z <= 1.8e-57) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); 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 (z <= -7.2e-39) tmp = t + ((y / z) * (x - t)); elseif (z <= 1.8e-57) tmp = x + (y / (a / (t - x))); else tmp = t - (y / (z / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e-39], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-57], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(y / N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-39}:\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-57}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{y}{\frac{z}{t - x}}\\
\end{array}
\end{array}
if z < -7.2000000000000001e-39Initial program 66.0%
associate-*r/46.1%
*-commutative46.1%
associate-/l*68.4%
Applied egg-rr68.4%
Taylor expanded in z around -inf 61.4%
+-commutative61.4%
mul-1-neg61.4%
distribute-rgt-out--61.6%
unsub-neg61.6%
associate-*r/73.3%
Simplified73.3%
Taylor expanded in y around inf 65.5%
if -7.2000000000000001e-39 < z < 1.8000000000000001e-57Initial program 94.4%
Taylor expanded in z around 0 74.5%
+-commutative74.5%
associate-/l*84.4%
Simplified84.4%
if 1.8000000000000001e-57 < z Initial program 70.8%
Taylor expanded in z around -inf 60.2%
+-commutative60.2%
mul-1-neg60.2%
unsub-neg60.2%
distribute-rgt-out--60.4%
Simplified60.4%
Taylor expanded in y around inf 55.9%
associate-/l*65.6%
Simplified65.6%
Final simplification74.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+133) t (if (<= z 2.2e+49) (+ x (* y (/ t a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+133) {
tmp = t;
} else if (z <= 2.2e+49) {
tmp = x + (y * (t / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.5d+133)) then
tmp = t
else if (z <= 2.2d+49) then
tmp = x + (y * (t / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+133) {
tmp = t;
} else if (z <= 2.2e+49) {
tmp = x + (y * (t / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+133: tmp = t elif z <= 2.2e+49: tmp = x + (y * (t / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+133) tmp = t; elseif (z <= 2.2e+49) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.5e+133) tmp = t; elseif (z <= 2.2e+49) tmp = x + (y * (t / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+133], t, If[LessEqual[z, 2.2e+49], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+49}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.5000000000000004e133 or 2.2000000000000001e49 < z Initial program 60.6%
Taylor expanded in z around inf 56.6%
if -6.5000000000000004e133 < z < 2.2000000000000001e49Initial program 90.5%
Taylor expanded in z around 0 65.5%
Taylor expanded in t around inf 54.3%
associate-/l*59.5%
Simplified59.5%
div-inv59.5%
clear-num59.5%
Applied egg-rr59.5%
Final simplification58.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.85e+135) t (if (<= z 5.6e+48) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+135) {
tmp = t;
} else if (z <= 5.6e+48) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.85d+135)) then
tmp = t
else if (z <= 5.6d+48) then
tmp = x + (t * (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+135) {
tmp = t;
} else if (z <= 5.6e+48) {
tmp = x + (t * (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e+135: tmp = t elif z <= 5.6e+48: tmp = x + (t * (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e+135) tmp = t; elseif (z <= 5.6e+48) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.85e+135) tmp = t; elseif (z <= 5.6e+48) tmp = x + (t * (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+135], t, If[LessEqual[z, 5.6e+48], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+135}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+48}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.84999999999999999e135 or 5.60000000000000025e48 < z Initial program 60.6%
Taylor expanded in z around inf 56.6%
if -1.84999999999999999e135 < z < 5.60000000000000025e48Initial program 90.5%
Taylor expanded in z around 0 65.5%
Taylor expanded in t around inf 54.3%
associate-/l*59.5%
Simplified59.5%
associate-/r/59.5%
Applied egg-rr59.5%
Final simplification58.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+133) t (if (<= z 1.4e+50) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+133) {
tmp = t;
} else if (z <= 1.4e+50) {
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.8d+133)) then
tmp = t
else if (z <= 1.4d+50) 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.8e+133) {
tmp = t;
} else if (z <= 1.4e+50) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+133: tmp = t elif z <= 1.4e+50: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+133) tmp = t; elseif (z <= 1.4e+50) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+133) tmp = t; elseif (z <= 1.4e+50) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+133], t, If[LessEqual[z, 1.4e+50], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+133}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.8000000000000002e133 or 1.3999999999999999e50 < z Initial program 60.6%
Taylor expanded in z around inf 56.6%
if -3.8000000000000002e133 < z < 1.3999999999999999e50Initial program 90.5%
Taylor expanded in a around inf 34.0%
Final simplification41.2%
(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 25.4%
Final simplification25.4%
herbie shell --seed 2023279
(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)))))