
(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 21 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
(if (<= t -7.2e+122)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 2.4e+146)
(+ (/ (- y x) (/ (- a t) (- z t))) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.2e+122) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 2.4e+146) {
tmp = ((y - x) / ((a - t) / (z - t))) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.2e+122) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 2.4e+146) tmp = Float64(Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t))) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.2e+122], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 2.4e+146], N[(N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+146}:\\
\;\;\;\;\frac{y - x}{\frac{a - t}{z - t}} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -7.2000000000000005e122Initial program 30.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites89.5%
Applied rewrites89.6%
if -7.2000000000000005e122 < t < 2.4000000000000002e146Initial program 83.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6492.9
Applied rewrites92.9%
if 2.4000000000000002e146 < t Initial program 27.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites95.5%
Final simplification92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) z) t)))
(if (<= t -2.45e+138)
(* (/ (- z a) t) x)
(if (<= t -1.1e-82)
t_1
(if (<= t 2.6e-73)
(* (/ z a) (- y x))
(if (<= t 3.2e+164) t_1 (+ (- y x) x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * z) / t;
double tmp;
if (t <= -2.45e+138) {
tmp = ((z - a) / t) * x;
} else if (t <= -1.1e-82) {
tmp = t_1;
} else if (t <= 2.6e-73) {
tmp = (z / a) * (y - x);
} else if (t <= 3.2e+164) {
tmp = t_1;
} else {
tmp = (y - x) + 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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * z) / t
if (t <= (-2.45d+138)) then
tmp = ((z - a) / t) * x
else if (t <= (-1.1d-82)) then
tmp = t_1
else if (t <= 2.6d-73) then
tmp = (z / a) * (y - x)
else if (t <= 3.2d+164) then
tmp = t_1
else
tmp = (y - x) + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * z) / t;
double tmp;
if (t <= -2.45e+138) {
tmp = ((z - a) / t) * x;
} else if (t <= -1.1e-82) {
tmp = t_1;
} else if (t <= 2.6e-73) {
tmp = (z / a) * (y - x);
} else if (t <= 3.2e+164) {
tmp = t_1;
} else {
tmp = (y - x) + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * z) / t tmp = 0 if t <= -2.45e+138: tmp = ((z - a) / t) * x elif t <= -1.1e-82: tmp = t_1 elif t <= 2.6e-73: tmp = (z / a) * (y - x) elif t <= 3.2e+164: tmp = t_1 else: tmp = (y - x) + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * z) / t) tmp = 0.0 if (t <= -2.45e+138) tmp = Float64(Float64(Float64(z - a) / t) * x); elseif (t <= -1.1e-82) tmp = t_1; elseif (t <= 2.6e-73) tmp = Float64(Float64(z / a) * Float64(y - x)); elseif (t <= 3.2e+164) tmp = t_1; else tmp = Float64(Float64(y - x) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - y) * z) / t; tmp = 0.0; if (t <= -2.45e+138) tmp = ((z - a) / t) * x; elseif (t <= -1.1e-82) tmp = t_1; elseif (t <= 2.6e-73) tmp = (z / a) * (y - x); elseif (t <= 3.2e+164) tmp = t_1; else tmp = (y - x) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -2.45e+138], N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, -1.1e-82], t$95$1, If[LessEqual[t, 2.6e-73], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+164], t$95$1, N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+138}:\\
\;\;\;\;\frac{z - a}{t} \cdot x\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-73}:\\
\;\;\;\;\frac{z}{a} \cdot \left(y - x\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) + x\\
\end{array}
\end{array}
if t < -2.44999999999999992e138Initial program 22.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.3%
Taylor expanded in y around 0
Applied rewrites23.3%
Applied rewrites34.7%
if -2.44999999999999992e138 < t < -1.09999999999999993e-82 or 2.6000000000000001e-73 < t < 3.1999999999999998e164Initial program 75.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites63.1%
Taylor expanded in z around inf
Applied rewrites41.3%
if -1.09999999999999993e-82 < t < 2.6000000000000001e-73Initial program 90.7%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in a around inf
Applied rewrites48.4%
if 3.1999999999999998e164 < t Initial program 28.9%
Taylor expanded in t around inf
lower--.f6449.2
Applied rewrites49.2%
Final simplification44.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+29)
(fma (- x y) (/ z t) y)
(if (<= t 2.1e-21)
(fma (/ (- y x) a) z x)
(if (<= t 2.4e+110) (* (/ y (- a t)) (- z t)) (fma (/ x t) (- z a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+29) {
tmp = fma((x - y), (z / t), y);
} else if (t <= 2.1e-21) {
tmp = fma(((y - x) / a), z, x);
} else if (t <= 2.4e+110) {
tmp = (y / (a - t)) * (z - t);
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+29) tmp = fma(Float64(x - y), Float64(z / t), y); elseif (t <= 2.1e-21) tmp = fma(Float64(Float64(y - x) / a), z, x); elseif (t <= 2.4e+110) tmp = Float64(Float64(y / Float64(a - t)) * Float64(z - t)); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+29], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 2.1e-21], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 2.4e+110], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+110}:\\
\;\;\;\;\frac{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -6.1999999999999998e29Initial program 40.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.1%
Applied rewrites87.1%
Taylor expanded in a around 0
Applied rewrites85.6%
if -6.1999999999999998e29 < t < 2.10000000000000013e-21Initial program 90.9%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6479.9
Applied rewrites79.9%
if 2.10000000000000013e-21 < t < 2.40000000000000012e110Initial program 71.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6468.8
Applied rewrites68.8%
if 2.40000000000000012e110 < t Initial program 32.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites94.1%
Taylor expanded in y around 0
Applied rewrites89.8%
Final simplification81.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.7e+65)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 1.05e+54)
(+ (/ (* (- z t) (- y x)) (- a t)) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+65) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 1.05e+54) {
tmp = (((z - t) * (y - x)) / (a - t)) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.7e+65) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 1.05e+54) tmp = Float64(Float64(Float64(Float64(z - t) * Float64(y - x)) / Float64(a - t)) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+65], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 1.05e+54], N[(N[(N[(N[(z - t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.7e65Initial program 36.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.8%
Applied rewrites87.8%
if -1.7e65 < t < 1.04999999999999993e54Initial program 89.6%
if 1.04999999999999993e54 < t Initial program 38.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.2%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+29)
(fma (- x y) (/ z t) y)
(if (<= t 2.9e-22)
(fma (/ (- y x) a) z x)
(if (<= t 8e+223) (fma (/ (- x y) t) z y) (fma (/ x t) (- z a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+29) {
tmp = fma((x - y), (z / t), y);
} else if (t <= 2.9e-22) {
tmp = fma(((y - x) / a), z, x);
} else if (t <= 8e+223) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+29) tmp = fma(Float64(x - y), Float64(z / t), y); elseif (t <= 2.9e-22) tmp = fma(Float64(Float64(y - x) / a), z, x); elseif (t <= 8e+223) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+29], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 2.9e-22], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 8e+223], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+223}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -6.1999999999999998e29Initial program 40.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.1%
Applied rewrites87.1%
Taylor expanded in a around 0
Applied rewrites85.6%
if -6.1999999999999998e29 < t < 2.9000000000000002e-22Initial program 91.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.5
Applied rewrites80.5%
if 2.9000000000000002e-22 < t < 8.00000000000000037e223Initial program 55.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.9%
Taylor expanded in a around 0
Applied rewrites73.8%
if 8.00000000000000037e223 < t Initial program 26.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites96.0%
Taylor expanded in y around 0
Applied rewrites95.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.1e-82)
(fma (- x y) (/ z t) y)
(if (<= t 5e-73)
(* (/ z a) (- y x))
(if (<= t 8e+223) (fma (/ (- x y) t) z y) (fma (/ x t) (- z a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e-82) {
tmp = fma((x - y), (z / t), y);
} else if (t <= 5e-73) {
tmp = (z / a) * (y - x);
} else if (t <= 8e+223) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e-82) tmp = fma(Float64(x - y), Float64(z / t), y); elseif (t <= 5e-73) tmp = Float64(Float64(z / a) * Float64(y - x)); elseif (t <= 8e+223) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e-82], N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 5e-73], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+223], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-82}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-73}:\\
\;\;\;\;\frac{z}{a} \cdot \left(y - x\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+223}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.09999999999999993e-82Initial program 55.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites73.1%
Applied rewrites73.1%
Taylor expanded in a around 0
Applied rewrites71.9%
if -1.09999999999999993e-82 < t < 4.9999999999999998e-73Initial program 90.7%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in a around inf
Applied rewrites48.4%
if 4.9999999999999998e-73 < t < 8.00000000000000037e223Initial program 58.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites73.6%
Taylor expanded in a around 0
Applied rewrites70.8%
if 8.00000000000000037e223 < t Initial program 26.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites96.0%
Taylor expanded in y around 0
Applied rewrites95.8%
Final simplification65.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) z y)))
(if (<= t -1.1e-82)
t_1
(if (<= t 5e-73)
(* (/ z a) (- y x))
(if (<= t 8e+223) t_1 (fma (/ x t) (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -1.1e-82) {
tmp = t_1;
} else if (t <= 5e-73) {
tmp = (z / a) * (y - x);
} else if (t <= 8e+223) {
tmp = t_1;
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -1.1e-82) tmp = t_1; elseif (t <= 5e-73) tmp = Float64(Float64(z / a) * Float64(y - x)); elseif (t <= 8e+223) tmp = t_1; else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -1.1e-82], t$95$1, If[LessEqual[t, 5e-73], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+223], t$95$1, N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-73}:\\
\;\;\;\;\frac{z}{a} \cdot \left(y - x\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.09999999999999993e-82 or 4.9999999999999998e-73 < t < 8.00000000000000037e223Initial program 56.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites73.3%
Taylor expanded in a around 0
Applied rewrites70.7%
if -1.09999999999999993e-82 < t < 4.9999999999999998e-73Initial program 90.7%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in a around inf
Applied rewrites48.4%
if 8.00000000000000037e223 < t Initial program 26.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites96.0%
Taylor expanded in y around 0
Applied rewrites95.8%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7e+29)
(* (/ x t) (- z a))
(if (<= t 2.6e-73)
(/ (* (- y x) z) a)
(if (<= t 3.2e+164) (/ (* (- x y) z) t) (+ (- y x) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+29) {
tmp = (x / t) * (z - a);
} else if (t <= 2.6e-73) {
tmp = ((y - x) * z) / a;
} else if (t <= 3.2e+164) {
tmp = ((x - y) * z) / t;
} else {
tmp = (y - x) + 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 (t <= (-7d+29)) then
tmp = (x / t) * (z - a)
else if (t <= 2.6d-73) then
tmp = ((y - x) * z) / a
else if (t <= 3.2d+164) then
tmp = ((x - y) * z) / t
else
tmp = (y - x) + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+29) {
tmp = (x / t) * (z - a);
} else if (t <= 2.6e-73) {
tmp = ((y - x) * z) / a;
} else if (t <= 3.2e+164) {
tmp = ((x - y) * z) / t;
} else {
tmp = (y - x) + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7e+29: tmp = (x / t) * (z - a) elif t <= 2.6e-73: tmp = ((y - x) * z) / a elif t <= 3.2e+164: tmp = ((x - y) * z) / t else: tmp = (y - x) + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e+29) tmp = Float64(Float64(x / t) * Float64(z - a)); elseif (t <= 2.6e-73) tmp = Float64(Float64(Float64(y - x) * z) / a); elseif (t <= 3.2e+164) tmp = Float64(Float64(Float64(x - y) * z) / t); else tmp = Float64(Float64(y - x) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7e+29) tmp = (x / t) * (z - a); elseif (t <= 2.6e-73) tmp = ((y - x) * z) / a; elseif (t <= 3.2e+164) tmp = ((x - y) * z) / t; else tmp = (y - x) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+29], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e-73], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 3.2e+164], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{t} \cdot \left(z - a\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-73}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+164}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) + x\\
\end{array}
\end{array}
if t < -6.99999999999999958e29Initial program 40.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.1%
Taylor expanded in y around 0
Applied rewrites28.7%
Applied rewrites37.6%
if -6.99999999999999958e29 < t < 2.6000000000000001e-73Initial program 90.8%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.2
Applied rewrites55.2%
Taylor expanded in a around inf
Applied rewrites42.4%
if 2.6000000000000001e-73 < t < 3.1999999999999998e164Initial program 69.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites65.3%
Taylor expanded in z around inf
Applied rewrites35.9%
if 3.1999999999999998e164 < t Initial program 28.9%
Taylor expanded in t around inf
lower--.f6449.2
Applied rewrites49.2%
Final simplification41.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ x t) (- z a))))
(if (<= t -7e+29)
t_1
(if (<= t 1.4e-65)
(/ (* (- y x) z) a)
(if (<= t 3.9e+166) t_1 (+ (- y x) x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x / t) * (z - a);
double tmp;
if (t <= -7e+29) {
tmp = t_1;
} else if (t <= 1.4e-65) {
tmp = ((y - x) * z) / a;
} else if (t <= 3.9e+166) {
tmp = t_1;
} else {
tmp = (y - x) + 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) :: t_1
real(8) :: tmp
t_1 = (x / t) * (z - a)
if (t <= (-7d+29)) then
tmp = t_1
else if (t <= 1.4d-65) then
tmp = ((y - x) * z) / a
else if (t <= 3.9d+166) then
tmp = t_1
else
tmp = (y - x) + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x / t) * (z - a);
double tmp;
if (t <= -7e+29) {
tmp = t_1;
} else if (t <= 1.4e-65) {
tmp = ((y - x) * z) / a;
} else if (t <= 3.9e+166) {
tmp = t_1;
} else {
tmp = (y - x) + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x / t) * (z - a) tmp = 0 if t <= -7e+29: tmp = t_1 elif t <= 1.4e-65: tmp = ((y - x) * z) / a elif t <= 3.9e+166: tmp = t_1 else: tmp = (y - x) + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x / t) * Float64(z - a)) tmp = 0.0 if (t <= -7e+29) tmp = t_1; elseif (t <= 1.4e-65) tmp = Float64(Float64(Float64(y - x) * z) / a); elseif (t <= 3.9e+166) tmp = t_1; else tmp = Float64(Float64(y - x) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x / t) * (z - a); tmp = 0.0; if (t <= -7e+29) tmp = t_1; elseif (t <= 1.4e-65) tmp = ((y - x) * z) / a; elseif (t <= 3.9e+166) tmp = t_1; else tmp = (y - x) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+29], t$95$1, If[LessEqual[t, 1.4e-65], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 3.9e+166], t$95$1, N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t} \cdot \left(z - a\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-65}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) + x\\
\end{array}
\end{array}
if t < -6.99999999999999958e29 or 1.4e-65 < t < 3.89999999999999991e166Initial program 53.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites77.9%
Taylor expanded in y around 0
Applied rewrites29.6%
Applied rewrites35.5%
if -6.99999999999999958e29 < t < 1.4e-65Initial program 90.9%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.8
Applied rewrites54.8%
Taylor expanded in a around inf
Applied rewrites42.0%
if 3.89999999999999991e166 < t Initial program 28.9%
Taylor expanded in t around inf
lower--.f6449.2
Applied rewrites49.2%
Final simplification40.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.65e+34)
(fma (- x y) (/ (- z a) t) y)
(if (<= t 3.9e-7)
(+ (/ (* (- y x) z) (- a t)) x)
(fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.65e+34) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 3.9e-7) {
tmp = (((y - x) * z) / (a - t)) + x;
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.65e+34) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 3.9e-7) tmp = Float64(Float64(Float64(Float64(y - x) * z) / Float64(a - t)) + x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.65e+34], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 3.9e-7], N[(N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-7}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -1.64999999999999994e34Initial program 39.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites86.8%
Applied rewrites86.8%
if -1.64999999999999994e34 < t < 3.90000000000000025e-7Initial program 91.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower--.f6484.6
Applied rewrites84.6%
if 3.90000000000000025e-7 < t Initial program 44.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.5%
Final simplification84.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -6e+29) (fma (- x y) (/ (- z a) t) y) (if (<= t 2.9e-22) (fma (/ (- y x) a) z x) (fma (/ (- x y) t) (- z a) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+29) {
tmp = fma((x - y), ((z - a) / t), y);
} else if (t <= 2.9e-22) {
tmp = fma(((y - x) / a), z, x);
} else {
tmp = fma(((x - y) / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+29) tmp = fma(Float64(x - y), Float64(Float64(z - a) / t), y); elseif (t <= 2.9e-22) tmp = fma(Float64(Float64(y - x) / a), z, x); else tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+29], N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 2.9e-22], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+29}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -5.9999999999999998e29Initial program 40.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.1%
Applied rewrites87.1%
if -5.9999999999999998e29 < t < 2.9000000000000002e-22Initial program 91.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.5
Applied rewrites80.5%
if 2.9000000000000002e-22 < t Initial program 47.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -6e+29) t_1 (if (<= t 2.9e-22) (fma (/ (- y x) a) z 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 <= -6e+29) {
tmp = t_1;
} else if (t <= 2.9e-22) {
tmp = fma(((y - x) / a), z, 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 <= -6e+29) tmp = t_1; elseif (t <= 2.9e-22) tmp = fma(Float64(Float64(y - x) / a), z, 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, -6e+29], t$95$1, If[LessEqual[t, 2.9e-22], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + 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 -6 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.9999999999999998e29 or 2.9000000000000002e-22 < t Initial program 44.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites84.2%
Applied rewrites83.6%
if -5.9999999999999998e29 < t < 2.9000000000000002e-22Initial program 91.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6480.5
Applied rewrites80.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z t) x)))
(if (<= x -2.2e+66)
t_1
(if (<= x 2.5e-305)
(* (/ z a) y)
(if (<= x 3.8e+67) (+ (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * x;
double tmp;
if (x <= -2.2e+66) {
tmp = t_1;
} else if (x <= 2.5e-305) {
tmp = (z / a) * y;
} else if (x <= 3.8e+67) {
tmp = (y - x) + 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 = (z / t) * x
if (x <= (-2.2d+66)) then
tmp = t_1
else if (x <= 2.5d-305) then
tmp = (z / a) * y
else if (x <= 3.8d+67) then
tmp = (y - x) + 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 = (z / t) * x;
double tmp;
if (x <= -2.2e+66) {
tmp = t_1;
} else if (x <= 2.5e-305) {
tmp = (z / a) * y;
} else if (x <= 3.8e+67) {
tmp = (y - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / t) * x tmp = 0 if x <= -2.2e+66: tmp = t_1 elif x <= 2.5e-305: tmp = (z / a) * y elif x <= 3.8e+67: tmp = (y - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / t) * x) tmp = 0.0 if (x <= -2.2e+66) tmp = t_1; elseif (x <= 2.5e-305) tmp = Float64(Float64(z / a) * y); elseif (x <= 3.8e+67) tmp = Float64(Float64(y - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / t) * x; tmp = 0.0; if (x <= -2.2e+66) tmp = t_1; elseif (x <= 2.5e-305) tmp = (z / a) * y; elseif (x <= 3.8e+67) tmp = (y - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -2.2e+66], t$95$1, If[LessEqual[x, 2.5e-305], N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 3.8e+67], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{t} \cdot x\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-305}:\\
\;\;\;\;\frac{z}{a} \cdot y\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+67}:\\
\;\;\;\;\left(y - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.1999999999999998e66 or 3.8000000000000002e67 < x Initial program 62.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites62.0%
Taylor expanded in y around 0
Applied rewrites37.7%
Applied rewrites44.6%
Taylor expanded in a around 0
Applied rewrites43.3%
if -2.1999999999999998e66 < x < 2.49999999999999993e-305Initial program 72.9%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6462.1
Applied rewrites62.1%
Applied rewrites61.5%
Taylor expanded in t around 0
Applied rewrites27.9%
if 2.49999999999999993e-305 < x < 3.8000000000000002e67Initial program 64.6%
Taylor expanded in t around inf
lower--.f6431.6
Applied rewrites31.6%
Final simplification34.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z t) x)))
(if (<= x -2.2e+66)
t_1
(if (<= x -9.5e-202)
(* (/ y a) z)
(if (<= x 3.8e+67) (+ (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * x;
double tmp;
if (x <= -2.2e+66) {
tmp = t_1;
} else if (x <= -9.5e-202) {
tmp = (y / a) * z;
} else if (x <= 3.8e+67) {
tmp = (y - x) + 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 = (z / t) * x
if (x <= (-2.2d+66)) then
tmp = t_1
else if (x <= (-9.5d-202)) then
tmp = (y / a) * z
else if (x <= 3.8d+67) then
tmp = (y - x) + 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 = (z / t) * x;
double tmp;
if (x <= -2.2e+66) {
tmp = t_1;
} else if (x <= -9.5e-202) {
tmp = (y / a) * z;
} else if (x <= 3.8e+67) {
tmp = (y - x) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / t) * x tmp = 0 if x <= -2.2e+66: tmp = t_1 elif x <= -9.5e-202: tmp = (y / a) * z elif x <= 3.8e+67: tmp = (y - x) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / t) * x) tmp = 0.0 if (x <= -2.2e+66) tmp = t_1; elseif (x <= -9.5e-202) tmp = Float64(Float64(y / a) * z); elseif (x <= 3.8e+67) tmp = Float64(Float64(y - x) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / t) * x; tmp = 0.0; if (x <= -2.2e+66) tmp = t_1; elseif (x <= -9.5e-202) tmp = (y / a) * z; elseif (x <= 3.8e+67) tmp = (y - x) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -2.2e+66], t$95$1, If[LessEqual[x, -9.5e-202], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 3.8e+67], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{t} \cdot x\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-202}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+67}:\\
\;\;\;\;\left(y - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.1999999999999998e66 or 3.8000000000000002e67 < x Initial program 62.1%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites62.0%
Taylor expanded in y around 0
Applied rewrites37.7%
Applied rewrites44.6%
Taylor expanded in a around 0
Applied rewrites43.3%
if -2.1999999999999998e66 < x < -9.5000000000000001e-202Initial program 65.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6458.8
Applied rewrites58.8%
Taylor expanded in t around 0
Applied rewrites19.8%
Applied rewrites26.6%
if -9.5000000000000001e-202 < x < 3.8000000000000002e67Initial program 70.4%
Taylor expanded in t around inf
lower--.f6430.6
Applied rewrites30.6%
Final simplification34.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -1.1e-82) t_1 (if (<= t 5e-73) (* (/ z a) (- y x)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -1.1e-82) {
tmp = t_1;
} else if (t <= 5e-73) {
tmp = (z / a) * (y - x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -1.1e-82) tmp = t_1; elseif (t <= 5e-73) tmp = Float64(Float64(z / a) * Float64(y - x)); 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] * z + y), $MachinePrecision]}, If[LessEqual[t, -1.1e-82], t$95$1, If[LessEqual[t, 5e-73], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-73}:\\
\;\;\;\;\frac{z}{a} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.09999999999999993e-82 or 4.9999999999999998e-73 < t Initial program 52.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
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites76.6%
Taylor expanded in a around 0
Applied rewrites71.6%
if -1.09999999999999993e-82 < t < 4.9999999999999998e-73Initial program 90.7%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6456.1
Applied rewrites56.1%
Taylor expanded in a around inf
Applied rewrites48.4%
Final simplification63.2%
(FPCore (x y z t a) :precision binary64 (if (<= t -7e+29) (* (/ (- z a) t) x) (if (<= t 5e-8) (/ (* (- y x) z) a) (+ (- y x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+29) {
tmp = ((z - a) / t) * x;
} else if (t <= 5e-8) {
tmp = ((y - x) * z) / a;
} else {
tmp = (y - x) + 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 (t <= (-7d+29)) then
tmp = ((z - a) / t) * x
else if (t <= 5d-8) then
tmp = ((y - x) * z) / a
else
tmp = (y - x) + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+29) {
tmp = ((z - a) / t) * x;
} else if (t <= 5e-8) {
tmp = ((y - x) * z) / a;
} else {
tmp = (y - x) + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7e+29: tmp = ((z - a) / t) * x elif t <= 5e-8: tmp = ((y - x) * z) / a else: tmp = (y - x) + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e+29) tmp = Float64(Float64(Float64(z - a) / t) * x); elseif (t <= 5e-8) tmp = Float64(Float64(Float64(y - x) * z) / a); else tmp = Float64(Float64(y - x) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7e+29) tmp = ((z - a) / t) * x; elseif (t <= 5e-8) tmp = ((y - x) * z) / a; else tmp = (y - x) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+29], N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 5e-8], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+29}:\\
\;\;\;\;\frac{z - a}{t} \cdot x\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) + x\\
\end{array}
\end{array}
if t < -6.99999999999999958e29Initial program 40.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.1%
Taylor expanded in y around 0
Applied rewrites28.7%
Applied rewrites37.6%
if -6.99999999999999958e29 < t < 4.9999999999999998e-8Initial program 91.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.4
Applied rewrites55.4%
Taylor expanded in a around inf
Applied rewrites41.1%
if 4.9999999999999998e-8 < t Initial program 44.3%
Taylor expanded in t around inf
lower--.f6436.6
Applied rewrites36.6%
Final simplification39.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -8e+29) (* (/ z t) x) (if (<= t 5e-8) (/ (* (- y x) z) a) (+ (- y x) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+29) {
tmp = (z / t) * x;
} else if (t <= 5e-8) {
tmp = ((y - x) * z) / a;
} else {
tmp = (y - x) + 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 (t <= (-8d+29)) then
tmp = (z / t) * x
else if (t <= 5d-8) then
tmp = ((y - x) * z) / a
else
tmp = (y - x) + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+29) {
tmp = (z / t) * x;
} else if (t <= 5e-8) {
tmp = ((y - x) * z) / a;
} else {
tmp = (y - x) + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8e+29: tmp = (z / t) * x elif t <= 5e-8: tmp = ((y - x) * z) / a else: tmp = (y - x) + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e+29) tmp = Float64(Float64(z / t) * x); elseif (t <= 5e-8) tmp = Float64(Float64(Float64(y - x) * z) / a); else tmp = Float64(Float64(y - x) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8e+29) tmp = (z / t) * x; elseif (t <= 5e-8) tmp = ((y - x) * z) / a; else tmp = (y - x) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+29], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 5e-8], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / a), $MachinePrecision], N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+29}:\\
\;\;\;\;\frac{z}{t} \cdot x\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) + x\\
\end{array}
\end{array}
if t < -7.99999999999999931e29Initial program 40.9%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites87.1%
Taylor expanded in y around 0
Applied rewrites28.7%
Applied rewrites37.6%
Taylor expanded in a around 0
Applied rewrites35.8%
if -7.99999999999999931e29 < t < 4.9999999999999998e-8Initial program 91.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6455.4
Applied rewrites55.4%
Taylor expanded in a around inf
Applied rewrites41.1%
if 4.9999999999999998e-8 < t Initial program 44.3%
Taylor expanded in t around inf
lower--.f6436.6
Applied rewrites36.6%
Final simplification38.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- y x) x))) (if (<= t -2.5e+85) t_1 (if (<= t 2.65e-8) (/ (* z y) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) + x;
double tmp;
if (t <= -2.5e+85) {
tmp = t_1;
} else if (t <= 2.65e-8) {
tmp = (z * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - x) + x
if (t <= (-2.5d+85)) then
tmp = t_1
else if (t <= 2.65d-8) then
tmp = (z * y) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) + x;
double tmp;
if (t <= -2.5e+85) {
tmp = t_1;
} else if (t <= 2.65e-8) {
tmp = (z * y) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - x) + x tmp = 0 if t <= -2.5e+85: tmp = t_1 elif t <= 2.65e-8: tmp = (z * y) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - x) + x) tmp = 0.0 if (t <= -2.5e+85) tmp = t_1; elseif (t <= 2.65e-8) tmp = Float64(Float64(z * y) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - x) + x; tmp = 0.0; if (t <= -2.5e+85) tmp = t_1; elseif (t <= 2.65e-8) tmp = (z * y) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -2.5e+85], t$95$1, If[LessEqual[t, 2.65e-8], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) + x\\
\mathbf{if}\;t \leq -2.5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-8}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.5e85 or 2.6499999999999999e-8 < t Initial program 41.0%
Taylor expanded in t around inf
lower--.f6431.2
Applied rewrites31.2%
if -2.5e85 < t < 2.6499999999999999e-8Initial program 89.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6435.4
Applied rewrites35.4%
Taylor expanded in t around 0
Applied rewrites26.5%
Final simplification28.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ (- y x) x))) (if (<= t -2.45e+85) t_1 (if (<= t 2.65e-8) (* (/ y a) z) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) + x;
double tmp;
if (t <= -2.45e+85) {
tmp = t_1;
} else if (t <= 2.65e-8) {
tmp = (y / a) * 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 = (y - x) + x
if (t <= (-2.45d+85)) then
tmp = t_1
else if (t <= 2.65d-8) then
tmp = (y / a) * 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 = (y - x) + x;
double tmp;
if (t <= -2.45e+85) {
tmp = t_1;
} else if (t <= 2.65e-8) {
tmp = (y / a) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - x) + x tmp = 0 if t <= -2.45e+85: tmp = t_1 elif t <= 2.65e-8: tmp = (y / a) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - x) + x) tmp = 0.0 if (t <= -2.45e+85) tmp = t_1; elseif (t <= 2.65e-8) tmp = Float64(Float64(y / a) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - x) + x; tmp = 0.0; if (t <= -2.45e+85) tmp = t_1; elseif (t <= 2.65e-8) tmp = (y / a) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -2.45e+85], t$95$1, If[LessEqual[t, 2.65e-8], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) + x\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-8}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.4499999999999998e85 or 2.6499999999999999e-8 < t Initial program 41.0%
Taylor expanded in t around inf
lower--.f6431.2
Applied rewrites31.2%
if -2.4499999999999998e85 < t < 2.6499999999999999e-8Initial program 89.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6435.4
Applied rewrites35.4%
Taylor expanded in t around 0
Applied rewrites26.5%
Applied rewrites26.4%
Final simplification28.7%
(FPCore (x y z t a) :precision binary64 (+ (- y x) x))
double code(double x, double y, double z, double t, double a) {
return (y - 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 = (y - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y - x) + x;
}
def code(x, y, z, t, a): return (y - x) + x
function code(x, y, z, t, a) return Float64(Float64(y - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (y - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(y - x\right) + x
\end{array}
Initial program 66.3%
Taylor expanded in t around inf
lower--.f6418.9
Applied rewrites18.9%
Final simplification18.9%
(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(Float64(-x) + 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}
\\
\left(-x\right) + x
\end{array}
Initial program 66.3%
Taylor expanded in t around inf
lower--.f6418.9
Applied rewrites18.9%
Taylor expanded in y around 0
Applied rewrites2.8%
Final simplification2.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 2024244
(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))))