
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
(FPCore (x y z t a b c) :precision binary64 (+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + 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 * y) + ((z * t) / 16.0d0)) - ((a * b) / 4.0d0)) + c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
def code(x, y, z, t, a, b, c): return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c) end
function tmp = code(x, y, z, t, a, b, c) tmp = (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c; end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\end{array}
Initial program 97.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* a b) 4.0)) (t_2 (* -0.25 (* b a))))
(if (<= t_1 -2e+99)
t_2
(if (<= t_1 5e+63)
(fma y x c)
(if (<= t_1 5e+154) (fma (* t z) 0.0625 c) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) / 4.0;
double t_2 = -0.25 * (b * a);
double tmp;
if (t_1 <= -2e+99) {
tmp = t_2;
} else if (t_1 <= 5e+63) {
tmp = fma(y, x, c);
} else if (t_1 <= 5e+154) {
tmp = fma((t * z), 0.0625, c);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) / 4.0) t_2 = Float64(-0.25 * Float64(b * a)) tmp = 0.0 if (t_1 <= -2e+99) tmp = t_2; elseif (t_1 <= 5e+63) tmp = fma(y, x, c); elseif (t_1 <= 5e+154) tmp = fma(Float64(t * z), 0.0625, c); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+99], t$95$2, If[LessEqual[t$95$1, 5e+63], N[(y * x + c), $MachinePrecision], If[LessEqual[t$95$1, 5e+154], N[(N[(t * z), $MachinePrecision] * 0.0625 + c), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a \cdot b}{4}\\
t_2 := -0.25 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot z, 0.0625, c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 a b) #s(literal 4 binary64)) < -1.9999999999999999e99 or 5.00000000000000004e154 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) Initial program 96.4%
Taylor expanded in a around inf
Applied rewrites68.9%
if -1.9999999999999999e99 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) < 5.00000000000000011e63Initial program 98.1%
Taylor expanded in z around 0
Applied rewrites76.8%
Taylor expanded in a around 0
Applied rewrites68.0%
if 5.00000000000000011e63 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) < 5.00000000000000004e154Initial program 100.0%
Taylor expanded in x around 0
Applied rewrites87.6%
Taylor expanded in a around 0
Applied rewrites70.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* a b) 4.0)) (t_2 (* -0.25 (* b a))))
(if (<= t_1 -2e+99)
t_2
(if (<= t_1 2e+77)
(fma y x c)
(if (<= t_1 5e+150) (* (* 0.0625 z) t) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) / 4.0;
double t_2 = -0.25 * (b * a);
double tmp;
if (t_1 <= -2e+99) {
tmp = t_2;
} else if (t_1 <= 2e+77) {
tmp = fma(y, x, c);
} else if (t_1 <= 5e+150) {
tmp = (0.0625 * z) * t;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) / 4.0) t_2 = Float64(-0.25 * Float64(b * a)) tmp = 0.0 if (t_1 <= -2e+99) tmp = t_2; elseif (t_1 <= 2e+77) tmp = fma(y, x, c); elseif (t_1 <= 5e+150) tmp = Float64(Float64(0.0625 * z) * t); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+99], t$95$2, If[LessEqual[t$95$1, 2e+77], N[(y * x + c), $MachinePrecision], If[LessEqual[t$95$1, 5e+150], N[(N[(0.0625 * z), $MachinePrecision] * t), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a \cdot b}{4}\\
t_2 := -0.25 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\left(0.0625 \cdot z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 (*.f64 a b) #s(literal 4 binary64)) < -1.9999999999999999e99 or 5.00000000000000009e150 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) Initial program 96.5%
Taylor expanded in a around inf
Applied rewrites68.1%
if -1.9999999999999999e99 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) < 1.99999999999999997e77Initial program 98.1%
Taylor expanded in z around 0
Applied rewrites76.9%
Taylor expanded in a around 0
Applied rewrites68.2%
if 1.99999999999999997e77 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) < 5.00000000000000009e150Initial program 100.0%
Taylor expanded in z around inf
Applied rewrites65.3%
Applied rewrites65.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z t) 16.0)))
(if (or (<= t_1 -100000.0) (not (<= t_1 5e+111)))
(fma -0.25 (* b a) (fma (* t z) 0.0625 c))
(fma y x (+ c (* (* b a) -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * t) / 16.0;
double tmp;
if ((t_1 <= -100000.0) || !(t_1 <= 5e+111)) {
tmp = fma(-0.25, (b * a), fma((t * z), 0.0625, c));
} else {
tmp = fma(y, x, (c + ((b * a) * -0.25)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * t) / 16.0) tmp = 0.0 if ((t_1 <= -100000.0) || !(t_1 <= 5e+111)) tmp = fma(-0.25, Float64(b * a), fma(Float64(t * z), 0.0625, c)); else tmp = fma(y, x, Float64(c + Float64(Float64(b * a) * -0.25))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -100000.0], N[Not[LessEqual[t$95$1, 5e+111]], $MachinePrecision]], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(N[(t * z), $MachinePrecision] * 0.0625 + c), $MachinePrecision]), $MachinePrecision], N[(y * x + N[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{16}\\
\mathbf{if}\;t\_1 \leq -100000 \lor \neg \left(t\_1 \leq 5 \cdot 10^{+111}\right):\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(t \cdot z, 0.0625, c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c + \left(b \cdot a\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 z t) #s(literal 16 binary64)) < -1e5 or 4.9999999999999997e111 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) Initial program 94.9%
Taylor expanded in x around 0
Applied rewrites84.8%
if -1e5 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) < 4.9999999999999997e111Initial program 99.4%
Taylor expanded in z around 0
Applied rewrites95.6%
Applied rewrites95.6%
Final simplification91.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z t) 16.0)))
(if (or (<= t_1 -2e+233) (not (<= t_1 5e+135)))
(fma -0.25 (* b a) (* (* t z) 0.0625))
(fma y x (+ c (* (* b a) -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * t) / 16.0;
double tmp;
if ((t_1 <= -2e+233) || !(t_1 <= 5e+135)) {
tmp = fma(-0.25, (b * a), ((t * z) * 0.0625));
} else {
tmp = fma(y, x, (c + ((b * a) * -0.25)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * t) / 16.0) tmp = 0.0 if ((t_1 <= -2e+233) || !(t_1 <= 5e+135)) tmp = fma(-0.25, Float64(b * a), Float64(Float64(t * z) * 0.0625)); else tmp = fma(y, x, Float64(c + Float64(Float64(b * a) * -0.25))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+233], N[Not[LessEqual[t$95$1, 5e+135]], $MachinePrecision]], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(N[(t * z), $MachinePrecision] * 0.0625), $MachinePrecision]), $MachinePrecision], N[(y * x + N[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{16}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+233} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+135}\right):\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \left(t \cdot z\right) \cdot 0.0625\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c + \left(b \cdot a\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 z t) #s(literal 16 binary64)) < -1.99999999999999995e233 or 5.00000000000000029e135 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) Initial program 93.6%
Taylor expanded in x around 0
Applied rewrites86.0%
Taylor expanded in z around inf
Applied rewrites86.0%
if -1.99999999999999995e233 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) < 5.00000000000000029e135Initial program 99.0%
Taylor expanded in z around 0
Applied rewrites92.4%
Applied rewrites92.9%
Final simplification91.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z t) 16.0)))
(if (or (<= t_1 -2e+233) (not (<= t_1 5e+190)))
(* (* 0.0625 z) t)
(fma y x (+ c (* (* b a) -0.25))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * t) / 16.0;
double tmp;
if ((t_1 <= -2e+233) || !(t_1 <= 5e+190)) {
tmp = (0.0625 * z) * t;
} else {
tmp = fma(y, x, (c + ((b * a) * -0.25)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * t) / 16.0) tmp = 0.0 if ((t_1 <= -2e+233) || !(t_1 <= 5e+190)) tmp = Float64(Float64(0.0625 * z) * t); else tmp = fma(y, x, Float64(c + Float64(Float64(b * a) * -0.25))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+233], N[Not[LessEqual[t$95$1, 5e+190]], $MachinePrecision]], N[(N[(0.0625 * z), $MachinePrecision] * t), $MachinePrecision], N[(y * x + N[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{16}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+233} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;\left(0.0625 \cdot z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c + \left(b \cdot a\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 z t) #s(literal 16 binary64)) < -1.99999999999999995e233 or 5.00000000000000036e190 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) Initial program 92.6%
Taylor expanded in z around inf
Applied rewrites81.8%
Applied rewrites83.4%
if -1.99999999999999995e233 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) < 5.00000000000000036e190Initial program 99.0%
Taylor expanded in z around 0
Applied rewrites91.2%
Applied rewrites91.7%
Final simplification90.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z t) 16.0)))
(if (or (<= t_1 -2e+233) (not (<= t_1 5e+190)))
(* (* 0.0625 z) t)
(fma -0.25 (* b a) (fma y x c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * t) / 16.0;
double tmp;
if ((t_1 <= -2e+233) || !(t_1 <= 5e+190)) {
tmp = (0.0625 * z) * t;
} else {
tmp = fma(-0.25, (b * a), fma(y, x, c));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * t) / 16.0) tmp = 0.0 if ((t_1 <= -2e+233) || !(t_1 <= 5e+190)) tmp = Float64(Float64(0.0625 * z) * t); else tmp = fma(-0.25, Float64(b * a), fma(y, x, c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+233], N[Not[LessEqual[t$95$1, 5e+190]], $MachinePrecision]], N[(N[(0.0625 * z), $MachinePrecision] * t), $MachinePrecision], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(y * x + c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{16}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+233} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;\left(0.0625 \cdot z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 z t) #s(literal 16 binary64)) < -1.99999999999999995e233 or 5.00000000000000036e190 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) Initial program 92.6%
Taylor expanded in z around inf
Applied rewrites81.8%
Applied rewrites83.4%
if -1.99999999999999995e233 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) < 5.00000000000000036e190Initial program 99.0%
Taylor expanded in z around 0
Applied rewrites91.2%
Final simplification89.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z t) 16.0)))
(if (or (<= t_1 -1e+295) (not (<= t_1 5e+190)))
(* (* 0.0625 z) t)
(fma y x (* -0.25 (* a b))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * t) / 16.0;
double tmp;
if ((t_1 <= -1e+295) || !(t_1 <= 5e+190)) {
tmp = (0.0625 * z) * t;
} else {
tmp = fma(y, x, (-0.25 * (a * b)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * t) / 16.0) tmp = 0.0 if ((t_1 <= -1e+295) || !(t_1 <= 5e+190)) tmp = Float64(Float64(0.0625 * z) * t); else tmp = fma(y, x, Float64(-0.25 * Float64(a * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+295], N[Not[LessEqual[t$95$1, 5e+190]], $MachinePrecision]], N[(N[(0.0625 * z), $MachinePrecision] * t), $MachinePrecision], N[(y * x + N[(-0.25 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{16}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+295} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;\left(0.0625 \cdot z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, -0.25 \cdot \left(a \cdot b\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 z t) #s(literal 16 binary64)) < -9.9999999999999998e294 or 5.00000000000000036e190 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) Initial program 91.7%
Taylor expanded in z around inf
Applied rewrites85.7%
Applied rewrites87.6%
if -9.9999999999999998e294 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) < 5.00000000000000036e190Initial program 99.0%
Taylor expanded in z around 0
Applied rewrites90.1%
Applied rewrites90.6%
Taylor expanded in a around inf
Applied rewrites70.4%
Final simplification73.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* z t) 16.0)))
(if (or (<= t_1 -1e+295) (not (<= t_1 5e+190)))
(* (* 0.0625 z) t)
(fma -0.25 (* b a) (* y x)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (z * t) / 16.0;
double tmp;
if ((t_1 <= -1e+295) || !(t_1 <= 5e+190)) {
tmp = (0.0625 * z) * t;
} else {
tmp = fma(-0.25, (b * a), (y * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(z * t) / 16.0) tmp = 0.0 if ((t_1 <= -1e+295) || !(t_1 <= 5e+190)) tmp = Float64(Float64(0.0625 * z) * t); else tmp = fma(-0.25, Float64(b * a), Float64(y * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+295], N[Not[LessEqual[t$95$1, 5e+190]], $MachinePrecision]], N[(N[(0.0625 * z), $MachinePrecision] * t), $MachinePrecision], N[(-0.25 * N[(b * a), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot t}{16}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+295} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;\left(0.0625 \cdot z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, y \cdot x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 z t) #s(literal 16 binary64)) < -9.9999999999999998e294 or 5.00000000000000036e190 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) Initial program 91.7%
Taylor expanded in z around inf
Applied rewrites85.7%
Applied rewrites87.6%
if -9.9999999999999998e294 < (/.f64 (*.f64 z t) #s(literal 16 binary64)) < 5.00000000000000036e190Initial program 99.0%
Taylor expanded in z around 0
Applied rewrites90.1%
Taylor expanded in x around inf
Applied rewrites69.9%
Final simplification73.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (* a b) 4.0)))
(if (or (<= t_1 -2e+99) (not (<= t_1 5e+154)))
(* -0.25 (* b a))
(fma y x c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (a * b) / 4.0;
double tmp;
if ((t_1 <= -2e+99) || !(t_1 <= 5e+154)) {
tmp = -0.25 * (b * a);
} else {
tmp = fma(y, x, c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(a * b) / 4.0) tmp = 0.0 if ((t_1 <= -2e+99) || !(t_1 <= 5e+154)) tmp = Float64(-0.25 * Float64(b * a)); else tmp = fma(y, x, c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+99], N[Not[LessEqual[t$95$1, 5e+154]], $MachinePrecision]], N[(-0.25 * N[(b * a), $MachinePrecision]), $MachinePrecision], N[(y * x + c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a \cdot b}{4}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+99} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+154}\right):\\
\;\;\;\;-0.25 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 a b) #s(literal 4 binary64)) < -1.9999999999999999e99 or 5.00000000000000004e154 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) Initial program 96.4%
Taylor expanded in a around inf
Applied rewrites68.9%
if -1.9999999999999999e99 < (/.f64 (*.f64 a b) #s(literal 4 binary64)) < 5.00000000000000004e154Initial program 98.3%
Taylor expanded in z around 0
Applied rewrites73.9%
Taylor expanded in a around 0
Applied rewrites64.4%
Final simplification65.8%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= t -1.25e-53) (not (<= t 27500000000000.0))) (* (fma 0.0625 z (/ (fma -0.25 (* b a) (fma y x c)) t)) t) (fma y x (+ c (* (* b a) -0.25)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.25e-53) || !(t <= 27500000000000.0)) {
tmp = fma(0.0625, z, (fma(-0.25, (b * a), fma(y, x, c)) / t)) * t;
} else {
tmp = fma(y, x, (c + ((b * a) * -0.25)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.25e-53) || !(t <= 27500000000000.0)) tmp = Float64(fma(0.0625, z, Float64(fma(-0.25, Float64(b * a), fma(y, x, c)) / t)) * t); else tmp = fma(y, x, Float64(c + Float64(Float64(b * a) * -0.25))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[t, -1.25e-53], N[Not[LessEqual[t, 27500000000000.0]], $MachinePrecision]], N[(N[(0.0625 * z + N[(N[(-0.25 * N[(b * a), $MachinePrecision] + N[(y * x + c), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(y * x + N[(c + N[(N[(b * a), $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-53} \lor \neg \left(t \leq 27500000000000\right):\\
\;\;\;\;\mathsf{fma}\left(0.0625, z, \frac{\mathsf{fma}\left(-0.25, b \cdot a, \mathsf{fma}\left(y, x, c\right)\right)}{t}\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, x, c + \left(b \cdot a\right) \cdot -0.25\right)\\
\end{array}
\end{array}
if t < -1.25e-53 or 2.75e13 < t Initial program 96.6%
Taylor expanded in t around inf
Applied rewrites98.5%
if -1.25e-53 < t < 2.75e13Initial program 99.1%
Taylor expanded in z around 0
Applied rewrites95.5%
Applied rewrites96.4%
Final simplification97.6%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -1e+22) (not (<= (* x y) 5e+105))) (fma y x c) (fma -0.25 (* b a) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -1e+22) || !((x * y) <= 5e+105)) {
tmp = fma(y, x, c);
} else {
tmp = fma(-0.25, (b * a), c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -1e+22) || !(Float64(x * y) <= 5e+105)) tmp = fma(y, x, c); else tmp = fma(-0.25, Float64(b * a), c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -1e+22], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e+105]], $MachinePrecision]], N[(y * x + c), $MachinePrecision], N[(-0.25 * N[(b * a), $MachinePrecision] + c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{+22} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{+105}\right):\\
\;\;\;\;\mathsf{fma}\left(y, x, c\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.25, b \cdot a, c\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1e22 or 5.00000000000000046e105 < (*.f64 x y) Initial program 95.7%
Taylor expanded in z around 0
Applied rewrites85.9%
Taylor expanded in a around 0
Applied rewrites78.1%
if -1e22 < (*.f64 x y) < 5.00000000000000046e105Initial program 99.4%
Taylor expanded in z around 0
Applied rewrites71.4%
Taylor expanded in x around 0
Applied rewrites65.2%
Final simplification71.1%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= (* x y) -5e+119) (not (<= (* x y) 2e-18))) (* y x) c))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * y) <= -5e+119) || !((x * y) <= 2e-18)) {
tmp = y * x;
} else {
tmp = 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 (((x * y) <= (-5d+119)) .or. (.not. ((x * y) <= 2d-18))) then
tmp = y * x
else
tmp = 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 (((x * y) <= -5e+119) || !((x * y) <= 2e-18)) {
tmp = y * x;
} else {
tmp = c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if ((x * y) <= -5e+119) or not ((x * y) <= 2e-18): tmp = y * x else: tmp = c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((Float64(x * y) <= -5e+119) || !(Float64(x * y) <= 2e-18)) tmp = Float64(y * x); else tmp = c; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (((x * y) <= -5e+119) || ~(((x * y) <= 2e-18))) tmp = y * x; else tmp = c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[N[(x * y), $MachinePrecision], -5e+119], N[Not[LessEqual[N[(x * y), $MachinePrecision], 2e-18]], $MachinePrecision]], N[(y * x), $MachinePrecision], c]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+119} \lor \neg \left(x \cdot y \leq 2 \cdot 10^{-18}\right):\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\end{array}
if (*.f64 x y) < -4.9999999999999999e119 or 2.0000000000000001e-18 < (*.f64 x y) Initial program 95.8%
Taylor expanded in x around inf
Applied rewrites65.1%
if -4.9999999999999999e119 < (*.f64 x y) < 2.0000000000000001e-18Initial program 99.4%
Taylor expanded in c around inf
Applied rewrites29.1%
Final simplification45.7%
(FPCore (x y z t a b c) :precision binary64 (fma y x c))
double code(double x, double y, double z, double t, double a, double b, double c) {
return fma(y, x, c);
}
function code(x, y, z, t, a, b, c) return fma(y, x, c) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(y * x + c), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, x, c\right)
\end{array}
Initial program 97.7%
Taylor expanded in z around 0
Applied rewrites78.1%
Taylor expanded in a around 0
Applied rewrites52.0%
(FPCore (x y z t a b c) :precision binary64 c)
double code(double x, double y, double z, double t, double a, double b, double c) {
return 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 = c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return c;
}
def code(x, y, z, t, a, b, c): return c
function code(x, y, z, t, a, b, c) return c end
function tmp = code(x, y, z, t, a, b, c) tmp = c; end
code[x_, y_, z_, t_, a_, b_, c_] := c
\begin{array}{l}
\\
c
\end{array}
Initial program 97.7%
Taylor expanded in c around inf
Applied rewrites18.5%
herbie shell --seed 2025021
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, C"
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c))