
(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 25 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) (/ (- a t) (- z t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-300)
t_1
(if (<= t_2 0.0) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) / ((a - t) / (z - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-300) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-300) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-300], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{a - t}{z - t}}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999996e-300 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 72.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6489.1
Applied rewrites89.1%
if -4.99999999999999996e-300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z t) (- a t)) (- y x) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-300)
t_1
(if (<= t_2 0.0) (fma (- x y) (/ (- z a) t) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - t) / (a - t)), (y - x), x);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-300) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x - y), ((z - a) / t), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-300) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $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, -5e-300], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-300}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999996e-300 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 72.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6488.9
Applied rewrites88.9%
if -4.99999999999999996e-300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y z))))
(if (<= t -4e+151)
t_1
(if (<= t -0.00041)
(/ (* z (- x y)) t)
(if (<= t -8e-307)
(* (- y x) (/ z a))
(if (<= t 6.4e-257)
(fma t (/ x a) x)
(if (<= t 1.8e+108) (* z (/ (- y x) a)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / z);
double tmp;
if (t <= -4e+151) {
tmp = t_1;
} else if (t <= -0.00041) {
tmp = (z * (x - y)) / t;
} else if (t <= -8e-307) {
tmp = (y - x) * (z / a);
} else if (t <= 6.4e-257) {
tmp = fma(t, (x / a), x);
} else if (t <= 1.8e+108) {
tmp = z * ((y - x) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / z)) tmp = 0.0 if (t <= -4e+151) tmp = t_1; elseif (t <= -0.00041) tmp = Float64(Float64(z * Float64(x - y)) / t); elseif (t <= -8e-307) tmp = Float64(Float64(y - x) * Float64(z / a)); elseif (t <= 6.4e-257) tmp = fma(t, Float64(x / a), x); elseif (t <= 1.8e+108) tmp = Float64(z * Float64(Float64(y - x) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+151], t$95$1, If[LessEqual[t, -0.00041], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, -8e-307], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e-257], N[(t * N[(x / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.8e+108], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -4 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -0.00041:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-307}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-257}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+108}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.00000000000000007e151 or 1.8e108 < t Initial program 41.9%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites65.0%
Taylor expanded in t around inf
Applied rewrites41.9%
if -4.00000000000000007e151 < t < -4.0999999999999999e-4Initial program 56.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.6%
Taylor expanded in z around inf
Applied rewrites41.8%
if -4.0999999999999999e-4 < t < -7.99999999999999927e-307Initial program 89.2%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.8
Applied rewrites83.8%
Taylor expanded in z around inf
Applied rewrites56.7%
Applied rewrites59.2%
if -7.99999999999999927e-307 < t < 6.39999999999999971e-257Initial program 100.0%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6492.3
Applied rewrites92.3%
Taylor expanded in y around 0
Applied rewrites71.7%
Taylor expanded in z around 0
Applied rewrites70.7%
if 6.39999999999999971e-257 < t < 1.8e108Initial program 83.3%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6464.6
Applied rewrites64.6%
Taylor expanded in t around inf
Applied rewrites13.2%
Taylor expanded in z around inf
Applied rewrites46.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* x (- z a)) t)) (t_2 (* z (/ y z))))
(if (<= t -3e+150)
t_2
(if (<= t -0.31)
t_1
(if (<= t -2.7e-131)
(/ (* y z) a)
(if (<= t 4.4e-72)
(fma t (/ x a) x)
(if (<= t 1.9e+129) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * (z - a)) / t;
double t_2 = z * (y / z);
double tmp;
if (t <= -3e+150) {
tmp = t_2;
} else if (t <= -0.31) {
tmp = t_1;
} else if (t <= -2.7e-131) {
tmp = (y * z) / a;
} else if (t <= 4.4e-72) {
tmp = fma(t, (x / a), x);
} else if (t <= 1.9e+129) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x * Float64(z - a)) / t) t_2 = Float64(z * Float64(y / z)) tmp = 0.0 if (t <= -3e+150) tmp = t_2; elseif (t <= -0.31) tmp = t_1; elseif (t <= -2.7e-131) tmp = Float64(Float64(y * z) / a); elseif (t <= 4.4e-72) tmp = fma(t, Float64(x / a), x); elseif (t <= 1.9e+129) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+150], t$95$2, If[LessEqual[t, -0.31], t$95$1, If[LessEqual[t, -2.7e-131], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 4.4e-72], N[(t * N[(x / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.9e+129], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \left(z - a\right)}{t}\\
t_2 := z \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+150}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -0.31:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-131}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-72}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{a}, x\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.00000000000000012e150 or 1.90000000000000003e129 < t Initial program 40.2%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites64.4%
Taylor expanded in t around inf
Applied rewrites42.7%
if -3.00000000000000012e150 < t < -0.309999999999999998 or 4.40000000000000005e-72 < t < 1.90000000000000003e129Initial program 67.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.0%
Taylor expanded in x around inf
Applied rewrites34.7%
if -0.309999999999999998 < t < -2.70000000000000021e-131Initial program 88.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6467.6
Applied rewrites67.6%
Taylor expanded in z around inf
Applied rewrites56.2%
Taylor expanded in y around inf
Applied rewrites50.4%
if -2.70000000000000021e-131 < t < 4.40000000000000005e-72Initial program 91.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6485.3
Applied rewrites85.3%
Taylor expanded in y around 0
Applied rewrites61.5%
Taylor expanded in z around 0
Applied rewrites43.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z (- x y)) t)) (t_2 (* z (/ y z))))
(if (<= t -4e+151)
t_2
(if (<= t -15.8)
t_1
(if (<= t 1.35e-39)
(+ x (/ (* y z) a))
(if (<= t 3.9e+129) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * (x - y)) / t;
double t_2 = z * (y / z);
double tmp;
if (t <= -4e+151) {
tmp = t_2;
} else if (t <= -15.8) {
tmp = t_1;
} else if (t <= 1.35e-39) {
tmp = x + ((y * z) / a);
} else if (t <= 3.9e+129) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z * (x - y)) / t
t_2 = z * (y / z)
if (t <= (-4d+151)) then
tmp = t_2
else if (t <= (-15.8d0)) then
tmp = t_1
else if (t <= 1.35d-39) then
tmp = x + ((y * z) / a)
else if (t <= 3.9d+129) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z * (x - y)) / t;
double t_2 = z * (y / z);
double tmp;
if (t <= -4e+151) {
tmp = t_2;
} else if (t <= -15.8) {
tmp = t_1;
} else if (t <= 1.35e-39) {
tmp = x + ((y * z) / a);
} else if (t <= 3.9e+129) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * (x - y)) / t t_2 = z * (y / z) tmp = 0 if t <= -4e+151: tmp = t_2 elif t <= -15.8: tmp = t_1 elif t <= 1.35e-39: tmp = x + ((y * z) / a) elif t <= 3.9e+129: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * Float64(x - y)) / t) t_2 = Float64(z * Float64(y / z)) tmp = 0.0 if (t <= -4e+151) tmp = t_2; elseif (t <= -15.8) tmp = t_1; elseif (t <= 1.35e-39) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (t <= 3.9e+129) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * (x - y)) / t; t_2 = z * (y / z); tmp = 0.0; if (t <= -4e+151) tmp = t_2; elseif (t <= -15.8) tmp = t_1; elseif (t <= 1.35e-39) tmp = x + ((y * z) / a); elseif (t <= 3.9e+129) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+151], t$95$2, If[LessEqual[t, -15.8], t$95$1, If[LessEqual[t, 1.35e-39], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e+129], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(x - y\right)}{t}\\
t_2 := z \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -4 \cdot 10^{+151}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -15.8:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-39}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -4.00000000000000007e151 or 3.8999999999999997e129 < t Initial program 39.4%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites63.9%
Taylor expanded in t around inf
Applied rewrites43.1%
if -4.00000000000000007e151 < t < -15.800000000000001 or 1.35e-39 < t < 3.8999999999999997e129Initial program 65.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.3%
Taylor expanded in z around inf
Applied rewrites40.3%
if -15.800000000000001 < t < 1.35e-39Initial program 90.8%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6475.2
Applied rewrites75.2%
Taylor expanded in y around inf
Applied rewrites64.2%
Final simplification51.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ z a) (- x) x)))
(if (<= a -3.1e+131)
t_1
(if (<= a -3.8e-153)
(* z (/ (- y x) a))
(if (<= a 1.5e-221)
(/ (* z (- x y)) t)
(if (<= a 3.35e-9) (+ x (- y x)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z / a), -x, x);
double tmp;
if (a <= -3.1e+131) {
tmp = t_1;
} else if (a <= -3.8e-153) {
tmp = z * ((y - x) / a);
} else if (a <= 1.5e-221) {
tmp = (z * (x - y)) / t;
} else if (a <= 3.35e-9) {
tmp = x + (y - x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z / a), Float64(-x), x) tmp = 0.0 if (a <= -3.1e+131) tmp = t_1; elseif (a <= -3.8e-153) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (a <= 1.5e-221) tmp = Float64(Float64(z * Float64(x - y)) / t); elseif (a <= 3.35e-9) tmp = Float64(x + Float64(y - x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * (-x) + x), $MachinePrecision]}, If[LessEqual[a, -3.1e+131], t$95$1, If[LessEqual[a, -3.8e-153], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-221], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 3.35e-9], N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{a}, -x, x\right)\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{-153}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-221}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;a \leq 3.35 \cdot 10^{-9}:\\
\;\;\;\;x + \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.10000000000000016e131 or 3.34999999999999981e-9 < a Initial program 63.6%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6471.6
Applied rewrites71.6%
Taylor expanded in y around 0
Applied rewrites52.1%
Taylor expanded in z around inf
Applied rewrites52.3%
if -3.10000000000000016e131 < a < -3.80000000000000023e-153Initial program 74.3%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.2
Applied rewrites60.2%
Taylor expanded in t around inf
Applied rewrites6.2%
Taylor expanded in z around inf
Applied rewrites46.1%
if -3.80000000000000023e-153 < a < 1.5000000000000001e-221Initial program 76.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites89.5%
Taylor expanded in z around inf
Applied rewrites57.4%
if 1.5000000000000001e-221 < a < 3.34999999999999981e-9Initial program 62.0%
Taylor expanded in t around inf
lower--.f6440.4
Applied rewrites40.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y z))))
(if (<= t -4e+151)
t_1
(if (<= t -0.00041)
(/ (* z (- x y)) t)
(if (<= t 1.8e+108) (* z (/ (- y x) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / z);
double tmp;
if (t <= -4e+151) {
tmp = t_1;
} else if (t <= -0.00041) {
tmp = (z * (x - y)) / t;
} else if (t <= 1.8e+108) {
tmp = z * ((y - x) / 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 = z * (y / z)
if (t <= (-4d+151)) then
tmp = t_1
else if (t <= (-0.00041d0)) then
tmp = (z * (x - y)) / t
else if (t <= 1.8d+108) then
tmp = z * ((y - x) / 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 = z * (y / z);
double tmp;
if (t <= -4e+151) {
tmp = t_1;
} else if (t <= -0.00041) {
tmp = (z * (x - y)) / t;
} else if (t <= 1.8e+108) {
tmp = z * ((y - x) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / z) tmp = 0 if t <= -4e+151: tmp = t_1 elif t <= -0.00041: tmp = (z * (x - y)) / t elif t <= 1.8e+108: tmp = z * ((y - x) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / z)) tmp = 0.0 if (t <= -4e+151) tmp = t_1; elseif (t <= -0.00041) tmp = Float64(Float64(z * Float64(x - y)) / t); elseif (t <= 1.8e+108) tmp = Float64(z * Float64(Float64(y - x) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / z); tmp = 0.0; if (t <= -4e+151) tmp = t_1; elseif (t <= -0.00041) tmp = (z * (x - y)) / t; elseif (t <= 1.8e+108) tmp = z * ((y - x) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4e+151], t$95$1, If[LessEqual[t, -0.00041], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 1.8e+108], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -4 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -0.00041:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+108}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.00000000000000007e151 or 1.8e108 < t Initial program 41.9%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites65.0%
Taylor expanded in t around inf
Applied rewrites41.9%
if -4.00000000000000007e151 < t < -4.0999999999999999e-4Initial program 56.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.6%
Taylor expanded in z around inf
Applied rewrites41.8%
if -4.0999999999999999e-4 < t < 1.8e108Initial program 87.1%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.4
Applied rewrites74.4%
Taylor expanded in t around inf
Applied rewrites10.7%
Taylor expanded in z around inf
Applied rewrites47.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -0.0011)
(+ y (* (- y x) (/ (- a z) t)))
(if (<= t 1.9e-48)
(+ x (* (- z t) (/ (- y x) a)))
(fma (- x y) (/ (- z a) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -0.0011) {
tmp = y + ((y - x) * ((a - z) / t));
} else if (t <= 1.9e-48) {
tmp = x + ((z - t) * ((y - x) / a));
} else {
tmp = fma((x - y), ((z - a) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -0.0011) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); elseif (t <= 1.9e-48) tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / a))); else tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -0.0011], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-48], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0011:\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-48}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\end{array}
\end{array}
if t < -0.00110000000000000007Initial program 50.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f6450.2
Applied rewrites50.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
distribute-rgt-out--N/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
distribute-lft-out--N/A
associate-*r/N/A
lower-*.f64N/A
Applied rewrites80.3%
if -0.00110000000000000007 < t < 1.90000000000000001e-48Initial program 90.5%
Taylor expanded in a around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.0
Applied rewrites83.0%
if 1.90000000000000001e-48 < t Initial program 53.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites77.4%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma t (/ x a) x)))
(if (<= a -1.05e+57)
t_1
(if (<= a 1.5e-221)
(/ (* z (- x y)) t)
(if (<= a 5e+43) (+ x (- y x)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(t, (x / a), x);
double tmp;
if (a <= -1.05e+57) {
tmp = t_1;
} else if (a <= 1.5e-221) {
tmp = (z * (x - y)) / t;
} else if (a <= 5e+43) {
tmp = x + (y - x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(t, Float64(x / a), x) tmp = 0.0 if (a <= -1.05e+57) tmp = t_1; elseif (a <= 1.5e-221) tmp = Float64(Float64(z * Float64(x - y)) / t); elseif (a <= 5e+43) tmp = Float64(x + Float64(y - x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(x / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.05e+57], t$95$1, If[LessEqual[a, 1.5e-221], N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 5e+43], N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \frac{x}{a}, x\right)\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-221}:\\
\;\;\;\;\frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+43}:\\
\;\;\;\;x + \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.04999999999999995e57 or 5.0000000000000004e43 < a Initial program 63.2%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6474.0
Applied rewrites74.0%
Taylor expanded in y around 0
Applied rewrites50.4%
Taylor expanded in z around 0
Applied rewrites37.7%
if -1.04999999999999995e57 < a < 1.5000000000000001e-221Initial program 75.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.7%
Taylor expanded in z around inf
Applied rewrites45.4%
if 1.5000000000000001e-221 < a < 5.0000000000000004e43Initial program 65.3%
Taylor expanded in t around inf
lower--.f6439.5
Applied rewrites39.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -0.0011)
(+ y (* (- y x) (/ (- a z) t)))
(if (<= t 1.9e-48)
(fma (- z t) (/ (- y x) a) x)
(fma (- x y) (/ (- z a) t) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -0.0011) {
tmp = y + ((y - x) * ((a - z) / t));
} else if (t <= 1.9e-48) {
tmp = fma((z - t), ((y - x) / a), x);
} else {
tmp = fma((x - y), ((z - a) / t), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -0.0011) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); elseif (t <= 1.9e-48) tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x); else tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -0.0011], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-48], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0011:\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-48}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\end{array}
\end{array}
if t < -0.00110000000000000007Initial program 50.5%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lower-fma.f64N/A
lower-/.f6450.2
Applied rewrites50.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
distribute-rgt-out--N/A
associate-/l*N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
distribute-lft-out--N/A
associate-*r/N/A
lower-*.f64N/A
Applied rewrites80.3%
if -0.00110000000000000007 < t < 1.90000000000000001e-48Initial program 90.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
if 1.90000000000000001e-48 < t Initial program 53.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites77.4%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -0.0011)
t_1
(if (<= t 1.9e-48) (fma (- z t) (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -0.0011) {
tmp = t_1;
} else if (t <= 1.9e-48) {
tmp = fma((z - t), ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -0.0011) tmp = t_1; elseif (t <= 1.9e-48) tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -0.0011], t$95$1, If[LessEqual[t, 1.9e-48], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -0.0011:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-48}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.00110000000000000007 or 1.90000000000000001e-48 < t Initial program 52.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.8%
if -0.00110000000000000007 < t < 1.90000000000000001e-48Initial program 90.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -0.00041) t_1 (if (<= t 1.2e-39) (+ x (* (- y x) (/ z a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -0.00041) {
tmp = t_1;
} else if (t <= 1.2e-39) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -0.00041) tmp = t_1; elseif (t <= 1.2e-39) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -0.00041], t$95$1, If[LessEqual[t, 1.2e-39], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -0.00041:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-39}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.0999999999999999e-4 or 1.20000000000000008e-39 < t Initial program 51.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.0%
if -4.0999999999999999e-4 < t < 1.20000000000000008e-39Initial program 90.7%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6475.9
Applied rewrites75.9%
Applied rewrites82.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) (- z a) y))) (if (<= t -0.00041) t_1 (if (<= t 1.2e-39) (+ x (* (- y x) (/ z a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -0.00041) {
tmp = t_1;
} else if (t <= 1.2e-39) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -0.00041) tmp = t_1; elseif (t <= 1.2e-39) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -0.00041], t$95$1, If[LessEqual[t, 1.2e-39], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -0.00041:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-39}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.0999999999999999e-4 or 1.20000000000000008e-39 < t Initial program 51.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.0%
Taylor expanded in z around 0
Applied rewrites77.3%
if -4.0999999999999999e-4 < t < 1.20000000000000008e-39Initial program 90.7%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6475.9
Applied rewrites75.9%
Applied rewrites82.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y x))))
(if (<= t -112000000.0)
t_1
(if (<= t 2.1e-293) (/ (* y z) a) (if (<= t 3e-72) (* z (/ x z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -112000000.0) {
tmp = t_1;
} else if (t <= 2.1e-293) {
tmp = (y * z) / a;
} else if (t <= 3e-72) {
tmp = z * (x / z);
} 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)
if (t <= (-112000000.0d0)) then
tmp = t_1
else if (t <= 2.1d-293) then
tmp = (y * z) / a
else if (t <= 3d-72) then
tmp = z * (x / z)
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);
double tmp;
if (t <= -112000000.0) {
tmp = t_1;
} else if (t <= 2.1e-293) {
tmp = (y * z) / a;
} else if (t <= 3e-72) {
tmp = z * (x / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - x) tmp = 0 if t <= -112000000.0: tmp = t_1 elif t <= 2.1e-293: tmp = (y * z) / a elif t <= 3e-72: tmp = z * (x / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -112000000.0) tmp = t_1; elseif (t <= 2.1e-293) tmp = Float64(Float64(y * z) / a); elseif (t <= 3e-72) tmp = Float64(z * Float64(x / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - x); tmp = 0.0; if (t <= -112000000.0) tmp = t_1; elseif (t <= 2.1e-293) tmp = (y * z) / a; elseif (t <= 3e-72) tmp = z * (x / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -112000000.0], t$95$1, If[LessEqual[t, 2.1e-293], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 3e-72], N[(z * N[(x / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -112000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-293}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-72}:\\
\;\;\;\;z \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.12e8 or 3e-72 < t Initial program 52.7%
Taylor expanded in t around inf
lower--.f6429.7
Applied rewrites29.7%
if -1.12e8 < t < 2.10000000000000005e-293Initial program 88.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.2
Applied rewrites79.2%
Taylor expanded in z around inf
Applied rewrites53.5%
Taylor expanded in y around inf
Applied rewrites39.3%
if 2.10000000000000005e-293 < t < 3e-72Initial program 92.2%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites90.1%
Taylor expanded in a around inf
Applied rewrites35.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ z t) y))) (if (<= t -0.096) t_1 (if (<= t 1.2e-39) (+ x (* (- y x) (/ z a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -0.096) {
tmp = t_1;
} else if (t <= 1.2e-39) {
tmp = x + ((y - x) * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -0.096) tmp = t_1; elseif (t <= 1.2e-39) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -0.096], t$95$1, If[LessEqual[t, 1.2e-39], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -0.096:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-39}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.096000000000000002 or 1.20000000000000008e-39 < t Initial program 51.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.0%
Taylor expanded in z around inf
Applied rewrites68.0%
if -0.096000000000000002 < t < 1.20000000000000008e-39Initial program 90.7%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6475.9
Applied rewrites75.9%
Applied rewrites82.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ z t) y))) (if (<= t -0.06) t_1 (if (<= t 1.2e-39) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -0.06) {
tmp = t_1;
} else if (t <= 1.2e-39) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -0.06) tmp = t_1; elseif (t <= 1.2e-39) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -0.06], t$95$1, If[LessEqual[t, 1.2e-39], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -0.06:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.059999999999999998 or 1.20000000000000008e-39 < t Initial program 51.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.0%
Taylor expanded in z around inf
Applied rewrites68.0%
if -0.059999999999999998 < t < 1.20000000000000008e-39Initial program 90.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6481.7
Applied rewrites81.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ y z)))) (if (<= t -7e+144) t_1 (if (<= t 2.4e+111) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / z);
double tmp;
if (t <= -7e+144) {
tmp = t_1;
} else if (t <= 2.4e+111) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / z)) tmp = 0.0 if (t <= -7e+144) tmp = t_1; elseif (t <= 2.4e+111) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+144], t$95$1, If[LessEqual[t, 2.4e+111], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -7 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.9999999999999996e144 or 2.40000000000000006e111 < t Initial program 43.0%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites64.9%
Taylor expanded in t around inf
Applied rewrites40.9%
if -6.9999999999999996e144 < t < 2.40000000000000006e111Initial program 82.6%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6466.8
Applied rewrites66.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.7e+47) (* z (/ y z)) (if (<= t 1.02e-30) (fma t (/ x a) x) (+ x (- y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+47) {
tmp = z * (y / z);
} else if (t <= 1.02e-30) {
tmp = fma(t, (x / a), x);
} else {
tmp = x + (y - x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.7e+47) tmp = Float64(z * Float64(y / z)); elseif (t <= 1.02e-30) tmp = fma(t, Float64(x / a), x); else tmp = Float64(x + Float64(y - x)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+47], N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e-30], N[(t * N[(x / a), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+47}:\\
\;\;\;\;z \cdot \frac{y}{z}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-30}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right)\\
\end{array}
\end{array}
if t < -1.6999999999999999e47Initial program 48.6%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites73.8%
Taylor expanded in t around inf
Applied rewrites37.8%
if -1.6999999999999999e47 < t < 1.0199999999999999e-30Initial program 88.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6478.6
Applied rewrites78.6%
Taylor expanded in y around 0
Applied rewrites54.9%
Taylor expanded in z around 0
Applied rewrites38.9%
if 1.0199999999999999e-30 < t Initial program 50.8%
Taylor expanded in t around inf
lower--.f6428.9
Applied rewrites28.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* z (/ y z)))) (if (<= t -3.5e+142) t_1 (if (<= t 5.4e+91) (/ (* y z) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / z);
double tmp;
if (t <= -3.5e+142) {
tmp = t_1;
} else if (t <= 5.4e+91) {
tmp = (y * z) / 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 = z * (y / z)
if (t <= (-3.5d+142)) then
tmp = t_1
else if (t <= 5.4d+91) then
tmp = (y * z) / 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 = z * (y / z);
double tmp;
if (t <= -3.5e+142) {
tmp = t_1;
} else if (t <= 5.4e+91) {
tmp = (y * z) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / z) tmp = 0 if t <= -3.5e+142: tmp = t_1 elif t <= 5.4e+91: tmp = (y * z) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / z)) tmp = 0.0 if (t <= -3.5e+142) tmp = t_1; elseif (t <= 5.4e+91) tmp = Float64(Float64(y * z) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / z); tmp = 0.0; if (t <= -3.5e+142) tmp = t_1; elseif (t <= 5.4e+91) tmp = (y * z) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e+142], t$95$1, If[LessEqual[t, 5.4e+91], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{z}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+91}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.49999999999999997e142 or 5.4e91 < t Initial program 44.5%
Taylor expanded in z around inf
sub-negN/A
associate-+r+N/A
associate-+l+N/A
Applied rewrites64.3%
Taylor expanded in t around inf
Applied rewrites40.3%
if -3.49999999999999997e142 < t < 5.4e91Initial program 82.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6469.6
Applied rewrites69.6%
Taylor expanded in z around inf
Applied rewrites40.5%
Taylor expanded in y around inf
Applied rewrites27.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (- y x)))) (if (<= t -112000000.0) t_1 (if (<= t 7.5e+46) (/ (* y z) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - x);
double tmp;
if (t <= -112000000.0) {
tmp = t_1;
} else if (t <= 7.5e+46) {
tmp = (y * z) / 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 = x + (y - x)
if (t <= (-112000000.0d0)) then
tmp = t_1
else if (t <= 7.5d+46) then
tmp = (y * z) / 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 = x + (y - x);
double tmp;
if (t <= -112000000.0) {
tmp = t_1;
} else if (t <= 7.5e+46) {
tmp = (y * z) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - x) tmp = 0 if t <= -112000000.0: tmp = t_1 elif t <= 7.5e+46: tmp = (y * z) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - x)) tmp = 0.0 if (t <= -112000000.0) tmp = t_1; elseif (t <= 7.5e+46) tmp = Float64(Float64(y * z) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - x); tmp = 0.0; if (t <= -112000000.0) tmp = t_1; elseif (t <= 7.5e+46) tmp = (y * z) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -112000000.0], t$95$1, If[LessEqual[t, 7.5e+46], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right)\\
\mathbf{if}\;t \leq -112000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+46}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.12e8 or 7.5000000000000003e46 < t Initial program 46.7%
Taylor expanded in t around inf
lower--.f6432.0
Applied rewrites32.0%
if -1.12e8 < t < 7.5000000000000003e46Initial program 87.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.2
Applied rewrites75.2%
Taylor expanded in z around inf
Applied rewrites44.9%
Taylor expanded in y around inf
Applied rewrites30.6%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.15e+118) (+ x (- y x)) (/ (* x t) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.15e+118) {
tmp = x + (y - x);
} else {
tmp = (x * 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 (x <= 1.15d+118) then
tmp = x + (y - x)
else
tmp = (x * 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 (x <= 1.15e+118) {
tmp = x + (y - x);
} else {
tmp = (x * t) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.15e+118: tmp = x + (y - x) else: tmp = (x * t) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.15e+118) tmp = Float64(x + Float64(y - x)); else tmp = Float64(Float64(x * t) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.15e+118) tmp = x + (y - x); else tmp = (x * t) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.15e+118], N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision], N[(N[(x * t), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{+118}:\\
\;\;\;\;x + \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot t}{a}\\
\end{array}
\end{array}
if x < 1.15000000000000008e118Initial program 71.4%
Taylor expanded in t around inf
lower--.f6421.8
Applied rewrites21.8%
if 1.15000000000000008e118 < x Initial program 54.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.3
Applied rewrites58.3%
Taylor expanded in t around inf
Applied rewrites19.3%
Taylor expanded in y around 0
Applied rewrites21.9%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.15e+118) (+ x (- y x)) (* x (/ t a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.15e+118) {
tmp = x + (y - x);
} else {
tmp = x * (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 (x <= 1.15d+118) then
tmp = x + (y - x)
else
tmp = x * (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 (x <= 1.15e+118) {
tmp = x + (y - x);
} else {
tmp = x * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.15e+118: tmp = x + (y - x) else: tmp = x * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.15e+118) tmp = Float64(x + Float64(y - x)); else tmp = Float64(x * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.15e+118) tmp = x + (y - x); else tmp = x * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.15e+118], N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision], N[(x * N[(t / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.15 \cdot 10^{+118}:\\
\;\;\;\;x + \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{t}{a}\\
\end{array}
\end{array}
if x < 1.15000000000000008e118Initial program 71.4%
Taylor expanded in t around inf
lower--.f6421.8
Applied rewrites21.8%
if 1.15000000000000008e118 < x Initial program 54.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.3
Applied rewrites58.3%
Taylor expanded in t around inf
Applied rewrites19.3%
Taylor expanded in y around 0
Applied rewrites21.9%
Applied rewrites19.6%
Final simplification21.5%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.06e+118) (+ x (- y x)) (* t (/ x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.06e+118) {
tmp = x + (y - x);
} else {
tmp = t * (x / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= 1.06d+118) then
tmp = x + (y - x)
else
tmp = t * (x / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.06e+118) {
tmp = x + (y - x);
} else {
tmp = t * (x / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.06e+118: tmp = x + (y - x) else: tmp = t * (x / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 1.06e+118) tmp = Float64(x + Float64(y - x)); else tmp = Float64(t * Float64(x / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 1.06e+118) tmp = x + (y - x); else tmp = t * (x / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 1.06e+118], N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.06 \cdot 10^{+118}:\\
\;\;\;\;x + \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{a}\\
\end{array}
\end{array}
if x < 1.06e118Initial program 71.4%
Taylor expanded in t around inf
lower--.f6421.8
Applied rewrites21.8%
if 1.06e118 < x Initial program 54.5%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.3
Applied rewrites58.3%
Taylor expanded in t around inf
Applied rewrites19.3%
Taylor expanded in y around 0
Applied rewrites21.9%
Applied rewrites19.5%
(FPCore (x y z t a) :precision binary64 (+ x (- y x)))
double code(double x, double y, double z, double t, double a) {
return x + (y - 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 + (y - x)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y - x);
}
def code(x, y, z, t, a): return x + (y - x)
function code(x, y, z, t, a) return Float64(x + Float64(y - x)) end
function tmp = code(x, y, z, t, a) tmp = x + (y - x); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right)
\end{array}
Initial program 68.7%
Taylor expanded in t around inf
lower--.f6419.5
Applied rewrites19.5%
(FPCore (x y z t a) :precision binary64 (+ x (- x)))
double code(double x, double y, double z, double t, double a) {
return x + -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 + -x
end function
public static double code(double x, double y, double z, double t, double a) {
return x + -x;
}
def code(x, y, z, t, a): return x + -x
function code(x, y, z, t, a) return Float64(x + Float64(-x)) end
function tmp = code(x, y, z, t, a) tmp = x + -x; end
code[x_, y_, z_, t_, a_] := N[(x + (-x)), $MachinePrecision]
\begin{array}{l}
\\
x + \left(-x\right)
\end{array}
Initial program 68.7%
Taylor expanded in t around inf
lower--.f6419.5
Applied rewrites19.5%
Taylor expanded in y around 0
Applied rewrites2.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 2024222
(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))))