
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -5e-272)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (/ (* (- t x) (- a y)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -5e-272) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -5e-272) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-272], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $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^{-272}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999982e-272Initial program 90.1%
+-commutative90.1%
remove-double-neg90.1%
unsub-neg90.1%
*-commutative90.1%
associate-*l/73.1%
associate-/l*96.2%
fma-neg96.2%
remove-double-neg96.2%
Simplified96.2%
if -4.99999999999999982e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
Taylor expanded in z around inf 83.1%
associate--l+83.1%
associate-*r/83.1%
associate-*r/83.1%
mul-1-neg83.1%
div-sub83.0%
mul-1-neg83.0%
distribute-lft-out--83.0%
associate-*r/83.0%
mul-1-neg83.0%
unsub-neg83.0%
distribute-rgt-out--83.3%
Simplified83.3%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 85.1%
Taylor expanded in y around 0 72.6%
+-commutative72.6%
div-sub72.6%
mul-1-neg72.6%
associate-/l*84.2%
distribute-lft-neg-out84.2%
distribute-rgt-out85.1%
sub-neg85.1%
associate-/r/92.3%
Simplified92.3%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-272) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-272) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-272)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-272) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-272) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -5e-272) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -5e-272) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-272], 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[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $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^{-272} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999982e-272 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 87.5%
Taylor expanded in y around 0 72.4%
+-commutative72.4%
div-sub72.4%
mul-1-neg72.4%
associate-/l*85.7%
distribute-lft-neg-out85.7%
distribute-rgt-out87.5%
sub-neg87.5%
associate-/r/93.8%
Simplified93.8%
if -4.99999999999999982e-272 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.2%
Taylor expanded in z around inf 83.1%
associate--l+83.1%
associate-*r/83.1%
associate-*r/83.1%
mul-1-neg83.1%
div-sub83.0%
mul-1-neg83.0%
distribute-lft-out--83.0%
associate-*r/83.0%
mul-1-neg83.0%
unsub-neg83.0%
distribute-rgt-out--83.3%
Simplified83.3%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-109) (not (<= t_1 2e-206)))
t_1
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-109) || !(t_1 <= 2e-206)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-1d-109)) .or. (.not. (t_1 <= 2d-206))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -1e-109) || !(t_1 <= 2e-206)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -1e-109) or not (t_1 <= 2e-206): tmp = t_1 else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-109) || !(t_1 <= 2e-206)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -1e-109) || ~((t_1 <= 2e-206))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-109], N[Not[LessEqual[t$95$1, 2e-206]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $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^{-109} \lor \neg \left(t\_1 \leq 2 \cdot 10^{-206}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999999e-110 or 2.00000000000000006e-206 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.1%
if -9.9999999999999999e-110 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.00000000000000006e-206Initial program 12.5%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
associate-*r/77.6%
associate-*r/77.6%
mul-1-neg77.6%
div-sub77.6%
mul-1-neg77.6%
distribute-lft-out--77.6%
associate-*r/77.6%
mul-1-neg77.6%
unsub-neg77.6%
distribute-rgt-out--77.8%
Simplified77.8%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.5e+29)
(/ t (/ a (- y z)))
(if (<= t 1.22e+35)
(* x (- 1.0 (/ y a)))
(if (<= t 1.5e+86) t (* t (/ (- y z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+29) {
tmp = t / (a / (y - z));
} else if (t <= 1.22e+35) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.5e+86) {
tmp = t;
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.5d+29)) then
tmp = t / (a / (y - z))
else if (t <= 1.22d+35) then
tmp = x * (1.0d0 - (y / a))
else if (t <= 1.5d+86) then
tmp = t
else
tmp = t * ((y - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+29) {
tmp = t / (a / (y - z));
} else if (t <= 1.22e+35) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.5e+86) {
tmp = t;
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+29: tmp = t / (a / (y - z)) elif t <= 1.22e+35: tmp = x * (1.0 - (y / a)) elif t <= 1.5e+86: tmp = t else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+29) tmp = Float64(t / Float64(a / Float64(y - z))); elseif (t <= 1.22e+35) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (t <= 1.5e+86) tmp = t; else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.5e+29) tmp = t / (a / (y - z)); elseif (t <= 1.22e+35) tmp = x * (1.0 - (y / a)); elseif (t <= 1.5e+86) tmp = t; else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+29], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e+35], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+86], t, N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+29}:\\
\;\;\;\;\frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+86}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if t < -2.5e29Initial program 89.5%
Taylor expanded in x around 0 50.4%
Taylor expanded in a around inf 41.2%
associate-/l*49.6%
Simplified49.6%
clear-num49.6%
un-div-inv49.7%
Applied egg-rr49.7%
if -2.5e29 < t < 1.21999999999999999e35Initial program 68.3%
Taylor expanded in y around 0 68.8%
+-commutative68.8%
div-sub68.8%
mul-1-neg68.8%
associate-/l*67.5%
distribute-lft-neg-out67.5%
distribute-rgt-out68.3%
sub-neg68.3%
associate-/r/75.1%
Simplified75.1%
Taylor expanded in z around 0 50.1%
Taylor expanded in x around inf 44.2%
mul-1-neg44.2%
unsub-neg44.2%
Simplified44.2%
if 1.21999999999999999e35 < t < 1.49999999999999988e86Initial program 68.1%
Taylor expanded in z around inf 61.0%
if 1.49999999999999988e86 < t Initial program 90.9%
Taylor expanded in x around 0 48.4%
Taylor expanded in a around inf 37.7%
associate-/l*56.9%
Simplified56.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) a))))
(if (<= t -6e+29)
t_1
(if (<= t 1.2e+35) (* x (- 1.0 (/ y a))) (if (<= t 1.25e+86) t t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (t <= -6e+29) {
tmp = t_1;
} else if (t <= 1.2e+35) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.25e+86) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / a)
if (t <= (-6d+29)) then
tmp = t_1
else if (t <= 1.2d+35) then
tmp = x * (1.0d0 - (y / a))
else if (t <= 1.25d+86) then
tmp = t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (t <= -6e+29) {
tmp = t_1;
} else if (t <= 1.2e+35) {
tmp = x * (1.0 - (y / a));
} else if (t <= 1.25e+86) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / a) tmp = 0 if t <= -6e+29: tmp = t_1 elif t <= 1.2e+35: tmp = x * (1.0 - (y / a)) elif t <= 1.25e+86: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / a)) tmp = 0.0 if (t <= -6e+29) tmp = t_1; elseif (t <= 1.2e+35) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (t <= 1.25e+86) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / a); tmp = 0.0; if (t <= -6e+29) tmp = t_1; elseif (t <= 1.2e+35) tmp = x * (1.0 - (y / a)); elseif (t <= 1.25e+86) tmp = t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+29], t$95$1, If[LessEqual[t, 1.2e+35], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+86], t, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a}\\
\mathbf{if}\;t \leq -6 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+86}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.9999999999999998e29 or 1.2499999999999999e86 < t Initial program 90.2%
Taylor expanded in x around 0 49.4%
Taylor expanded in a around inf 39.5%
associate-/l*53.2%
Simplified53.2%
if -5.9999999999999998e29 < t < 1.20000000000000007e35Initial program 68.3%
Taylor expanded in y around 0 68.8%
+-commutative68.8%
div-sub68.8%
mul-1-neg68.8%
associate-/l*67.5%
distribute-lft-neg-out67.5%
distribute-rgt-out68.3%
sub-neg68.3%
associate-/r/75.1%
Simplified75.1%
Taylor expanded in z around 0 50.1%
Taylor expanded in x around inf 44.2%
mul-1-neg44.2%
unsub-neg44.2%
Simplified44.2%
if 1.20000000000000007e35 < t < 1.2499999999999999e86Initial program 68.1%
Taylor expanded in z around inf 61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.8e+147)
(* t (/ (- y z) (- a z)))
(if (<= z 4.1e+101)
(+ x (* (- t x) (/ (- y z) a)))
(/ t (/ (- a z) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.8e+147) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 4.1e+101) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.8d+147)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 4.1d+101) then
tmp = x + ((t - x) * ((y - z) / a))
else
tmp = t / ((a - z) / (y - z))
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.8e+147) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 4.1e+101) {
tmp = x + ((t - x) * ((y - z) / a));
} else {
tmp = t / ((a - z) / (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.8e+147: tmp = t * ((y - z) / (a - z)) elif z <= 4.1e+101: tmp = x + ((t - x) * ((y - z) / a)) else: tmp = t / ((a - z) / (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.8e+147) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 4.1e+101) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))); else tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.8e+147) tmp = t * ((y - z) / (a - z)); elseif (z <= 4.1e+101) tmp = x + ((t - x) * ((y - z) / a)); else tmp = t / ((a - z) / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.8e+147], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+101], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+147}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+101}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if z < -8.8000000000000007e147Initial program 54.0%
Taylor expanded in x around 0 39.9%
associate-/l*74.5%
Simplified74.5%
if -8.8000000000000007e147 < z < 4.1e101Initial program 87.5%
Taylor expanded in a around inf 67.7%
associate-/l*77.3%
Simplified77.3%
if 4.1e101 < z Initial program 64.2%
Taylor expanded in x around 0 36.8%
associate-/l*69.0%
*-un-lft-identity69.0%
clear-num69.0%
div-inv69.1%
Applied egg-rr69.1%
*-un-lft-identity69.1%
Applied egg-rr69.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -95000.0) t (if (<= z -1.35e-126) x (if (<= z 1.85e+133) (* t (/ y a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -95000.0) {
tmp = t;
} else if (z <= -1.35e-126) {
tmp = x;
} else if (z <= 1.85e+133) {
tmp = t * (y / a);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-95000.0d0)) then
tmp = t
else if (z <= (-1.35d-126)) then
tmp = x
else if (z <= 1.85d+133) then
tmp = t * (y / a)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -95000.0) {
tmp = t;
} else if (z <= -1.35e-126) {
tmp = x;
} else if (z <= 1.85e+133) {
tmp = t * (y / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -95000.0: tmp = t elif z <= -1.35e-126: tmp = x elif z <= 1.85e+133: tmp = t * (y / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -95000.0) tmp = t; elseif (z <= -1.35e-126) tmp = x; elseif (z <= 1.85e+133) tmp = Float64(t * Float64(y / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -95000.0) tmp = t; elseif (z <= -1.35e-126) tmp = x; elseif (z <= 1.85e+133) tmp = t * (y / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -95000.0], t, If[LessEqual[z, -1.35e-126], x, If[LessEqual[z, 1.85e+133], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -95000:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-126}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+133}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -95000 or 1.85000000000000012e133 < z Initial program 64.5%
Taylor expanded in z around inf 43.2%
if -95000 < z < -1.34999999999999998e-126Initial program 87.2%
Taylor expanded in a around inf 54.1%
if -1.34999999999999998e-126 < z < 1.85000000000000012e133Initial program 89.2%
Taylor expanded in x around 0 47.5%
Taylor expanded in z around 0 31.4%
associate-/l*37.8%
Simplified37.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -550.0) (not (<= z 1.7e-98))) (/ t (/ (- a z) (- y z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -550.0) || !(z <= 1.7e-98)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / (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 <= (-550.0d0)) .or. (.not. (z <= 1.7d-98))) then
tmp = t / ((a - z) / (y - z))
else
tmp = x + ((t - x) / (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 <= -550.0) || !(z <= 1.7e-98)) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -550.0) or not (z <= 1.7e-98): tmp = t / ((a - z) / (y - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -550.0) || !(z <= 1.7e-98)) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -550.0) || ~((z <= 1.7e-98))) tmp = t / ((a - z) / (y - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -550.0], N[Not[LessEqual[z, 1.7e-98]], $MachinePrecision]], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -550 \lor \neg \left(z \leq 1.7 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -550 or 1.7000000000000001e-98 < z Initial program 71.3%
Taylor expanded in x around 0 38.0%
associate-/l*62.8%
*-un-lft-identity62.8%
clear-num62.7%
div-inv62.8%
Applied egg-rr62.8%
*-un-lft-identity62.8%
Applied egg-rr62.8%
if -550 < z < 1.7000000000000001e-98Initial program 88.3%
Taylor expanded in y around 0 88.4%
+-commutative88.4%
div-sub88.4%
mul-1-neg88.4%
associate-/l*85.2%
distribute-lft-neg-out85.2%
distribute-rgt-out88.3%
sub-neg88.3%
associate-/r/94.0%
Simplified94.0%
Taylor expanded in z around 0 83.9%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.15e-27) (not (<= z 1.85e-97))) (* t (/ (- y z) (- a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e-27) || !(z <= 1.85e-97)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (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.15d-27)) .or. (.not. (z <= 1.85d-97))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) / (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.15e-27) || !(z <= 1.85e-97)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.15e-27) or not (z <= 1.85e-97): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.15e-27) || !(z <= 1.85e-97)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.15e-27) || ~((z <= 1.85e-97))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.15e-27], N[Not[LessEqual[z, 1.85e-97]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-27} \lor \neg \left(z \leq 1.85 \cdot 10^{-97}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -1.15e-27 or 1.84999999999999988e-97 < z Initial program 70.8%
Taylor expanded in x around 0 37.7%
associate-/l*61.9%
Simplified61.9%
if -1.15e-27 < z < 1.84999999999999988e-97Initial program 89.8%
Taylor expanded in y around 0 89.9%
+-commutative89.9%
div-sub89.9%
mul-1-neg89.9%
associate-/l*86.6%
distribute-lft-neg-out86.6%
distribute-rgt-out89.8%
sub-neg89.8%
associate-/r/95.8%
Simplified95.8%
Taylor expanded in z around 0 86.3%
Final simplification71.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e+62) (not (<= z 3e-113))) (* t (/ (- y z) (- a z))) (+ x (* y (/ (- t x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+62) || !(z <= 3e-113)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7d+62)) .or. (.not. (z <= 3d-113))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y * ((t - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+62) || !(z <= 3e-113)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y * ((t - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7e+62) or not (z <= 3e-113): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y * ((t - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7e+62) || !(z <= 3e-113)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7e+62) || ~((z <= 3e-113))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y * ((t - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e+62], N[Not[LessEqual[z, 3e-113]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+62} \lor \neg \left(z \leq 3 \cdot 10^{-113}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\end{array}
\end{array}
if z < -6.99999999999999967e62 or 3.0000000000000001e-113 < z Initial program 69.3%
Taylor expanded in x around 0 37.9%
associate-/l*63.9%
Simplified63.9%
if -6.99999999999999967e62 < z < 3.0000000000000001e-113Initial program 89.3%
Taylor expanded in z around 0 74.2%
associate-/l*77.1%
Simplified77.1%
Final simplification69.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.8e+83) (not (<= y 6.5e+164))) (* y (/ (- t x) (- a z))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.8e+83) || !(y <= 6.5e+164)) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-4.8d+83)) .or. (.not. (y <= 6.5d+164))) then
tmp = y * ((t - x) / (a - z))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.8e+83) || !(y <= 6.5e+164)) {
tmp = y * ((t - x) / (a - z));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.8e+83) or not (y <= 6.5e+164): tmp = y * ((t - x) / (a - z)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.8e+83) || !(y <= 6.5e+164)) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.8e+83) || ~((y <= 6.5e+164))) tmp = y * ((t - x) / (a - z)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.8e+83], N[Not[LessEqual[y, 6.5e+164]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+83} \lor \neg \left(y \leq 6.5 \cdot 10^{+164}\right):\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -4.79999999999999982e83 or 6.5000000000000003e164 < y Initial program 85.0%
Taylor expanded in y around inf 82.9%
div-sub82.9%
Simplified82.9%
if -4.79999999999999982e83 < y < 6.5000000000000003e164Initial program 74.4%
Taylor expanded in x around 0 42.8%
associate-/l*59.1%
Simplified59.1%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (<= x -2e+103) (* x (- 1.0 (/ y a))) (if (<= x 7.5e+122) (* t (/ (- y z) (- a z))) (* (- y a) (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2e+103) {
tmp = x * (1.0 - (y / a));
} else if (x <= 7.5e+122) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = (y - a) * (x / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-2d+103)) then
tmp = x * (1.0d0 - (y / a))
else if (x <= 7.5d+122) then
tmp = t * ((y - z) / (a - z))
else
tmp = (y - a) * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2e+103) {
tmp = x * (1.0 - (y / a));
} else if (x <= 7.5e+122) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = (y - a) * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2e+103: tmp = x * (1.0 - (y / a)) elif x <= 7.5e+122: tmp = t * ((y - z) / (a - z)) else: tmp = (y - a) * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2e+103) tmp = Float64(x * Float64(1.0 - Float64(y / a))); elseif (x <= 7.5e+122) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(Float64(y - a) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2e+103) tmp = x * (1.0 - (y / a)); elseif (x <= 7.5e+122) tmp = t * ((y - z) / (a - z)); else tmp = (y - a) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2e+103], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e+122], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - a), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+103}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+122}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - a\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -2e103Initial program 78.0%
Taylor expanded in y around 0 59.3%
+-commutative59.3%
div-sub59.3%
mul-1-neg59.3%
associate-/l*72.8%
distribute-lft-neg-out72.8%
distribute-rgt-out78.0%
sub-neg78.0%
associate-/r/80.7%
Simplified80.7%
Taylor expanded in z around 0 64.0%
Taylor expanded in x around inf 61.0%
mul-1-neg61.0%
unsub-neg61.0%
Simplified61.0%
if -2e103 < x < 7.5000000000000002e122Initial program 81.8%
Taylor expanded in x around 0 53.8%
associate-/l*72.8%
Simplified72.8%
if 7.5000000000000002e122 < x Initial program 61.5%
Taylor expanded in x around -inf 65.0%
associate-*r*65.0%
neg-mul-165.0%
Simplified65.0%
Taylor expanded in z around -inf 33.3%
associate-/l*46.7%
Applied egg-rr46.7%
associate-*r/33.3%
*-commutative33.3%
associate-*r/46.7%
*-commutative46.7%
Simplified46.7%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.4e+147) t (if (<= z 1.85e+133) (* t (/ (- y z) a)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.4e+147) {
tmp = t;
} else if (z <= 1.85e+133) {
tmp = t * ((y - z) / a);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.4d+147)) then
tmp = t
else if (z <= 1.85d+133) then
tmp = t * ((y - z) / a)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.4e+147) {
tmp = t;
} else if (z <= 1.85e+133) {
tmp = t * ((y - z) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.4e+147: tmp = t elif z <= 1.85e+133: tmp = t * ((y - z) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.4e+147) tmp = t; elseif (z <= 1.85e+133) tmp = Float64(t * Float64(Float64(y - z) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.4e+147) tmp = t; elseif (z <= 1.85e+133) tmp = t * ((y - z) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.4e+147], t, If[LessEqual[z, 1.85e+133], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{+147}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+133}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.4000000000000006e147 or 1.85000000000000012e133 < z Initial program 57.9%
Taylor expanded in z around inf 51.0%
if -9.4000000000000006e147 < z < 1.85000000000000012e133Initial program 87.7%
Taylor expanded in x around 0 43.0%
Taylor expanded in a around inf 33.3%
associate-/l*39.9%
Simplified39.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -2200.0) t (if (<= z 4.8e-37) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2200.0) {
tmp = t;
} else if (z <= 4.8e-37) {
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 <= (-2200.0d0)) then
tmp = t
else if (z <= 4.8d-37) 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 <= -2200.0) {
tmp = t;
} else if (z <= 4.8e-37) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2200.0: tmp = t elif z <= 4.8e-37: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2200.0) tmp = t; elseif (z <= 4.8e-37) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2200.0) tmp = t; elseif (z <= 4.8e-37) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2200.0], t, If[LessEqual[z, 4.8e-37], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2200:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2200 or 4.79999999999999982e-37 < z Initial program 68.5%
Taylor expanded in z around inf 38.5%
if -2200 < z < 4.79999999999999982e-37Initial program 89.7%
Taylor expanded in a around inf 34.7%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 77.9%
Taylor expanded in z around inf 23.8%
herbie shell --seed 2024116
(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)))))