
(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 17 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 -2e-235) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(- y (/ (* x (- a z)) 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 <= -2e-235) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y - ((x * (a - z)) / 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 <= -2e-235) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y - Float64(Float64(x * Float64(a - z)) / 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, -2e-235], 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[(x * N[(a - z), $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 -2 \cdot 10^{-235} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.9999999999999999e-235 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 71.4%
+-commutative71.4%
associate-/l*88.5%
fma-define88.6%
Simplified88.6%
if -1.9999999999999999e-235 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.2%
+-commutative4.2%
associate-/l*4.2%
fma-define4.2%
Simplified4.2%
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%
Taylor expanded in y around 0 99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Final simplification89.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* z (/ (- x y) t))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-235)
t_2
(if (<= t_2 0.0)
(- y (/ (* x (- a z)) t))
(if (<= t_2 2e+295) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (z * ((x - y) / 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 <= -2e-235) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - ((x * (a - z)) / t);
} else if (t_2 <= 2e+295) {
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 = y + (z * ((x - y) / 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 <= -2e-235) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - ((x * (a - z)) / t);
} else if (t_2 <= 2e+295) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (z * ((x - y) / t)) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-235: tmp = t_2 elif t_2 <= 0.0: tmp = y - ((x * (a - z)) / t) elif t_2 <= 2e+295: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(z * Float64(Float64(x - y) / 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 <= -2e-235) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(x * Float64(a - z)) / t)); elseif (t_2 <= 2e+295) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (z * ((x - y) / t)); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-235) tmp = t_2; elseif (t_2 <= 0.0) tmp = y - ((x * (a - z)) / t); elseif (t_2 <= 2e+295) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $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, -2e-235], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(x * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+295], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + z \cdot \frac{x - y}{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 -2 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;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 2e295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 36.3%
+-commutative36.3%
associate-/l*79.4%
fma-define79.4%
Simplified79.4%
Taylor expanded in t around inf 58.0%
associate--l+58.0%
associate-*r/58.0%
associate-*r/58.0%
mul-1-neg58.0%
div-sub59.0%
mul-1-neg59.0%
distribute-lft-out--59.0%
associate-*r/59.0%
mul-1-neg59.0%
unsub-neg59.0%
distribute-rgt-out--59.4%
Simplified59.4%
Taylor expanded in z around inf 60.3%
associate-/l*68.7%
Simplified68.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.9999999999999999e-235 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 2e295Initial program 96.4%
if -1.9999999999999999e-235 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.2%
+-commutative4.2%
associate-/l*4.2%
fma-define4.2%
Simplified4.2%
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%
Taylor expanded in y around 0 99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Final simplification85.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (* (- y x) (/ 1.0 (- a t))))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-235)
t_2
(if (<= t_2 0.0) (- y (/ (* x (- a z)) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * ((y - x) * (1.0 / (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 <= -2e-235) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - ((x * (a - z)) / 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 - t) * ((y - x) * (1.0 / (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 <= -2e-235) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - ((x * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * ((y - x) * (1.0 / (a - t)))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-235: tmp = t_2 elif t_2 <= 0.0: tmp = y - ((x * (a - z)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) * Float64(1.0 / 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 <= -2e-235) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(x * Float64(a - z)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) * ((y - x) * (1.0 / (a - t)))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-235) tmp = t_2; elseif (t_2 <= 0.0) tmp = y - ((x * (a - z)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $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, -2e-235], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(x * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{1}{a - t}\right)\\
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 -2 \cdot 10^{-235}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\right)}{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 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 58.8%
div-inv58.7%
*-commutative58.7%
associate-*l*84.1%
Applied egg-rr84.1%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.9999999999999999e-235Initial program 95.4%
if -1.9999999999999999e-235 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.2%
+-commutative4.2%
associate-/l*4.2%
fma-define4.2%
Simplified4.2%
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%
Taylor expanded in y around 0 99.8%
mul-1-neg99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.3e+78)
(* x (+ (/ (- z t) (- t a)) 1.0))
(if (<= a -1.5e-48)
(- y (/ (* x (- a z)) t))
(if (<= a 1.56e-40)
(+ y (* z (/ (- x y) t)))
(- x (* z (/ (- x y) a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.3e+78) {
tmp = x * (((z - t) / (t - a)) + 1.0);
} else if (a <= -1.5e-48) {
tmp = y - ((x * (a - z)) / t);
} else if (a <= 1.56e-40) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x - (z * ((x - y) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.3d+78)) then
tmp = x * (((z - t) / (t - a)) + 1.0d0)
else if (a <= (-1.5d-48)) then
tmp = y - ((x * (a - z)) / t)
else if (a <= 1.56d-40) then
tmp = y + (z * ((x - y) / t))
else
tmp = x - (z * ((x - y) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.3e+78) {
tmp = x * (((z - t) / (t - a)) + 1.0);
} else if (a <= -1.5e-48) {
tmp = y - ((x * (a - z)) / t);
} else if (a <= 1.56e-40) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x - (z * ((x - y) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.3e+78: tmp = x * (((z - t) / (t - a)) + 1.0) elif a <= -1.5e-48: tmp = y - ((x * (a - z)) / t) elif a <= 1.56e-40: tmp = y + (z * ((x - y) / t)) else: tmp = x - (z * ((x - y) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.3e+78) tmp = Float64(x * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0)); elseif (a <= -1.5e-48) tmp = Float64(y - Float64(Float64(x * Float64(a - z)) / t)); elseif (a <= 1.56e-40) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); else tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.3e+78) tmp = x * (((z - t) / (t - a)) + 1.0); elseif (a <= -1.5e-48) tmp = y - ((x * (a - z)) / t); elseif (a <= 1.56e-40) tmp = y + (z * ((x - y) / t)); else tmp = x - (z * ((x - y) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.3e+78], N[(x * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.5e-48], N[(y - N[(N[(x * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.56e-40], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+78}:\\
\;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\
\mathbf{elif}\;a \leq -1.5 \cdot 10^{-48}:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;a \leq 1.56 \cdot 10^{-40}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\end{array}
\end{array}
if a < -2.3000000000000002e78Initial program 66.4%
+-commutative66.4%
associate-/l*95.0%
fma-define95.1%
Simplified95.1%
Taylor expanded in y around 0 57.1%
*-rgt-identity57.1%
mul-1-neg57.1%
associate-/l*73.4%
distribute-rgt-neg-in73.4%
mul-1-neg73.4%
distribute-lft-in73.5%
mul-1-neg73.5%
unsub-neg73.5%
Simplified73.5%
if -2.3000000000000002e78 < a < -1.5e-48Initial program 61.5%
+-commutative61.5%
associate-/l*65.5%
fma-define65.6%
Simplified65.6%
Taylor expanded in t around inf 59.1%
associate--l+59.1%
associate-*r/59.1%
associate-*r/59.1%
mul-1-neg59.1%
div-sub59.2%
mul-1-neg59.2%
distribute-lft-out--59.2%
associate-*r/59.2%
mul-1-neg59.2%
unsub-neg59.2%
distribute-rgt-out--59.2%
Simplified59.2%
Taylor expanded in y around 0 59.8%
mul-1-neg59.8%
distribute-rgt-neg-in59.8%
sub-neg59.8%
distribute-neg-in59.8%
remove-double-neg59.8%
+-commutative59.8%
sub-neg59.8%
Simplified59.8%
if -1.5e-48 < a < 1.55999999999999996e-40Initial program 63.9%
+-commutative63.9%
associate-/l*76.0%
fma-define76.0%
Simplified76.0%
Taylor expanded in t around inf 79.7%
associate--l+79.7%
associate-*r/79.7%
associate-*r/79.7%
mul-1-neg79.7%
div-sub80.8%
mul-1-neg80.8%
distribute-lft-out--80.8%
associate-*r/80.8%
mul-1-neg80.8%
unsub-neg80.8%
distribute-rgt-out--80.8%
Simplified80.8%
Taylor expanded in z around inf 78.0%
associate-/l*80.5%
Simplified80.5%
if 1.55999999999999996e-40 < a Initial program 71.8%
Taylor expanded in t around 0 64.4%
associate-/l*70.3%
Simplified70.3%
Final simplification74.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* y (/ (- a z) t)))))
(if (<= t -530000000000.0)
t_1
(if (<= t -9e-232)
(+ x (* y (/ (- z t) a)))
(if (<= t 6.5e-12) (- x (* z (/ (- x y) a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (y * ((a - z) / t));
double tmp;
if (t <= -530000000000.0) {
tmp = t_1;
} else if (t <= -9e-232) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 6.5e-12) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + (y * ((a - z) / t))
if (t <= (-530000000000.0d0)) then
tmp = t_1
else if (t <= (-9d-232)) then
tmp = x + (y * ((z - t) / a))
else if (t <= 6.5d-12) then
tmp = x - (z * ((x - y) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (y * ((a - z) / t));
double tmp;
if (t <= -530000000000.0) {
tmp = t_1;
} else if (t <= -9e-232) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 6.5e-12) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (y * ((a - z) / t)) tmp = 0 if t <= -530000000000.0: tmp = t_1 elif t <= -9e-232: tmp = x + (y * ((z - t) / a)) elif t <= 6.5e-12: tmp = x - (z * ((x - y) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(y * Float64(Float64(a - z) / t))) tmp = 0.0 if (t <= -530000000000.0) tmp = t_1; elseif (t <= -9e-232) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (t <= 6.5e-12) tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (y * ((a - z) / t)); tmp = 0.0; if (t <= -530000000000.0) tmp = t_1; elseif (t <= -9e-232) tmp = x + (y * ((z - t) / a)); elseif (t <= 6.5e-12) tmp = x - (z * ((x - y) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -530000000000.0], t$95$1, If[LessEqual[t, -9e-232], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e-12], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + y \cdot \frac{a - z}{t}\\
\mathbf{if}\;t \leq -530000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-232}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.3e11 or 6.5000000000000002e-12 < t Initial program 43.0%
+-commutative43.0%
associate-/l*70.0%
fma-define70.0%
Simplified70.0%
Taylor expanded in t around inf 63.9%
associate--l+63.9%
associate-*r/63.9%
associate-*r/63.9%
mul-1-neg63.9%
div-sub63.9%
mul-1-neg63.9%
distribute-lft-out--63.9%
associate-*r/63.9%
mul-1-neg63.9%
unsub-neg63.9%
distribute-rgt-out--64.1%
Simplified64.1%
Taylor expanded in y around inf 48.3%
associate-/l*55.9%
Simplified55.9%
if -5.3e11 < t < -8.99999999999999933e-232Initial program 95.1%
Taylor expanded in y around inf 76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in a around inf 78.3%
associate-/l*78.3%
Simplified78.3%
if -8.99999999999999933e-232 < t < 6.5000000000000002e-12Initial program 91.5%
Taylor expanded in t around 0 78.0%
associate-/l*81.7%
Simplified81.7%
Final simplification67.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.2e+101)
y
(if (<= t -9.6e-227)
(+ x (* y (/ z (- a t))))
(if (<= t 1.85e+24) (- x (* z (/ (- x y) a))) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.2e+101) {
tmp = y;
} else if (t <= -9.6e-227) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 1.85e+24) {
tmp = x - (z * ((x - y) / a));
} 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.2d+101)) then
tmp = y
else if (t <= (-9.6d-227)) then
tmp = x + (y * (z / (a - t)))
else if (t <= 1.85d+24) then
tmp = x - (z * ((x - y) / a))
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.2e+101) {
tmp = y;
} else if (t <= -9.6e-227) {
tmp = x + (y * (z / (a - t)));
} else if (t <= 1.85e+24) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.2e+101: tmp = y elif t <= -9.6e-227: tmp = x + (y * (z / (a - t))) elif t <= 1.85e+24: tmp = x - (z * ((x - y) / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.2e+101) tmp = y; elseif (t <= -9.6e-227) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); elseif (t <= 1.85e+24) tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.2e+101) tmp = y; elseif (t <= -9.6e-227) tmp = x + (y * (z / (a - t))); elseif (t <= 1.85e+24) tmp = x - (z * ((x - y) / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.2e+101], y, If[LessEqual[t, -9.6e-227], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+24], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+101}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-227}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+24}:\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.19999999999999994e101 or 1.85e24 < t Initial program 37.7%
+-commutative37.7%
associate-/l*66.7%
fma-define66.8%
Simplified66.8%
Taylor expanded in y around 0 53.4%
+-commutative53.4%
+-commutative53.4%
div-sub53.4%
mul-1-neg53.4%
associate-/l*66.7%
distribute-lft-neg-in66.7%
distribute-rgt-in66.7%
sub-neg66.7%
associate-*l/37.7%
associate-*r/63.5%
fma-define63.5%
Simplified63.5%
Taylor expanded in t around inf 49.3%
if -1.19999999999999994e101 < t < -9.5999999999999998e-227Initial program 87.7%
Taylor expanded in y around inf 73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in z around inf 64.8%
associate-/l*69.3%
Simplified69.3%
if -9.5999999999999998e-227 < t < 1.85e24Initial program 90.1%
Taylor expanded in t around 0 73.2%
associate-/l*77.6%
Simplified77.6%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -23000000000000.0)
y
(if (<= t -5.2e-293)
(+ x (* y (/ z a)))
(if (<= t 2.02e+24) (* x (- 1.0 (/ z a))) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -23000000000000.0) {
tmp = y;
} else if (t <= -5.2e-293) {
tmp = x + (y * (z / a));
} else if (t <= 2.02e+24) {
tmp = x * (1.0 - (z / a));
} 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 <= (-23000000000000.0d0)) then
tmp = y
else if (t <= (-5.2d-293)) then
tmp = x + (y * (z / a))
else if (t <= 2.02d+24) then
tmp = x * (1.0d0 - (z / a))
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 <= -23000000000000.0) {
tmp = y;
} else if (t <= -5.2e-293) {
tmp = x + (y * (z / a));
} else if (t <= 2.02e+24) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -23000000000000.0: tmp = y elif t <= -5.2e-293: tmp = x + (y * (z / a)) elif t <= 2.02e+24: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -23000000000000.0) tmp = y; elseif (t <= -5.2e-293) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 2.02e+24) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -23000000000000.0) tmp = y; elseif (t <= -5.2e-293) tmp = x + (y * (z / a)); elseif (t <= 2.02e+24) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -23000000000000.0], y, If[LessEqual[t, -5.2e-293], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.02e+24], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -23000000000000:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-293}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.02 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.3e13 or 2.0199999999999999e24 < t Initial program 41.3%
+-commutative41.3%
associate-/l*69.1%
fma-define69.2%
Simplified69.2%
Taylor expanded in y around 0 56.6%
+-commutative56.6%
+-commutative56.6%
div-sub56.6%
mul-1-neg56.6%
associate-/l*69.1%
distribute-lft-neg-in69.1%
distribute-rgt-in69.1%
sub-neg69.1%
associate-*l/41.3%
associate-*r/66.3%
fma-define66.3%
Simplified66.3%
Taylor expanded in t around inf 47.7%
if -2.3e13 < t < -5.1999999999999996e-293Initial program 93.0%
Taylor expanded in y around inf 72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in t around 0 68.7%
associate-/l*70.5%
Simplified70.5%
if -5.1999999999999996e-293 < t < 2.0199999999999999e24Initial program 90.6%
+-commutative90.6%
associate-/l*96.8%
fma-define96.8%
Simplified96.8%
Taylor expanded in y around 0 65.1%
*-rgt-identity65.1%
mul-1-neg65.1%
associate-/l*72.7%
distribute-rgt-neg-in72.7%
mul-1-neg72.7%
distribute-lft-in72.7%
mul-1-neg72.7%
unsub-neg72.7%
Simplified72.7%
Taylor expanded in t around 0 65.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.75e+113)
x
(if (<= a -7.5e-279)
y
(if (<= a 1.25e-178) (* x (/ z t)) (if (<= a 1.45e+57) y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.75e+113) {
tmp = x;
} else if (a <= -7.5e-279) {
tmp = y;
} else if (a <= 1.25e-178) {
tmp = x * (z / t);
} else if (a <= 1.45e+57) {
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 <= (-2.75d+113)) then
tmp = x
else if (a <= (-7.5d-279)) then
tmp = y
else if (a <= 1.25d-178) then
tmp = x * (z / t)
else if (a <= 1.45d+57) 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 <= -2.75e+113) {
tmp = x;
} else if (a <= -7.5e-279) {
tmp = y;
} else if (a <= 1.25e-178) {
tmp = x * (z / t);
} else if (a <= 1.45e+57) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.75e+113: tmp = x elif a <= -7.5e-279: tmp = y elif a <= 1.25e-178: tmp = x * (z / t) elif a <= 1.45e+57: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.75e+113) tmp = x; elseif (a <= -7.5e-279) tmp = y; elseif (a <= 1.25e-178) tmp = Float64(x * Float64(z / t)); elseif (a <= 1.45e+57) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.75e+113) tmp = x; elseif (a <= -7.5e-279) tmp = y; elseif (a <= 1.25e-178) tmp = x * (z / t); elseif (a <= 1.45e+57) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.75e+113], x, If[LessEqual[a, -7.5e-279], y, If[LessEqual[a, 1.25e-178], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+57], y, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.75 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-279}:\\
\;\;\;\;y\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-178}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+57}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.75e113 or 1.4500000000000001e57 < a Initial program 69.7%
+-commutative69.7%
associate-/l*93.4%
fma-define93.5%
Simplified93.5%
Taylor expanded in a around inf 57.2%
if -2.75e113 < a < -7.5e-279 or 1.24999999999999994e-178 < a < 1.4500000000000001e57Initial program 63.8%
+-commutative63.8%
associate-/l*75.4%
fma-define75.4%
Simplified75.4%
Taylor expanded in y around 0 71.6%
+-commutative71.6%
+-commutative71.6%
div-sub71.6%
mul-1-neg71.6%
associate-/l*73.8%
distribute-lft-neg-in73.8%
distribute-rgt-in75.4%
sub-neg75.4%
associate-*l/63.8%
associate-*r/72.7%
fma-define72.7%
Simplified72.7%
Taylor expanded in t around inf 37.5%
if -7.5e-279 < a < 1.24999999999999994e-178Initial program 69.5%
+-commutative69.5%
associate-/l*79.7%
fma-define79.7%
Simplified79.7%
Taylor expanded in y around 0 42.6%
*-rgt-identity42.6%
mul-1-neg42.6%
associate-/l*51.5%
distribute-rgt-neg-in51.5%
mul-1-neg51.5%
distribute-lft-in51.5%
mul-1-neg51.5%
unsub-neg51.5%
Simplified51.5%
Taylor expanded in a around 0 55.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4e+45) (not (<= a 1.7e-40))) (- x (* (/ (- z t) a) (- x y))) (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e+45) || !(a <= 1.7e-40)) {
tmp = x - (((z - t) / a) * (x - y));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-4d+45)) .or. (.not. (a <= 1.7d-40))) then
tmp = x - (((z - t) / a) * (x - y))
else
tmp = y + (z * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4e+45) || !(a <= 1.7e-40)) {
tmp = x - (((z - t) / a) * (x - y));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4e+45) or not (a <= 1.7e-40): tmp = x - (((z - t) / a) * (x - y)) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4e+45) || !(a <= 1.7e-40)) tmp = Float64(x - Float64(Float64(Float64(z - t) / a) * Float64(x - y))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4e+45) || ~((a <= 1.7e-40))) tmp = x - (((z - t) / a) * (x - y)); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4e+45], N[Not[LessEqual[a, 1.7e-40]], $MachinePrecision]], N[(x - N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+45} \lor \neg \left(a \leq 1.7 \cdot 10^{-40}\right):\\
\;\;\;\;x - \frac{z - t}{a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -3.9999999999999997e45 or 1.69999999999999992e-40 < a Initial program 69.3%
Taylor expanded in a around inf 61.8%
associate-/l*73.7%
Simplified73.7%
if -3.9999999999999997e45 < a < 1.69999999999999992e-40Initial program 63.8%
+-commutative63.8%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in t around inf 77.9%
associate--l+77.9%
associate-*r/77.9%
associate-*r/77.9%
mul-1-neg77.9%
div-sub78.8%
mul-1-neg78.8%
distribute-lft-out--78.8%
associate-*r/78.8%
mul-1-neg78.8%
unsub-neg78.8%
distribute-rgt-out--78.8%
Simplified78.8%
Taylor expanded in z around inf 75.4%
associate-/l*76.8%
Simplified76.8%
Final simplification75.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8500000000.0)
(+ y (* z (/ (- x y) t)))
(if (<= t 2.5e+27)
(+ x (/ (* (- y x) z) (- a t)))
(- y (/ (* x (- a z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8500000000.0) {
tmp = y + (z * ((x - y) / t));
} else if (t <= 2.5e+27) {
tmp = x + (((y - x) * z) / (a - t));
} else {
tmp = y - ((x * (a - 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 <= (-8500000000.0d0)) then
tmp = y + (z * ((x - y) / t))
else if (t <= 2.5d+27) then
tmp = x + (((y - x) * z) / (a - t))
else
tmp = y - ((x * (a - 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 <= -8500000000.0) {
tmp = y + (z * ((x - y) / t));
} else if (t <= 2.5e+27) {
tmp = x + (((y - x) * z) / (a - t));
} else {
tmp = y - ((x * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8500000000.0: tmp = y + (z * ((x - y) / t)) elif t <= 2.5e+27: tmp = x + (((y - x) * z) / (a - t)) else: tmp = y - ((x * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8500000000.0) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); elseif (t <= 2.5e+27) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / Float64(a - t))); else tmp = Float64(y - Float64(Float64(x * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8500000000.0) tmp = y + (z * ((x - y) / t)); elseif (t <= 2.5e+27) tmp = x + (((y - x) * z) / (a - t)); else tmp = y - ((x * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8500000000.0], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+27], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(N[(x * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8500000000:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+27}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - \frac{x \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if t < -8.5e9Initial program 41.2%
+-commutative41.2%
associate-/l*68.8%
fma-define68.9%
Simplified68.9%
Taylor expanded in t around inf 59.6%
associate--l+59.6%
associate-*r/59.6%
associate-*r/59.6%
mul-1-neg59.6%
div-sub59.6%
mul-1-neg59.6%
distribute-lft-out--59.6%
associate-*r/59.6%
mul-1-neg59.6%
unsub-neg59.6%
distribute-rgt-out--59.7%
Simplified59.7%
Taylor expanded in z around inf 59.1%
associate-/l*63.3%
Simplified63.3%
if -8.5e9 < t < 2.4999999999999999e27Initial program 91.7%
Taylor expanded in z around inf 86.3%
if 2.4999999999999999e27 < t Initial program 40.5%
+-commutative40.5%
associate-/l*68.9%
fma-define68.9%
Simplified68.9%
Taylor expanded in t around inf 66.8%
associate--l+66.8%
associate-*r/66.8%
associate-*r/66.8%
mul-1-neg66.8%
div-sub66.8%
mul-1-neg66.8%
distribute-lft-out--66.8%
associate-*r/66.8%
mul-1-neg66.8%
unsub-neg66.8%
distribute-rgt-out--67.1%
Simplified67.1%
Taylor expanded in y around 0 71.8%
mul-1-neg71.8%
distribute-rgt-neg-in71.8%
sub-neg71.8%
distribute-neg-in71.8%
remove-double-neg71.8%
+-commutative71.8%
sub-neg71.8%
Simplified71.8%
Final simplification77.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.5e+44)
(+ x (* (- z t) (/ y (- a t))))
(if (<= a 1.16e-40)
(+ y (* z (/ (- x y) t)))
(- x (* (/ (- z t) a) (- x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e+44) {
tmp = x + ((z - t) * (y / (a - t)));
} else if (a <= 1.16e-40) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x - (((z - t) / a) * (x - 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 (a <= (-4.5d+44)) then
tmp = x + ((z - t) * (y / (a - t)))
else if (a <= 1.16d-40) then
tmp = y + (z * ((x - y) / t))
else
tmp = x - (((z - t) / a) * (x - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e+44) {
tmp = x + ((z - t) * (y / (a - t)));
} else if (a <= 1.16e-40) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x - (((z - t) / a) * (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e+44: tmp = x + ((z - t) * (y / (a - t))) elif a <= 1.16e-40: tmp = y + (z * ((x - y) / t)) else: tmp = x - (((z - t) / a) * (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e+44) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); elseif (a <= 1.16e-40) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); else tmp = Float64(x - Float64(Float64(Float64(z - t) / a) * Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e+44) tmp = x + ((z - t) * (y / (a - t))); elseif (a <= 1.16e-40) tmp = y + (z * ((x - y) / t)); else tmp = x - (((z - t) / a) * (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e+44], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.16e-40], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+44}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-40}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - t}{a} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if a < -4.5e44Initial program 65.4%
Taylor expanded in y around inf 61.1%
*-commutative61.1%
*-lft-identity61.1%
times-frac69.7%
/-rgt-identity69.7%
Simplified69.7%
if -4.5e44 < a < 1.15999999999999991e-40Initial program 63.8%
+-commutative63.8%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in t around inf 77.9%
associate--l+77.9%
associate-*r/77.9%
associate-*r/77.9%
mul-1-neg77.9%
div-sub78.8%
mul-1-neg78.8%
distribute-lft-out--78.8%
associate-*r/78.8%
mul-1-neg78.8%
unsub-neg78.8%
distribute-rgt-out--78.8%
Simplified78.8%
Taylor expanded in z around inf 75.4%
associate-/l*76.8%
Simplified76.8%
if 1.15999999999999991e-40 < a Initial program 71.8%
Taylor expanded in a around inf 65.1%
associate-/l*77.4%
Simplified77.4%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.5e+45) (not (<= a 9.6e-41))) (- x (* z (/ (- x y) a))) (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.5e+45) || !(a <= 9.6e-41)) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = y + (z * ((x - y) / 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 <= (-4.5d+45)) .or. (.not. (a <= 9.6d-41))) then
tmp = x - (z * ((x - y) / a))
else
tmp = y + (z * ((x - y) / 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 <= -4.5e+45) || !(a <= 9.6e-41)) {
tmp = x - (z * ((x - y) / a));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.5e+45) or not (a <= 9.6e-41): tmp = x - (z * ((x - y) / a)) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.5e+45) || !(a <= 9.6e-41)) tmp = Float64(x - Float64(z * Float64(Float64(x - y) / a))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.5e+45) || ~((a <= 9.6e-41))) tmp = x - (z * ((x - y) / a)); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.5e+45], N[Not[LessEqual[a, 9.6e-41]], $MachinePrecision]], N[(x - N[(z * N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+45} \lor \neg \left(a \leq 9.6 \cdot 10^{-41}\right):\\
\;\;\;\;x - z \cdot \frac{x - y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -4.4999999999999998e45 or 9.60000000000000087e-41 < a Initial program 69.3%
Taylor expanded in t around 0 60.8%
associate-/l*68.0%
Simplified68.0%
if -4.4999999999999998e45 < a < 9.60000000000000087e-41Initial program 63.8%
+-commutative63.8%
associate-/l*75.8%
fma-define75.8%
Simplified75.8%
Taylor expanded in t around inf 77.9%
associate--l+77.9%
associate-*r/77.9%
associate-*r/77.9%
mul-1-neg77.9%
div-sub78.8%
mul-1-neg78.8%
distribute-lft-out--78.8%
associate-*r/78.8%
mul-1-neg78.8%
unsub-neg78.8%
distribute-rgt-out--78.8%
Simplified78.8%
Taylor expanded in z around inf 75.4%
associate-/l*76.8%
Simplified76.8%
Final simplification72.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.6e+98) y (if (<= t 2.2e+31) (+ x (* y (/ z (- a t)))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.6e+98) {
tmp = y;
} else if (t <= 2.2e+31) {
tmp = x + (y * (z / (a - t)));
} 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 <= (-4.6d+98)) then
tmp = y
else if (t <= 2.2d+31) then
tmp = x + (y * (z / (a - t)))
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 <= -4.6e+98) {
tmp = y;
} else if (t <= 2.2e+31) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.6e+98: tmp = y elif t <= 2.2e+31: tmp = x + (y * (z / (a - t))) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.6e+98) tmp = y; elseif (t <= 2.2e+31) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.6e+98) tmp = y; elseif (t <= 2.2e+31) tmp = x + (y * (z / (a - t))); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.6e+98], y, If[LessEqual[t, 2.2e+31], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+98}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+31}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.60000000000000026e98 or 2.2000000000000001e31 < t Initial program 37.2%
+-commutative37.2%
associate-/l*66.4%
fma-define66.5%
Simplified66.5%
Taylor expanded in y around 0 53.0%
+-commutative53.0%
+-commutative53.0%
div-sub53.0%
mul-1-neg53.0%
associate-/l*66.4%
distribute-lft-neg-in66.4%
distribute-rgt-in66.4%
sub-neg66.4%
associate-*l/37.2%
associate-*r/63.2%
fma-define63.2%
Simplified63.2%
Taylor expanded in t around inf 49.7%
if -4.60000000000000026e98 < t < 2.2000000000000001e31Initial program 89.3%
Taylor expanded in y around inf 67.7%
*-commutative67.7%
Simplified67.7%
Taylor expanded in z around inf 61.6%
associate-/l*64.5%
Simplified64.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.16e+33) y (if (<= t 2.2e+24) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.16e+33) {
tmp = y;
} else if (t <= 2.2e+24) {
tmp = x * (1.0 - (z / a));
} 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.16d+33)) then
tmp = y
else if (t <= 2.2d+24) then
tmp = x * (1.0d0 - (z / a))
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.16e+33) {
tmp = y;
} else if (t <= 2.2e+24) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.16e+33: tmp = y elif t <= 2.2e+24: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.16e+33) tmp = y; elseif (t <= 2.2e+24) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.16e+33) tmp = y; elseif (t <= 2.2e+24) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.16e+33], y, If[LessEqual[t, 2.2e+24], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.16 \cdot 10^{+33}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.16000000000000001e33 or 2.20000000000000002e24 < t Initial program 40.7%
+-commutative40.7%
associate-/l*69.1%
fma-define69.2%
Simplified69.2%
Taylor expanded in y around 0 56.3%
+-commutative56.3%
+-commutative56.3%
div-sub56.3%
mul-1-neg56.3%
associate-/l*69.1%
distribute-lft-neg-in69.1%
distribute-rgt-in69.1%
sub-neg69.1%
associate-*l/40.7%
associate-*r/66.3%
fma-define66.3%
Simplified66.3%
Taylor expanded in t around inf 48.0%
if -1.16000000000000001e33 < t < 2.20000000000000002e24Initial program 91.1%
+-commutative91.1%
associate-/l*95.2%
fma-define95.3%
Simplified95.3%
Taylor expanded in y around 0 61.7%
*-rgt-identity61.7%
mul-1-neg61.7%
associate-/l*67.3%
distribute-rgt-neg-in67.3%
mul-1-neg67.3%
distribute-lft-in67.3%
mul-1-neg67.3%
unsub-neg67.3%
Simplified67.3%
Taylor expanded in t around 0 58.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.5e+113) x (if (<= a 3.3e+55) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e+113) {
tmp = x;
} else if (a <= 3.3e+55) {
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 <= (-4.5d+113)) then
tmp = x
else if (a <= 3.3d+55) 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 <= -4.5e+113) {
tmp = x;
} else if (a <= 3.3e+55) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e+113: tmp = x elif a <= 3.3e+55: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e+113) tmp = x; elseif (a <= 3.3e+55) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e+113) tmp = x; elseif (a <= 3.3e+55) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e+113], x, If[LessEqual[a, 3.3e+55], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+55}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.5000000000000001e113 or 3.3e55 < a Initial program 69.7%
+-commutative69.7%
associate-/l*93.4%
fma-define93.5%
Simplified93.5%
Taylor expanded in a around inf 57.2%
if -4.5000000000000001e113 < a < 3.3e55Initial program 64.9%
+-commutative64.9%
associate-/l*76.2%
fma-define76.2%
Simplified76.2%
Taylor expanded in y around 0 69.3%
+-commutative69.3%
+-commutative69.3%
div-sub69.3%
mul-1-neg69.3%
associate-/l*73.1%
distribute-lft-neg-in73.1%
distribute-rgt-in76.2%
sub-neg76.2%
associate-*l/64.9%
associate-*r/72.3%
fma-define72.4%
Simplified72.4%
Taylor expanded in t around inf 35.9%
(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 66.7%
+-commutative66.7%
associate-/l*82.6%
fma-define82.6%
Simplified82.6%
Taylor expanded in a around inf 27.1%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 66.7%
+-commutative66.7%
associate-/l*82.6%
fma-define82.6%
Simplified82.6%
Taylor expanded in y around 0 41.6%
*-rgt-identity41.6%
mul-1-neg41.6%
associate-/l*48.0%
distribute-rgt-neg-in48.0%
mul-1-neg48.0%
distribute-lft-in48.1%
mul-1-neg48.1%
unsub-neg48.1%
Simplified48.1%
Taylor expanded in t around inf 2.8%
Taylor expanded in x around 0 2.8%
(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 2024144
(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))))