
(FPCore (z0 z1) :precision binary64 (/ (- (* (- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725) z0) (* 0.07957747033803834 z1)) (* (* z1 z0) z1)))
double code(double z0, double z1) {
return (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = ((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)
end function
public static double code(double z0, double z1) {
return (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1);
}
def code(z0, z1): return (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)
function code(z0, z1) return Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) end
function tmp = code(z0, z1) tmp = (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1); end
code[z0_, z1_] := N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision]
\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1}
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (z0 z1) :precision binary64 (/ (- (* (- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725) z0) (* 0.07957747033803834 z1)) (* (* z1 z0) z1)))
double code(double z0, double z1) {
return (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = ((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)
end function
public static double code(double z0, double z1) {
return (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1);
}
def code(z0, z1): return (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)
function code(z0, z1) return Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) end
function tmp = code(z0, z1) tmp = (((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1); end
code[z0_, z1_] := N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision]
\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1}
(FPCore (z0 z1) :precision binary64 (/ (+ (/ -0.07957747033803834 z0) (/ (- 0.053051646556513725 (* (- z0) (/ -0.02210485264800276 z1))) z1)) z1))
double code(double z0, double z1) {
return ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (-z0 * (-0.02210485264800276 / z1))) / z1)) / z1;
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = (((-0.07957747033803834d0) / z0) + ((0.053051646556513725d0 - (-z0 * ((-0.02210485264800276d0) / z1))) / z1)) / z1
end function
public static double code(double z0, double z1) {
return ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (-z0 * (-0.02210485264800276 / z1))) / z1)) / z1;
}
def code(z0, z1): return ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (-z0 * (-0.02210485264800276 / z1))) / z1)) / z1
function code(z0, z1) return Float64(Float64(Float64(-0.07957747033803834 / z0) + Float64(Float64(0.053051646556513725 - Float64(Float64(-z0) * Float64(-0.02210485264800276 / z1))) / z1)) / z1) end
function tmp = code(z0, z1) tmp = ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (-z0 * (-0.02210485264800276 / z1))) / z1)) / z1; end
code[z0_, z1_] := N[(N[(N[(-0.07957747033803834 / z0), $MachinePrecision] + N[(N[(0.053051646556513725 - N[((-z0) * N[(-0.02210485264800276 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]
\frac{\frac{-0.07957747033803834}{z0} + \frac{0.053051646556513725 - \left(-z0\right) \cdot \frac{-0.02210485264800276}{z1}}{z1}}{z1}
Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites99.6%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lift-/.f64N/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
(FPCore (z0 z1) :precision binary64 (/ (+ (/ -0.07957747033803834 z0) (/ (- 0.053051646556513725 (* 0.02210485264800276 (/ z0 z1))) z1)) z1))
double code(double z0, double z1) {
return ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (0.02210485264800276 * (z0 / z1))) / z1)) / z1;
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = (((-0.07957747033803834d0) / z0) + ((0.053051646556513725d0 - (0.02210485264800276d0 * (z0 / z1))) / z1)) / z1
end function
public static double code(double z0, double z1) {
return ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (0.02210485264800276 * (z0 / z1))) / z1)) / z1;
}
def code(z0, z1): return ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (0.02210485264800276 * (z0 / z1))) / z1)) / z1
function code(z0, z1) return Float64(Float64(Float64(-0.07957747033803834 / z0) + Float64(Float64(0.053051646556513725 - Float64(0.02210485264800276 * Float64(z0 / z1))) / z1)) / z1) end
function tmp = code(z0, z1) tmp = ((-0.07957747033803834 / z0) + ((0.053051646556513725 - (0.02210485264800276 * (z0 / z1))) / z1)) / z1; end
code[z0_, z1_] := N[(N[(N[(-0.07957747033803834 / z0), $MachinePrecision] + N[(N[(0.053051646556513725 - N[(0.02210485264800276 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision] / z1), $MachinePrecision]
\frac{\frac{-0.07957747033803834}{z0} + \frac{0.053051646556513725 - 0.02210485264800276 \cdot \frac{z0}{z1}}{z1}}{z1}
Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites99.6%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
(- INFINITY))
(/
(-
(- (/ (* z0 -0.02210485264800276) z1) -0.053051646556513725)
(/ (* 0.07957747033803834 z1) z0))
(* z1 z1))
(+
(/
(- (* (/ z0 z1) -0.02210485264800276) -0.053051646556513725)
(* z1 z1))
(/ -0.07957747033803834 (* z1 z0)))))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -((double) INFINITY)) {
tmp = ((((z0 * -0.02210485264800276) / z1) - -0.053051646556513725) - ((0.07957747033803834 * z1) / z0)) / (z1 * z1);
} else {
tmp = ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0));
}
return tmp;
}
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -Double.POSITIVE_INFINITY) {
tmp = ((((z0 * -0.02210485264800276) / z1) - -0.053051646556513725) - ((0.07957747033803834 * z1) / z0)) / (z1 * z1);
} else {
tmp = ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0));
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -math.inf: tmp = ((((z0 * -0.02210485264800276) / z1) - -0.053051646556513725) - ((0.07957747033803834 * z1) / z0)) / (z1 * z1) else: tmp = ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0)) return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= Float64(-Inf)) tmp = Float64(Float64(Float64(Float64(Float64(z0 * -0.02210485264800276) / z1) - -0.053051646556513725) - Float64(Float64(0.07957747033803834 * z1) / z0)) / Float64(z1 * z1)); else tmp = Float64(Float64(Float64(Float64(Float64(z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / Float64(z1 * z1)) + Float64(-0.07957747033803834 / Float64(z1 * z0))); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -Inf) tmp = ((((z0 * -0.02210485264800276) / z1) - -0.053051646556513725) - ((0.07957747033803834 * z1) / z0)) / (z1 * z1); else tmp = ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0)); end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(N[(N[(N[(z0 * -0.02210485264800276), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] - N[(N[(0.07957747033803834 * z1), $MachinePrecision] / z0), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(z0 / z1), $MachinePrecision] * -0.02210485264800276), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision] + N[(-0.07957747033803834 / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -\infty:\\
\;\;\;\;\frac{\left(\frac{z0 \cdot -0.02210485264800276}{z1} - -0.053051646556513725\right) - \frac{0.07957747033803834 \cdot z1}{z0}}{z1 \cdot z1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{z0}{z1} \cdot -0.02210485264800276 - -0.053051646556513725}{z1 \cdot z1} + \frac{-0.07957747033803834}{z1 \cdot z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -inf.0Initial program 77.7%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
associate-/l/N/A
lower-/.f64N/A
Applied rewrites80.1%
if -inf.0 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites99.6%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lift-/.f64N/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
lift-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
div-addN/A
lower-+.f64N/A
Applied rewrites97.1%
(FPCore (z0 z1) :precision binary64 (+ (/ (- (* (/ z0 z1) -0.02210485264800276) -0.053051646556513725) (* z1 z1)) (/ -0.07957747033803834 (* z1 z0))))
double code(double z0, double z1) {
return ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0));
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = ((((z0 / z1) * (-0.02210485264800276d0)) - (-0.053051646556513725d0)) / (z1 * z1)) + ((-0.07957747033803834d0) / (z1 * z0))
end function
public static double code(double z0, double z1) {
return ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0));
}
def code(z0, z1): return ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0))
function code(z0, z1) return Float64(Float64(Float64(Float64(Float64(z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / Float64(z1 * z1)) + Float64(-0.07957747033803834 / Float64(z1 * z0))) end
function tmp = code(z0, z1) tmp = ((((z0 / z1) * -0.02210485264800276) - -0.053051646556513725) / (z1 * z1)) + (-0.07957747033803834 / (z1 * z0)); end
code[z0_, z1_] := N[(N[(N[(N[(N[(z0 / z1), $MachinePrecision] * -0.02210485264800276), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision] + N[(-0.07957747033803834 / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\frac{z0}{z1} \cdot -0.02210485264800276 - -0.053051646556513725}{z1 \cdot z1} + \frac{-0.07957747033803834}{z1 \cdot z0}
Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites99.6%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
lift-/.f64N/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
lift-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
div-addN/A
lower-+.f64N/A
Applied rewrites97.1%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
-1e+131)
(/
(-
(*
(- (* (/ -0.02210485264800276 z1) z0) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z1) z0))
(/
(-
(*
z0
(/
(- (* z0 -0.02210485264800276) (* -0.053051646556513725 z1))
(* z1 z1)))
0.07957747033803834)
(* z1 z0))))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -1e+131) {
tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z1) * z0);
} else {
tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)) <= (-1d+131)) then
tmp = ((((((-0.02210485264800276d0) / z1) * z0) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z1) * z0)
else
tmp = ((z0 * (((z0 * (-0.02210485264800276d0)) - ((-0.053051646556513725d0) * z1)) / (z1 * z1))) - 0.07957747033803834d0) / (z1 * z0)
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -1e+131) {
tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z1) * z0);
} else {
tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0);
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -1e+131: tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z1) * z0) else: tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0) return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= -1e+131) tmp = Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(Float64(z0 * Float64(Float64(Float64(z0 * -0.02210485264800276) - Float64(-0.053051646556513725 * z1)) / Float64(z1 * z1))) - 0.07957747033803834) / Float64(z1 * z0)); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -1e+131) tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z1) * z0); else tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0); end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], -1e+131], N[(N[(N[(N[(N[(N[(-0.02210485264800276 / z1), $MachinePrecision] * z0), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z0 * N[(N[(N[(z0 * -0.02210485264800276), $MachinePrecision] - N[(-0.053051646556513725 * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -1 \cdot 10^{+131}:\\
\;\;\;\;\frac{\left(\frac{-0.02210485264800276}{z1} \cdot z0 - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\frac{z0 \cdot \frac{z0 \cdot -0.02210485264800276 - -0.053051646556513725 \cdot z1}{z1 \cdot z1} - 0.07957747033803834}{z1 \cdot z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -9.9999999999999991e130Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
if -9.9999999999999991e130 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites77.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6491.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f64N/A
lower-*.f6491.0%
Applied rewrites91.0%
(FPCore (z0 z1)
:precision binary64
(let* ((t_0 (* (* z1 z0) z1)))
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
t_0)
-4e+195)
(/
(-
(*
(- (* (/ -0.02210485264800276 z1) z0) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
t_0)
(/
(-
(*
z0
(/
(- (* z0 -0.02210485264800276) (* -0.053051646556513725 z1))
(* z1 z1)))
0.07957747033803834)
(* z1 z0)))))double code(double z0, double z1) {
double t_0 = (z1 * z0) * z1;
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0) <= -4e+195) {
tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0;
} else {
tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: t_0
real(8) :: tmp
t_0 = (z1 * z0) * z1
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / t_0) <= (-4d+195)) then
tmp = ((((((-0.02210485264800276d0) / z1) * z0) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / t_0
else
tmp = ((z0 * (((z0 * (-0.02210485264800276d0)) - ((-0.053051646556513725d0) * z1)) / (z1 * z1))) - 0.07957747033803834d0) / (z1 * z0)
end if
code = tmp
end function
public static double code(double z0, double z1) {
double t_0 = (z1 * z0) * z1;
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0) <= -4e+195) {
tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0;
} else {
tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0);
}
return tmp;
}
def code(z0, z1): t_0 = (z1 * z0) * z1 tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0) <= -4e+195: tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0 else: tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0) return tmp
function code(z0, z1) t_0 = Float64(Float64(z1 * z0) * z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / t_0) <= -4e+195) tmp = Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / t_0); else tmp = Float64(Float64(Float64(z0 * Float64(Float64(Float64(z0 * -0.02210485264800276) - Float64(-0.053051646556513725 * z1)) / Float64(z1 * z1))) - 0.07957747033803834) / Float64(z1 * z0)); end return tmp end
function tmp_2 = code(z0, z1) t_0 = (z1 * z0) * z1; tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0) <= -4e+195) tmp = (((((-0.02210485264800276 / z1) * z0) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / t_0; else tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0); end tmp_2 = tmp; end
code[z0_, z1_] := Block[{t$95$0 = N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], -4e+195], N[(N[(N[(N[(N[(N[(-0.02210485264800276 / z1), $MachinePrecision] * z0), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(N[(z0 * N[(N[(N[(z0 * -0.02210485264800276), $MachinePrecision] - N[(-0.053051646556513725 * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left(z1 \cdot z0\right) \cdot z1\\
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{t\_0} \leq -4 \cdot 10^{+195}:\\
\;\;\;\;\frac{\left(\frac{-0.02210485264800276}{z1} \cdot z0 - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{z0 \cdot \frac{z0 \cdot -0.02210485264800276 - -0.053051646556513725 \cdot z1}{z1 \cdot z1} - 0.07957747033803834}{z1 \cdot z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -3.9999999999999999e195Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
if -3.9999999999999999e195 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites77.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6491.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f64N/A
lower-*.f6491.0%
Applied rewrites91.0%
(FPCore (z0 z1)
:precision binary64
(/
(-
(*
z0
(/
(- (* z0 -0.02210485264800276) (* -0.053051646556513725 z1))
(* z1 z1)))
0.07957747033803834)
(* z1 z0)))double code(double z0, double z1) {
return ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = ((z0 * (((z0 * (-0.02210485264800276d0)) - ((-0.053051646556513725d0) * z1)) / (z1 * z1))) - 0.07957747033803834d0) / (z1 * z0)
end function
public static double code(double z0, double z1) {
return ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0);
}
def code(z0, z1): return ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0)
function code(z0, z1) return Float64(Float64(Float64(z0 * Float64(Float64(Float64(z0 * -0.02210485264800276) - Float64(-0.053051646556513725 * z1)) / Float64(z1 * z1))) - 0.07957747033803834) / Float64(z1 * z0)) end
function tmp = code(z0, z1) tmp = ((z0 * (((z0 * -0.02210485264800276) - (-0.053051646556513725 * z1)) / (z1 * z1))) - 0.07957747033803834) / (z1 * z0); end
code[z0_, z1_] := N[(N[(N[(z0 * N[(N[(N[(z0 * -0.02210485264800276), $MachinePrecision] - N[(-0.053051646556513725 * z1), $MachinePrecision]), $MachinePrecision] / N[(z1 * z1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]
\frac{z0 \cdot \frac{z0 \cdot -0.02210485264800276 - -0.053051646556513725 \cdot z1}{z1 \cdot z1} - 0.07957747033803834}{z1 \cdot z0}
Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites77.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6491.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
lower--.f64N/A
lower-*.f6491.0%
Applied rewrites91.0%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
-5e+31)
(/ (* -0.07957747033803834 z1) (* (* z1 z1) z0))
(/
(*
2.0
(/ (- (* (/ z0 z1) 0.053051646556513725) 0.07957747033803834) z1))
(* 2.0 z0))))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = (2.0 * ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1)) / (2.0 * z0);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)) <= (-5d+31)) then
tmp = ((-0.07957747033803834d0) * z1) / ((z1 * z1) * z0)
else
tmp = (2.0d0 * ((((z0 / z1) * 0.053051646556513725d0) - 0.07957747033803834d0) / z1)) / (2.0d0 * z0)
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = (2.0 * ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1)) / (2.0 * z0);
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31: tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0) else: tmp = (2.0 * ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1)) / (2.0 * z0) return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= -5e+31) tmp = Float64(Float64(-0.07957747033803834 * z1) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(2.0 * Float64(Float64(Float64(Float64(z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1)) / Float64(2.0 * z0)); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0); else tmp = (2.0 * ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1)) / (2.0 * z0); end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], -5e+31], N[(N[(-0.07957747033803834 * z1), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(N[(N[(z0 / z1), $MachinePrecision] * 0.053051646556513725), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / z1), $MachinePrecision]), $MachinePrecision] / N[(2.0 * z0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \frac{\frac{z0}{z1} \cdot 0.053051646556513725 - 0.07957747033803834}{z1}}{2 \cdot z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -5.0000000000000003e31Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
Taylor expanded in z0 around 0
lower-*.f6455.8%
Applied rewrites55.8%
if -5.0000000000000003e31 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
mult-flipN/A
lower-*.f64N/A
Applied rewrites92.1%
Taylor expanded in z0 around 0
lower-*.f64N/A
lower-/.f6464.5%
Applied rewrites64.5%
lift-*.f64N/A
lift-/.f64N/A
metadata-evalN/A
lift-*.f64N/A
frac-timesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
*-lft-identityN/A
associate-*l*N/A
metadata-evalN/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites66.3%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
-5e+31)
(/ (* -0.07957747033803834 z1) (* (* z1 z1) z0))
(/
(/ (- (* (/ z0 z1) 0.053051646556513725) 0.07957747033803834) z1)
z0)))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1) / z0;
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)) <= (-5d+31)) then
tmp = ((-0.07957747033803834d0) * z1) / ((z1 * z1) * z0)
else
tmp = ((((z0 / z1) * 0.053051646556513725d0) - 0.07957747033803834d0) / z1) / z0
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1) / z0;
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31: tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0) else: tmp = ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1) / z0 return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= -5e+31) tmp = Float64(Float64(-0.07957747033803834 * z1) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(Float64(Float64(Float64(z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1) / z0); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0); else tmp = ((((z0 / z1) * 0.053051646556513725) - 0.07957747033803834) / z1) / z0; end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], -5e+31], N[(N[(-0.07957747033803834 * z1), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(z0 / z1), $MachinePrecision] * 0.053051646556513725), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / z1), $MachinePrecision] / z0), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{z0}{z1} \cdot 0.053051646556513725 - 0.07957747033803834}{z1}}{z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -5.0000000000000003e31Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
Taylor expanded in z0 around 0
lower-*.f6455.8%
Applied rewrites55.8%
if -5.0000000000000003e31 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
mult-flipN/A
lower-*.f64N/A
Applied rewrites92.1%
Taylor expanded in z0 around 0
lower-*.f64N/A
lower-/.f6464.5%
Applied rewrites64.5%
lift-*.f64N/A
lift-/.f64N/A
mult-flip-revN/A
lift-*.f64N/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6466.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.3%
Applied rewrites66.3%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
-5e+31)
(/ (* -0.07957747033803834 z1) (* (* z1 z1) z0))
(/
(/ (- (* 0.053051646556513725 (/ z0 z1)) 0.07957747033803834) z0)
z1)))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = (((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / z0) / z1;
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)) <= (-5d+31)) then
tmp = ((-0.07957747033803834d0) * z1) / ((z1 * z1) * z0)
else
tmp = (((0.053051646556513725d0 * (z0 / z1)) - 0.07957747033803834d0) / z0) / z1
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = (((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / z0) / z1;
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31: tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0) else: tmp = (((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / z0) / z1 return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= -5e+31) tmp = Float64(Float64(-0.07957747033803834 * z1) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(Float64(Float64(0.053051646556513725 * Float64(z0 / z1)) - 0.07957747033803834) / z0) / z1); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0); else tmp = (((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / z0) / z1; end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], -5e+31], N[(N[(-0.07957747033803834 * z1), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.053051646556513725 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / z0), $MachinePrecision] / z1), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0.053051646556513725 \cdot \frac{z0}{z1} - 0.07957747033803834}{z0}}{z1}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -5.0000000000000003e31Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
Taylor expanded in z0 around 0
lower-*.f6455.8%
Applied rewrites55.8%
if -5.0000000000000003e31 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites99.6%
Taylor expanded in z0 around 0
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f6464.7%
Applied rewrites64.7%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
-5e+31)
(/ (* -0.07957747033803834 z1) (* (* z1 z1) z0))
(*
(- (* 0.053051646556513725 (/ z0 z1)) 0.07957747033803834)
(/ 1.0 (* z1 z0)))))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) * (1.0 / (z1 * z0));
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)) <= (-5d+31)) then
tmp = ((-0.07957747033803834d0) * z1) / ((z1 * z1) * z0)
else
tmp = ((0.053051646556513725d0 * (z0 / z1)) - 0.07957747033803834d0) * (1.0d0 / (z1 * z0))
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) * (1.0 / (z1 * z0));
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31: tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0) else: tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) * (1.0 / (z1 * z0)) return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= -5e+31) tmp = Float64(Float64(-0.07957747033803834 * z1) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(Float64(0.053051646556513725 * Float64(z0 / z1)) - 0.07957747033803834) * Float64(1.0 / Float64(z1 * z0))); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0); else tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) * (1.0 / (z1 * z0)); end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], -5e+31], N[(N[(-0.07957747033803834 * z1), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.053051646556513725 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] * N[(1.0 / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\left(0.053051646556513725 \cdot \frac{z0}{z1} - 0.07957747033803834\right) \cdot \frac{1}{z1 \cdot z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -5.0000000000000003e31Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
Taylor expanded in z0 around 0
lower-*.f6455.8%
Applied rewrites55.8%
if -5.0000000000000003e31 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
mult-flipN/A
lower-*.f64N/A
Applied rewrites92.1%
Taylor expanded in z0 around 0
lower-*.f64N/A
lower-/.f6464.5%
Applied rewrites64.5%
(FPCore (z0 z1)
:precision binary64
(if (<=
(/
(-
(*
(- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725)
z0)
(* 0.07957747033803834 z1))
(* (* z1 z0) z1))
-5e+31)
(/ (* -0.07957747033803834 z1) (* (* z1 z1) z0))
(/
(- (* 0.053051646556513725 (/ z0 z1)) 0.07957747033803834)
(* z1 z0))))double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / (z1 * z0);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if ((((((((-0.02210485264800276d0) * z0) / z1) - (-0.053051646556513725d0)) * z0) - (0.07957747033803834d0 * z1)) / ((z1 * z0) * z1)) <= (-5d+31)) then
tmp = ((-0.07957747033803834d0) * z1) / ((z1 * z1) * z0)
else
tmp = ((0.053051646556513725d0 * (z0 / z1)) - 0.07957747033803834d0) / (z1 * z0)
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / (z1 * z0);
}
return tmp;
}
def code(z0, z1): tmp = 0 if ((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31: tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0) else: tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / (z1 * z0) return tmp
function code(z0, z1) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - Float64(0.07957747033803834 * z1)) / Float64(Float64(z1 * z0) * z1)) <= -5e+31) tmp = Float64(Float64(-0.07957747033803834 * z1) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(Float64(0.053051646556513725 * Float64(z0 / z1)) - 0.07957747033803834) / Float64(z1 * z0)); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (((((((-0.02210485264800276 * z0) / z1) - -0.053051646556513725) * z0) - (0.07957747033803834 * z1)) / ((z1 * z0) * z1)) <= -5e+31) tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0); else tmp = ((0.053051646556513725 * (z0 / z1)) - 0.07957747033803834) / (z1 * z0); end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[N[(N[(N[(N[(N[(N[(-0.02210485264800276 * z0), $MachinePrecision] / z1), $MachinePrecision] - -0.053051646556513725), $MachinePrecision] * z0), $MachinePrecision] - N[(0.07957747033803834 * z1), $MachinePrecision]), $MachinePrecision] / N[(N[(z1 * z0), $MachinePrecision] * z1), $MachinePrecision]), $MachinePrecision], -5e+31], N[(N[(-0.07957747033803834 * z1), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.053051646556513725 * N[(z0 / z1), $MachinePrecision]), $MachinePrecision] - 0.07957747033803834), $MachinePrecision] / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\frac{-0.02210485264800276 \cdot z0}{z1} - -0.053051646556513725\right) \cdot z0 - 0.07957747033803834 \cdot z1}{\left(z1 \cdot z0\right) \cdot z1} \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.053051646556513725 \cdot \frac{z0}{z1} - 0.07957747033803834}{z1 \cdot z0}\\
\end{array}
if (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) < -5.0000000000000003e31Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
Taylor expanded in z0 around 0
lower-*.f6455.8%
Applied rewrites55.8%
if -5.0000000000000003e31 < (/.f64 (-.f64 (*.f64 (-.f64 (/.f64 (*.f64 #s(literal -552621316200069/25000000000000000 binary64) z0) z1) #s(literal -2122065862260549/40000000000000000 binary64)) z0) (*.f64 #s(literal 3978873516901917/50000000000000000 binary64) z1)) (*.f64 (*.f64 z1 z0) z1)) Initial program 77.7%
Taylor expanded in z1 around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f6499.6%
Applied rewrites99.6%
Applied rewrites77.1%
Taylor expanded in z0 around 0
lower-*.f64N/A
lower-/.f6464.5%
Applied rewrites64.5%
(FPCore (z0 z1)
:precision binary64
(if (<= z1 -1.5e-156)
(/ (/ -0.07957747033803834 z1) z0)
(if (<= z1 2e-69)
(/ (* -0.07957747033803834 z1) (* (* z1 z1) z0))
(/ (/ -0.07957747033803834 z0) z1))))double code(double z0, double z1) {
double tmp;
if (z1 <= -1.5e-156) {
tmp = (-0.07957747033803834 / z1) / z0;
} else if (z1 <= 2e-69) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = (-0.07957747033803834 / z0) / z1;
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
real(8) :: tmp
if (z1 <= (-1.5d-156)) then
tmp = ((-0.07957747033803834d0) / z1) / z0
else if (z1 <= 2d-69) then
tmp = ((-0.07957747033803834d0) * z1) / ((z1 * z1) * z0)
else
tmp = ((-0.07957747033803834d0) / z0) / z1
end if
code = tmp
end function
public static double code(double z0, double z1) {
double tmp;
if (z1 <= -1.5e-156) {
tmp = (-0.07957747033803834 / z1) / z0;
} else if (z1 <= 2e-69) {
tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0);
} else {
tmp = (-0.07957747033803834 / z0) / z1;
}
return tmp;
}
def code(z0, z1): tmp = 0 if z1 <= -1.5e-156: tmp = (-0.07957747033803834 / z1) / z0 elif z1 <= 2e-69: tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0) else: tmp = (-0.07957747033803834 / z0) / z1 return tmp
function code(z0, z1) tmp = 0.0 if (z1 <= -1.5e-156) tmp = Float64(Float64(-0.07957747033803834 / z1) / z0); elseif (z1 <= 2e-69) tmp = Float64(Float64(-0.07957747033803834 * z1) / Float64(Float64(z1 * z1) * z0)); else tmp = Float64(Float64(-0.07957747033803834 / z0) / z1); end return tmp end
function tmp_2 = code(z0, z1) tmp = 0.0; if (z1 <= -1.5e-156) tmp = (-0.07957747033803834 / z1) / z0; elseif (z1 <= 2e-69) tmp = (-0.07957747033803834 * z1) / ((z1 * z1) * z0); else tmp = (-0.07957747033803834 / z0) / z1; end tmp_2 = tmp; end
code[z0_, z1_] := If[LessEqual[z1, -1.5e-156], N[(N[(-0.07957747033803834 / z1), $MachinePrecision] / z0), $MachinePrecision], If[LessEqual[z1, 2e-69], N[(N[(-0.07957747033803834 * z1), $MachinePrecision] / N[(N[(z1 * z1), $MachinePrecision] * z0), $MachinePrecision]), $MachinePrecision], N[(N[(-0.07957747033803834 / z0), $MachinePrecision] / z1), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z1 \leq -1.5 \cdot 10^{-156}:\\
\;\;\;\;\frac{\frac{-0.07957747033803834}{z1}}{z0}\\
\mathbf{elif}\;z1 \leq 2 \cdot 10^{-69}:\\
\;\;\;\;\frac{-0.07957747033803834 \cdot z1}{\left(z1 \cdot z1\right) \cdot z0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-0.07957747033803834}{z0}}{z1}\\
\end{array}
if z1 < -1.5000000000000001e-156Initial program 77.7%
Taylor expanded in z0 around 0
lower-/.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6459.3%
Applied rewrites59.3%
if -1.5000000000000001e-156 < z1 < 1.9999999999999999e-69Initial program 77.7%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6477.7%
Applied rewrites77.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.9%
Applied rewrites71.9%
Taylor expanded in z0 around 0
lower-*.f6455.8%
Applied rewrites55.8%
if 1.9999999999999999e-69 < z1 Initial program 77.7%
Taylor expanded in z0 around 0
lower-/.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
mult-flip-revN/A
metadata-evalN/A
lift-/.f64N/A
lower-/.f64N/A
metadata-evalN/A
lift-/.f64N/A
mult-flip-revN/A
lower-/.f6459.3%
Applied rewrites59.3%
(FPCore (z0 z1) :precision binary64 (/ (/ -0.07957747033803834 z0) z1))
double code(double z0, double z1) {
return (-0.07957747033803834 / z0) / z1;
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = ((-0.07957747033803834d0) / z0) / z1
end function
public static double code(double z0, double z1) {
return (-0.07957747033803834 / z0) / z1;
}
def code(z0, z1): return (-0.07957747033803834 / z0) / z1
function code(z0, z1) return Float64(Float64(-0.07957747033803834 / z0) / z1) end
function tmp = code(z0, z1) tmp = (-0.07957747033803834 / z0) / z1; end
code[z0_, z1_] := N[(N[(-0.07957747033803834 / z0), $MachinePrecision] / z1), $MachinePrecision]
\frac{\frac{-0.07957747033803834}{z0}}{z1}
Initial program 77.7%
Taylor expanded in z0 around 0
lower-/.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/r*N/A
mult-flip-revN/A
metadata-evalN/A
lift-/.f64N/A
lower-/.f64N/A
metadata-evalN/A
lift-/.f64N/A
mult-flip-revN/A
lower-/.f6459.3%
Applied rewrites59.3%
(FPCore (z0 z1) :precision binary64 (* -0.07957747033803834 (/ 1.0 (* z1 z0))))
double code(double z0, double z1) {
return -0.07957747033803834 * (1.0 / (z1 * z0));
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = (-0.07957747033803834d0) * (1.0d0 / (z1 * z0))
end function
public static double code(double z0, double z1) {
return -0.07957747033803834 * (1.0 / (z1 * z0));
}
def code(z0, z1): return -0.07957747033803834 * (1.0 / (z1 * z0))
function code(z0, z1) return Float64(-0.07957747033803834 * Float64(1.0 / Float64(z1 * z0))) end
function tmp = code(z0, z1) tmp = -0.07957747033803834 * (1.0 / (z1 * z0)); end
code[z0_, z1_] := N[(-0.07957747033803834 * N[(1.0 / N[(z1 * z0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
-0.07957747033803834 \cdot \frac{1}{z1 \cdot z0}
Initial program 77.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
mult-flipN/A
lower-*.f64N/A
Applied rewrites92.1%
Taylor expanded in z0 around 0
Applied rewrites59.1%
(FPCore (z0 z1) :precision binary64 (/ -0.07957747033803834 (* z0 z1)))
double code(double z0, double z1) {
return -0.07957747033803834 / (z0 * z1);
}
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(z0, z1)
use fmin_fmax_functions
real(8), intent (in) :: z0
real(8), intent (in) :: z1
code = (-0.07957747033803834d0) / (z0 * z1)
end function
public static double code(double z0, double z1) {
return -0.07957747033803834 / (z0 * z1);
}
def code(z0, z1): return -0.07957747033803834 / (z0 * z1)
function code(z0, z1) return Float64(-0.07957747033803834 / Float64(z0 * z1)) end
function tmp = code(z0, z1) tmp = -0.07957747033803834 / (z0 * z1); end
code[z0_, z1_] := N[(-0.07957747033803834 / N[(z0 * z1), $MachinePrecision]), $MachinePrecision]
\frac{-0.07957747033803834}{z0 \cdot z1}
Initial program 77.7%
Taylor expanded in z0 around 0
lower-/.f64N/A
lower-*.f6459.1%
Applied rewrites59.1%
herbie shell --seed 2025250
(FPCore (z0 z1)
:name "(/ (- (* (- (/ (* -552621316200069/25000000000000000 z0) z1) -2122065862260549/40000000000000000) z0) (* 3978873516901917/50000000000000000 z1)) (* (* z1 z0) z1))"
:precision binary64
(/ (- (* (- (/ (* -0.02210485264800276 z0) z1) -0.053051646556513725) z0) (* 0.07957747033803834 z1)) (* (* z1 z0) z1)))