
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 (- INFINITY))
(- (* (* (/ (/ y c) z) -9.0) x))
(if (<= t_1 2e-15)
(/ (fma (fma (* x y) 9.0 b) (/ 1.0 z) (* (* a t) -4.0)) c)
(if (<= t_1 5e+185)
(fma -4.0 (* a (/ t c)) (/ (fma (* y x) 9.0 b) (* c z)))
(/
(- (* (fma (/ y z) -9.0 (- (/ (fma (* a t) -4.0 (/ b z)) x))) x))
c))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = -((((y / c) / z) * -9.0) * x);
} else if (t_1 <= 2e-15) {
tmp = fma(fma((x * y), 9.0, b), (1.0 / z), ((a * t) * -4.0)) / c;
} else if (t_1 <= 5e+185) {
tmp = fma(-4.0, (a * (t / c)), (fma((y * x), 9.0, b) / (c * z)));
} else {
tmp = -(fma((y / z), -9.0, -(fma((a * t), -4.0, (b / z)) / x)) * x) / c;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)); elseif (t_1 <= 2e-15) tmp = Float64(fma(fma(Float64(x * y), 9.0, b), Float64(1.0 / z), Float64(Float64(a * t) * -4.0)) / c); elseif (t_1 <= 5e+185) tmp = fma(-4.0, Float64(a * Float64(t / c)), Float64(fma(Float64(y * x), 9.0, b) / Float64(c * z))); else tmp = Float64(Float64(-Float64(fma(Float64(y / z), -9.0, Float64(-Float64(fma(Float64(a * t), -4.0, Float64(b / z)) / x))) * x)) / c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[t$95$1, 2e-15], N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] * N[(1.0 / z), $MachinePrecision] + N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 5e+185], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-N[(N[(N[(y / z), $MachinePrecision] * -9.0 + (-N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(b / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision])), $MachinePrecision] * x), $MachinePrecision]) / c), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-15}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot y, 9, b\right), \frac{1}{z}, \left(a \cdot t\right) \cdot -4\right)}{c}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+185}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-\mathsf{fma}\left(\frac{y}{z}, -9, -\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{x}\right) \cdot x}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 59.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.2
Applied rewrites81.2%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000002e-15Initial program 81.4%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites81.1%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6490.4
Applied rewrites90.4%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
+-commutativeN/A
mult-flipN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f6490.7
Applied rewrites90.7%
if 2.0000000000000002e-15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999999e185Initial program 83.8%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6487.8
Applied rewrites87.8%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6487.9
Applied rewrites87.9%
if 4.9999999999999999e185 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 73.2%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites71.6%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites81.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (* (* (/ (/ y c) z) -9.0) x))) (t_2 (* (* x 9.0) y)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 2e-15)
(/ (fma (fma (* x y) 9.0 b) (/ 1.0 z) (* (* a t) -4.0)) c)
(if (<= t_2 1e+281)
(fma -4.0 (* a (/ t c)) (/ (fma (* y x) 9.0 b) (* c z)))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -((((y / c) / z) * -9.0) * x);
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 2e-15) {
tmp = fma(fma((x * y), 9.0, b), (1.0 / z), ((a * t) * -4.0)) / c;
} else if (t_2 <= 1e+281) {
tmp = fma(-4.0, (a * (t / c)), (fma((y * x), 9.0, b) / (c * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 2e-15) tmp = Float64(fma(fma(Float64(x * y), 9.0, b), Float64(1.0 / z), Float64(Float64(a * t) * -4.0)) / c); elseif (t_2 <= 1e+281) tmp = fma(-4.0, Float64(a * Float64(t / c)), Float64(fma(Float64(y * x), 9.0, b) / Float64(c * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e-15], N[(N[(N[(N[(x * y), $MachinePrecision] * 9.0 + b), $MachinePrecision] * N[(1.0 / z), $MachinePrecision] + N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 1e+281], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-15}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot y, 9, b\right), \frac{1}{z}, \left(a \cdot t\right) \cdot -4\right)}{c}\\
\mathbf{elif}\;t\_2 \leq 10^{+281}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0 or 1e281 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 63.7%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.3
Applied rewrites81.3%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6489.2
Applied rewrites89.2%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000002e-15Initial program 81.4%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites81.1%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6490.4
Applied rewrites90.4%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
lift-fma.f64N/A
+-commutativeN/A
mult-flipN/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f6490.7
Applied rewrites90.7%
if 2.0000000000000002e-15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e281Initial program 83.4%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6487.5
Applied rewrites87.5%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6486.9
Applied rewrites86.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (* (* (/ (/ y c) z) -9.0) x)))
(t_2 (fma (* y x) 9.0 b))
(t_3 (* (* x 9.0) y)))
(if (<= t_3 (- INFINITY))
t_1
(if (<= t_3 2e-93)
(/ (fma (* a t) -4.0 (/ t_2 z)) c)
(if (<= t_3 1e+281) (fma -4.0 (* a (/ t c)) (/ t_2 (* c z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -((((y / c) / z) * -9.0) * x);
double t_2 = fma((y * x), 9.0, b);
double t_3 = (x * 9.0) * y;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_3 <= 2e-93) {
tmp = fma((a * t), -4.0, (t_2 / z)) / c;
} else if (t_3 <= 1e+281) {
tmp = fma(-4.0, (a * (t / c)), (t_2 / (c * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)) t_2 = fma(Float64(y * x), 9.0, b) t_3 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_1; elseif (t_3 <= 2e-93) tmp = Float64(fma(Float64(a * t), -4.0, Float64(t_2 / z)) / c); elseif (t_3 <= 1e+281) tmp = fma(-4.0, Float64(a * Float64(t / c)), Float64(t_2 / Float64(c * z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$1, If[LessEqual[t$95$3, 2e-93], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$3, 1e+281], N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
t_2 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_3 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-93}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{t\_2}{z}\right)}{c}\\
\mathbf{elif}\;t\_3 \leq 10^{+281}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{t\_2}{c \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0 or 1e281 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 63.7%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.3
Applied rewrites81.3%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6489.2
Applied rewrites89.2%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999998e-93Initial program 81.2%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites80.8%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6490.4
Applied rewrites90.4%
if 1.9999999999999998e-93 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e281Initial program 83.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6488.0
Applied rewrites88.0%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6487.4
Applied rewrites87.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (- (* (* (/ (/ y c) z) -9.0) x))) (t_2 (* (* x 9.0) y)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 1e+281)
(/ (fma (* a t) -4.0 (/ (fma (* y x) 9.0 b) z)) c)
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -((((y / c) / z) * -9.0) * x);
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 1e+281) {
tmp = fma((a * t), -4.0, (fma((y * x), 9.0, b) / z)) / c;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 1e+281) tmp = Float64(fma(Float64(a * t), -4.0, Float64(fma(Float64(y * x), 9.0, b) / z)) / c); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1e+281], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+281}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0 or 1e281 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 63.7%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.3
Applied rewrites81.3%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6489.2
Applied rewrites89.2%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e281Initial program 81.9%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites80.9%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6489.9
Applied rewrites89.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 (- INFINITY))
(- (* (* (/ (/ y c) z) -9.0) x))
(if (<= t_1 -2e-72)
(/ (fma (* a t) -4.0 (* (/ (* x y) z) 9.0)) c)
(if (<= t_1 2e+111)
(/ (fma (* -4.0 a) t (/ b z)) c)
(- (* (/ (- (* (/ y c) -9.0) (/ b (* c x))) z) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = -((((y / c) / z) * -9.0) * x);
} else if (t_1 <= -2e-72) {
tmp = fma((a * t), -4.0, (((x * y) / z) * 9.0)) / c;
} else if (t_1 <= 2e+111) {
tmp = fma((-4.0 * a), t, (b / z)) / c;
} else {
tmp = -(((((y / c) * -9.0) - (b / (c * x))) / z) * x);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)); elseif (t_1 <= -2e-72) tmp = Float64(fma(Float64(a * t), -4.0, Float64(Float64(Float64(x * y) / z) * 9.0)) / c); elseif (t_1 <= 2e+111) tmp = Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c); else tmp = Float64(-Float64(Float64(Float64(Float64(Float64(y / c) * -9.0) - Float64(b / Float64(c * x))) / z) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[t$95$1, -2e-72], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], (-N[(N[(N[(N[(N[(y / c), $MachinePrecision] * -9.0), $MachinePrecision] - N[(b / N[(c * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{x \cdot y}{z} \cdot 9\right)}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}}{z} \cdot x\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 59.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.2
Applied rewrites81.2%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-72Initial program 81.8%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites79.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6488.4
Applied rewrites88.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6471.1
Applied rewrites71.1%
if -1.9999999999999999e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.0%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites82.2%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6491.1
Applied rewrites91.1%
Taylor expanded in x around 0
lower-/.f6481.9
Applied rewrites81.9%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6482.0
Applied rewrites82.0%
if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.9%
Taylor expanded in z around 0
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6472.9
Applied rewrites72.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 (- INFINITY))
(- (* (* (/ (/ y c) z) -9.0) x))
(if (<= t_1 -2e-72)
(/ (fma (* a t) -4.0 (* (/ (* x y) z) 9.0)) c)
(if (<= t_1 4e+25)
(/ (fma (* -4.0 a) t (/ b z)) c)
(- (/ (* (- (* (/ y c) -9.0) (/ b (* c x))) x) z)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = -((((y / c) / z) * -9.0) * x);
} else if (t_1 <= -2e-72) {
tmp = fma((a * t), -4.0, (((x * y) / z) * 9.0)) / c;
} else if (t_1 <= 4e+25) {
tmp = fma((-4.0 * a), t, (b / z)) / c;
} else {
tmp = -(((((y / c) * -9.0) - (b / (c * x))) * x) / z);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)); elseif (t_1 <= -2e-72) tmp = Float64(fma(Float64(a * t), -4.0, Float64(Float64(Float64(x * y) / z) * 9.0)) / c); elseif (t_1 <= 4e+25) tmp = Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c); else tmp = Float64(-Float64(Float64(Float64(Float64(Float64(y / c) * -9.0) - Float64(b / Float64(c * x))) * x) / z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[t$95$1, -2e-72], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 4e+25], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], (-N[(N[(N[(N[(N[(y / c), $MachinePrecision] * -9.0), $MachinePrecision] - N[(b / N[(c * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{x \cdot y}{z} \cdot 9\right)}{c}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\left(\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}\right) \cdot x}{z}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 59.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.2
Applied rewrites81.2%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-72Initial program 81.8%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites79.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6488.4
Applied rewrites88.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6471.1
Applied rewrites71.1%
if -1.9999999999999999e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.00000000000000036e25Initial program 81.5%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites82.1%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6491.3
Applied rewrites91.3%
Taylor expanded in x around 0
lower-/.f6485.1
Applied rewrites85.1%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6485.2
Applied rewrites85.2%
if 4.00000000000000036e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 77.9%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.5%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6468.2
Applied rewrites68.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 (- INFINITY))
(- (* (* (/ (/ y c) z) -9.0) x))
(if (<= t_1 -2e-72)
(/ (fma (* a t) -4.0 (* (/ (* x y) z) 9.0)) c)
(if (<= t_1 2e+111)
(/ (fma (* -4.0 a) t (/ b z)) c)
(* (/ (* x 1.0) (* c (/ z y))) 9.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = -((((y / c) / z) * -9.0) * x);
} else if (t_1 <= -2e-72) {
tmp = fma((a * t), -4.0, (((x * y) / z) * 9.0)) / c;
} else if (t_1 <= 2e+111) {
tmp = fma((-4.0 * a), t, (b / z)) / c;
} else {
tmp = ((x * 1.0) / (c * (z / y))) * 9.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)); elseif (t_1 <= -2e-72) tmp = Float64(fma(Float64(a * t), -4.0, Float64(Float64(Float64(x * y) / z) * 9.0)) / c); elseif (t_1 <= 2e+111) tmp = Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c); else tmp = Float64(Float64(Float64(x * 1.0) / Float64(c * Float64(z / y))) * 9.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[t$95$1, -2e-72], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(x * 1.0), $MachinePrecision] / N[(c * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{x \cdot y}{z} \cdot 9\right)}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0Initial program 59.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6481.2
Applied rewrites81.2%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6491.5
Applied rewrites91.5%
if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-72Initial program 81.8%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites79.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6488.4
Applied rewrites88.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6471.1
Applied rewrites71.1%
if -1.9999999999999999e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.0%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites82.2%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6491.1
Applied rewrites91.1%
Taylor expanded in x around 0
lower-/.f6481.9
Applied rewrites81.9%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6482.0
Applied rewrites82.0%
if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites73.3%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6479.3
Applied rewrites79.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6467.5
Applied rewrites67.5%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
times-fracN/A
division-flipN/A
frac-timesN/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6468.7
Applied rewrites68.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 -5e+275)
(- (* (* (/ (/ y c) z) -9.0) x))
(if (<= t_1 -5e+25)
(/ (fma (* y x) 9.0 b) (* z c))
(if (<= t_1 2e+111)
(/ (fma (* -4.0 a) t (/ b z)) c)
(* (/ (* x 1.0) (* c (/ z y))) 9.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -5e+275) {
tmp = -((((y / c) / z) * -9.0) * x);
} else if (t_1 <= -5e+25) {
tmp = fma((y * x), 9.0, b) / (z * c);
} else if (t_1 <= 2e+111) {
tmp = fma((-4.0 * a), t, (b / z)) / c;
} else {
tmp = ((x * 1.0) / (c * (z / y))) * 9.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= -5e+275) tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)); elseif (t_1 <= -5e+25) tmp = Float64(fma(Float64(y * x), 9.0, b) / Float64(z * c)); elseif (t_1 <= 2e+111) tmp = Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c); else tmp = Float64(Float64(Float64(x * 1.0) / Float64(c * Float64(z / y))) * 9.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+275], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision]), If[LessEqual[t$95$1, -5e+25], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(x * 1.0), $MachinePrecision] / N[(c * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+275}:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.0000000000000003e275Initial program 62.6%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6479.1
Applied rewrites79.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6487.6
Applied rewrites87.6%
if -5.0000000000000003e275 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25Initial program 81.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.0%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites82.1%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6491.1
Applied rewrites91.1%
Taylor expanded in x around 0
lower-/.f6480.6
Applied rewrites80.6%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6480.7
Applied rewrites80.7%
if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites73.3%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6479.3
Applied rewrites79.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6467.5
Applied rewrites67.5%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
times-fracN/A
division-flipN/A
frac-timesN/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6468.7
Applied rewrites68.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)) (t_2 (- (* (* (/ (/ y c) z) -9.0) x))))
(if (<= t_1 -5e+275)
t_2
(if (<= t_1 -5e+25)
(/ (fma (* y x) 9.0 b) (* z c))
(if (<= t_1 2e+111) (/ (fma (* -4.0 a) t (/ b z)) c) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double t_2 = -((((y / c) / z) * -9.0) * x);
double tmp;
if (t_1 <= -5e+275) {
tmp = t_2;
} else if (t_1 <= -5e+25) {
tmp = fma((y * x), 9.0, b) / (z * c);
} else if (t_1 <= 2e+111) {
tmp = fma((-4.0 * a), t, (b / z)) / c;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) t_2 = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)) tmp = 0.0 if (t_1 <= -5e+275) tmp = t_2; elseif (t_1 <= -5e+25) tmp = Float64(fma(Float64(y * x), 9.0, b) / Float64(z * c)); elseif (t_1 <= 2e+111) tmp = Float64(fma(Float64(-4.0 * a), t, Float64(b / z)) / c); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])}, If[LessEqual[t$95$1, -5e+275], t$95$2, If[LessEqual[t$95$1, -5e+25], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.0000000000000003e275 or 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 71.4%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6471.0
Applied rewrites71.0%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6475.9
Applied rewrites75.9%
if -5.0000000000000003e275 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25Initial program 81.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6466.2
Applied rewrites66.2%
if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.0%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites82.1%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6491.1
Applied rewrites91.1%
Taylor expanded in x around 0
lower-/.f6480.6
Applied rewrites80.6%
lift-*.f64N/A
lift-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6480.7
Applied rewrites80.7%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -2.6e+207)
(* (* a (/ t c)) -4.0)
(if (<= z 2.7e+103)
(/ (fma (* y x) 9.0 b) (* z c))
(* -4.0 (/ (* a t) c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.6e+207) {
tmp = (a * (t / c)) * -4.0;
} else if (z <= 2.7e+103) {
tmp = fma((y * x), 9.0, b) / (z * c);
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.6e+207) tmp = Float64(Float64(a * Float64(t / c)) * -4.0); elseif (z <= 2.7e+103) tmp = Float64(fma(Float64(y * x), 9.0, b) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.6e+207], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[z, 2.7e+103], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+207}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+103}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -2.5999999999999998e207Initial program 46.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6478.4
Applied rewrites78.4%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites65.8%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6466.3
Applied rewrites66.3%
if -2.5999999999999998e207 < z < 2.69999999999999993e103Initial program 88.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6469.0
Applied rewrites69.0%
if 2.69999999999999993e103 < z Initial program 54.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6460.6
Applied rewrites60.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a (/ t c)) -4.0))
(t_2 (* (* x 9.0) y))
(t_3 (* (* x (/ (/ y c) z)) 9.0)))
(if (<= t_2 -5e+25)
t_3
(if (<= t_2 -1e-98)
t_1
(if (<= t_2 5e-230) (/ (/ b z) c) (if (<= t_2 2e+111) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * (t / c)) * -4.0;
double t_2 = (x * 9.0) * y;
double t_3 = (x * ((y / c) / z)) * 9.0;
double tmp;
if (t_2 <= -5e+25) {
tmp = t_3;
} else if (t_2 <= -1e-98) {
tmp = t_1;
} else if (t_2 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_2 <= 2e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (a * (t / c)) * (-4.0d0)
t_2 = (x * 9.0d0) * y
t_3 = (x * ((y / c) / z)) * 9.0d0
if (t_2 <= (-5d+25)) then
tmp = t_3
else if (t_2 <= (-1d-98)) then
tmp = t_1
else if (t_2 <= 5d-230) then
tmp = (b / z) / c
else if (t_2 <= 2d+111) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * (t / c)) * -4.0;
double t_2 = (x * 9.0) * y;
double t_3 = (x * ((y / c) / z)) * 9.0;
double tmp;
if (t_2 <= -5e+25) {
tmp = t_3;
} else if (t_2 <= -1e-98) {
tmp = t_1;
} else if (t_2 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_2 <= 2e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * (t / c)) * -4.0 t_2 = (x * 9.0) * y t_3 = (x * ((y / c) / z)) * 9.0 tmp = 0 if t_2 <= -5e+25: tmp = t_3 elif t_2 <= -1e-98: tmp = t_1 elif t_2 <= 5e-230: tmp = (b / z) / c elif t_2 <= 2e+111: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * Float64(t / c)) * -4.0) t_2 = Float64(Float64(x * 9.0) * y) t_3 = Float64(Float64(x * Float64(Float64(y / c) / z)) * 9.0) tmp = 0.0 if (t_2 <= -5e+25) tmp = t_3; elseif (t_2 <= -1e-98) tmp = t_1; elseif (t_2 <= 5e-230) tmp = Float64(Float64(b / z) / c); elseif (t_2 <= 2e+111) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * (t / c)) * -4.0; t_2 = (x * 9.0) * y; t_3 = (x * ((y / c) / z)) * 9.0; tmp = 0.0; if (t_2 <= -5e+25) tmp = t_3; elseif (t_2 <= -1e-98) tmp = t_1; elseif (t_2 <= 5e-230) tmp = (b / z) / c; elseif (t_2 <= 2e+111) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+25], t$95$3, If[LessEqual[t$95$2, -1e-98], t$95$1, If[LessEqual[t$95$2, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 2e+111], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\
t_2 := \left(x \cdot 9\right) \cdot y\\
t_3 := \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25 or 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites73.3%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6479.5
Applied rewrites79.5%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6462.0
Applied rewrites62.0%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6465.1
Applied rewrites65.1%
if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99 or 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.9%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6489.0
Applied rewrites89.0%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites44.5%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6446.2
Applied rewrites46.2%
if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230Initial program 81.1%
Taylor expanded in b around inf
Applied rewrites50.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites48.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 -1e-98)
(* (* (/ x c) (/ y z)) 9.0)
(if (<= t_1 5e-230)
(/ (/ b z) c)
(if (<= t_1 2e+111)
(* (* a (/ t c)) -4.0)
(- (* (* (/ (/ y c) z) -9.0) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -1e-98) {
tmp = ((x / c) * (y / z)) * 9.0;
} else if (t_1 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_1 <= 2e+111) {
tmp = (a * (t / c)) * -4.0;
} else {
tmp = -((((y / c) / z) * -9.0) * x);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 9.0d0) * y
if (t_1 <= (-1d-98)) then
tmp = ((x / c) * (y / z)) * 9.0d0
else if (t_1 <= 5d-230) then
tmp = (b / z) / c
else if (t_1 <= 2d+111) then
tmp = (a * (t / c)) * (-4.0d0)
else
tmp = -((((y / c) / z) * (-9.0d0)) * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -1e-98) {
tmp = ((x / c) * (y / z)) * 9.0;
} else if (t_1 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_1 <= 2e+111) {
tmp = (a * (t / c)) * -4.0;
} else {
tmp = -((((y / c) / z) * -9.0) * x);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) * y tmp = 0 if t_1 <= -1e-98: tmp = ((x / c) * (y / z)) * 9.0 elif t_1 <= 5e-230: tmp = (b / z) / c elif t_1 <= 2e+111: tmp = (a * (t / c)) * -4.0 else: tmp = -((((y / c) / z) * -9.0) * x) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= -1e-98) tmp = Float64(Float64(Float64(x / c) * Float64(y / z)) * 9.0); elseif (t_1 <= 5e-230) tmp = Float64(Float64(b / z) / c); elseif (t_1 <= 2e+111) tmp = Float64(Float64(a * Float64(t / c)) * -4.0); else tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * 9.0) * y; tmp = 0.0; if (t_1 <= -1e-98) tmp = ((x / c) * (y / z)) * 9.0; elseif (t_1 <= 5e-230) tmp = (b / z) / c; elseif (t_1 <= 2e+111) tmp = (a * (t / c)) * -4.0; else tmp = -((((y / c) / z) * -9.0) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-98], N[(N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-98}:\\
\;\;\;\;\left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99Initial program 77.0%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites75.4%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6482.9
Applied rewrites82.9%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6449.1
Applied rewrites49.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6450.5
Applied rewrites50.5%
if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230Initial program 81.1%
Taylor expanded in b around inf
Applied rewrites50.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites48.9%
if 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 83.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6488.7
Applied rewrites88.7%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites44.4%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6445.9
Applied rewrites45.9%
if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites72.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6467.5
Applied rewrites67.5%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6470.7
Applied rewrites70.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* x 9.0) y)))
(if (<= t_1 -1e-98)
(* (* (/ x c) (/ y z)) 9.0)
(if (<= t_1 5e-230)
(/ (/ b z) c)
(if (<= t_1 2e+111)
(* (* a (/ t c)) -4.0)
(* (* x (/ (/ y c) z)) 9.0))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -1e-98) {
tmp = ((x / c) * (y / z)) * 9.0;
} else if (t_1 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_1 <= 2e+111) {
tmp = (a * (t / c)) * -4.0;
} else {
tmp = (x * ((y / c) / z)) * 9.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (x * 9.0d0) * y
if (t_1 <= (-1d-98)) then
tmp = ((x / c) * (y / z)) * 9.0d0
else if (t_1 <= 5d-230) then
tmp = (b / z) / c
else if (t_1 <= 2d+111) then
tmp = (a * (t / c)) * (-4.0d0)
else
tmp = (x * ((y / c) / z)) * 9.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double tmp;
if (t_1 <= -1e-98) {
tmp = ((x / c) * (y / z)) * 9.0;
} else if (t_1 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_1 <= 2e+111) {
tmp = (a * (t / c)) * -4.0;
} else {
tmp = (x * ((y / c) / z)) * 9.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) * y tmp = 0 if t_1 <= -1e-98: tmp = ((x / c) * (y / z)) * 9.0 elif t_1 <= 5e-230: tmp = (b / z) / c elif t_1 <= 2e+111: tmp = (a * (t / c)) * -4.0 else: tmp = (x * ((y / c) / z)) * 9.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_1 <= -1e-98) tmp = Float64(Float64(Float64(x / c) * Float64(y / z)) * 9.0); elseif (t_1 <= 5e-230) tmp = Float64(Float64(b / z) / c); elseif (t_1 <= 2e+111) tmp = Float64(Float64(a * Float64(t / c)) * -4.0); else tmp = Float64(Float64(x * Float64(Float64(y / c) / z)) * 9.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (x * 9.0) * y; tmp = 0.0; if (t_1 <= -1e-98) tmp = ((x / c) * (y / z)) * 9.0; elseif (t_1 <= 5e-230) tmp = (b / z) / c; elseif (t_1 <= 2e+111) tmp = (a * (t / c)) * -4.0; else tmp = (x * ((y / c) / z)) * 9.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-98], N[(N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-98}:\\
\;\;\;\;\left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99Initial program 77.0%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites75.4%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6482.9
Applied rewrites82.9%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6449.1
Applied rewrites49.1%
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f6450.5
Applied rewrites50.5%
if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230Initial program 81.1%
Taylor expanded in b around inf
Applied rewrites50.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites48.9%
if 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 83.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6488.7
Applied rewrites88.7%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites44.4%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6445.9
Applied rewrites45.9%
if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites73.3%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6479.3
Applied rewrites79.3%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6467.5
Applied rewrites67.5%
lift-*.f64N/A
lift-/.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6470.7
Applied rewrites70.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ y (* c z))) (t_2 (* (* a (/ t c)) -4.0)) (t_3 (* (* x 9.0) y)))
(if (<= t_3 -5e+25)
(* x (* t_1 9.0))
(if (<= t_3 -1e-98)
t_2
(if (<= t_3 5e-230)
(/ (/ b z) c)
(if (<= t_3 2e+111) t_2 (* (* x t_1) 9.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y / (c * z);
double t_2 = (a * (t / c)) * -4.0;
double t_3 = (x * 9.0) * y;
double tmp;
if (t_3 <= -5e+25) {
tmp = x * (t_1 * 9.0);
} else if (t_3 <= -1e-98) {
tmp = t_2;
} else if (t_3 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_3 <= 2e+111) {
tmp = t_2;
} else {
tmp = (x * t_1) * 9.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y / (c * z)
t_2 = (a * (t / c)) * (-4.0d0)
t_3 = (x * 9.0d0) * y
if (t_3 <= (-5d+25)) then
tmp = x * (t_1 * 9.0d0)
else if (t_3 <= (-1d-98)) then
tmp = t_2
else if (t_3 <= 5d-230) then
tmp = (b / z) / c
else if (t_3 <= 2d+111) then
tmp = t_2
else
tmp = (x * t_1) * 9.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = y / (c * z);
double t_2 = (a * (t / c)) * -4.0;
double t_3 = (x * 9.0) * y;
double tmp;
if (t_3 <= -5e+25) {
tmp = x * (t_1 * 9.0);
} else if (t_3 <= -1e-98) {
tmp = t_2;
} else if (t_3 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_3 <= 2e+111) {
tmp = t_2;
} else {
tmp = (x * t_1) * 9.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = y / (c * z) t_2 = (a * (t / c)) * -4.0 t_3 = (x * 9.0) * y tmp = 0 if t_3 <= -5e+25: tmp = x * (t_1 * 9.0) elif t_3 <= -1e-98: tmp = t_2 elif t_3 <= 5e-230: tmp = (b / z) / c elif t_3 <= 2e+111: tmp = t_2 else: tmp = (x * t_1) * 9.0 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(y / Float64(c * z)) t_2 = Float64(Float64(a * Float64(t / c)) * -4.0) t_3 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_3 <= -5e+25) tmp = Float64(x * Float64(t_1 * 9.0)); elseif (t_3 <= -1e-98) tmp = t_2; elseif (t_3 <= 5e-230) tmp = Float64(Float64(b / z) / c); elseif (t_3 <= 2e+111) tmp = t_2; else tmp = Float64(Float64(x * t_1) * 9.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = y / (c * z); t_2 = (a * (t / c)) * -4.0; t_3 = (x * 9.0) * y; tmp = 0.0; if (t_3 <= -5e+25) tmp = x * (t_1 * 9.0); elseif (t_3 <= -1e-98) tmp = t_2; elseif (t_3 <= 5e-230) tmp = (b / z) / c; elseif (t_3 <= 2e+111) tmp = t_2; else tmp = (x * t_1) * 9.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+25], N[(x * N[(t$95$1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-98], t$95$2, If[LessEqual[t$95$3, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$3, 2e+111], t$95$2, N[(N[(x * t$95$1), $MachinePrecision] * 9.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{c \cdot z}\\
t_2 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\
t_3 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;x \cdot \left(t\_1 \cdot 9\right)\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-98}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot t\_1\right) \cdot 9\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25Initial program 75.4%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites73.3%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6479.6
Applied rewrites79.6%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6457.8
Applied rewrites57.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6457.8
Applied rewrites57.8%
if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99 or 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.9%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6489.0
Applied rewrites89.0%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites44.5%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6446.2
Applied rewrites46.2%
if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230Initial program 81.1%
Taylor expanded in b around inf
Applied rewrites50.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites48.9%
if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 82.9%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites82.5%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6490.7
Applied rewrites90.7%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6425.9
Applied rewrites25.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* a (/ t c)) -4.0))
(t_2 (* (* x 9.0) y))
(t_3 (* x (* (/ y (* c z)) 9.0))))
(if (<= t_2 -5e+25)
t_3
(if (<= t_2 -1e-98)
t_1
(if (<= t_2 5e-230) (/ (/ b z) c) (if (<= t_2 2e+111) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * (t / c)) * -4.0;
double t_2 = (x * 9.0) * y;
double t_3 = x * ((y / (c * z)) * 9.0);
double tmp;
if (t_2 <= -5e+25) {
tmp = t_3;
} else if (t_2 <= -1e-98) {
tmp = t_1;
} else if (t_2 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_2 <= 2e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (a * (t / c)) * (-4.0d0)
t_2 = (x * 9.0d0) * y
t_3 = x * ((y / (c * z)) * 9.0d0)
if (t_2 <= (-5d+25)) then
tmp = t_3
else if (t_2 <= (-1d-98)) then
tmp = t_1
else if (t_2 <= 5d-230) then
tmp = (b / z) / c
else if (t_2 <= 2d+111) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * (t / c)) * -4.0;
double t_2 = (x * 9.0) * y;
double t_3 = x * ((y / (c * z)) * 9.0);
double tmp;
if (t_2 <= -5e+25) {
tmp = t_3;
} else if (t_2 <= -1e-98) {
tmp = t_1;
} else if (t_2 <= 5e-230) {
tmp = (b / z) / c;
} else if (t_2 <= 2e+111) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (a * (t / c)) * -4.0 t_2 = (x * 9.0) * y t_3 = x * ((y / (c * z)) * 9.0) tmp = 0 if t_2 <= -5e+25: tmp = t_3 elif t_2 <= -1e-98: tmp = t_1 elif t_2 <= 5e-230: tmp = (b / z) / c elif t_2 <= 2e+111: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * Float64(t / c)) * -4.0) t_2 = Float64(Float64(x * 9.0) * y) t_3 = Float64(x * Float64(Float64(y / Float64(c * z)) * 9.0)) tmp = 0.0 if (t_2 <= -5e+25) tmp = t_3; elseif (t_2 <= -1e-98) tmp = t_1; elseif (t_2 <= 5e-230) tmp = Float64(Float64(b / z) / c); elseif (t_2 <= 2e+111) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (a * (t / c)) * -4.0; t_2 = (x * 9.0) * y; t_3 = x * ((y / (c * z)) * 9.0); tmp = 0.0; if (t_2 <= -5e+25) tmp = t_3; elseif (t_2 <= -1e-98) tmp = t_1; elseif (t_2 <= 5e-230) tmp = (b / z) / c; elseif (t_2 <= 2e+111) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+25], t$95$3, If[LessEqual[t$95$2, -1e-98], t$95$1, If[LessEqual[t$95$2, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 2e+111], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\
t_2 := \left(x \cdot 9\right) \cdot y\\
t_3 := x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25 or 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 75.3%
lift-*.f64N/A
lift-/.f64N/A
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites73.3%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lift-*.f6479.5
Applied rewrites79.5%
Taylor expanded in x around inf
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-+l-N/A
associate-/r*N/A
*-commutativeN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6462.0
Applied rewrites62.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f64N/A
lift-*.f6462.0
Applied rewrites62.0%
if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99 or 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111Initial program 82.9%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6489.0
Applied rewrites89.0%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites44.5%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6446.2
Applied rewrites46.2%
if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230Initial program 81.1%
Taylor expanded in b around inf
Applied rewrites50.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites48.9%
(FPCore (x y z t a b c) :precision binary64 (if (<= z -6.4e-81) (* (* a (/ t c)) -4.0) (if (<= z 7e+101) (/ b (* z c)) (* -4.0 (/ (* a t) c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.4e-81) {
tmp = (a * (t / c)) * -4.0;
} else if (z <= 7e+101) {
tmp = b / (z * c);
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-6.4d-81)) then
tmp = (a * (t / c)) * (-4.0d0)
else if (z <= 7d+101) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * ((a * t) / c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.4e-81) {
tmp = (a * (t / c)) * -4.0;
} else if (z <= 7e+101) {
tmp = b / (z * c);
} else {
tmp = -4.0 * ((a * t) / c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= -6.4e-81: tmp = (a * (t / c)) * -4.0 elif z <= 7e+101: tmp = b / (z * c) else: tmp = -4.0 * ((a * t) / c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -6.4e-81) tmp = Float64(Float64(a * Float64(t / c)) * -4.0); elseif (z <= 7e+101) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= -6.4e-81) tmp = (a * (t / c)) * -4.0; elseif (z <= 7e+101) tmp = b / (z * c); else tmp = -4.0 * ((a * t) / c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6.4e-81], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[z, 7e+101], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{-81}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\end{array}
\end{array}
if z < -6.4e-81Initial program 70.4%
Taylor expanded in x around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6483.0
Applied rewrites83.0%
Taylor expanded in z around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate--r-N/A
lift-*.f64N/A
lift-*.f64N/A
associate-/l/N/A
*-commutativeN/A
Applied rewrites49.2%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6450.2
Applied rewrites50.2%
if -6.4e-81 < z < 7.00000000000000046e101Initial program 92.9%
Taylor expanded in b around inf
Applied rewrites44.8%
if 7.00000000000000046e101 < z Initial program 54.9%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6460.4
Applied rewrites60.4%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* -4.0 (/ (* a t) c)))) (if (<= z -1.4e-80) t_1 (if (<= z 7e+101) (/ b (* z c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * ((a * t) / c);
double tmp;
if (z <= -1.4e-80) {
tmp = t_1;
} else if (z <= 7e+101) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * ((a * t) / c)
if (z <= (-1.4d-80)) then
tmp = t_1
else if (z <= 7d+101) then
tmp = b / (z * c)
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 b, double c) {
double t_1 = -4.0 * ((a * t) / c);
double tmp;
if (z <= -1.4e-80) {
tmp = t_1;
} else if (z <= 7e+101) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * ((a * t) / c) tmp = 0 if z <= -1.4e-80: tmp = t_1 elif z <= 7e+101: tmp = b / (z * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(Float64(a * t) / c)) tmp = 0.0 if (z <= -1.4e-80) tmp = t_1; elseif (z <= 7e+101) tmp = Float64(b / Float64(z * c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * ((a * t) / c); tmp = 0.0; if (z <= -1.4e-80) tmp = t_1; elseif (z <= 7e+101) tmp = b / (z * c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e-80], t$95$1, If[LessEqual[z, 7e+101], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a \cdot t}{c}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.39999999999999995e-80 or 7.00000000000000046e101 < z Initial program 64.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6453.3
Applied rewrites53.3%
if -1.39999999999999995e-80 < z < 7.00000000000000046e101Initial program 92.9%
Taylor expanded in b around inf
Applied rewrites44.8%
(FPCore (x y z t a b c) :precision binary64 (if (<= a 4.5e+57) (/ (/ b z) c) (/ b (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 4.5e+57) {
tmp = (b / z) / c;
} else {
tmp = b / (z * c);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (a <= 4.5d+57) then
tmp = (b / z) / c
else
tmp = b / (z * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (a <= 4.5e+57) {
tmp = (b / z) / c;
} else {
tmp = b / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if a <= 4.5e+57: tmp = (b / z) / c else: tmp = b / (z * c) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (a <= 4.5e+57) tmp = Float64(Float64(b / z) / c); else tmp = Float64(b / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (a <= 4.5e+57) tmp = (b / z) / c; else tmp = b / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 4.5e+57], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if a < 4.49999999999999996e57Initial program 79.7%
Taylor expanded in b around inf
Applied rewrites36.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites35.3%
if 4.49999999999999996e57 < a Initial program 77.9%
Taylor expanded in b around inf
Applied rewrites27.2%
(FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
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), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
def code(x, y, z, t, a, b, c): return b / (z * c)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 79.3%
Taylor expanded in b around inf
Applied rewrites34.6%
herbie shell --seed 2025120
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))