
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (or (<= t_1 -4e-304) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(+ y (/ (* (- z a) (- x y)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -4e-304) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y + (((z - a) * (x - y)) / t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -4e-304) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-304], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-304} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999988e-304 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 78.0%
+-commutative78.0%
associate-/l*93.0%
fma-define92.9%
Simplified92.9%
if -3.99999999999999988e-304 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification93.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 (- INFINITY))
(+ x (* x (+ (* (/ (- z t) (- a t)) (/ y x)) (/ (- z t) (- t a)))))
(if (<= t_1 -4e-304)
t_1
(if (<= t_1 0.0)
(+ y (/ (* (- z a) (- x y)) t))
(if (<= t_1 5e+286)
(+ x (/ (+ (* y (- z t)) (* x (- t z))) (- a t)))
(+ x (* z (/ (- y x) (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + (x * ((((z - t) / (a - t)) * (y / x)) + ((z - t) / (t - a))));
} else if (t_1 <= -4e-304) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_1 <= 5e+286) {
tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
} else {
tmp = x + (z * ((y - x) / (a - t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + (x * ((((z - t) / (a - t)) * (y / x)) + ((z - t) / (t - a))));
} else if (t_1 <= -4e-304) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_1 <= 5e+286) {
tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
} else {
tmp = x + (z * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_1 <= -math.inf: tmp = x + (x * ((((z - t) / (a - t)) * (y / x)) + ((z - t) / (t - a)))) elif t_1 <= -4e-304: tmp = t_1 elif t_1 <= 0.0: tmp = y + (((z - a) * (x - y)) / t) elif t_1 <= 5e+286: tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t)) else: tmp = x + (z * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(x * Float64(Float64(Float64(Float64(z - t) / Float64(a - t)) * Float64(y / x)) + Float64(Float64(z - t) / Float64(t - a))))); elseif (t_1 <= -4e-304) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); elseif (t_1 <= 5e+286) tmp = Float64(x + Float64(Float64(Float64(y * Float64(z - t)) + Float64(x * Float64(t - z))) / Float64(a - t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -Inf) tmp = x + (x * ((((z - t) / (a - t)) * (y / x)) + ((z - t) / (t - a)))); elseif (t_1 <= -4e-304) tmp = t_1; elseif (t_1 <= 0.0) tmp = y + (((z - a) * (x - y)) / t); elseif (t_1 <= 5e+286) tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t)); else tmp = x + (z * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(x * N[(N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-304], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+286], N[(x + N[(N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + x \cdot \left(\frac{z - t}{a - t} \cdot \frac{y}{x} + \frac{z - t}{t - a}\right)\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right) + x \cdot \left(t - z\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0Initial program 42.2%
Taylor expanded in x around -inf 51.5%
associate-*r*51.5%
neg-mul-151.5%
associate--l+51.5%
mul-1-neg51.5%
times-frac76.7%
div-sub76.7%
Simplified76.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999988e-304Initial program 98.6%
if -3.99999999999999988e-304 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.0000000000000004e286Initial program 98.4%
*-commutative98.4%
sub-neg98.4%
distribute-lft-in98.4%
Applied egg-rr98.4%
if 5.0000000000000004e286 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 36.4%
Taylor expanded in z around inf 38.7%
associate-/l*62.4%
Simplified62.4%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) (- a t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-304)
t_2
(if (<= t_2 0.0)
(+ y (/ (* (- z a) (- x y)) t))
(if (<= t_2 5e+286)
(+ x (/ (+ (* y (- z t)) (* x (- t z))) (- a t)))
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_2 <= 5e+286) {
tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_2 <= 5e+286) {
tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((y - x) / (a - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-304: tmp = t_2 elif t_2 <= 0.0: tmp = y + (((z - a) * (x - y)) / t) elif t_2 <= 5e+286: tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); elseif (t_2 <= 5e+286) tmp = Float64(x + Float64(Float64(Float64(y * Float64(z - t)) + Float64(x * Float64(t - z))) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((y - x) / (a - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + (((z - a) * (x - y)) / t); elseif (t_2 <= 5e+286) tmp = x + (((y * (z - t)) + (x * (t - z))) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-304], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+286], N[(x + N[(N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right) + x \cdot \left(t - z\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 5.0000000000000004e286 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 39.7%
Taylor expanded in z around inf 44.5%
associate-/l*66.3%
Simplified66.3%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999988e-304Initial program 98.6%
if -3.99999999999999988e-304 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.0000000000000004e286Initial program 98.4%
*-commutative98.4%
sub-neg98.4%
distribute-lft-in98.4%
Applied egg-rr98.4%
Final simplification88.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) (- a t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-304)
t_2
(if (<= t_2 0.0)
(+ y (/ (* (- z a) (- x y)) t))
(if (<= t_2 5e+286) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_2 <= 5e+286) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((z - a) * (x - y)) / t);
} else if (t_2 <= 5e+286) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((y - x) / (a - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-304: tmp = t_2 elif t_2 <= 0.0: tmp = y + (((z - a) * (x - y)) / t) elif t_2 <= 5e+286: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)); elseif (t_2 <= 5e+286) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((y - x) / (a - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + (((z - a) * (x - y)) / t); elseif (t_2 <= 5e+286) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-304], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+286], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 5.0000000000000004e286 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 39.7%
Taylor expanded in z around inf 44.5%
associate-/l*66.3%
Simplified66.3%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -3.99999999999999988e-304 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.0000000000000004e286Initial program 98.5%
if -3.99999999999999988e-304 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
+-commutative4.7%
associate-/l*4.7%
fma-define4.7%
Simplified4.7%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.8%
mul-1-neg99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
mul-1-neg99.8%
unsub-neg99.8%
distribute-rgt-out--99.8%
Simplified99.8%
Final simplification88.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (/ (* (- z a) (- x y)) t))))
(if (<= t -8e+95)
t_1
(if (<= t 4.4e-75)
(+ x (* z (/ (- y x) (- a t))))
(if (<= t 1.3e-8) (+ x (/ (* y (- z t)) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (((z - a) * (x - y)) / t);
double tmp;
if (t <= -8e+95) {
tmp = t_1;
} else if (t <= 4.4e-75) {
tmp = x + (z * ((y - x) / (a - t)));
} else if (t <= 1.3e-8) {
tmp = x + ((y * (z - t)) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + (((z - a) * (x - y)) / t)
if (t <= (-8d+95)) then
tmp = t_1
else if (t <= 4.4d-75) then
tmp = x + (z * ((y - x) / (a - t)))
else if (t <= 1.3d-8) then
tmp = x + ((y * (z - t)) / (a - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (((z - a) * (x - y)) / t);
double tmp;
if (t <= -8e+95) {
tmp = t_1;
} else if (t <= 4.4e-75) {
tmp = x + (z * ((y - x) / (a - t)));
} else if (t <= 1.3e-8) {
tmp = x + ((y * (z - t)) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (((z - a) * (x - y)) / t) tmp = 0 if t <= -8e+95: tmp = t_1 elif t <= 4.4e-75: tmp = x + (z * ((y - x) / (a - t))) elif t <= 1.3e-8: tmp = x + ((y * (z - t)) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(Float64(z - a) * Float64(x - y)) / t)) tmp = 0.0 if (t <= -8e+95) tmp = t_1; elseif (t <= 4.4e-75) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); elseif (t <= 1.3e-8) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (((z - a) * (x - y)) / t); tmp = 0.0; if (t <= -8e+95) tmp = t_1; elseif (t <= 4.4e-75) tmp = x + (z * ((y - x) / (a - t))); elseif (t <= 1.3e-8) tmp = x + ((y * (z - t)) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(N[(z - a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8e+95], t$95$1, If[LessEqual[t, 4.4e-75], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-8], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \frac{\left(z - a\right) \cdot \left(x - y\right)}{t}\\
\mathbf{if}\;t \leq -8 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-75}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-8}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.00000000000000016e95 or 1.3000000000000001e-8 < t Initial program 42.7%
+-commutative42.7%
associate-/l*65.4%
fma-define65.4%
Simplified65.4%
Taylor expanded in t around inf 69.5%
associate--l+69.5%
associate-*r/69.5%
associate-*r/69.5%
mul-1-neg69.5%
div-sub69.5%
mul-1-neg69.5%
distribute-lft-out--69.5%
associate-*r/69.5%
mul-1-neg69.5%
unsub-neg69.5%
distribute-rgt-out--70.7%
Simplified70.7%
if -8.00000000000000016e95 < t < 4.40000000000000011e-75Initial program 87.8%
Taylor expanded in z around inf 84.7%
associate-/l*87.6%
Simplified87.6%
if 4.40000000000000011e-75 < t < 1.3000000000000001e-8Initial program 93.9%
Taylor expanded in y around inf 94.1%
*-commutative94.1%
Simplified94.1%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.3e+97)
(* y (- 1.0 (/ z t)))
(if (<= t 2.5e-70)
(+ x (* y (/ z (- a t))))
(if (<= t 9e+52) (- x (* t (/ y (- a t)))) (- y (* y (/ z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e+97) {
tmp = y * (1.0 - (z / t));
} else if (t <= 2.5e-70) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 9e+52) {
tmp = x - (t * (y / (a - t)));
} else {
tmp = y - (y * (z / 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 (t <= (-1.3d+97)) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 2.5d-70) then
tmp = x + (y * (z / (a - t)))
else if (t <= 9d+52) then
tmp = x - (t * (y / (a - t)))
else
tmp = y - (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e+97) {
tmp = y * (1.0 - (z / t));
} else if (t <= 2.5e-70) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 9e+52) {
tmp = x - (t * (y / (a - t)));
} else {
tmp = y - (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.3e+97: tmp = y * (1.0 - (z / t)) elif t <= 2.5e-70: tmp = x + (y * (z / (a - t))) elif t <= 9e+52: tmp = x - (t * (y / (a - t))) else: tmp = y - (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.3e+97) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 2.5e-70) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); elseif (t <= 9e+52) tmp = Float64(x - Float64(t * Float64(y / Float64(a - t)))); else tmp = Float64(y - Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.3e+97) tmp = y * (1.0 - (z / t)); elseif (t <= 2.5e-70) tmp = x + (y * (z / (a - t))); elseif (t <= 9e+52) tmp = x - (t * (y / (a - t))); else tmp = y - (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e+97], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-70], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+52], N[(x - N[(t * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+97}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-70}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+52}:\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -1.3e97Initial program 40.6%
+-commutative40.6%
associate-/l*68.8%
fma-define68.8%
Simplified68.8%
Taylor expanded in a around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
associate-/l*51.1%
div-sub51.1%
sub-neg51.1%
*-inverses51.1%
metadata-eval51.1%
Simplified51.1%
Taylor expanded in y around inf 63.3%
if -1.3e97 < t < 2.4999999999999999e-70Initial program 87.9%
Taylor expanded in z around inf 84.8%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in y around inf 70.6%
associate-/l*75.5%
Simplified75.5%
if 2.4999999999999999e-70 < t < 8.9999999999999999e52Initial program 81.4%
Taylor expanded in y around inf 81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in z around 0 70.7%
mul-1-neg70.7%
unsub-neg70.7%
associate-/l*70.5%
Simplified70.5%
if 8.9999999999999999e52 < t Initial program 38.9%
+-commutative38.9%
associate-/l*62.8%
fma-define62.7%
Simplified62.7%
Taylor expanded in a around 0 28.0%
mul-1-neg28.0%
unsub-neg28.0%
associate-/l*43.2%
div-sub43.2%
sub-neg43.2%
*-inverses43.2%
metadata-eval43.2%
Simplified43.2%
Taylor expanded in y around inf 46.2%
Taylor expanded in z around 0 41.9%
mul-1-neg41.9%
unsub-neg41.9%
associate-/l*46.3%
Simplified46.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.2e-35) (not (<= z 7e+33))) (+ x (* z (/ (- y x) (- a t)))) (+ x (/ (* y (- z t)) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.2e-35) || !(z <= 7e+33)) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = x + ((y * (z - t)) / (a - 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.2d-35)) .or. (.not. (z <= 7d+33))) then
tmp = x + (z * ((y - x) / (a - t)))
else
tmp = x + ((y * (z - t)) / (a - 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.2e-35) || !(z <= 7e+33)) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = x + ((y * (z - t)) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.2e-35) or not (z <= 7e+33): tmp = x + (z * ((y - x) / (a - t))) else: tmp = x + ((y * (z - t)) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.2e-35) || !(z <= 7e+33)) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); else tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.2e-35) || ~((z <= 7e+33))) tmp = x + (z * ((y - x) / (a - t))); else tmp = x + ((y * (z - t)) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.2e-35], N[Not[LessEqual[z, 7e+33]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{-35} \lor \neg \left(z \leq 7 \cdot 10^{+33}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\
\end{array}
\end{array}
if z < -9.1999999999999996e-35 or 7.0000000000000002e33 < z Initial program 72.5%
Taylor expanded in z around inf 70.1%
associate-/l*82.4%
Simplified82.4%
if -9.1999999999999996e-35 < z < 7.0000000000000002e33Initial program 71.5%
Taylor expanded in y around inf 69.6%
*-commutative69.6%
Simplified69.6%
Final simplification75.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.1e-60) (not (<= z 4.2e-11))) (+ x (* z (/ (- y x) (- a t)))) (- x (* t (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.1e-60) || !(z <= 4.2e-11)) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = x - (t * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.1d-60)) .or. (.not. (z <= 4.2d-11))) then
tmp = x + (z * ((y - x) / (a - t)))
else
tmp = x - (t * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.1e-60) || !(z <= 4.2e-11)) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = x - (t * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.1e-60) or not (z <= 4.2e-11): tmp = x + (z * ((y - x) / (a - t))) else: tmp = x - (t * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.1e-60) || !(z <= 4.2e-11)) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); else tmp = Float64(x - Float64(t * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.1e-60) || ~((z <= 4.2e-11))) tmp = x + (z * ((y - x) / (a - t))); else tmp = x - (t * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.1e-60], N[Not[LessEqual[z, 4.2e-11]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{-60} \lor \neg \left(z \leq 4.2 \cdot 10^{-11}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if z < -3.09999999999999988e-60 or 4.1999999999999997e-11 < z Initial program 73.0%
Taylor expanded in z around inf 70.3%
associate-/l*80.2%
Simplified80.2%
if -3.09999999999999988e-60 < z < 4.1999999999999997e-11Initial program 70.7%
Taylor expanded in y around inf 68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in z around 0 63.6%
mul-1-neg63.6%
unsub-neg63.6%
associate-/l*67.2%
Simplified67.2%
Final simplification74.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.45e+31) (not (<= a 20000000000000.0))) (- x (* z (/ (- x y) a))) (/ (* (- y x) z) (- a t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e+31) || !(a <= 20000000000000.0)) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = ((y - x) * z) / (a - 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 <= (-1.45d+31)) .or. (.not. (a <= 20000000000000.0d0))) then
tmp = x - (z * ((x - y) / a))
else
tmp = ((y - x) * z) / (a - 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 <= -1.45e+31) || !(a <= 20000000000000.0)) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = ((y - x) * z) / (a - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.45e+31) or not (a <= 20000000000000.0): tmp = x - (z * ((x - y) / a)) else: tmp = ((y - x) * z) / (a - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.45e+31) || !(a <= 20000000000000.0)) tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); else tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.45e+31) || ~((a <= 20000000000000.0))) tmp = x - (z * ((x - y) / a)); else tmp = ((y - x) * z) / (a - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.45e+31], N[Not[LessEqual[a, 20000000000000.0]], $MachinePrecision]], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+31} \lor \neg \left(a \leq 20000000000000\right):\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -1.45e31 or 2e13 < a Initial program 70.5%
Taylor expanded in t around 0 67.3%
associate-/l*77.5%
Simplified77.5%
if -1.45e31 < a < 2e13Initial program 73.5%
+-commutative73.5%
associate-/l*80.2%
fma-define80.2%
Simplified80.2%
Taylor expanded in z around inf 70.1%
+-commutative70.1%
mul-1-neg70.1%
unsub-neg70.1%
Simplified70.1%
Taylor expanded in z around inf 55.2%
div-sub56.0%
associate-/l*57.0%
Simplified57.0%
Final simplification67.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.6e+95) (* y (- 1.0 (/ z t))) (if (<= t 7.2e-17) (+ x (* y (/ z (- a t)))) (- y (* y (/ z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e+95) {
tmp = y * (1.0 - (z / t));
} else if (t <= 7.2e-17) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = y - (y * (z / 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 (t <= (-3.6d+95)) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 7.2d-17) then
tmp = x + (y * (z / (a - t)))
else
tmp = y - (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.6e+95) {
tmp = y * (1.0 - (z / t));
} else if (t <= 7.2e-17) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = y - (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.6e+95: tmp = y * (1.0 - (z / t)) elif t <= 7.2e-17: tmp = x + (y * (z / (a - t))) else: tmp = y - (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.6e+95) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 7.2e-17) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(y - Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.6e+95) tmp = y * (1.0 - (z / t)); elseif (t <= 7.2e-17) tmp = x + (y * (z / (a - t))); else tmp = y - (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.6e+95], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-17], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-17}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -3.59999999999999978e95Initial program 40.6%
+-commutative40.6%
associate-/l*68.8%
fma-define68.8%
Simplified68.8%
Taylor expanded in a around 0 35.5%
mul-1-neg35.5%
unsub-neg35.5%
associate-/l*51.1%
div-sub51.1%
sub-neg51.1%
*-inverses51.1%
metadata-eval51.1%
Simplified51.1%
Taylor expanded in y around inf 63.3%
if -3.59999999999999978e95 < t < 7.1999999999999999e-17Initial program 88.1%
Taylor expanded in z around inf 83.5%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in y around inf 70.3%
associate-/l*74.8%
Simplified74.8%
if 7.1999999999999999e-17 < t Initial program 47.9%
+-commutative47.9%
associate-/l*65.7%
fma-define65.6%
Simplified65.6%
Taylor expanded in a around 0 32.0%
mul-1-neg32.0%
unsub-neg32.0%
associate-/l*43.2%
div-sub43.2%
sub-neg43.2%
*-inverses43.2%
metadata-eval43.2%
Simplified43.2%
Taylor expanded in y around inf 45.5%
Taylor expanded in z around 0 42.3%
mul-1-neg42.3%
unsub-neg42.3%
associate-/l*45.6%
Simplified45.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.4e+29) (not (<= a 22000000000000.0))) (+ x (* y (/ z a))) (- y (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.4e+29) || !(a <= 22000000000000.0)) {
tmp = x + (y * (z / a));
} else {
tmp = y - (y * (z / 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 <= (-5.4d+29)) .or. (.not. (a <= 22000000000000.0d0))) then
tmp = x + (y * (z / a))
else
tmp = y - (y * (z / 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 <= -5.4e+29) || !(a <= 22000000000000.0)) {
tmp = x + (y * (z / a));
} else {
tmp = y - (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.4e+29) or not (a <= 22000000000000.0): tmp = x + (y * (z / a)) else: tmp = y - (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.4e+29) || !(a <= 22000000000000.0)) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(y - Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.4e+29) || ~((a <= 22000000000000.0))) tmp = x + (y * (z / a)); else tmp = y - (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.4e+29], N[Not[LessEqual[a, 22000000000000.0]], $MachinePrecision]], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{+29} \lor \neg \left(a \leq 22000000000000\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y - y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -5.4e29 or 2.2e13 < a Initial program 70.5%
Taylor expanded in y around inf 72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in t around 0 66.7%
+-commutative66.7%
associate-/l*72.5%
Simplified72.5%
if -5.4e29 < a < 2.2e13Initial program 73.5%
+-commutative73.5%
associate-/l*80.2%
fma-define80.2%
Simplified80.2%
Taylor expanded in a around 0 50.0%
mul-1-neg50.0%
unsub-neg50.0%
associate-/l*56.7%
div-sub56.8%
sub-neg56.8%
*-inverses56.8%
metadata-eval56.8%
Simplified56.8%
Taylor expanded in y around inf 53.2%
Taylor expanded in z around 0 48.8%
mul-1-neg48.8%
unsub-neg48.8%
associate-/l*53.2%
Simplified53.2%
Final simplification62.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.05e+29) (not (<= a 20000000000000.0))) (+ x (* y (/ z a))) (* y (- 1.0 (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.05e+29) || !(a <= 20000000000000.0)) {
tmp = x + (y * (z / a));
} else {
tmp = y * (1.0 - (z / 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 <= (-3.05d+29)) .or. (.not. (a <= 20000000000000.0d0))) then
tmp = x + (y * (z / a))
else
tmp = y * (1.0d0 - (z / 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 <= -3.05e+29) || !(a <= 20000000000000.0)) {
tmp = x + (y * (z / a));
} else {
tmp = y * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.05e+29) or not (a <= 20000000000000.0): tmp = x + (y * (z / a)) else: tmp = y * (1.0 - (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.05e+29) || !(a <= 20000000000000.0)) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(y * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.05e+29) || ~((a <= 20000000000000.0))) tmp = x + (y * (z / a)); else tmp = y * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.05e+29], N[Not[LessEqual[a, 20000000000000.0]], $MachinePrecision]], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.05 \cdot 10^{+29} \lor \neg \left(a \leq 20000000000000\right):\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if a < -3.0499999999999999e29 or 2e13 < a Initial program 70.5%
Taylor expanded in y around inf 72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in t around 0 66.7%
+-commutative66.7%
associate-/l*72.5%
Simplified72.5%
if -3.0499999999999999e29 < a < 2e13Initial program 73.5%
+-commutative73.5%
associate-/l*80.2%
fma-define80.2%
Simplified80.2%
Taylor expanded in a around 0 50.0%
mul-1-neg50.0%
unsub-neg50.0%
associate-/l*56.7%
div-sub56.8%
sub-neg56.8%
*-inverses56.8%
metadata-eval56.8%
Simplified56.8%
Taylor expanded in y around inf 53.2%
Final simplification62.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e+106) x (if (<= a 1100000.0) (* y (- 1.0 (/ z t))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e+106) {
tmp = x;
} else if (a <= 1100000.0) {
tmp = y * (1.0 - (z / t));
} else {
tmp = 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 <= (-1.7d+106)) then
tmp = x
else if (a <= 1100000.0d0) then
tmp = y * (1.0d0 - (z / t))
else
tmp = 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 <= -1.7e+106) {
tmp = x;
} else if (a <= 1100000.0) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e+106: tmp = x elif a <= 1100000.0: tmp = y * (1.0 - (z / t)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e+106) tmp = x; elseif (a <= 1100000.0) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e+106) tmp = x; elseif (a <= 1100000.0) tmp = y * (1.0 - (z / t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e+106], x, If[LessEqual[a, 1100000.0], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{+106}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1100000:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.69999999999999997e106 or 1.1e6 < a Initial program 69.7%
+-commutative69.7%
associate-/l*92.2%
fma-define92.2%
Simplified92.2%
Taylor expanded in a around inf 57.3%
if -1.69999999999999997e106 < a < 1.1e6Initial program 73.7%
+-commutative73.7%
associate-/l*80.8%
fma-define80.8%
Simplified80.8%
Taylor expanded in a around 0 47.2%
mul-1-neg47.2%
unsub-neg47.2%
associate-/l*54.4%
div-sub54.4%
sub-neg54.4%
*-inverses54.4%
metadata-eval54.4%
Simplified54.4%
Taylor expanded in y around inf 52.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.05e+29) x (if (<= a 3.3e-294) (* x (/ z t)) (if (<= a 32000000000000.0) y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.05e+29) {
tmp = x;
} else if (a <= 3.3e-294) {
tmp = x * (z / t);
} else if (a <= 32000000000000.0) {
tmp = y;
} else {
tmp = 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 <= (-3.05d+29)) then
tmp = x
else if (a <= 3.3d-294) then
tmp = x * (z / t)
else if (a <= 32000000000000.0d0) then
tmp = y
else
tmp = 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 <= -3.05e+29) {
tmp = x;
} else if (a <= 3.3e-294) {
tmp = x * (z / t);
} else if (a <= 32000000000000.0) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.05e+29: tmp = x elif a <= 3.3e-294: tmp = x * (z / t) elif a <= 32000000000000.0: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.05e+29) tmp = x; elseif (a <= 3.3e-294) tmp = Float64(x * Float64(z / t)); elseif (a <= 32000000000000.0) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.05e+29) tmp = x; elseif (a <= 3.3e-294) tmp = x * (z / t); elseif (a <= 32000000000000.0) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.05e+29], x, If[LessEqual[a, 3.3e-294], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 32000000000000.0], y, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.05 \cdot 10^{+29}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-294}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 32000000000000:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.0499999999999999e29 or 3.2e13 < a Initial program 70.5%
+-commutative70.5%
associate-/l*91.1%
fma-define91.1%
Simplified91.1%
Taylor expanded in a around inf 53.0%
if -3.0499999999999999e29 < a < 3.3e-294Initial program 72.5%
+-commutative72.5%
associate-/l*76.5%
fma-define76.5%
Simplified76.5%
Taylor expanded in a around 0 48.9%
mul-1-neg48.9%
unsub-neg48.9%
associate-/l*52.9%
div-sub52.9%
sub-neg52.9%
*-inverses52.9%
metadata-eval52.9%
Simplified52.9%
Taylor expanded in x around -inf 33.1%
associate-/l*37.1%
Simplified37.1%
if 3.3e-294 < a < 3.2e13Initial program 74.7%
+-commutative74.7%
associate-/l*84.7%
fma-define84.7%
Simplified84.7%
Taylor expanded in z around inf 75.9%
+-commutative75.9%
mul-1-neg75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in t around inf 36.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.9e+96) y (if (<= t 7.5e-17) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+96) {
tmp = y;
} else if (t <= 7.5e-17) {
tmp = x;
} else {
tmp = 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 (t <= (-1.9d+96)) then
tmp = y
else if (t <= 7.5d-17) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+96) {
tmp = y;
} else if (t <= 7.5e-17) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.9e+96: tmp = y elif t <= 7.5e-17: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.9e+96) tmp = y; elseif (t <= 7.5e-17) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.9e+96) tmp = y; elseif (t <= 7.5e-17) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.9e+96], y, If[LessEqual[t, 7.5e-17], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+96}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.9000000000000001e96 or 7.49999999999999984e-17 < t Initial program 45.1%
+-commutative45.1%
associate-/l*66.9%
fma-define66.8%
Simplified66.8%
Taylor expanded in z around inf 60.8%
+-commutative60.8%
mul-1-neg60.8%
unsub-neg60.8%
Simplified60.8%
Taylor expanded in t around inf 44.8%
if -1.9000000000000001e96 < t < 7.49999999999999984e-17Initial program 88.1%
+-commutative88.1%
associate-/l*97.0%
fma-define97.0%
Simplified97.0%
Taylor expanded in a around inf 42.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 72.0%
+-commutative72.0%
associate-/l*85.7%
fma-define85.7%
Simplified85.7%
Taylor expanded in a around inf 31.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024145
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))