
(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]
\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}
Herbie found 16 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]
\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}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
1.0
(/
(- c)
(*
(fmax x y)
(-
(fma -9.0 (/ (fmin x y) z) (* 4.0 (/ (* a t) (fmax x y))))
(/ b (* (fmax x y) z))))))))
(if (<= z -4.4e+114)
t_1
(if (<= z 1.2e+80)
(/
(/ (fma (* (* z t) -4.0) a (fma (* (fmax x y) (fmin x y)) 9.0 b)) c)
z)
t_1))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 1.0 / (-c / (fmax(x, y) * (fma(-9.0, (fmin(x, y) / z), (4.0 * ((a * t) / fmax(x, y)))) - (b / (fmax(x, y) * z)))));
double tmp;
if (z <= -4.4e+114) {
tmp = t_1;
} else if (z <= 1.2e+80) {
tmp = (fma(((z * t) * -4.0), a, fma((fmax(x, y) * fmin(x, y)), 9.0, b)) / c) / z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(1.0 / Float64(Float64(-c) / Float64(fmax(x, y) * Float64(fma(-9.0, Float64(fmin(x, y) / z), Float64(4.0 * Float64(Float64(a * t) / fmax(x, y)))) - Float64(b / Float64(fmax(x, y) * z)))))) tmp = 0.0 if (z <= -4.4e+114) tmp = t_1; elseif (z <= 1.2e+80) tmp = Float64(Float64(fma(Float64(Float64(z * t) * -4.0), a, fma(Float64(fmax(x, y) * fmin(x, y)), 9.0, b)) / c) / z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(1.0 / N[((-c) / N[(N[Max[x, y], $MachinePrecision] * N[(N[(-9.0 * N[(N[Min[x, y], $MachinePrecision] / z), $MachinePrecision] + N[(4.0 * N[(N[(a * t), $MachinePrecision] / N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b / N[(N[Max[x, y], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+114], t$95$1, If[LessEqual[z, 1.2e+80], N[(N[(N[(N[(N[(z * t), $MachinePrecision] * -4.0), $MachinePrecision] * a + N[(N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \frac{1}{\frac{-c}{\mathsf{max}\left(x, y\right) \cdot \left(\mathsf{fma}\left(-9, \frac{\mathsf{min}\left(x, y\right)}{z}, 4 \cdot \frac{a \cdot t}{\mathsf{max}\left(x, y\right)}\right) - \frac{b}{\mathsf{max}\left(x, y\right) \cdot z}\right)}}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+80}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(z \cdot t\right) \cdot -4, a, \mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -4.4000000000000001e114 or 1.1999999999999999e80 < z Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6475.0
Applied rewrites75.0%
if -4.4000000000000001e114 < z < 1.1999999999999999e80Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Applied rewrites80.1%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* z (fabs c)))
(t_2
(/
(fma (* 9.0 (fmin x y)) (fmax x y) (fma -4.0 (* (* a t) z) b))
t_1))
(t_3
(/
(+ (- (* (* (fmin x y) 9.0) (fmax x y)) (* (* (* z 4.0) t) a)) b)
t_1)))
(*
(copysign 1.0 c)
(if (<= t_3 -2e-251)
t_2
(if (<= t_3 2e+227)
(/
(/
(fma (* (* z t) -4.0) a (fma (* (fmax x y) (fmin x y)) 9.0 b))
(fabs c))
z)
(if (<= t_3 INFINITY) t_2 (/ 1.0 (* -0.25 (/ (fabs c) (* a t))))))))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = z * fabs(c);
double t_2 = fma((9.0 * fmin(x, y)), fmax(x, y), fma(-4.0, ((a * t) * z), b)) / t_1;
double t_3 = ((((fmin(x, y) * 9.0) * fmax(x, y)) - (((z * 4.0) * t) * a)) + b) / t_1;
double tmp;
if (t_3 <= -2e-251) {
tmp = t_2;
} else if (t_3 <= 2e+227) {
tmp = (fma(((z * t) * -4.0), a, fma((fmax(x, y) * fmin(x, y)), 9.0, b)) / fabs(c)) / z;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = 1.0 / (-0.25 * (fabs(c) / (a * t)));
}
return copysign(1.0, c) * tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(z * abs(c)) t_2 = Float64(fma(Float64(9.0 * fmin(x, y)), fmax(x, y), fma(-4.0, Float64(Float64(a * t) * z), b)) / t_1) t_3 = Float64(Float64(Float64(Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / t_1) tmp = 0.0 if (t_3 <= -2e-251) tmp = t_2; elseif (t_3 <= 2e+227) tmp = Float64(Float64(fma(Float64(Float64(z * t) * -4.0), a, fma(Float64(fmax(x, y) * fmin(x, y)), 9.0, b)) / abs(c)) / z); elseif (t_3 <= Inf) tmp = t_2; else tmp = Float64(1.0 / Float64(-0.25 * Float64(abs(c) / Float64(a * t)))); end return Float64(copysign(1.0, c) * tmp) end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[(-4.0 * N[(N[(a * t), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[t$95$3, -2e-251], t$95$2, If[LessEqual[t$95$3, 2e+227], N[(N[(N[(N[(N[(z * t), $MachinePrecision] * -4.0), $MachinePrecision] * a + N[(N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, N[(1.0 / N[(-0.25 * N[(N[Abs[c], $MachinePrecision] / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := z \cdot \left|c\right|\\
t_2 := \frac{\mathsf{fma}\left(9 \cdot \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{t\_1}\\
t_3 := \frac{\left(\left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{t\_1}\\
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{-251}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+227}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(z \cdot t\right) \cdot -4, a, \mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)\right)}{\left|c\right|}}{z}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{-0.25 \cdot \frac{\left|c\right|}{a \cdot t}}\\
\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)) < -2.00000000000000003e-251 or 2.0000000000000002e227 < (/.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.0Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
if -2.00000000000000003e-251 < (/.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)) < 2.0000000000000002e227Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Applied rewrites80.1%
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)) Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c)
:precision binary64
(*
(copysign 1.0 c)
(if (<= (fabs c) 7.5e-20)
(/ (fma (* 9.0 x) y (fma -4.0 (* (* a t) z) b)) (* z (fabs c)))
(if (<= (fabs c) 1.75e+119)
(fma
(* x 9.0)
(/ y (* (fabs c) z))
(* t (fma -4.0 (/ a (fabs c)) (/ b (* (fabs c) (* t z))))))
(/
(fma (/ y (fabs c)) (* 9.0 x) (/ (fma (* (* t z) -4.0) a b) (fabs c)))
z)))))double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (fabs(c) <= 7.5e-20) {
tmp = fma((9.0 * x), y, fma(-4.0, ((a * t) * z), b)) / (z * fabs(c));
} else if (fabs(c) <= 1.75e+119) {
tmp = fma((x * 9.0), (y / (fabs(c) * z)), (t * fma(-4.0, (a / fabs(c)), (b / (fabs(c) * (t * z))))));
} else {
tmp = fma((y / fabs(c)), (9.0 * x), (fma(((t * z) * -4.0), a, b) / fabs(c))) / z;
}
return copysign(1.0, c) * tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (abs(c) <= 7.5e-20) tmp = Float64(fma(Float64(9.0 * x), y, fma(-4.0, Float64(Float64(a * t) * z), b)) / Float64(z * abs(c))); elseif (abs(c) <= 1.75e+119) tmp = fma(Float64(x * 9.0), Float64(y / Float64(abs(c) * z)), Float64(t * fma(-4.0, Float64(a / abs(c)), Float64(b / Float64(abs(c) * Float64(t * z)))))); else tmp = Float64(fma(Float64(y / abs(c)), Float64(9.0 * x), Float64(fma(Float64(Float64(t * z) * -4.0), a, b) / abs(c))) / z); end return Float64(copysign(1.0, c) * tmp) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[c], $MachinePrecision], 7.5e-20], N[(N[(N[(9.0 * x), $MachinePrecision] * y + N[(-4.0 * N[(N[(a * t), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[c], $MachinePrecision], 1.75e+119], N[(N[(x * 9.0), $MachinePrecision] * N[(y / N[(N[Abs[c], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(-4.0 * N[(a / N[Abs[c], $MachinePrecision]), $MachinePrecision] + N[(b / N[(N[Abs[c], $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[Abs[c], $MachinePrecision]), $MachinePrecision] * N[(9.0 * x), $MachinePrecision] + N[(N[(N[(N[(t * z), $MachinePrecision] * -4.0), $MachinePrecision] * a + b), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]), $MachinePrecision]
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|c\right| \leq 7.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot \left|c\right|}\\
\mathbf{elif}\;\left|c\right| \leq 1.75 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot 9, \frac{y}{\left|c\right| \cdot z}, t \cdot \mathsf{fma}\left(-4, \frac{a}{\left|c\right|}, \frac{b}{\left|c\right| \cdot \left(t \cdot z\right)}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{\left|c\right|}, 9 \cdot x, \frac{\mathsf{fma}\left(\left(t \cdot z\right) \cdot -4, a, b\right)}{\left|c\right|}\right)}{z}\\
\end{array}
if c < 7.49999999999999981e-20Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
if 7.49999999999999981e-20 < c < 1.75e119Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
lift-/.f64N/A
lift-fma.f64N/A
div-addN/A
associate-/l*N/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lower-/.f6473.8
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6473.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6473.8
lift-*.f64N/A
*-commutativeN/A
lift-*.f6473.8
Applied rewrites73.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6472.8
Applied rewrites72.8%
if 1.75e119 < c Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites79.9%
Applied rewrites77.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1
(/
(+ (- (* (* (fmin x y) 9.0) (fmax x y)) (* (* (* z 4.0) t) a)) b)
(* z c)))
(t_2
(/
(fma (* 9.0 (fmin x y)) (fmax x y) (fma -4.0 (* (* a t) z) b))
(* z c))))
(if (<= t_1 -2e-251)
t_2
(if (<= t_1 0.0)
(/ 1.0 (/ (- c) (/ (- (* 4.0 (* a (* t z))) b) z)))
(if (<= t_1 INFINITY) t_2 (/ 1.0 (* -0.25 (/ c (* a t)))))))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((fmin(x, y) * 9.0) * fmax(x, y)) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = fma((9.0 * fmin(x, y)), fmax(x, y), fma(-4.0, ((a * t) * z), b)) / (z * c);
double tmp;
if (t_1 <= -2e-251) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = 1.0 / (-c / (((4.0 * (a * (t * z))) - b) / z));
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = 1.0 / (-0.25 * (c / (a * t)));
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y)) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_2 = Float64(fma(Float64(9.0 * fmin(x, y)), fmax(x, y), fma(-4.0, Float64(Float64(a * t) * z), b)) / Float64(z * c)) tmp = 0.0 if (t_1 <= -2e-251) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(1.0 / Float64(Float64(-c) / Float64(Float64(Float64(4.0 * Float64(a * Float64(t * z))) - b) / z))); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(1.0 / Float64(-0.25 * Float64(c / Float64(a * t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[(-4.0 * N[(N[(a * t), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-251], t$95$2, If[LessEqual[t$95$1, 0.0], N[(1.0 / N[((-c) / N[(N[(N[(4.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(1.0 / N[(-0.25 * N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := \frac{\left(\left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right) - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_2 := \frac{\mathsf{fma}\left(9 \cdot \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot c}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-251}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{1}{\frac{-c}{\frac{4 \cdot \left(a \cdot \left(t \cdot z\right)\right) - b}{z}}}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{-0.25 \cdot \frac{c}{a \cdot t}}\\
\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)) < -2.00000000000000003e-251 or 0.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)) < +inf.0Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
if -2.00000000000000003e-251 < (/.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)) < 0.0Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6456.7
Applied rewrites56.7%
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)) Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c)
:precision binary64
(*
(copysign 1.0 c)
(if (<= (fabs c) 2e+28)
(/
(fma
(* 9.0 (fmin x y))
(fmax x y)
(fma -4.0 (* (* (fmax t a) (fmin t a)) z) b))
(* z (fabs c)))
(/
(/
(fma
(* (fmax t a) (* -4.0 z))
(fmin t a)
(fma (* (fmax x y) (fmin x y)) 9.0 b))
(fabs c))
z))))double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (fabs(c) <= 2e+28) {
tmp = fma((9.0 * fmin(x, y)), fmax(x, y), fma(-4.0, ((fmax(t, a) * fmin(t, a)) * z), b)) / (z * fabs(c));
} else {
tmp = (fma((fmax(t, a) * (-4.0 * z)), fmin(t, a), fma((fmax(x, y) * fmin(x, y)), 9.0, b)) / fabs(c)) / z;
}
return copysign(1.0, c) * tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if (abs(c) <= 2e+28) tmp = Float64(fma(Float64(9.0 * fmin(x, y)), fmax(x, y), fma(-4.0, Float64(Float64(fmax(t, a) * fmin(t, a)) * z), b)) / Float64(z * abs(c))); else tmp = Float64(Float64(fma(Float64(fmax(t, a) * Float64(-4.0 * z)), fmin(t, a), fma(Float64(fmax(x, y) * fmin(x, y)), 9.0, b)) / abs(c)) / z); end return Float64(copysign(1.0, c) * tmp) end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[c], $MachinePrecision], 2e+28], N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision] * N[Min[t, a], $MachinePrecision] + N[(N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|c\right| \leq 2 \cdot 10^{+28}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9 \cdot \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right), \mathsf{fma}\left(-4, \left(\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot z, b\right)\right)}{z \cdot \left|c\right|}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot z\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)\right)}{\left|c\right|}}{z}\\
\end{array}
if c < 1.99999999999999992e28Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
if 1.99999999999999992e28 < c Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites79.9%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ b (* 9.0 (* x y)))) (t_2 (* (* x 9.0) y)))
(if (<= t_2 -5e+79)
(/ (/ t_1 c) z)
(if (<= t_2 5e+22)
(/ (/ (fma (* (* t a) z) -4.0 b) z) c)
(/ t_1 (* z c))))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -5e+79) {
tmp = (t_1 / c) / z;
} else if (t_2 <= 5e+22) {
tmp = (fma(((t * a) * z), -4.0, b) / z) / c;
} else {
tmp = t_1 / (z * c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(b + Float64(9.0 * Float64(x * y))) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= -5e+79) tmp = Float64(Float64(t_1 / c) / z); elseif (t_2 <= 5e+22) tmp = Float64(Float64(fma(Float64(Float64(t * a) * z), -4.0, b) / z) / c); else tmp = Float64(t_1 / Float64(z * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+79], N[(N[(t$95$1 / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 5e+22], N[(N[(N[(N[(N[(t * a), $MachinePrecision] * z), $MachinePrecision] * -4.0 + b), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], N[(t$95$1 / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := b + 9 \cdot \left(x \cdot y\right)\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;\frac{\frac{t\_1}{c}}{z}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\left(t \cdot a\right) \cdot z, -4, b\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{z \cdot c}\\
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e79Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Applied rewrites80.1%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6460.4
Applied rewrites60.4%
if -5e79 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999996e22Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-evalN/A
Applied rewrites79.3%
Taylor expanded in x around 0
Applied rewrites56.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites59.8%
if 4.9999999999999996e22 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 79.4%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ b (* 9.0 (* x y)))) (t_2 (* (* x 9.0) y)))
(if (<= t_2 -5e+79)
(/ (/ t_1 c) z)
(if (<= t_2 5e+22)
(/ (fma (* (* -4.0 z) a) t b) (* z c))
(/ t_1 (* z c))))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -5e+79) {
tmp = (t_1 / c) / z;
} else if (t_2 <= 5e+22) {
tmp = fma(((-4.0 * z) * a), t, b) / (z * c);
} else {
tmp = t_1 / (z * c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) t_1 = Float64(b + Float64(9.0 * Float64(x * y))) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= -5e+79) tmp = Float64(Float64(t_1 / c) / z); elseif (t_2 <= 5e+22) tmp = Float64(fma(Float64(Float64(-4.0 * z) * a), t, b) / Float64(z * c)); else tmp = Float64(t_1 / Float64(z * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+79], N[(N[(t$95$1 / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 5e+22], N[(N[(N[(N[(-4.0 * z), $MachinePrecision] * a), $MachinePrecision] * t + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := b + 9 \cdot \left(x \cdot y\right)\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;\frac{\frac{t\_1}{c}}{z}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+22}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(-4 \cdot z\right) \cdot a, t, b\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{z \cdot c}\\
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e79Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Applied rewrites80.1%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6460.4
Applied rewrites60.4%
if -5e79 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999996e22Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
associate-+l+N/A
lift-*.f64N/A
distribute-lft-neg-inN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
metadata-evalN/A
Applied rewrites79.3%
Taylor expanded in x around 0
Applied rewrites56.7%
if 4.9999999999999996e22 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 79.4%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ 1.0 (* -0.25 (/ c (* (fmax t a) (fmin t a)))))))
(if (<= (fmax t a) -2.7e-17)
t_1
(if (<= (fmax t a) 1e-186)
(/ (/ (- (* -9.0 (* x y)) b) (- z)) c)
(if (<= (fmax t a) 1.15e+227) (/ (+ b (* 9.0 (* x y))) (* z c)) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a))));
double tmp;
if (fmax(t, a) <= -2.7e-17) {
tmp = t_1;
} else if (fmax(t, a) <= 1e-186) {
tmp = (((-9.0 * (x * y)) - b) / -z) / c;
} else if (fmax(t, a) <= 1.15e+227) {
tmp = (b + (9.0 * (x * y))) / (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 = 1.0d0 / ((-0.25d0) * (c / (fmax(t, a) * fmin(t, a))))
if (fmax(t, a) <= (-2.7d-17)) then
tmp = t_1
else if (fmax(t, a) <= 1d-186) then
tmp = ((((-9.0d0) * (x * y)) - b) / -z) / c
else if (fmax(t, a) <= 1.15d+227) then
tmp = (b + (9.0d0 * (x * y))) / (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 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a))));
double tmp;
if (fmax(t, a) <= -2.7e-17) {
tmp = t_1;
} else if (fmax(t, a) <= 1e-186) {
tmp = (((-9.0 * (x * y)) - b) / -z) / c;
} else if (fmax(t, a) <= 1.15e+227) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a)))) tmp = 0 if fmax(t, a) <= -2.7e-17: tmp = t_1 elif fmax(t, a) <= 1e-186: tmp = (((-9.0 * (x * y)) - b) / -z) / c elif fmax(t, a) <= 1.15e+227: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(1.0 / Float64(-0.25 * Float64(c / Float64(fmax(t, a) * fmin(t, a))))) tmp = 0.0 if (fmax(t, a) <= -2.7e-17) tmp = t_1; elseif (fmax(t, a) <= 1e-186) tmp = Float64(Float64(Float64(Float64(-9.0 * Float64(x * y)) - b) / Float64(-z)) / c); elseif (fmax(t, a) <= 1.15e+227) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 1.0 / (-0.25 * (c / (max(t, a) * min(t, a)))); tmp = 0.0; if (max(t, a) <= -2.7e-17) tmp = t_1; elseif (max(t, a) <= 1e-186) tmp = (((-9.0 * (x * y)) - b) / -z) / c; elseif (max(t, a) <= 1.15e+227) tmp = (b + (9.0 * (x * y))) / (z * c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(1.0 / N[(-0.25 * N[(c / N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[t, a], $MachinePrecision], -2.7e-17], t$95$1, If[LessEqual[N[Max[t, a], $MachinePrecision], 1e-186], N[(N[(N[(N[(-9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision] / (-z)), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[N[Max[t, a], $MachinePrecision], 1.15e+227], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \frac{1}{-0.25 \cdot \frac{c}{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}}\\
\mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 10^{-186}:\\
\;\;\;\;\frac{\frac{-9 \cdot \left(x \cdot y\right) - b}{-z}}{c}\\
\mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 1.15 \cdot 10^{+227}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -2.7000000000000001e-17 or 1.1499999999999999e227 < a Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -2.7000000000000001e-17 < a < 9.9999999999999991e-187Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f6458.0
Applied rewrites58.0%
lift-/.f64N/A
lift-/.f64N/A
div-flip-revN/A
frac-2negN/A
lift-neg.f64N/A
remove-double-negN/A
lower-/.f64N/A
Applied rewrites58.1%
if 9.9999999999999991e-187 < a < 1.1499999999999999e227Initial program 79.4%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ b (* 9.0 (* x y))))
(t_2 (/ 1.0 (* -0.25 (/ c (* (fmax t a) (fmin t a)))))))
(if (<= (fmax t a) -2.7e-17)
t_2
(if (<= (fmax t a) -5e-294)
(/ (/ t_1 c) z)
(if (<= (fmax t a) 1.15e+227) (/ 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 = b + (9.0 * (x * y));
double t_2 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a))));
double tmp;
if (fmax(t, a) <= -2.7e-17) {
tmp = t_2;
} else if (fmax(t, a) <= -5e-294) {
tmp = (t_1 / c) / z;
} else if (fmax(t, a) <= 1.15e+227) {
tmp = t_1 / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b + (9.0d0 * (x * y))
t_2 = 1.0d0 / ((-0.25d0) * (c / (fmax(t, a) * fmin(t, a))))
if (fmax(t, a) <= (-2.7d-17)) then
tmp = t_2
else if (fmax(t, a) <= (-5d-294)) then
tmp = (t_1 / c) / z
else if (fmax(t, a) <= 1.15d+227) then
tmp = t_1 / (z * c)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double t_2 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a))));
double tmp;
if (fmax(t, a) <= -2.7e-17) {
tmp = t_2;
} else if (fmax(t, a) <= -5e-294) {
tmp = (t_1 / c) / z;
} else if (fmax(t, a) <= 1.15e+227) {
tmp = t_1 / (z * c);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b + (9.0 * (x * y)) t_2 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a)))) tmp = 0 if fmax(t, a) <= -2.7e-17: tmp = t_2 elif fmax(t, a) <= -5e-294: tmp = (t_1 / c) / z elif fmax(t, a) <= 1.15e+227: tmp = t_1 / (z * c) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b + Float64(9.0 * Float64(x * y))) t_2 = Float64(1.0 / Float64(-0.25 * Float64(c / Float64(fmax(t, a) * fmin(t, a))))) tmp = 0.0 if (fmax(t, a) <= -2.7e-17) tmp = t_2; elseif (fmax(t, a) <= -5e-294) tmp = Float64(Float64(t_1 / c) / z); elseif (fmax(t, a) <= 1.15e+227) tmp = Float64(t_1 / Float64(z * c)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b + (9.0 * (x * y)); t_2 = 1.0 / (-0.25 * (c / (max(t, a) * min(t, a)))); tmp = 0.0; if (max(t, a) <= -2.7e-17) tmp = t_2; elseif (max(t, a) <= -5e-294) tmp = (t_1 / c) / z; elseif (max(t, a) <= 1.15e+227) tmp = t_1 / (z * c); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(-0.25 * N[(c / N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[t, a], $MachinePrecision], -2.7e-17], t$95$2, If[LessEqual[N[Max[t, a], $MachinePrecision], -5e-294], N[(N[(t$95$1 / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[N[Max[t, a], $MachinePrecision], 1.15e+227], N[(t$95$1 / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
t_1 := b + 9 \cdot \left(x \cdot y\right)\\
t_2 := \frac{1}{-0.25 \cdot \frac{c}{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}}\\
\mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq -5 \cdot 10^{-294}:\\
\;\;\;\;\frac{\frac{t\_1}{c}}{z}\\
\mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 1.15 \cdot 10^{+227}:\\
\;\;\;\;\frac{t\_1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if a < -2.7000000000000001e-17 or 1.1499999999999999e227 < a Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -2.7000000000000001e-17 < a < -5.0000000000000003e-294Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Applied rewrites80.1%
Taylor expanded in z around 0
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6460.4
Applied rewrites60.4%
if -5.0000000000000003e-294 < a < 1.1499999999999999e227Initial program 79.4%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ 1.0 (* -0.25 (/ c (* (fmax t a) (fmin t a)))))))
(if (<= (fmax t a) -2.7e-17)
t_1
(if (<= (fmax t a) 1.15e+227) (/ (+ b (* 9.0 (* x y))) (* z c)) t_1))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a))));
double tmp;
if (fmax(t, a) <= -2.7e-17) {
tmp = t_1;
} else if (fmax(t, a) <= 1.15e+227) {
tmp = (b + (9.0 * (x * y))) / (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 = 1.0d0 / ((-0.25d0) * (c / (fmax(t, a) * fmin(t, a))))
if (fmax(t, a) <= (-2.7d-17)) then
tmp = t_1
else if (fmax(t, a) <= 1.15d+227) then
tmp = (b + (9.0d0 * (x * y))) / (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 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a))));
double tmp;
if (fmax(t, a) <= -2.7e-17) {
tmp = t_1;
} else if (fmax(t, a) <= 1.15e+227) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 1.0 / (-0.25 * (c / (fmax(t, a) * fmin(t, a)))) tmp = 0 if fmax(t, a) <= -2.7e-17: tmp = t_1 elif fmax(t, a) <= 1.15e+227: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(1.0 / Float64(-0.25 * Float64(c / Float64(fmax(t, a) * fmin(t, a))))) tmp = 0.0 if (fmax(t, a) <= -2.7e-17) tmp = t_1; elseif (fmax(t, a) <= 1.15e+227) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 1.0 / (-0.25 * (c / (max(t, a) * min(t, a)))); tmp = 0.0; if (max(t, a) <= -2.7e-17) tmp = t_1; elseif (max(t, a) <= 1.15e+227) tmp = (b + (9.0 * (x * y))) / (z * c); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(1.0 / N[(-0.25 * N[(c / N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[t, a], $MachinePrecision], -2.7e-17], t$95$1, If[LessEqual[N[Max[t, a], $MachinePrecision], 1.15e+227], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \frac{1}{-0.25 \cdot \frac{c}{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}}\\
\mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 1.15 \cdot 10^{+227}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -2.7000000000000001e-17 or 1.1499999999999999e227 < a Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if -2.7000000000000001e-17 < a < 1.1499999999999999e227Initial program 79.4%
Taylor expanded in z around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (fmin x y) 9.0) (fmax x y))))
(if (<= t_1 -5e+79)
(/ (* (* 9.0 (fmin x y)) (fmax x y)) (* z c))
(if (<= t_1 -4e-257)
(* -4.0 (/ (* a t) c))
(if (<= t_1 1e-184)
(/ b (* c z))
(if (<= t_1 2e+27)
(/ 1.0 (* -0.25 (/ c (* a t))))
(/ (* 9.0 (* (fmin x y) (fmax x y))) (* z c))))))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
double tmp;
if (t_1 <= -5e+79) {
tmp = ((9.0 * fmin(x, y)) * fmax(x, y)) / (z * c);
} else if (t_1 <= -4e-257) {
tmp = -4.0 * ((a * t) / c);
} else if (t_1 <= 1e-184) {
tmp = b / (c * z);
} else if (t_1 <= 2e+27) {
tmp = 1.0 / (-0.25 * (c / (a * t)));
} else {
tmp = (9.0 * (fmin(x, y) * fmax(x, y))) / (z * c);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (fmin(x, y) * 9.0d0) * fmax(x, y)
if (t_1 <= (-5d+79)) then
tmp = ((9.0d0 * fmin(x, y)) * fmax(x, y)) / (z * c)
else if (t_1 <= (-4d-257)) then
tmp = (-4.0d0) * ((a * t) / c)
else if (t_1 <= 1d-184) then
tmp = b / (c * z)
else if (t_1 <= 2d+27) then
tmp = 1.0d0 / ((-0.25d0) * (c / (a * t)))
else
tmp = (9.0d0 * (fmin(x, y) * fmax(x, y))) / (z * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
double tmp;
if (t_1 <= -5e+79) {
tmp = ((9.0 * fmin(x, y)) * fmax(x, y)) / (z * c);
} else if (t_1 <= -4e-257) {
tmp = -4.0 * ((a * t) / c);
} else if (t_1 <= 1e-184) {
tmp = b / (c * z);
} else if (t_1 <= 2e+27) {
tmp = 1.0 / (-0.25 * (c / (a * t)));
} else {
tmp = (9.0 * (fmin(x, y) * fmax(x, y))) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (fmin(x, y) * 9.0) * fmax(x, y) tmp = 0 if t_1 <= -5e+79: tmp = ((9.0 * fmin(x, y)) * fmax(x, y)) / (z * c) elif t_1 <= -4e-257: tmp = -4.0 * ((a * t) / c) elif t_1 <= 1e-184: tmp = b / (c * z) elif t_1 <= 2e+27: tmp = 1.0 / (-0.25 * (c / (a * t))) else: tmp = (9.0 * (fmin(x, y) * fmax(x, y))) / (z * c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y)) tmp = 0.0 if (t_1 <= -5e+79) tmp = Float64(Float64(Float64(9.0 * fmin(x, y)) * fmax(x, y)) / Float64(z * c)); elseif (t_1 <= -4e-257) tmp = Float64(-4.0 * Float64(Float64(a * t) / c)); elseif (t_1 <= 1e-184) tmp = Float64(b / Float64(c * z)); elseif (t_1 <= 2e+27) tmp = Float64(1.0 / Float64(-0.25 * Float64(c / Float64(a * t)))); else tmp = Float64(Float64(9.0 * Float64(fmin(x, y) * fmax(x, y))) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (min(x, y) * 9.0) * max(x, y); tmp = 0.0; if (t_1 <= -5e+79) tmp = ((9.0 * min(x, y)) * max(x, y)) / (z * c); elseif (t_1 <= -4e-257) tmp = -4.0 * ((a * t) / c); elseif (t_1 <= 1e-184) tmp = b / (c * z); elseif (t_1 <= 2e+27) tmp = 1.0 / (-0.25 * (c / (a * t))); else tmp = (9.0 * (min(x, y) * max(x, y))) / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+79], N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-257], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-184], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+27], N[(1.0 / N[(-0.25 * N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(9.0 * N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;\frac{\left(9 \cdot \mathsf{min}\left(x, y\right)\right) \cdot \mathsf{max}\left(x, y\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-257}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;t\_1 \leq 10^{-184}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;\frac{1}{-0.25 \cdot \frac{c}{a \cdot t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right)}{z \cdot c}\\
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e79Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6435.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.5
Applied rewrites35.5%
if -5e79 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.9999999999999999e-257Initial program 79.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -3.9999999999999999e-257 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e-184Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
if 1.0000000000000001e-184 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e27Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
frac-2negN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-neg.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
Applied rewrites78.7%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
if 2e27 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* (* (fmin x y) 9.0) (fmax x y))) (t_2 (* -4.0 (/ (* a t) c))))
(if (<= t_1 -5e+79)
(/ (* (* 9.0 (fmin x y)) (fmax x y)) (* z c))
(if (<= t_1 -4e-257)
t_2
(if (<= t_1 1e-184)
(/ b (* c z))
(if (<= t_1 2e+27)
t_2
(/ (* 9.0 (* (fmin x y) (fmax x y))) (* z c))))))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
double t_2 = -4.0 * ((a * t) / c);
double tmp;
if (t_1 <= -5e+79) {
tmp = ((9.0 * fmin(x, y)) * fmax(x, y)) / (z * c);
} else if (t_1 <= -4e-257) {
tmp = t_2;
} else if (t_1 <= 1e-184) {
tmp = b / (c * z);
} else if (t_1 <= 2e+27) {
tmp = t_2;
} else {
tmp = (9.0 * (fmin(x, y) * fmax(x, y))) / (z * c);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (fmin(x, y) * 9.0d0) * fmax(x, y)
t_2 = (-4.0d0) * ((a * t) / c)
if (t_1 <= (-5d+79)) then
tmp = ((9.0d0 * fmin(x, y)) * fmax(x, y)) / (z * c)
else if (t_1 <= (-4d-257)) then
tmp = t_2
else if (t_1 <= 1d-184) then
tmp = b / (c * z)
else if (t_1 <= 2d+27) then
tmp = t_2
else
tmp = (9.0d0 * (fmin(x, y) * fmax(x, y))) / (z * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
double t_2 = -4.0 * ((a * t) / c);
double tmp;
if (t_1 <= -5e+79) {
tmp = ((9.0 * fmin(x, y)) * fmax(x, y)) / (z * c);
} else if (t_1 <= -4e-257) {
tmp = t_2;
} else if (t_1 <= 1e-184) {
tmp = b / (c * z);
} else if (t_1 <= 2e+27) {
tmp = t_2;
} else {
tmp = (9.0 * (fmin(x, y) * fmax(x, y))) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = (fmin(x, y) * 9.0) * fmax(x, y) t_2 = -4.0 * ((a * t) / c) tmp = 0 if t_1 <= -5e+79: tmp = ((9.0 * fmin(x, y)) * fmax(x, y)) / (z * c) elif t_1 <= -4e-257: tmp = t_2 elif t_1 <= 1e-184: tmp = b / (c * z) elif t_1 <= 2e+27: tmp = t_2 else: tmp = (9.0 * (fmin(x, y) * fmax(x, y))) / (z * c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y)) t_2 = Float64(-4.0 * Float64(Float64(a * t) / c)) tmp = 0.0 if (t_1 <= -5e+79) tmp = Float64(Float64(Float64(9.0 * fmin(x, y)) * fmax(x, y)) / Float64(z * c)); elseif (t_1 <= -4e-257) tmp = t_2; elseif (t_1 <= 1e-184) tmp = Float64(b / Float64(c * z)); elseif (t_1 <= 2e+27) tmp = t_2; else tmp = Float64(Float64(9.0 * Float64(fmin(x, y) * fmax(x, y))) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = (min(x, y) * 9.0) * max(x, y); t_2 = -4.0 * ((a * t) / c); tmp = 0.0; if (t_1 <= -5e+79) tmp = ((9.0 * min(x, y)) * max(x, y)) / (z * c); elseif (t_1 <= -4e-257) tmp = t_2; elseif (t_1 <= 1e-184) tmp = b / (c * z); elseif (t_1 <= 2e+27) tmp = t_2; else tmp = (9.0 * (min(x, y) * max(x, y))) / (z * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+79], N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-257], t$95$2, If[LessEqual[t$95$1, 1e-184], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+27], t$95$2, N[(N[(9.0 * N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\
t_2 := -4 \cdot \frac{a \cdot t}{c}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;\frac{\left(9 \cdot \mathsf{min}\left(x, y\right)\right) \cdot \mathsf{max}\left(x, y\right)}{z \cdot c}\\
\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-257}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{-184}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\right)}{z \cdot c}\\
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e79Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6435.5
lift-*.f64N/A
*-commutativeN/A
lower-*.f6435.5
Applied rewrites35.5%
if -5e79 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.9999999999999999e-257 or 1.0000000000000001e-184 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e27Initial program 79.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -3.9999999999999999e-257 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e-184Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
if 2e27 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ (* a t) c))) (t_2 (* (* x 9.0) y)))
(if (<= t_2 -5e+79)
(* 9.0 (/ (* x y) (* c z)))
(if (<= t_2 -4e-257)
t_1
(if (<= t_2 1e-184)
(/ b (* c z))
(if (<= t_2 2e+27) t_1 (/ (* 9.0 (* x y)) (* z c))))))))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 t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -5e+79) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (t_2 <= -4e-257) {
tmp = t_1;
} else if (t_2 <= 1e-184) {
tmp = b / (c * z);
} else if (t_2 <= 2e+27) {
tmp = t_1;
} else {
tmp = (9.0 * (x * y)) / (z * c);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((a * t) / c)
t_2 = (x * 9.0d0) * y
if (t_2 <= (-5d+79)) then
tmp = 9.0d0 * ((x * y) / (c * z))
else if (t_2 <= (-4d-257)) then
tmp = t_1
else if (t_2 <= 1d-184) then
tmp = b / (c * z)
else if (t_2 <= 2d+27) then
tmp = t_1
else
tmp = (9.0d0 * (x * y)) / (z * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * ((a * t) / c);
double t_2 = (x * 9.0) * y;
double tmp;
if (t_2 <= -5e+79) {
tmp = 9.0 * ((x * y) / (c * z));
} else if (t_2 <= -4e-257) {
tmp = t_1;
} else if (t_2 <= 1e-184) {
tmp = b / (c * z);
} else if (t_2 <= 2e+27) {
tmp = t_1;
} else {
tmp = (9.0 * (x * y)) / (z * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * ((a * t) / c) t_2 = (x * 9.0) * y tmp = 0 if t_2 <= -5e+79: tmp = 9.0 * ((x * y) / (c * z)) elif t_2 <= -4e-257: tmp = t_1 elif t_2 <= 1e-184: tmp = b / (c * z) elif t_2 <= 2e+27: tmp = t_1 else: tmp = (9.0 * (x * y)) / (z * c) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(Float64(a * t) / c)) t_2 = Float64(Float64(x * 9.0) * y) tmp = 0.0 if (t_2 <= -5e+79) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z))); elseif (t_2 <= -4e-257) tmp = t_1; elseif (t_2 <= 1e-184) tmp = Float64(b / Float64(c * z)); elseif (t_2 <= 2e+27) tmp = t_1; else tmp = Float64(Float64(9.0 * Float64(x * y)) / Float64(z * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * ((a * t) / c); t_2 = (x * 9.0) * y; tmp = 0.0; if (t_2 <= -5e+79) tmp = 9.0 * ((x * y) / (c * z)); elseif (t_2 <= -4e-257) tmp = t_1; elseif (t_2 <= 1e-184) tmp = b / (c * z); elseif (t_2 <= 2e+27) tmp = t_1; else tmp = (9.0 * (x * y)) / (z * c); 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]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+79], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-257], t$95$1, If[LessEqual[t$95$2, 1e-184], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+27], t$95$1, N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := -4 \cdot \frac{a \cdot t}{c}\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-184}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e79Initial program 79.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
if -5e79 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.9999999999999999e-257 or 1.0000000000000001e-184 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e27Initial program 79.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -3.9999999999999999e-257 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e-184Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
if 2e27 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 79.4%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
add-flip-revN/A
lower-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
add-flip-revN/A
Applied rewrites80.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ (* a t) c)))
(t_2 (* (* x 9.0) y))
(t_3 (* 9.0 (/ (* x y) (* c z)))))
(if (<= t_2 -5e+79)
t_3
(if (<= t_2 -4e-257)
t_1
(if (<= t_2 1e-184) (/ b (* c z)) (if (<= t_2 2e+27) t_1 t_3))))))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 t_2 = (x * 9.0) * y;
double t_3 = 9.0 * ((x * y) / (c * z));
double tmp;
if (t_2 <= -5e+79) {
tmp = t_3;
} else if (t_2 <= -4e-257) {
tmp = t_1;
} else if (t_2 <= 1e-184) {
tmp = b / (c * z);
} else if (t_2 <= 2e+27) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (-4.0d0) * ((a * t) / c)
t_2 = (x * 9.0d0) * y
t_3 = 9.0d0 * ((x * y) / (c * z))
if (t_2 <= (-5d+79)) then
tmp = t_3
else if (t_2 <= (-4d-257)) then
tmp = t_1
else if (t_2 <= 1d-184) then
tmp = b / (c * z)
else if (t_2 <= 2d+27) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * ((a * t) / c);
double t_2 = (x * 9.0) * y;
double t_3 = 9.0 * ((x * y) / (c * z));
double tmp;
if (t_2 <= -5e+79) {
tmp = t_3;
} else if (t_2 <= -4e-257) {
tmp = t_1;
} else if (t_2 <= 1e-184) {
tmp = b / (c * z);
} else if (t_2 <= 2e+27) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * ((a * t) / c) t_2 = (x * 9.0) * y t_3 = 9.0 * ((x * y) / (c * z)) tmp = 0 if t_2 <= -5e+79: tmp = t_3 elif t_2 <= -4e-257: tmp = t_1 elif t_2 <= 1e-184: tmp = b / (c * z) elif t_2 <= 2e+27: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(Float64(a * t) / c)) t_2 = Float64(Float64(x * 9.0) * y) t_3 = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z))) tmp = 0.0 if (t_2 <= -5e+79) tmp = t_3; elseif (t_2 <= -4e-257) tmp = t_1; elseif (t_2 <= 1e-184) tmp = Float64(b / Float64(c * z)); elseif (t_2 <= 2e+27) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * ((a * t) / c); t_2 = (x * 9.0) * y; t_3 = 9.0 * ((x * y) / (c * z)); tmp = 0.0; if (t_2 <= -5e+79) tmp = t_3; elseif (t_2 <= -4e-257) tmp = t_1; elseif (t_2 <= 1e-184) tmp = b / (c * z); elseif (t_2 <= 2e+27) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+79], t$95$3, If[LessEqual[t$95$2, -4e-257], t$95$1, If[LessEqual[t$95$2, 1e-184], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+27], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
t_1 := -4 \cdot \frac{a \cdot t}{c}\\
t_2 := \left(x \cdot 9\right) \cdot y\\
t_3 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+79}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-184}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e79 or 2e27 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 79.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6435.5
Applied rewrites35.5%
if -5e79 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -3.9999999999999999e-257 or 1.0000000000000001e-184 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e27Initial program 79.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -3.9999999999999999e-257 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.0000000000000001e-184Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ (* (fmax t a) (fmin t a)) c))))
(if (<= (fmin t a) -2.5e+106)
t_1
(if (<= (fmin t a) 2.5e-193) (/ b (* c z)) t_1))))double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
double tmp;
if (fmin(t, a) <= -2.5e+106) {
tmp = t_1;
} else if (fmin(t, a) <= 2.5e-193) {
tmp = b / (c * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
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) * ((fmax(t, a) * fmin(t, a)) / c)
if (fmin(t, a) <= (-2.5d+106)) then
tmp = t_1
else if (fmin(t, a) <= 2.5d-193) then
tmp = b / (c * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
double tmp;
if (fmin(t, a) <= -2.5e+106) {
tmp = t_1;
} else if (fmin(t, a) <= 2.5e-193) {
tmp = b / (c * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = -4.0 * ((fmax(t, a) * fmin(t, a)) / c) tmp = 0 if fmin(t, a) <= -2.5e+106: tmp = t_1 elif fmin(t, a) <= 2.5e-193: tmp = b / (c * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(Float64(fmax(t, a) * fmin(t, a)) / c)) tmp = 0.0 if (fmin(t, a) <= -2.5e+106) tmp = t_1; elseif (fmin(t, a) <= 2.5e-193) tmp = Float64(b / Float64(c * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = -4.0 * ((max(t, a) * min(t, a)) / c); tmp = 0.0; if (min(t, a) <= -2.5e+106) tmp = t_1; elseif (min(t, a) <= 2.5e-193) tmp = b / (c * z); 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[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Min[t, a], $MachinePrecision], -2.5e+106], t$95$1, If[LessEqual[N[Min[t, a], $MachinePrecision], 2.5e-193], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := -4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\
\mathbf{if}\;\mathsf{min}\left(t, a\right) \leq -2.5 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\mathsf{min}\left(t, a\right) \leq 2.5 \cdot 10^{-193}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.4999999999999999e106 or 2.5000000000000002e-193 < t Initial program 79.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6438.9
Applied rewrites38.9%
if -2.4999999999999999e106 < t < 2.5000000000000002e-193Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
(FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c)
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 / (c * z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
def code(x, y, z, t, a, b, c): return b / (c * z)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(c * z)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (c * z); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
\frac{b}{c \cdot z}
Initial program 79.4%
Taylor expanded in b around inf
lower-/.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
herbie shell --seed 2025181
(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)))