
(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 14 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 (fma (* y x) 9.0 b))
(t_2 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(t_3 (* (/ (fma -4.0 t (/ t_1 (* a z))) c) a)))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 2e+295) (fma -4.0 (/ (* a t) c) (/ t_1 (* c z))) t_3))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((y * x), 9.0, b);
double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_3 = (fma(-4.0, t, (t_1 / (a * z))) / c) * a;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= 2e+295) {
tmp = fma(-4.0, ((a * t) / c), (t_1 / (c * z)));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(y * x), 9.0, b) t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_3 = Float64(Float64(fma(-4.0, t, Float64(t_1 / Float64(a * z))) / c) * a) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= 2e+295) tmp = fma(-4.0, Float64(Float64(a * t) / c), Float64(t_1 / Float64(c * z))); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(N[(N[(-4.0 * t + N[(t$95$1 / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 2e+295], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] + N[(t$95$1 / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_2 := \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}\\
t_3 := \frac{\mathsf{fma}\left(-4, t, \frac{t\_1}{a \cdot z}\right)}{c} \cdot a\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{t\_1}{c \cdot z}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < -inf.0 or 2e295 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) Initial program 70.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites80.6%
Taylor expanded in c around 0
lower-/.f64N/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lower-*.f6486.8
Applied rewrites86.8%
if -inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 2e295Initial program 90.7%
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-*.f6491.3
Applied rewrites91.3%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma (* y x) 9.0 b)))
(if (<= c 2.6e+48)
(/ (fma (* a t) -4.0 (/ t_1 z)) c)
(* (fma (/ t c) -4.0 (/ t_1 (* (* c z) a))) a))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((y * x), 9.0, b);
double tmp;
if (c <= 2.6e+48) {
tmp = fma((a * t), -4.0, (t_1 / z)) / c;
} else {
tmp = fma((t / c), -4.0, (t_1 / ((c * z) * a))) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(y * x), 9.0, b) tmp = 0.0 if (c <= 2.6e+48) tmp = Float64(fma(Float64(a * t), -4.0, Float64(t_1 / z)) / c); else tmp = Float64(fma(Float64(t / c), -4.0, Float64(t_1 / Float64(Float64(c * z) * a))) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]}, If[LessEqual[c, 2.6e+48], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(t / c), $MachinePrecision] * -4.0 + N[(t$95$1 / N[(N[(c * z), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
\mathbf{if}\;c \leq 2.6 \cdot 10^{+48}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{t\_1}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{c}, -4, \frac{t\_1}{\left(c \cdot z\right) \cdot a}\right) \cdot a\\
\end{array}
\end{array}
if c < 2.59999999999999995e48Initial program 83.0%
Taylor expanded in b around inf
Applied rewrites35.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6434.3
associate-+l-34.3
associate-*l*34.3
*-commutative34.3
*-commutative34.3
associate-+l-34.3
Applied rewrites34.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-*.f6489.9
Applied rewrites89.9%
if 2.59999999999999995e48 < c Initial program 67.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites74.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma (* y x) 9.0 b))
(t_2 (* (/ (fma -4.0 t (/ t_1 (* a z))) c) a)))
(if (<= a -20000000.0)
t_2
(if (<= a 3.5e+23) (/ (fma (* a t) -4.0 (/ t_1 z)) c) t_2))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma((y * x), 9.0, b);
double t_2 = (fma(-4.0, t, (t_1 / (a * z))) / c) * a;
double tmp;
if (a <= -20000000.0) {
tmp = t_2;
} else if (a <= 3.5e+23) {
tmp = fma((a * t), -4.0, (t_1 / z)) / c;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = fma(Float64(y * x), 9.0, b) t_2 = Float64(Float64(fma(-4.0, t, Float64(t_1 / Float64(a * z))) / c) * a) tmp = 0.0 if (a <= -20000000.0) tmp = t_2; elseif (a <= 3.5e+23) tmp = Float64(fma(Float64(a * t), -4.0, Float64(t_1 / z)) / c); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(-4.0 * t + N[(t$95$1 / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -20000000.0], t$95$2, If[LessEqual[a, 3.5e+23], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_2 := \frac{\mathsf{fma}\left(-4, t, \frac{t\_1}{a \cdot z}\right)}{c} \cdot a\\
\mathbf{if}\;a \leq -20000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+23}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{t\_1}{z}\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2e7 or 3.5000000000000002e23 < a Initial program 78.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites83.8%
Taylor expanded in c around 0
lower-/.f64N/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lower-*.f6488.2
Applied rewrites88.2%
if -2e7 < a < 3.5000000000000002e23Initial program 80.7%
Taylor expanded in b around inf
Applied rewrites42.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6441.4
associate-+l-41.4
associate-*l*41.4
*-commutative41.4
*-commutative41.4
associate-+l-41.4
Applied rewrites41.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-*.f6489.8
Applied rewrites89.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (/ (fma -4.0 t (/ b (* a z))) c) a)))
(if (<= t -5.6e+219)
t_1
(if (<= t 1.08e-19)
(/ (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 = (fma(-4.0, t, (b / (a * z))) / c) * a;
double tmp;
if (t <= -5.6e+219) {
tmp = t_1;
} else if (t <= 1.08e-19) {
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(fma(-4.0, t, Float64(b / Float64(a * z))) / c) * a) tmp = 0.0 if (t <= -5.6e+219) tmp = t_1; elseif (t <= 1.08e-19) 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[(-4.0 * t + N[(b / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -5.6e+219], t$95$1, If[LessEqual[t, 1.08e-19], 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 := \frac{\mathsf{fma}\left(-4, t, \frac{b}{a \cdot z}\right)}{c} \cdot a\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{+219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{-19}:\\
\;\;\;\;\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 t < -5.60000000000000031e219 or 1.08e-19 < t Initial program 73.1%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.8%
Taylor expanded in c around 0
lower-/.f64N/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lower-*.f6481.5
Applied rewrites81.5%
Taylor expanded in x around 0
Applied rewrites73.1%
if -5.60000000000000031e219 < t < 1.08e-19Initial program 83.1%
Taylor expanded in b around inf
Applied rewrites40.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6438.7
associate-+l-38.7
associate-*l*38.7
*-commutative38.7
*-commutative38.7
associate-+l-38.7
Applied rewrites38.7%
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.6
Applied rewrites88.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -1.5e-48)
(fma (/ (* a t) c) -4.0 (/ b (* c z)))
(if (<= b 5.5e-13)
(/ (fma (* a t) -4.0 (* (/ (* y x) z) 9.0)) c)
(* (/ (fma -4.0 t (/ b (* a z))) c) a))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -1.5e-48) {
tmp = fma(((a * t) / c), -4.0, (b / (c * z)));
} else if (b <= 5.5e-13) {
tmp = fma((a * t), -4.0, (((y * x) / z) * 9.0)) / c;
} else {
tmp = (fma(-4.0, t, (b / (a * z))) / c) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -1.5e-48) tmp = fma(Float64(Float64(a * t) / c), -4.0, Float64(b / Float64(c * z))); elseif (b <= 5.5e-13) tmp = Float64(fma(Float64(a * t), -4.0, Float64(Float64(Float64(y * x) / z) * 9.0)) / c); else tmp = Float64(Float64(fma(-4.0, t, Float64(b / Float64(a * z))) / c) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.5e-48], N[(N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision] * -4.0 + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.5e-13], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(N[(-4.0 * t + N[(b / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.5 \cdot 10^{-48}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a \cdot t}{c}, -4, \frac{b}{c \cdot z}\right)\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{y \cdot x}{z} \cdot 9\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, t, \frac{b}{a \cdot z}\right)}{c} \cdot a\\
\end{array}
\end{array}
if b < -1.5e-48Initial program 79.8%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites70.7%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f6469.5
Applied rewrites69.5%
if -1.5e-48 < b < 5.49999999999999979e-13Initial program 79.9%
Taylor expanded in b around inf
Applied rewrites17.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6415.4
associate-+l-15.4
associate-*l*15.4
*-commutative15.4
*-commutative15.4
associate-+l-15.4
Applied rewrites15.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-*.f6487.9
Applied rewrites87.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift-*.f6480.7
Applied rewrites80.7%
if 5.49999999999999979e-13 < b Initial program 79.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites76.0%
Taylor expanded in c around 0
lower-/.f64N/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lower-*.f6479.0
Applied rewrites79.0%
Taylor expanded in x around 0
Applied rewrites67.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (/ (fma -4.0 t (/ b (* a z))) c) a)))
(if (<= t -11000000000.0)
t_1
(if (<= t 6.1e-89) (/ (fma x (* y 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 = (fma(-4.0, t, (b / (a * z))) / c) * a;
double tmp;
if (t <= -11000000000.0) {
tmp = t_1;
} else if (t <= 6.1e-89) {
tmp = fma(x, (y * 9.0), b) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(fma(-4.0, t, Float64(b / Float64(a * z))) / c) * a) tmp = 0.0 if (t <= -11000000000.0) tmp = t_1; elseif (t <= 6.1e-89) tmp = Float64(fma(x, Float64(y * 9.0), b) / Float64(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[(-4.0 * t + N[(b / N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -11000000000.0], t$95$1, If[LessEqual[t, 6.1e-89], N[(N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(-4, t, \frac{b}{a \cdot z}\right)}{c} \cdot a\\
\mathbf{if}\;t \leq -11000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{-89}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y \cdot 9, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1e10 or 6.1000000000000003e-89 < t Initial program 75.1%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.9%
Taylor expanded in c around 0
lower-/.f64N/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lower-*.f6481.4
Applied rewrites81.4%
Taylor expanded in x around 0
Applied rewrites70.8%
if -1.1e10 < t < 6.1000000000000003e-89Initial program 85.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6475.2
Applied rewrites75.2%
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6475.1
Applied rewrites75.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ t c) -4.0) a)))
(if (<= t -2.75e+210)
t_1
(if (<= t -11000000000.0)
(/ (fma (* a t) -4.0 (/ b z)) c)
(if (<= t 3.6e-20) (/ (fma x (* y 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 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -2.75e+210) {
tmp = t_1;
} else if (t <= -11000000000.0) {
tmp = fma((a * t), -4.0, (b / z)) / c;
} else if (t <= 3.6e-20) {
tmp = fma(x, (y * 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(t / c) * -4.0) * a) tmp = 0.0 if (t <= -2.75e+210) tmp = t_1; elseif (t <= -11000000000.0) tmp = Float64(fma(Float64(a * t), -4.0, Float64(b / z)) / c); elseif (t <= 3.6e-20) tmp = Float64(fma(x, Float64(y * 9.0), b) / Float64(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[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -2.75e+210], t$95$1, If[LessEqual[t, -11000000000.0], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 3.6e-20], N[(N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{+210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -11000000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y \cdot 9, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.75000000000000006e210 or 3.59999999999999974e-20 < t Initial program 72.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f6461.4
Applied rewrites61.4%
if -2.75000000000000006e210 < t < -1.1e10Initial program 76.3%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites70.4%
Taylor expanded in c around -inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites70.3%
Taylor expanded in y around 0
+-commutativeN/A
metadata-evalN/A
fp-cancel-sub-sign-invN/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lift-*.f64N/A
lower-/.f6468.0
Applied rewrites68.0%
if -1.1e10 < t < 3.59999999999999974e-20Initial program 85.5%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6473.8
Applied rewrites73.8%
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6473.7
Applied rewrites73.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ t c) -4.0) a)))
(if (<= t -3.2e+106)
t_1
(if (<= t 3.6e-20) (/ (fma x (* y 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 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -3.2e+106) {
tmp = t_1;
} else if (t <= 3.6e-20) {
tmp = fma(x, (y * 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(t / c) * -4.0) * a) tmp = 0.0 if (t <= -3.2e+106) tmp = t_1; elseif (t <= 3.6e-20) tmp = Float64(fma(x, Float64(y * 9.0), b) / Float64(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[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -3.2e+106], t$95$1, If[LessEqual[t, 3.6e-20], N[(N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y \cdot 9, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.1999999999999998e106 or 3.59999999999999974e-20 < t Initial program 73.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f6460.9
Applied rewrites60.9%
if -3.1999999999999998e106 < t < 3.59999999999999974e-20Initial program 84.6%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6471.3
Applied rewrites71.3%
lift-fma.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6471.2
Applied rewrites71.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ t c) -4.0) a)))
(if (<= t -9.2e+61)
t_1
(if (<= t -6.5e-12)
(/ b (* z c))
(if (<= t 1.4e-22) (/ (* y (* (/ x z) 9.0)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= -6.5e-12) {
tmp = b / (z * c);
} else if (t <= 1.4e-22) {
tmp = (y * ((x / z) * 9.0)) / 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 = ((t / c) * (-4.0d0)) * a
if (t <= (-9.2d+61)) then
tmp = t_1
else if (t <= (-6.5d-12)) then
tmp = b / (z * c)
else if (t <= 1.4d-22) then
tmp = (y * ((x / z) * 9.0d0)) / 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 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= -6.5e-12) {
tmp = b / (z * c);
} else if (t <= 1.4e-22) {
tmp = (y * ((x / z) * 9.0)) / c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t / c) * -4.0) * a tmp = 0 if t <= -9.2e+61: tmp = t_1 elif t <= -6.5e-12: tmp = b / (z * c) elif t <= 1.4e-22: tmp = (y * ((x / z) * 9.0)) / c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t / c) * -4.0) * a) tmp = 0.0 if (t <= -9.2e+61) tmp = t_1; elseif (t <= -6.5e-12) tmp = Float64(b / Float64(z * c)); elseif (t <= 1.4e-22) tmp = Float64(Float64(y * Float64(Float64(x / z) * 9.0)) / c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t / c) * -4.0) * a; tmp = 0.0; if (t <= -9.2e+61) tmp = t_1; elseif (t <= -6.5e-12) tmp = b / (z * c); elseif (t <= 1.4e-22) tmp = (y * ((x / z) * 9.0)) / c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -9.2e+61], t$95$1, If[LessEqual[t, -6.5e-12], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-22], N[(N[(y * N[(N[(x / z), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{y \cdot \left(\frac{x}{z} \cdot 9\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.1999999999999998e61 or 1.39999999999999997e-22 < t Initial program 73.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f6460.2
Applied rewrites60.2%
if -9.1999999999999998e61 < t < -6.5000000000000002e-12Initial program 81.7%
Taylor expanded in b around inf
Applied rewrites34.3%
if -6.5000000000000002e-12 < t < 1.39999999999999997e-22Initial program 85.6%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.5%
Taylor expanded in c around -inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites76.7%
Taylor expanded in x around inf
*-commutativeN/A
lift-/.f64N/A
lift-*.f6444.9
Applied rewrites44.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6443.7
Applied rewrites43.7%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (/ t c) -4.0) a)))
(if (<= t -9.2e+61)
t_1
(if (<= t -2.2e-133)
(/ b (* z c))
(if (<= t 4e-23) (* y (* (/ x (* c z)) 9.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= -2.2e-133) {
tmp = b / (z * c);
} else if (t <= 4e-23) {
tmp = y * ((x / (c * z)) * 9.0);
} 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 = ((t / c) * (-4.0d0)) * a
if (t <= (-9.2d+61)) then
tmp = t_1
else if (t <= (-2.2d-133)) then
tmp = b / (z * c)
else if (t <= 4d-23) then
tmp = y * ((x / (c * z)) * 9.0d0)
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 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= -2.2e-133) {
tmp = b / (z * c);
} else if (t <= 4e-23) {
tmp = y * ((x / (c * z)) * 9.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t / c) * -4.0) * a tmp = 0 if t <= -9.2e+61: tmp = t_1 elif t <= -2.2e-133: tmp = b / (z * c) elif t <= 4e-23: tmp = y * ((x / (c * z)) * 9.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t / c) * -4.0) * a) tmp = 0.0 if (t <= -9.2e+61) tmp = t_1; elseif (t <= -2.2e-133) tmp = Float64(b / Float64(z * c)); elseif (t <= 4e-23) tmp = Float64(y * Float64(Float64(x / Float64(c * z)) * 9.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t / c) * -4.0) * a; tmp = 0.0; if (t <= -9.2e+61) tmp = t_1; elseif (t <= -2.2e-133) tmp = b / (z * c); elseif (t <= 4e-23) tmp = y * ((x / (c * z)) * 9.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -9.2e+61], t$95$1, If[LessEqual[t, -2.2e-133], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-23], N[(y * N[(N[(x / N[(c * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-133}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-23}:\\
\;\;\;\;y \cdot \left(\frac{x}{c \cdot z} \cdot 9\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.1999999999999998e61 or 3.99999999999999984e-23 < t Initial program 73.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f6460.2
Applied rewrites60.2%
if -9.1999999999999998e61 < t < -2.2000000000000001e-133Initial program 83.3%
Taylor expanded in b around inf
Applied rewrites37.3%
if -2.2000000000000001e-133 < t < 3.99999999999999984e-23Initial program 86.0%
Taylor expanded in y around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.7%
Taylor expanded in c around -inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites77.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6447.1
Applied rewrites47.1%
(FPCore (x y z t a b c) :precision binary64 (if (<= t -9.2e+61) (* (* (/ t c) -4.0) a) (if (<= t 1.7e-87) (/ b (* z c)) (* (/ (* -4.0 t) c) a))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.2e+61) {
tmp = ((t / c) * -4.0) * a;
} else if (t <= 1.7e-87) {
tmp = b / (z * c);
} else {
tmp = ((-4.0 * t) / c) * a;
}
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 (t <= (-9.2d+61)) then
tmp = ((t / c) * (-4.0d0)) * a
else if (t <= 1.7d-87) then
tmp = b / (z * c)
else
tmp = (((-4.0d0) * t) / c) * a
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 (t <= -9.2e+61) {
tmp = ((t / c) * -4.0) * a;
} else if (t <= 1.7e-87) {
tmp = b / (z * c);
} else {
tmp = ((-4.0 * t) / c) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if t <= -9.2e+61: tmp = ((t / c) * -4.0) * a elif t <= 1.7e-87: tmp = b / (z * c) else: tmp = ((-4.0 * t) / c) * a return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -9.2e+61) tmp = Float64(Float64(Float64(t / c) * -4.0) * a); elseif (t <= 1.7e-87) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(Float64(-4.0 * t) / c) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (t <= -9.2e+61) tmp = ((t / c) * -4.0) * a; elseif (t <= 1.7e-87) tmp = b / (z * c); else tmp = ((-4.0 * t) / c) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -9.2e+61], N[(N[(N[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 1.7e-87], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-4.0 * t), $MachinePrecision] / c), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+61}:\\
\;\;\;\;\left(\frac{t}{c} \cdot -4\right) \cdot a\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-87}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot t}{c} \cdot a\\
\end{array}
\end{array}
if t < -9.1999999999999998e61Initial program 72.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites74.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f6461.2
Applied rewrites61.2%
if -9.1999999999999998e61 < t < 1.6999999999999999e-87Initial program 85.4%
Taylor expanded in b around inf
Applied rewrites42.9%
if 1.6999999999999999e-87 < t Initial program 75.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites78.9%
Taylor expanded in c around 0
lower-/.f64N/A
lower-fma.f64N/A
+-commutativeN/A
associate-*r/N/A
div-addN/A
lower-/.f64N/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
lift-fma.f64N/A
lift-*.f64N/A
lower-*.f6481.7
Applied rewrites81.7%
Taylor expanded in z around inf
lower-*.f6454.3
Applied rewrites54.3%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* (* (/ t c) -4.0) a))) (if (<= t -9.2e+61) t_1 (if (<= t 1.7e-87) (/ b (* z c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= 1.7e-87) {
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 = ((t / c) * (-4.0d0)) * a
if (t <= (-9.2d+61)) then
tmp = t_1
else if (t <= 1.7d-87) 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 = ((t / c) * -4.0) * a;
double tmp;
if (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= 1.7e-87) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t / c) * -4.0) * a tmp = 0 if t <= -9.2e+61: tmp = t_1 elif t <= 1.7e-87: tmp = b / (z * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t / c) * -4.0) * a) tmp = 0.0 if (t <= -9.2e+61) tmp = t_1; elseif (t <= 1.7e-87) 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 = ((t / c) * -4.0) * a; tmp = 0.0; if (t <= -9.2e+61) tmp = t_1; elseif (t <= 1.7e-87) 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[(N[(N[(t / c), $MachinePrecision] * -4.0), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[t, -9.2e+61], t$95$1, If[LessEqual[t, 1.7e-87], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\frac{t}{c} \cdot -4\right) \cdot a\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-87}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.1999999999999998e61 or 1.6999999999999999e-87 < t Initial program 74.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites77.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lift-/.f6456.9
Applied rewrites56.9%
if -9.1999999999999998e61 < t < 1.6999999999999999e-87Initial program 85.4%
Taylor expanded in b around inf
Applied rewrites42.9%
(FPCore (x y z t a b c) :precision binary64 (let* ((t_1 (* -4.0 (/ (* a t) c)))) (if (<= t -9.2e+61) t_1 (if (<= t 1.7e-87) (/ 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 (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= 1.7e-87) {
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 (t <= (-9.2d+61)) then
tmp = t_1
else if (t <= 1.7d-87) 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 (t <= -9.2e+61) {
tmp = t_1;
} else if (t <= 1.7e-87) {
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 t <= -9.2e+61: tmp = t_1 elif t <= 1.7e-87: 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 (t <= -9.2e+61) tmp = t_1; elseif (t <= 1.7e-87) 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 (t <= -9.2e+61) tmp = t_1; elseif (t <= 1.7e-87) 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[t, -9.2e+61], t$95$1, If[LessEqual[t, 1.7e-87], 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}\;t \leq -9.2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-87}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.1999999999999998e61 or 1.6999999999999999e-87 < t Initial program 74.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6451.2
Applied rewrites51.2%
if -9.1999999999999998e61 < t < 1.6999999999999999e-87Initial program 85.4%
Taylor expanded in b around inf
Applied rewrites42.9%
(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.8%
Taylor expanded in b around inf
Applied rewrites35.0%
herbie shell --seed 2025114
(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)))