
(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-274) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(- y (/ (* (- x y) (- 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-274) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y - (((x - y) * (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-274) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y - Float64(Float64(Float64(x - y) * 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-274], 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[(x - y), $MachinePrecision] * 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^{-274} \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(x - y\right) \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.99999999999999993e-274 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 76.9%
+-commutative76.9%
associate-/l*93.4%
fma-define93.4%
Simplified93.4%
if -1.99999999999999993e-274 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.1%
+-commutative4.1%
associate-/l*4.1%
fma-define4.1%
Simplified4.1%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r/99.9%
mul-1-neg99.9%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification93.8%
(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-274)
t_2
(if (<= t_2 0.0)
(- y (/ (* (- x y) (- a z)) t))
(if (<= t_2 5e+271) 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-274) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((x - y) * (a - z)) / t);
} else if (t_2 <= 5e+271) {
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-274) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((x - y) * (a - z)) / t);
} else if (t_2 <= 5e+271) {
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-274: tmp = t_2 elif t_2 <= 0.0: tmp = y - (((x - y) * (a - z)) / t) elif t_2 <= 5e+271: 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-274) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(x - y) * Float64(a - z)) / t)); elseif (t_2 <= 5e+271) 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-274) tmp = t_2; elseif (t_2 <= 0.0) tmp = y - (((x - y) * (a - z)) / t); elseif (t_2 <= 5e+271) 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-274], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(N[(x - y), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+271], 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^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{\left(x - y\right) \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+271}:\\
\;\;\;\;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.0000000000000003e271 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 44.5%
+-commutative44.5%
associate-/l*85.1%
fma-define85.2%
Simplified85.2%
Taylor expanded in t around inf 58.1%
associate--l+58.1%
associate-*r/58.1%
associate-*r/58.1%
mul-1-neg58.1%
div-sub60.1%
mul-1-neg60.1%
distribute-lft-out--60.1%
associate-*r/60.1%
mul-1-neg60.1%
unsub-neg60.1%
distribute-rgt-out--60.4%
Simplified60.4%
Taylor expanded in z around inf 60.2%
associate-/l*75.6%
Simplified75.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.99999999999999993e-274 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.0000000000000003e271Initial program 99.1%
if -1.99999999999999993e-274 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.1%
+-commutative4.1%
associate-/l*4.1%
fma-define4.1%
Simplified4.1%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r/99.9%
mul-1-neg99.9%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (* (- y x) (/ -1.0 (- t a))))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-274)
t_2
(if (<= t_2 0.0) (- y (/ (* (- x y) (- 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 / (t - a))));
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-274) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((x - y) * (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 / (t - a))));
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-274) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((x - y) * (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 / (t - a)))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-274: tmp = t_2 elif t_2 <= 0.0: tmp = y - (((x - y) * (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(t - a))))) 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-274) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(x - y) * 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 / (t - a)))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-274) tmp = t_2; elseif (t_2 <= 0.0) tmp = y - (((x - y) * (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[(t - a), $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-274], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(N[(x - y), $MachinePrecision] * 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}{t - a}\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^{-274}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{\left(x - y\right) \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 68.2%
div-inv68.1%
*-commutative68.1%
associate-*l*89.4%
Applied egg-rr89.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.99999999999999993e-274Initial program 99.0%
if -1.99999999999999993e-274 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.1%
+-commutative4.1%
associate-/l*4.1%
fma-define4.1%
Simplified4.1%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r/99.9%
mul-1-neg99.9%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- a t))) (t_2 (+ x (* (- z t) t_1))))
(if (<= a -2.9e-56)
t_2
(if (<= a -7.5e-137)
(* z (+ t_1 (/ x (- t a))))
(if (<= a 1.55e-70) (+ y (* z (/ (- x y) t))) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - t);
double t_2 = x + ((z - t) * t_1);
double tmp;
if (a <= -2.9e-56) {
tmp = t_2;
} else if (a <= -7.5e-137) {
tmp = z * (t_1 + (x / (t - a)));
} else if (a <= 1.55e-70) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y / (a - t)
t_2 = x + ((z - t) * t_1)
if (a <= (-2.9d-56)) then
tmp = t_2
else if (a <= (-7.5d-137)) then
tmp = z * (t_1 + (x / (t - a)))
else if (a <= 1.55d-70) then
tmp = y + (z * ((x - y) / t))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a - t);
double t_2 = x + ((z - t) * t_1);
double tmp;
if (a <= -2.9e-56) {
tmp = t_2;
} else if (a <= -7.5e-137) {
tmp = z * (t_1 + (x / (t - a)));
} else if (a <= 1.55e-70) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a - t) t_2 = x + ((z - t) * t_1) tmp = 0 if a <= -2.9e-56: tmp = t_2 elif a <= -7.5e-137: tmp = z * (t_1 + (x / (t - a))) elif a <= 1.55e-70: tmp = y + (z * ((x - y) / t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a - t)) t_2 = Float64(x + Float64(Float64(z - t) * t_1)) tmp = 0.0 if (a <= -2.9e-56) tmp = t_2; elseif (a <= -7.5e-137) tmp = Float64(z * Float64(t_1 + Float64(x / Float64(t - a)))); elseif (a <= 1.55e-70) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a - t); t_2 = x + ((z - t) * t_1); tmp = 0.0; if (a <= -2.9e-56) tmp = t_2; elseif (a <= -7.5e-137) tmp = z * (t_1 + (x / (t - a))); elseif (a <= 1.55e-70) tmp = y + (z * ((x - y) / t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z - t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.9e-56], t$95$2, If[LessEqual[a, -7.5e-137], N[(z * N[(t$95$1 + N[(x / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-70], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
t_2 := x + \left(z - t\right) \cdot t\_1\\
\mathbf{if}\;a \leq -2.9 \cdot 10^{-56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-137}:\\
\;\;\;\;z \cdot \left(t\_1 + \frac{x}{t - a}\right)\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-70}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.89999999999999991e-56 or 1.55e-70 < a Initial program 77.0%
Taylor expanded in y around inf 71.1%
*-commutative71.1%
*-lft-identity71.1%
times-frac82.1%
/-rgt-identity82.1%
Simplified82.1%
if -2.89999999999999991e-56 < a < -7.4999999999999995e-137Initial program 79.6%
+-commutative79.6%
associate-/l*79.7%
fma-define79.7%
Simplified79.7%
Taylor expanded in z around inf 75.3%
if -7.4999999999999995e-137 < a < 1.55e-70Initial program 61.2%
+-commutative61.2%
associate-/l*80.0%
fma-define80.0%
Simplified80.0%
Taylor expanded in t around inf 78.1%
associate--l+78.1%
associate-*r/78.1%
associate-*r/78.1%
mul-1-neg78.1%
div-sub78.1%
mul-1-neg78.1%
distribute-lft-out--78.1%
associate-*r/78.1%
mul-1-neg78.1%
unsub-neg78.1%
distribute-rgt-out--78.1%
Simplified78.1%
Taylor expanded in z around inf 77.1%
associate-/l*82.2%
Simplified82.2%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e-25) (not (<= a 8e-68))) (+ x (* (- z t) (/ y (- a t)))) (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-25) || !(a <= 8e-68)) {
tmp = x + ((z - t) * (y / (a - t)));
} 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 <= (-5.6d-25)) .or. (.not. (a <= 8d-68))) then
tmp = x + ((z - t) * (y / (a - t)))
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 <= -5.6e-25) || !(a <= 8e-68)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e-25) or not (a <= 8e-68): tmp = x + ((z - t) * (y / (a - t))) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e-25) || !(a <= 8e-68)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); 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 <= -5.6e-25) || ~((a <= 8e-68))) tmp = x + ((z - t) * (y / (a - t))); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e-25], N[Not[LessEqual[a, 8e-68]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $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 -5.6 \cdot 10^{-25} \lor \neg \left(a \leq 8 \cdot 10^{-68}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -5.59999999999999976e-25 or 8.00000000000000053e-68 < a Initial program 77.0%
Taylor expanded in y around inf 71.0%
*-commutative71.0%
*-lft-identity71.0%
times-frac82.7%
/-rgt-identity82.7%
Simplified82.7%
if -5.59999999999999976e-25 < a < 8.00000000000000053e-68Initial program 64.8%
+-commutative64.8%
associate-/l*79.8%
fma-define79.8%
Simplified79.8%
Taylor expanded in t around inf 73.9%
associate--l+73.9%
associate-*r/73.9%
associate-*r/73.9%
mul-1-neg73.9%
div-sub74.8%
mul-1-neg74.8%
distribute-lft-out--74.8%
associate-*r/74.8%
mul-1-neg74.8%
unsub-neg74.8%
distribute-rgt-out--74.8%
Simplified74.8%
Taylor expanded in z around inf 72.7%
associate-/l*76.7%
Simplified76.7%
Final simplification80.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.56e-9) (not (<= t 8.5e-36))) (+ y (* z (/ (- x y) t))) (+ x (* (- y x) (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.56e-9) || !(t <= 8.5e-36)) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x + ((y - x) * ((z - t) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.56d-9)) .or. (.not. (t <= 8.5d-36))) then
tmp = y + (z * ((x - y) / t))
else
tmp = x + ((y - x) * ((z - t) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.56e-9) || !(t <= 8.5e-36)) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x + ((y - x) * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.56e-9) or not (t <= 8.5e-36): tmp = y + (z * ((x - y) / t)) else: tmp = x + ((y - x) * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.56e-9) || !(t <= 8.5e-36)) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); else tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.56e-9) || ~((t <= 8.5e-36))) tmp = y + (z * ((x - y) / t)); else tmp = x + ((y - x) * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.56e-9], N[Not[LessEqual[t, 8.5e-36]], $MachinePrecision]], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{-9} \lor \neg \left(t \leq 8.5 \cdot 10^{-36}\right):\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if t < -1.56e-9 or 8.5000000000000007e-36 < t Initial program 49.4%
+-commutative49.4%
associate-/l*77.0%
fma-define77.1%
Simplified77.1%
Taylor expanded in t around inf 62.8%
associate--l+62.8%
associate-*r/62.8%
associate-*r/62.8%
mul-1-neg62.8%
div-sub62.8%
mul-1-neg62.8%
distribute-lft-out--62.8%
associate-*r/62.8%
mul-1-neg62.8%
unsub-neg62.8%
distribute-rgt-out--63.0%
Simplified63.0%
Taylor expanded in z around inf 59.2%
associate-/l*69.8%
Simplified69.8%
if -1.56e-9 < t < 8.5000000000000007e-36Initial program 95.6%
Taylor expanded in a around inf 80.3%
associate-/l*82.6%
Simplified82.6%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.1e-10) (not (<= t 8e-31))) (+ y (* z (/ (- x y) t))) (- x (* (/ z a) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.1e-10) || !(t <= 8e-31)) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x - ((z / 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 ((t <= (-2.1d-10)) .or. (.not. (t <= 8d-31))) then
tmp = y + (z * ((x - y) / t))
else
tmp = x - ((z / 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 ((t <= -2.1e-10) || !(t <= 8e-31)) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x - ((z / a) * (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.1e-10) or not (t <= 8e-31): tmp = y + (z * ((x - y) / t)) else: tmp = x - ((z / a) * (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.1e-10) || !(t <= 8e-31)) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); else tmp = Float64(x - Float64(Float64(z / a) * Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.1e-10) || ~((t <= 8e-31))) tmp = y + (z * ((x - y) / t)); else tmp = x - ((z / a) * (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.1e-10], N[Not[LessEqual[t, 8e-31]], $MachinePrecision]], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z / a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-10} \lor \neg \left(t \leq 8 \cdot 10^{-31}\right):\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{a} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if t < -2.1e-10 or 8.000000000000001e-31 < t Initial program 49.4%
+-commutative49.4%
associate-/l*77.0%
fma-define77.1%
Simplified77.1%
Taylor expanded in t around inf 62.8%
associate--l+62.8%
associate-*r/62.8%
associate-*r/62.8%
mul-1-neg62.8%
div-sub62.8%
mul-1-neg62.8%
distribute-lft-out--62.8%
associate-*r/62.8%
mul-1-neg62.8%
unsub-neg62.8%
distribute-rgt-out--63.0%
Simplified63.0%
Taylor expanded in z around inf 59.2%
associate-/l*69.8%
Simplified69.8%
if -2.1e-10 < t < 8.000000000000001e-31Initial program 95.6%
Taylor expanded in a around inf 80.3%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in z around inf 79.6%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.6e-13) (not (<= t 8.5e-45))) (* y (/ (- z t) (- a t))) (- x (* (/ z a) (- x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.6e-13) || !(t <= 8.5e-45)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((z / 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 ((t <= (-5.6d-13)) .or. (.not. (t <= 8.5d-45))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - ((z / 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 ((t <= -5.6e-13) || !(t <= 8.5e-45)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((z / a) * (x - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.6e-13) or not (t <= 8.5e-45): tmp = y * ((z - t) / (a - t)) else: tmp = x - ((z / a) * (x - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.6e-13) || !(t <= 8.5e-45)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(Float64(z / a) * Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.6e-13) || ~((t <= 8.5e-45))) tmp = y * ((z - t) / (a - t)); else tmp = x - ((z / a) * (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.6e-13], N[Not[LessEqual[t, 8.5e-45]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z / a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{-13} \lor \neg \left(t \leq 8.5 \cdot 10^{-45}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{a} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if t < -5.6000000000000004e-13 or 8.50000000000000041e-45 < t Initial program 49.4%
+-commutative49.4%
associate-/l*77.4%
fma-define77.4%
Simplified77.4%
Taylor expanded in y around 0 67.4%
+-commutative67.4%
div-sub67.4%
mul-1-neg67.4%
associate-/l*77.4%
distribute-lft-neg-in77.4%
distribute-rgt-in77.4%
sub-neg77.4%
associate-*l/49.4%
associate-*r/76.2%
+-commutative76.2%
fma-define76.3%
Simplified76.3%
Taylor expanded in y around inf 63.9%
div-sub63.9%
Simplified63.9%
if -5.6000000000000004e-13 < t < 8.50000000000000041e-45Initial program 96.3%
Taylor expanded in a around inf 80.8%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in z around inf 80.1%
Final simplification71.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.1e-11) (not (<= t 3.1e-44))) (* y (/ (- z t) (- a t))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.1e-11) || !(t <= 3.1e-44)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.1d-11)) .or. (.not. (t <= 3.1d-44))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (z * ((y - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.1e-11) || !(t <= 3.1e-44)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.1e-11) or not (t <= 3.1e-44): tmp = y * ((z - t) / (a - t)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.1e-11) || !(t <= 3.1e-44)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.1e-11) || ~((t <= 3.1e-44))) tmp = y * ((z - t) / (a - t)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.1e-11], N[Not[LessEqual[t, 3.1e-44]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{-11} \lor \neg \left(t \leq 3.1 \cdot 10^{-44}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -3.10000000000000028e-11 or 3.09999999999999984e-44 < t Initial program 49.4%
+-commutative49.4%
associate-/l*77.4%
fma-define77.4%
Simplified77.4%
Taylor expanded in y around 0 67.4%
+-commutative67.4%
div-sub67.4%
mul-1-neg67.4%
associate-/l*77.4%
distribute-lft-neg-in77.4%
distribute-rgt-in77.4%
sub-neg77.4%
associate-*l/49.4%
associate-*r/76.2%
+-commutative76.2%
fma-define76.3%
Simplified76.3%
Taylor expanded in y around inf 63.9%
div-sub63.9%
Simplified63.9%
if -3.10000000000000028e-11 < t < 3.09999999999999984e-44Initial program 96.3%
Taylor expanded in t around 0 78.5%
associate-/l*78.5%
Simplified78.5%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.2e+52) (not (<= y 2.6e-42))) (* y (/ (- z t) (- a t))) (- x (/ (* x z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.2e+52) || !(y <= 2.6e-42)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-4.2d+52)) .or. (.not. (y <= 2.6d-42))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - ((x * z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.2e+52) || !(y <= 2.6e-42)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.2e+52) or not (y <= 2.6e-42): tmp = y * ((z - t) / (a - t)) else: tmp = x - ((x * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.2e+52) || !(y <= 2.6e-42)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(Float64(x * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.2e+52) || ~((y <= 2.6e-42))) tmp = y * ((z - t) / (a - t)); else tmp = x - ((x * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.2e+52], N[Not[LessEqual[y, 2.6e-42]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+52} \lor \neg \left(y \leq 2.6 \cdot 10^{-42}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\end{array}
\end{array}
if y < -4.2e52 or 2.6e-42 < y Initial program 68.8%
+-commutative68.8%
associate-/l*94.1%
fma-define94.1%
Simplified94.1%
Taylor expanded in y around 0 84.9%
+-commutative84.9%
div-sub84.9%
mul-1-neg84.9%
associate-/l*90.5%
distribute-lft-neg-in90.5%
distribute-rgt-in94.1%
sub-neg94.1%
associate-*l/68.8%
associate-*r/90.7%
+-commutative90.7%
fma-define90.7%
Simplified90.7%
Taylor expanded in y around inf 76.3%
div-sub76.3%
Simplified76.3%
if -4.2e52 < y < 2.6e-42Initial program 75.1%
+-commutative75.1%
associate-/l*79.1%
fma-define79.1%
Simplified79.1%
Taylor expanded in y around 0 72.5%
+-commutative72.5%
div-sub72.5%
mul-1-neg72.5%
associate-/l*76.6%
distribute-lft-neg-in76.6%
distribute-rgt-in79.1%
sub-neg79.1%
associate-*l/75.1%
associate-*r/76.0%
+-commutative76.0%
fma-define76.1%
Simplified76.1%
Taylor expanded in y around 0 59.3%
mul-1-neg59.3%
unsub-neg59.3%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in t around 0 52.0%
Final simplification64.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.22e-132) (not (<= a 5.6e+50))) (- x (* x (/ z a))) (- y (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.22e-132) || !(a <= 5.6e+50)) {
tmp = x - (x * (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 <= (-1.22d-132)) .or. (.not. (a <= 5.6d+50))) then
tmp = x - (x * (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 <= -1.22e-132) || !(a <= 5.6e+50)) {
tmp = x - (x * (z / a));
} else {
tmp = y - (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.22e-132) or not (a <= 5.6e+50): tmp = x - (x * (z / a)) else: tmp = y - (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.22e-132) || !(a <= 5.6e+50)) tmp = Float64(x - Float64(x * 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 <= -1.22e-132) || ~((a <= 5.6e+50))) tmp = x - (x * (z / a)); else tmp = y - (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.22e-132], N[Not[LessEqual[a, 5.6e+50]], $MachinePrecision]], N[(x - N[(x * 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 -1.22 \cdot 10^{-132} \lor \neg \left(a \leq 5.6 \cdot 10^{+50}\right):\\
\;\;\;\;x - x \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y - y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.2200000000000001e-132 or 5.5999999999999996e50 < a Initial program 78.4%
+-commutative78.4%
associate-/l*91.6%
fma-define91.6%
Simplified91.6%
Taylor expanded in y around 0 83.8%
+-commutative83.8%
div-sub83.8%
mul-1-neg83.8%
associate-/l*90.1%
distribute-lft-neg-in90.1%
distribute-rgt-in91.6%
sub-neg91.6%
associate-*l/78.4%
associate-*r/89.8%
+-commutative89.8%
fma-define89.8%
Simplified89.8%
Taylor expanded in y around 0 53.0%
mul-1-neg53.0%
unsub-neg53.0%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in t around 0 54.5%
associate-/l*55.2%
Simplified55.2%
if -1.2200000000000001e-132 < a < 5.5999999999999996e50Initial program 64.1%
+-commutative64.1%
associate-/l*81.9%
fma-define82.0%
Simplified82.0%
Taylor expanded in t around inf 73.3%
associate--l+73.3%
associate-*r/73.3%
associate-*r/73.3%
mul-1-neg73.3%
div-sub73.3%
mul-1-neg73.3%
distribute-lft-out--73.3%
associate-*r/73.3%
mul-1-neg73.3%
unsub-neg73.3%
distribute-rgt-out--73.3%
Simplified73.3%
Taylor expanded in y around inf 51.9%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in z around inf 51.9%
associate-/l*62.0%
Simplified62.0%
Final simplification58.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.05e+96) (not (<= t 0.00043))) (+ y (* a (/ y t))) (- x (/ (* x z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.05e+96) || !(t <= 0.00043)) {
tmp = y + (a * (y / t));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.05d+96)) .or. (.not. (t <= 0.00043d0))) then
tmp = y + (a * (y / t))
else
tmp = x - ((x * z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.05e+96) || !(t <= 0.00043)) {
tmp = y + (a * (y / t));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.05e+96) or not (t <= 0.00043): tmp = y + (a * (y / t)) else: tmp = x - ((x * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.05e+96) || !(t <= 0.00043)) tmp = Float64(y + Float64(a * Float64(y / t))); else tmp = Float64(x - Float64(Float64(x * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.05e+96) || ~((t <= 0.00043))) tmp = y + (a * (y / t)); else tmp = x - ((x * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.05e+96], N[Not[LessEqual[t, 0.00043]], $MachinePrecision]], N[(y + N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+96} \lor \neg \left(t \leq 0.00043\right):\\
\;\;\;\;y + a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\end{array}
\end{array}
if t < -2.04999999999999999e96 or 4.29999999999999989e-4 < t Initial program 41.7%
+-commutative41.7%
associate-/l*74.6%
fma-define74.6%
Simplified74.6%
Taylor expanded in t around inf 63.3%
associate--l+63.3%
associate-*r/63.3%
associate-*r/63.3%
mul-1-neg63.3%
div-sub63.3%
mul-1-neg63.3%
distribute-lft-out--63.3%
associate-*r/63.3%
mul-1-neg63.3%
unsub-neg63.3%
distribute-rgt-out--63.5%
Simplified63.5%
Taylor expanded in y around inf 46.2%
associate-/l*59.6%
Simplified59.6%
Taylor expanded in z around 0 47.6%
sub-neg47.6%
mul-1-neg47.6%
remove-double-neg47.6%
associate-/l*50.5%
Simplified50.5%
if -2.04999999999999999e96 < t < 4.29999999999999989e-4Initial program 92.6%
+-commutative92.6%
associate-/l*95.8%
fma-define95.8%
Simplified95.8%
Taylor expanded in y around 0 91.0%
+-commutative91.0%
div-sub91.0%
mul-1-neg91.0%
associate-/l*90.4%
distribute-lft-neg-in90.4%
distribute-rgt-in95.8%
sub-neg95.8%
associate-*l/92.6%
associate-*r/91.2%
+-commutative91.2%
fma-define91.3%
Simplified91.3%
Taylor expanded in y around 0 56.7%
mul-1-neg56.7%
unsub-neg56.7%
associate-/l*56.8%
Simplified56.8%
Taylor expanded in t around 0 51.9%
Final simplification51.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.4e+92) (not (<= t 8.5e-14))) (+ y (* a (/ y t))) (- x (* x (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.4e+92) || !(t <= 8.5e-14)) {
tmp = y + (a * (y / t));
} else {
tmp = x - (x * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.4d+92)) .or. (.not. (t <= 8.5d-14))) then
tmp = y + (a * (y / t))
else
tmp = x - (x * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.4e+92) || !(t <= 8.5e-14)) {
tmp = y + (a * (y / t));
} else {
tmp = x - (x * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.4e+92) or not (t <= 8.5e-14): tmp = y + (a * (y / t)) else: tmp = x - (x * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.4e+92) || !(t <= 8.5e-14)) tmp = Float64(y + Float64(a * Float64(y / t))); else tmp = Float64(x - Float64(x * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.4e+92) || ~((t <= 8.5e-14))) tmp = y + (a * (y / t)); else tmp = x - (x * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.4e+92], N[Not[LessEqual[t, 8.5e-14]], $MachinePrecision]], N[(y + N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+92} \lor \neg \left(t \leq 8.5 \cdot 10^{-14}\right):\\
\;\;\;\;y + a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -3.3999999999999998e92 or 8.50000000000000038e-14 < t Initial program 42.3%
+-commutative42.3%
associate-/l*74.9%
fma-define74.9%
Simplified74.9%
Taylor expanded in t around inf 63.6%
associate--l+63.6%
associate-*r/63.6%
associate-*r/63.6%
mul-1-neg63.6%
div-sub63.6%
mul-1-neg63.6%
distribute-lft-out--63.6%
associate-*r/63.6%
mul-1-neg63.6%
unsub-neg63.6%
distribute-rgt-out--63.8%
Simplified63.8%
Taylor expanded in y around inf 46.7%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in z around 0 47.1%
sub-neg47.1%
mul-1-neg47.1%
remove-double-neg47.1%
associate-/l*50.0%
Simplified50.0%
if -3.3999999999999998e92 < t < 8.50000000000000038e-14Initial program 92.6%
+-commutative92.6%
associate-/l*95.7%
fma-define95.7%
Simplified95.7%
Taylor expanded in y around 0 91.0%
+-commutative91.0%
div-sub91.0%
mul-1-neg91.0%
associate-/l*90.4%
distribute-lft-neg-in90.4%
distribute-rgt-in95.7%
sub-neg95.7%
associate-*l/92.6%
associate-*r/91.2%
+-commutative91.2%
fma-define91.2%
Simplified91.2%
Taylor expanded in y around 0 57.1%
mul-1-neg57.1%
unsub-neg57.1%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in t around 0 52.2%
associate-/l*52.2%
Simplified52.2%
Final simplification51.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.3e+99) x (if (<= a 2.65e+45) (+ y (* a (/ y t))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.3e+99) {
tmp = x;
} else if (a <= 2.65e+45) {
tmp = y + (a * (y / 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 <= (-2.3d+99)) then
tmp = x
else if (a <= 2.65d+45) then
tmp = y + (a * (y / 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 <= -2.3e+99) {
tmp = x;
} else if (a <= 2.65e+45) {
tmp = y + (a * (y / t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.3e+99: tmp = x elif a <= 2.65e+45: tmp = y + (a * (y / t)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.3e+99) tmp = x; elseif (a <= 2.65e+45) tmp = Float64(y + Float64(a * Float64(y / t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.3e+99) tmp = x; elseif (a <= 2.65e+45) tmp = y + (a * (y / t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.3e+99], x, If[LessEqual[a, 2.65e+45], N[(y + N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.3 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.65 \cdot 10^{+45}:\\
\;\;\;\;y + a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.30000000000000019e99 or 2.64999999999999996e45 < a Initial program 78.1%
+-commutative78.1%
associate-/l*94.8%
fma-define94.8%
Simplified94.8%
Taylor expanded in a around inf 57.9%
if -2.30000000000000019e99 < a < 2.64999999999999996e45Initial program 67.9%
+-commutative67.9%
associate-/l*82.5%
fma-define82.5%
Simplified82.5%
Taylor expanded in t around inf 67.3%
associate--l+67.3%
associate-*r/67.3%
associate-*r/67.3%
mul-1-neg67.3%
div-sub68.0%
mul-1-neg68.0%
distribute-lft-out--68.0%
associate-*r/68.0%
mul-1-neg68.0%
unsub-neg68.0%
distribute-rgt-out--68.0%
Simplified68.0%
Taylor expanded in y around inf 46.8%
associate-/l*54.3%
Simplified54.3%
Taylor expanded in z around 0 34.9%
sub-neg34.9%
mul-1-neg34.9%
remove-double-neg34.9%
associate-/l*35.7%
Simplified35.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.2e+96) x (if (<= a 6.8e+49) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.2e+96) {
tmp = x;
} else if (a <= 6.8e+49) {
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 <= (-1.2d+96)) then
tmp = x
else if (a <= 6.8d+49) 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 <= -1.2e+96) {
tmp = x;
} else if (a <= 6.8e+49) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.2e+96: tmp = x elif a <= 6.8e+49: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.2e+96) tmp = x; elseif (a <= 6.8e+49) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.2e+96) tmp = x; elseif (a <= 6.8e+49) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e+96], x, If[LessEqual[a, 6.8e+49], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{+49}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.19999999999999996e96 or 6.8000000000000001e49 < a Initial program 78.1%
+-commutative78.1%
associate-/l*94.8%
fma-define94.8%
Simplified94.8%
Taylor expanded in a around inf 57.9%
if -1.19999999999999996e96 < a < 6.8000000000000001e49Initial program 67.9%
+-commutative67.9%
associate-/l*82.5%
fma-define82.5%
Simplified82.5%
Taylor expanded in y around 0 75.0%
+-commutative75.0%
div-sub75.0%
mul-1-neg75.0%
associate-/l*77.4%
distribute-lft-neg-in77.4%
distribute-rgt-in82.5%
sub-neg82.5%
associate-*l/67.9%
associate-*r/77.2%
+-commutative77.2%
fma-define77.3%
Simplified77.3%
Taylor expanded in t around inf 33.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 71.7%
+-commutative71.7%
associate-/l*87.1%
fma-define87.1%
Simplified87.1%
Taylor expanded in a around inf 26.7%
(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 71.7%
+-commutative71.7%
associate-/l*87.1%
fma-define87.1%
Simplified87.1%
Taylor expanded in y around 0 79.1%
+-commutative79.1%
div-sub79.1%
mul-1-neg79.1%
associate-/l*84.0%
distribute-lft-neg-in84.0%
distribute-rgt-in87.1%
sub-neg87.1%
associate-*l/71.7%
associate-*r/83.8%
+-commutative83.8%
fma-define83.9%
Simplified83.9%
Taylor expanded in y around 0 39.9%
mul-1-neg39.9%
unsub-neg39.9%
associate-/l*42.9%
Simplified42.9%
Taylor expanded in t around inf 2.7%
Taylor expanded in x around 0 2.7%
(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 2024181
(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))))