
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
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, i)
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), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
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, i)
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), intent (in) :: i
code = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c))) (t_2 (* t_1 c)))
(if (<= t_2 (- INFINITY))
(* -2.0 (* c (fma (* i b) c (* i a))))
(if (<= t_2 5e+212)
(* 2.0 (fma y x (- (* t z) (* i (* (fma c b a) c)))))
(* 2.0 (- (* x y) (* c (* i t_1))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = t_1 * c;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = -2.0 * (c * fma((i * b), c, (i * a)));
} else if (t_2 <= 5e+212) {
tmp = 2.0 * fma(y, x, ((t * z) - (i * (fma(c, b, a) * c))));
} else {
tmp = 2.0 * ((x * y) - (c * (i * t_1)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(t_1 * c) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(-2.0 * Float64(c * fma(Float64(i * b), c, Float64(i * a)))); elseif (t_2 <= 5e+212) tmp = Float64(2.0 * fma(y, x, Float64(Float64(t * z) - Float64(i * Float64(fma(c, b, a) * c))))); else tmp = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(i * t_1)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * c), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(-2.0 * N[(c * N[(N[(i * b), $MachinePrecision] * c + N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+212], N[(2.0 * N[(y * x + N[(N[(t * z), $MachinePrecision] - N[(i * N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := t\_1 \cdot c\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;-2 \cdot \left(c \cdot \mathsf{fma}\left(i \cdot b, c, i \cdot a\right)\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+212}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(i \cdot t\_1\right)\right)\\
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -inf.0Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6444.8%
Applied rewrites44.8%
if -inf.0 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.9999999999999999e212Initial program 90.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6491.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6491.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6491.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6491.9%
Applied rewrites91.9%
if 4.9999999999999999e212 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 90.5%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6469.8%
Applied rewrites69.8%
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (fma (fma c b a) (* (- c) i) (fma t z (* y x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * fma(fma(c, b, a), (-c * i), fma(t, z, (y * x)));
}
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * fma(fma(c, b, a), Float64(Float64(-c) * i), fma(t, z, Float64(y * x)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(c * b + a), $MachinePrecision] * N[((-c) * i), $MachinePrecision] + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-c\right) \cdot i, \mathsf{fma}\left(t, z, y \cdot x\right)\right)
Initial program 90.5%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/A
lift-*.f64N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f6495.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6495.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6495.6%
Applied rewrites95.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* b c)))
(t_2 (* 2.0 (- (* x y) (* c (* i t_1)))))
(t_3 (* t_1 c)))
(if (<= t_3 -2e+82)
t_2
(if (<= t_3 5e+212) (* 2.0 (fma y x (- (* t z) (* i (* a c))))) t_2))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (b * c);
double t_2 = 2.0 * ((x * y) - (c * (i * t_1)));
double t_3 = t_1 * c;
double tmp;
if (t_3 <= -2e+82) {
tmp = t_2;
} else if (t_3 <= 5e+212) {
tmp = 2.0 * fma(y, x, ((t * z) - (i * (a * c))));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(b * c)) t_2 = Float64(2.0 * Float64(Float64(x * y) - Float64(c * Float64(i * t_1)))) t_3 = Float64(t_1 * c) tmp = 0.0 if (t_3 <= -2e+82) tmp = t_2; elseif (t_3 <= 5e+212) tmp = Float64(2.0 * fma(y, x, Float64(Float64(t * z) - Float64(i * Float64(a * c))))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(x * y), $MachinePrecision] - N[(c * N[(i * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * c), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+82], t$95$2, If[LessEqual[t$95$3, 5e+212], N[(2.0 * N[(y * x + N[(N[(t * z), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := 2 \cdot \left(x \cdot y - c \cdot \left(i \cdot t\_1\right)\right)\\
t_3 := t\_1 \cdot c\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+212}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < -1.9999999999999999e82 or 4.9999999999999999e212 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 90.5%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6469.8%
Applied rewrites69.8%
if -1.9999999999999999e82 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.9999999999999999e212Initial program 90.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6491.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6491.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6491.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6491.9%
Applied rewrites91.9%
Taylor expanded in a around inf
lower-*.f6473.0%
Applied rewrites73.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (fma b c a) (* (* i c) -2.0))) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -2e+212)
t_1
(if (<= t_2 2e+159) (* 2.0 (fma y x (- (* t z) (* i (* a c))))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(b, c, a) * ((i * c) * -2.0);
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -2e+212) {
tmp = t_1;
} else if (t_2 <= 2e+159) {
tmp = 2.0 * fma(y, x, ((t * z) - (i * (a * c))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(fma(b, c, a) * Float64(Float64(i * c) * -2.0)) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -2e+212) tmp = t_1; elseif (t_2 <= 2e+159) tmp = Float64(2.0 * fma(y, x, Float64(Float64(t * z) - Float64(i * Float64(a * c))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b * c + a), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+212], t$95$1, If[LessEqual[t$95$2, 2e+159], N[(2.0 * N[(y * x + N[(N[(t * z), $MachinePrecision] - N[(i * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, a\right) \cdot \left(\left(i \cdot c\right) \cdot -2\right)\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+159}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.9999999999999998e212 or 1.9999999999999999e159 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
Applied rewrites48.8%
if -1.9999999999999998e212 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999999e159Initial program 90.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f6491.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6491.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6491.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6491.9%
Applied rewrites91.9%
Taylor expanded in a around inf
lower-*.f6473.0%
Applied rewrites73.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (fma b c a) (* (* i c) -2.0))) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -2e+212)
t_1
(if (<= t_2 2e+159) (* 2.0 (- (fma t z (* x y)) (* a (* c i)))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(b, c, a) * ((i * c) * -2.0);
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -2e+212) {
tmp = t_1;
} else if (t_2 <= 2e+159) {
tmp = 2.0 * (fma(t, z, (x * y)) - (a * (c * i)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(fma(b, c, a) * Float64(Float64(i * c) * -2.0)) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -2e+212) tmp = t_1; elseif (t_2 <= 2e+159) tmp = Float64(2.0 * Float64(fma(t, z, Float64(x * y)) - Float64(a * Float64(c * i)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b * c + a), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+212], t$95$1, If[LessEqual[t$95$2, 2e+159], N[(2.0 * N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, a\right) \cdot \left(\left(i \cdot c\right) \cdot -2\right)\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+159}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(t, z, x \cdot y\right) - a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.9999999999999998e212 or 1.9999999999999999e159 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
Applied rewrites48.8%
if -1.9999999999999998e212 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999999e159Initial program 90.5%
Taylor expanded in b around 0
lower--.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6474.9%
Applied rewrites74.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -2e+209)
(* (fma b c a) (* (* i c) -2.0))
(if (<= t_1 2000.0)
(fma (+ z z) t (* (+ y y) x))
(* (* i (fma b c a)) (* -2.0 c))))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -2e+209) {
tmp = fma(b, c, a) * ((i * c) * -2.0);
} else if (t_1 <= 2000.0) {
tmp = fma((z + z), t, ((y + y) * x));
} else {
tmp = (i * fma(b, c, a)) * (-2.0 * c);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -2e+209) tmp = Float64(fma(b, c, a) * Float64(Float64(i * c) * -2.0)); elseif (t_1 <= 2000.0) tmp = fma(Float64(z + z), t, Float64(Float64(y + y) * x)); else tmp = Float64(Float64(i * fma(b, c, a)) * Float64(-2.0 * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+209], N[(N[(b * c + a), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2000.0], N[(N[(z + z), $MachinePrecision] * t + N[(N[(y + y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(i * N[(b * c + a), $MachinePrecision]), $MachinePrecision] * N[(-2.0 * c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+209}:\\
\;\;\;\;\mathsf{fma}\left(b, c, a\right) \cdot \left(\left(i \cdot c\right) \cdot -2\right)\\
\mathbf{elif}\;t\_1 \leq 2000:\\
\;\;\;\;\mathsf{fma}\left(z + z, t, \left(y + y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot \mathsf{fma}\left(b, c, a\right)\right) \cdot \left(-2 \cdot c\right)\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.0000000000000001e209Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
Applied rewrites48.8%
if -2.0000000000000001e209 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2e3Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
count-2N/A
lift-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
count-2-revN/A
lower-+.f6455.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.5%
Applied rewrites55.5%
if 2e3 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* i (fma b c a)) (* -2.0 c))) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -2e+209)
t_1
(if (<= t_2 2000.0) (fma (+ z z) t (* (+ y y) x)) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (i * fma(b, c, a)) * (-2.0 * c);
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -2e+209) {
tmp = t_1;
} else if (t_2 <= 2000.0) {
tmp = fma((z + z), t, ((y + y) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(i * fma(b, c, a)) * Float64(-2.0 * c)) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -2e+209) tmp = t_1; elseif (t_2 <= 2000.0) tmp = fma(Float64(z + z), t, Float64(Float64(y + y) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(i * N[(b * c + a), $MachinePrecision]), $MachinePrecision] * N[(-2.0 * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+209], t$95$1, If[LessEqual[t$95$2, 2000.0], N[(N[(z + z), $MachinePrecision] * t + N[(N[(y + y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \left(i \cdot \mathsf{fma}\left(b, c, a\right)\right) \cdot \left(-2 \cdot c\right)\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2000:\\
\;\;\;\;\mathsf{fma}\left(z + z, t, \left(y + y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -2.0000000000000001e209 or 2e3 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
if -2.0000000000000001e209 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2e3Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
count-2N/A
lift-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
count-2-revN/A
lower-+.f6455.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.5%
Applied rewrites55.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* c (* b (* c i))))) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e+177)
(* -2.0 (* a (* c i)))
(if (<= t_2 1e+260) (* 2.0 (fma t z (* x y))) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (c * (b * (c * i)));
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e+177) {
tmp = -2.0 * (a * (c * i));
} else if (t_2 <= 1e+260) {
tmp = 2.0 * fma(t, z, (x * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e+177) tmp = Float64(-2.0 * Float64(a * Float64(c * i))); elseif (t_2 <= 1e+260) tmp = Float64(2.0 * fma(t, z, Float64(x * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e+177], N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+260], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+177}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+260}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0 or 1.0000000000000001e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6433.6%
Applied rewrites33.6%
if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1e177Initial program 90.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6425.9%
Applied rewrites25.9%
if -1e177 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.0000000000000001e260Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+239)
(* -2.0 (* c (* (* b i) c)))
(if (<= t_1 1e+260)
(fma (+ z z) t (* (+ y y) x))
(* (* b c) (* (* i c) -2.0))))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+239) {
tmp = -2.0 * (c * ((b * i) * c));
} else if (t_1 <= 1e+260) {
tmp = fma((z + z), t, ((y + y) * x));
} else {
tmp = (b * c) * ((i * c) * -2.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+239) tmp = Float64(-2.0 * Float64(c * Float64(Float64(b * i) * c))); elseif (t_1 <= 1e+260) tmp = fma(Float64(z + z), t, Float64(Float64(y + y) * x)); else tmp = Float64(Float64(b * c) * Float64(Float64(i * c) * -2.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+239], N[(-2.0 * N[(c * N[(N[(b * i), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+260], N[(N[(z + z), $MachinePrecision] * t + N[(N[(y + y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+239}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot i\right) \cdot c\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+260}:\\
\;\;\;\;\mathsf{fma}\left(z + z, t, \left(y + y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c\right) \cdot \left(\left(i \cdot c\right) \cdot -2\right)\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000001e239Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6433.6%
Applied rewrites33.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6432.8%
Applied rewrites32.8%
if -5.0000000000000001e239 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.0000000000000001e260Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
lift-*.f64N/A
lift-fma.f64N/A
distribute-lft-inN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
count-2N/A
lift-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
count-2-revN/A
lower-+.f6455.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6455.5%
Applied rewrites55.5%
if 1.0000000000000001e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
Applied rewrites48.8%
Taylor expanded in a around 0
lower-*.f6433.5%
Applied rewrites33.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+239)
(* -2.0 (* c (* (* b i) c)))
(if (<= t_1 1e+260)
(* 2.0 (fma t z (* x y)))
(* (* b c) (* (* i c) -2.0))))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+239) {
tmp = -2.0 * (c * ((b * i) * c));
} else if (t_1 <= 1e+260) {
tmp = 2.0 * fma(t, z, (x * y));
} else {
tmp = (b * c) * ((i * c) * -2.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+239) tmp = Float64(-2.0 * Float64(c * Float64(Float64(b * i) * c))); elseif (t_1 <= 1e+260) tmp = Float64(2.0 * fma(t, z, Float64(x * y))); else tmp = Float64(Float64(b * c) * Float64(Float64(i * c) * -2.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+239], N[(-2.0 * N[(c * N[(N[(b * i), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+260], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+239}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot i\right) \cdot c\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+260}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c\right) \cdot \left(\left(i \cdot c\right) \cdot -2\right)\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000001e239Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6433.6%
Applied rewrites33.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6432.8%
Applied rewrites32.8%
if -5.0000000000000001e239 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.0000000000000001e260Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
if 1.0000000000000001e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
lift-*.f64N/A
metadata-evalN/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-fma.f64N/A
associate-*r*N/A
lift-*.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-outN/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
distribute-rgt-neg-outN/A
lift-neg.f64N/A
Applied rewrites48.8%
Taylor expanded in a around 0
lower-*.f6433.5%
Applied rewrites33.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+239)
(* -2.0 (* c (* (* b i) c)))
(if (<= t_1 1e+260)
(* 2.0 (fma t z (* x y)))
(* -2.0 (* c (* b (* c i))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+239) {
tmp = -2.0 * (c * ((b * i) * c));
} else if (t_1 <= 1e+260) {
tmp = 2.0 * fma(t, z, (x * y));
} else {
tmp = -2.0 * (c * (b * (c * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+239) tmp = Float64(-2.0 * Float64(c * Float64(Float64(b * i) * c))); elseif (t_1 <= 1e+260) tmp = Float64(2.0 * fma(t, z, Float64(x * y))); else tmp = Float64(-2.0 * Float64(c * Float64(b * Float64(c * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+239], N[(-2.0 * N[(c * N[(N[(b * i), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+260], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-2.0 * N[(c * N[(b * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+239}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(b \cdot i\right) \cdot c\right)\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+260}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000001e239Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6433.6%
Applied rewrites33.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lift-*.f64N/A
lower-*.f6432.8%
Applied rewrites32.8%
if -5.0000000000000001e239 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.0000000000000001e260Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
if 1.0000000000000001e260 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f6447.4%
Applied rewrites47.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6433.6%
Applied rewrites33.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* a (* c i)))) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -1e+177)
t_1
(if (<= t_2 2e+284) (* 2.0 (fma t z (* x y))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (a * (c * i));
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -1e+177) {
tmp = t_1;
} else if (t_2 <= 2e+284) {
tmp = 2.0 * fma(t, z, (x * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(a * Float64(c * i))) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -1e+177) tmp = t_1; elseif (t_2 <= 2e+284) tmp = Float64(2.0 * fma(t, z, Float64(x * y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+177], t$95$1, If[LessEqual[t$95$2, 2e+284], N[(2.0 * N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+177}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+284}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1e177 or 2.0000000000000002e284 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 90.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6425.9%
Applied rewrites25.9%
if -1e177 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000002e284Initial program 90.5%
Taylor expanded in c around 0
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6%
Applied rewrites55.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* -2.0 (* a (* c i)))) (t_2 (* (+ x x) y)))
(if (<= (* x y) -8e+76)
t_2
(if (<= (* x y) -1.2e-205)
t_1
(if (<= (* x y) 2e-94)
(* (+ t t) z)
(if (<= (* x y) 2e-26) t_1 t_2))))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (a * (c * i));
double t_2 = (x + x) * y;
double tmp;
if ((x * y) <= -8e+76) {
tmp = t_2;
} else if ((x * y) <= -1.2e-205) {
tmp = t_1;
} else if ((x * y) <= 2e-94) {
tmp = (t + t) * z;
} else if ((x * y) <= 2e-26) {
tmp = t_1;
} else {
tmp = t_2;
}
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, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-2.0d0) * (a * (c * i))
t_2 = (x + x) * y
if ((x * y) <= (-8d+76)) then
tmp = t_2
else if ((x * y) <= (-1.2d-205)) then
tmp = t_1
else if ((x * y) <= 2d-94) then
tmp = (t + t) * z
else if ((x * y) <= 2d-26) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -2.0 * (a * (c * i));
double t_2 = (x + x) * y;
double tmp;
if ((x * y) <= -8e+76) {
tmp = t_2;
} else if ((x * y) <= -1.2e-205) {
tmp = t_1;
} else if ((x * y) <= 2e-94) {
tmp = (t + t) * z;
} else if ((x * y) <= 2e-26) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -2.0 * (a * (c * i)) t_2 = (x + x) * y tmp = 0 if (x * y) <= -8e+76: tmp = t_2 elif (x * y) <= -1.2e-205: tmp = t_1 elif (x * y) <= 2e-94: tmp = (t + t) * z elif (x * y) <= 2e-26: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(-2.0 * Float64(a * Float64(c * i))) t_2 = Float64(Float64(x + x) * y) tmp = 0.0 if (Float64(x * y) <= -8e+76) tmp = t_2; elseif (Float64(x * y) <= -1.2e-205) tmp = t_1; elseif (Float64(x * y) <= 2e-94) tmp = Float64(Float64(t + t) * z); elseif (Float64(x * y) <= 2e-26) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -2.0 * (a * (c * i)); t_2 = (x + x) * y; tmp = 0.0; if ((x * y) <= -8e+76) tmp = t_2; elseif ((x * y) <= -1.2e-205) tmp = t_1; elseif ((x * y) <= 2e-94) tmp = (t + t) * z; elseif ((x * y) <= 2e-26) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(-2.0 * N[(a * N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -8e+76], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], -1.2e-205], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 2e-94], N[(N[(t + t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-26], t$95$1, t$95$2]]]]]]
\begin{array}{l}
t_1 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
t_2 := \left(x + x\right) \cdot y\\
\mathbf{if}\;x \cdot y \leq -8 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \cdot y \leq -1.2 \cdot 10^{-205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-94}:\\
\;\;\;\;\left(t + t\right) \cdot z\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (*.f64 x y) < -8.0000000000000004e76 or 2.0000000000000001e-26 < (*.f64 x y) Initial program 90.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6429.6%
Applied rewrites29.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6429.6%
Applied rewrites29.6%
if -8.0000000000000004e76 < (*.f64 x y) < -1.2000000000000001e-205 or 1.9999999999999999e-94 < (*.f64 x y) < 2.0000000000000001e-26Initial program 90.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6425.9%
Applied rewrites25.9%
if -1.2000000000000001e-205 < (*.f64 x y) < 1.9999999999999999e-94Initial program 90.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6429.2%
Applied rewrites29.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6429.2%
Applied rewrites29.2%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* (+ x x) y))) (if (<= (* x y) -8e+76) t_1 (if (<= (* x y) 1e-33) (* (+ t t) z) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + x) * y;
double tmp;
if ((x * y) <= -8e+76) {
tmp = t_1;
} else if ((x * y) <= 1e-33) {
tmp = (t + t) * z;
} 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, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (x + x) * y
if ((x * y) <= (-8d+76)) then
tmp = t_1
else if ((x * y) <= 1d-33) then
tmp = (t + t) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + x) * y;
double tmp;
if ((x * y) <= -8e+76) {
tmp = t_1;
} else if ((x * y) <= 1e-33) {
tmp = (t + t) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + x) * y tmp = 0 if (x * y) <= -8e+76: tmp = t_1 elif (x * y) <= 1e-33: tmp = (t + t) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + x) * y) tmp = 0.0 if (Float64(x * y) <= -8e+76) tmp = t_1; elseif (Float64(x * y) <= 1e-33) tmp = Float64(Float64(t + t) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + x) * y; tmp = 0.0; if ((x * y) <= -8e+76) tmp = t_1; elseif ((x * y) <= 1e-33) tmp = (t + t) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -8e+76], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], 1e-33], N[(N[(t + t), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x + x\right) \cdot y\\
\mathbf{if}\;x \cdot y \leq -8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq 10^{-33}:\\
\;\;\;\;\left(t + t\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 x y) < -8.0000000000000004e76 or 1.0000000000000001e-33 < (*.f64 x y) Initial program 90.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6429.6%
Applied rewrites29.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6429.6%
Applied rewrites29.6%
if -8.0000000000000004e76 < (*.f64 x y) < 1.0000000000000001e-33Initial program 90.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6429.2%
Applied rewrites29.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6429.2%
Applied rewrites29.2%
(FPCore (x y z t a b c i) :precision binary64 (* (+ t t) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (t + t) * z;
}
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, i)
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), intent (in) :: i
code = (t + t) * z
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (t + t) * z;
}
def code(x, y, z, t, a, b, c, i): return (t + t) * z
function code(x, y, z, t, a, b, c, i) return Float64(Float64(t + t) * z) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (t + t) * z; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(t + t), $MachinePrecision] * z), $MachinePrecision]
\left(t + t\right) \cdot z
Initial program 90.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6429.2%
Applied rewrites29.2%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6429.2%
Applied rewrites29.2%
herbie shell --seed 2025205
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))