(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) { return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))); }
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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)))) end function
public static double code(double w0, double M, double D, double h, double l, double d) { return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))); }
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (w0 M D h l d) :precision binary64 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) { return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))); }
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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)))) end function
public static double code(double w0, double M, double D, double h, double l, double d) { return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))); }
def code(w0, M, D, h, l, d): return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d) return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) end
function tmp = code(w0, M, D, h, l, d) tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))); end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l} \\ w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \end{array}
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))) 5e+267) (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (+ d d)) 2.0) (/ h l))))) (* w0 (sqrt (- 1.0 (* (* (/ D d) (* 0.5 M)) (/ (* 0.5 (* (* h M) D)) (* l d))))))))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))) <= 5e+267) { tmp = w0 * sqrt((1.0 - (pow(((M * D) / (d + d)), 2.0) * (h / l)))); } else { tmp = w0 * sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if ((w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))) <= 5d+267) then tmp = w0 * sqrt((1.0d0 - ((((m * d) / (d_1 + d_1)) ** 2.0d0) * (h / l)))) else tmp = w0 * sqrt((1.0d0 - (((d / d_1) * (0.5d0 * m)) * ((0.5d0 * ((h * m) * d)) / (l * d_1))))) end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))) <= 5e+267) { tmp = w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (d + d)), 2.0) * (h / l)))); } else { tmp = w0 * Math.sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if (w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))) <= 5e+267: tmp = w0 * math.sqrt((1.0 - (math.pow(((M * D) / (d + d)), 2.0) * (h / l)))) else: tmp = w0 * math.sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))) return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) <= 5e+267) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(d + d)) ^ 2.0) * Float64(h / l))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D / d) * Float64(0.5 * M)) * Float64(Float64(0.5 * Float64(Float64(h * M) * D)) / Float64(l * d)))))); end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if ((w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))))) <= 5e+267) tmp = w0 * sqrt((1.0 - ((((M * D) / (d + d)) ^ 2.0) * (h / l)))); else tmp = w0 * sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 5e+267], N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * N[(N[(h * M), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \leq 5 \cdot 10^{+267}:\\ \;\;\;\;w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{d + d}\right)}^{2} \cdot \frac{h}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right) \cdot \frac{0.5 \cdot \left(\left(h \cdot M\right) \cdot D\right)}{\ell \cdot d}}\\ \end{array} \end{array}
if (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) < 4.9999999999999999e267
Initial program 96.1%
lift-*.f64
N/A
count-2-rev
N/A
lower-+.f64
96.1
Applied rewrites96.1%
if 4.9999999999999999e267 < (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)))))
Initial program 34.8%
lift-*.f64
N/A
count-2-rev
N/A
lower-+.f64
34.8
Applied rewrites34.8%
lift-*.f64
N/A
lift-pow.f64
N/A
lift-*.f64
N/A
lift-+.f64
N/A
lift-/.f64
N/A
count-2-rev
N/A
frac-times
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-/.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lift-/.f64
N/A
lower-*.f64
N/A
Applied rewrites47.8%
Taylor expanded in M around 0
associate-*r/
N/A
lower-/.f64
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
69.9
Applied rewrites69.9%
Taylor expanded in M around 0
lower-*.f64
69.9
Applied rewrites69.9%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))) 5e+267) (* w0 (sqrt (- 1.0 (* (* (* (/ M 2.0) (/ D d)) (* (* 0.5 M) (/ D d))) (/ h l))))) (* w0 (sqrt (- 1.0 (* (* (/ D d) (* 0.5 M)) (/ (* 0.5 (* (* h M) D)) (* l d))))))))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))) <= 5e+267) { tmp = w0 * sqrt((1.0 - ((((M / 2.0) * (D / d)) * ((0.5 * M) * (D / d))) * (h / l)))); } else { tmp = w0 * sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if ((w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))) <= 5d+267) then tmp = w0 * sqrt((1.0d0 - ((((m / 2.0d0) * (d / d_1)) * ((0.5d0 * m) * (d / d_1))) * (h / l)))) else tmp = w0 * sqrt((1.0d0 - (((d / d_1) * (0.5d0 * m)) * ((0.5d0 * ((h * m) * d)) / (l * d_1))))) end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))) <= 5e+267) { tmp = w0 * Math.sqrt((1.0 - ((((M / 2.0) * (D / d)) * ((0.5 * M) * (D / d))) * (h / l)))); } else { tmp = w0 * Math.sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if (w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))) <= 5e+267: tmp = w0 * math.sqrt((1.0 - ((((M / 2.0) * (D / d)) * ((0.5 * M) * (D / d))) * (h / l)))) else: tmp = w0 * math.sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))) return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l))))) <= 5e+267) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(Float64(M / 2.0) * Float64(D / d)) * Float64(Float64(0.5 * M) * Float64(D / d))) * Float64(h / l))))); else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D / d) * Float64(0.5 * M)) * Float64(Float64(0.5 * Float64(Float64(h * M) * D)) / Float64(l * d)))))); end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if ((w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))))) <= 5e+267) tmp = w0 * sqrt((1.0 - ((((M / 2.0) * (D / d)) * ((0.5 * M) * (D / d))) * (h / l)))); else tmp = w0 * sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 5e+267], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * M), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * N[(N[(h * M), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \leq 5 \cdot 10^{+267}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \left(\left(0.5 \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \frac{h}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right) \cdot \frac{0.5 \cdot \left(\left(h \cdot M\right) \cdot D\right)}{\ell \cdot d}}\\ \end{array} \end{array}
if (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))) < 4.9999999999999999e267
Initial program 96.1%
lift-pow.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
unpow2
N/A
lower-*.f64
N/A
times-frac
N/A
lower-*.f64
N/A
lower-/.f64
N/A
lower-/.f64
N/A
times-frac
N/A
lower-*.f64
N/A
lower-/.f64
N/A
lower-/.f64
95.1
Applied rewrites95.1%
Taylor expanded in M around 0
lower-*.f64
95.1
Applied rewrites95.1%
if 4.9999999999999999e267 < (*.f64 w0 (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)))))
Initial program 34.8%
lift-*.f64
N/A
count-2-rev
N/A
lower-+.f64
34.8
Applied rewrites34.8%
lift-*.f64
N/A
lift-pow.f64
N/A
lift-*.f64
N/A
lift-+.f64
N/A
lift-/.f64
N/A
count-2-rev
N/A
frac-times
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-/.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lift-/.f64
N/A
lower-*.f64
N/A
Applied rewrites47.8%
Taylor expanded in M around 0
associate-*r/
N/A
lower-/.f64
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
69.9
Applied rewrites69.9%
Taylor expanded in M around 0
lower-*.f64
69.9
Applied rewrites69.9%
(FPCore (w0 M D h l d) :precision binary64 (let* ((t_0 (* (/ D d) (/ M 2.0)))) (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -1e-9) (* w0 (sqrt (- 1.0 (* t_0 (* t_0 (/ h l)))))) w0)))
double code(double w0, double M, double D, double h, double l, double d) { double t_0 = (D / d) * (M / 2.0); double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -1e-9) { tmp = w0 * sqrt((1.0 - (t_0 * (t_0 * (h / l))))); } else { tmp = w0; } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: t_0 real(8) :: tmp t_0 = (d / d_1) * (m / 2.0d0) if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-1d-9)) then tmp = w0 * sqrt((1.0d0 - (t_0 * (t_0 * (h / l))))) else tmp = w0 end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double t_0 = (D / d) * (M / 2.0); double tmp; if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -1e-9) { tmp = w0 * Math.sqrt((1.0 - (t_0 * (t_0 * (h / l))))); } else { tmp = w0; } return tmp; }
def code(w0, M, D, h, l, d): t_0 = (D / d) * (M / 2.0) tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -1e-9: tmp = w0 * math.sqrt((1.0 - (t_0 * (t_0 * (h / l))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(D / d) * Float64(M / 2.0)) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -1e-9) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(t_0 * Float64(t_0 * Float64(h / l)))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (D / d) * (M / 2.0); tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -1e-9) tmp = w0 * sqrt((1.0 - (t_0 * (t_0 * (h / l))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[(D / d), $MachinePrecision] * N[(M / 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -1e-9], N[(w0 * N[Sqrt[N[(1.0 - N[(t$95$0 * N[(t$95$0 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{D}{d} \cdot \frac{M}{2}\\ \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -1 \cdot 10^{-9}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t\_0 \cdot \left(t\_0 \cdot \frac{h}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -1.00000000000000006e-9
Initial program 66.5%
lift-*.f64
N/A
count-2-rev
N/A
lower-+.f64
66.5
Applied rewrites66.5%
lift-*.f64
N/A
lift-pow.f64
N/A
lift-*.f64
N/A
lift-+.f64
N/A
lift-/.f64
N/A
count-2-rev
N/A
frac-times
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-/.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lift-/.f64
N/A
lower-*.f64
N/A
Applied rewrites70.3%
if -1.00000000000000006e-9 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.2%
Taylor expanded in M around 0
Applied rewrites96.0%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)))) 1.0) w0 (* w0 (sqrt (- 1.0 (* (* (/ D d) (* 0.5 M)) (/ (* 0.5 (* (* h M) D)) (* l d))))))))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if (sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))) <= 1.0) { tmp = w0; } else { tmp = w0 * sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if (sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)))) <= 1.0d0) then tmp = w0 else tmp = w0 * sqrt((1.0d0 - (((d / d_1) * (0.5d0 * m)) * ((0.5d0 * ((h * m) * d)) / (l * d_1))))) end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if (Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))) <= 1.0) { tmp = w0; } else { tmp = w0 * Math.sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)))) <= 1.0: tmp = w0 else: tmp = w0 * math.sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))) return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)))) <= 1.0) tmp = w0; else tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(Float64(D / d) * Float64(0.5 * M)) * Float64(Float64(0.5 * Float64(Float64(h * M) * D)) / Float64(l * d)))))); end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)))) <= 1.0) tmp = w0; else tmp = w0 * sqrt((1.0 - (((D / d) * (0.5 * M)) * ((0.5 * ((h * M) * D)) / (l * d))))); end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1.0], w0, N[(w0 * N[Sqrt[N[(1.0 - N[(N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * N[(N[(h * M), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \leq 1:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right) \cdot \frac{0.5 \cdot \left(\left(h \cdot M\right) \cdot D\right)}{\ell \cdot d}}\\ \end{array} \end{array}
if (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)))) < 1
Initial program 100.0%
Taylor expanded in M around 0
Applied rewrites100.0%
if 1 < (sqrt.f64 (-.f64 #s(literal 1 binary64) (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))))
Initial program 49.1%
lift-*.f64
N/A
count-2-rev
N/A
lower-+.f64
49.1
Applied rewrites49.1%
lift-*.f64
N/A
lift-pow.f64
N/A
lift-*.f64
N/A
lift-+.f64
N/A
lift-/.f64
N/A
count-2-rev
N/A
frac-times
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-/.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lift-/.f64
N/A
lower-*.f64
N/A
Applied rewrites57.6%
Taylor expanded in M around 0
associate-*r/
N/A
lower-/.f64
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
62.2
Applied rewrites62.2%
Taylor expanded in M around 0
lower-*.f64
62.2
Applied rewrites62.2%
(FPCore (w0 M D h l d) :precision binary64 (let* ((t_0 (/ (* M D) (* 2.0 d)))) (if (<= (* (pow t_0 2.0) (/ h l)) -1e-9) (* w0 (sqrt (- 1.0 (* t_0 (* (* (/ D d) (/ M 2.0)) (/ h l)))))) w0)))
double code(double w0, double M, double D, double h, double l, double d) { double t_0 = (M * D) / (2.0 * d); double tmp; if ((pow(t_0, 2.0) * (h / l)) <= -1e-9) { tmp = w0 * sqrt((1.0 - (t_0 * (((D / d) * (M / 2.0)) * (h / l))))); } else { tmp = w0; } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: t_0 real(8) :: tmp t_0 = (m * d) / (2.0d0 * d_1) if (((t_0 ** 2.0d0) * (h / l)) <= (-1d-9)) then tmp = w0 * sqrt((1.0d0 - (t_0 * (((d / d_1) * (m / 2.0d0)) * (h / l))))) else tmp = w0 end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double t_0 = (M * D) / (2.0 * d); double tmp; if ((Math.pow(t_0, 2.0) * (h / l)) <= -1e-9) { tmp = w0 * Math.sqrt((1.0 - (t_0 * (((D / d) * (M / 2.0)) * (h / l))))); } else { tmp = w0; } return tmp; }
def code(w0, M, D, h, l, d): t_0 = (M * D) / (2.0 * d) tmp = 0 if (math.pow(t_0, 2.0) * (h / l)) <= -1e-9: tmp = w0 * math.sqrt((1.0 - (t_0 * (((D / d) * (M / 2.0)) * (h / l))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) t_0 = Float64(Float64(M * D) / Float64(2.0 * d)) tmp = 0.0 if (Float64((t_0 ^ 2.0) * Float64(h / l)) <= -1e-9) tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(t_0 * Float64(Float64(Float64(D / d) * Float64(M / 2.0)) * Float64(h / l)))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) t_0 = (M * D) / (2.0 * d); tmp = 0.0; if (((t_0 ^ 2.0) * (h / l)) <= -1e-9) tmp = w0 * sqrt((1.0 - (t_0 * (((D / d) * (M / 2.0)) * (h / l))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[t$95$0, 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -1e-9], N[(w0 * N[Sqrt[N[(1.0 - N[(t$95$0 * N[(N[(N[(D / d), $MachinePrecision] * N[(M / 2.0), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]]
\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{2 \cdot d}\\ \mathbf{if}\;{t\_0}^{2} \cdot \frac{h}{\ell} \leq -1 \cdot 10^{-9}:\\ \;\;\;\;w0 \cdot \sqrt{1 - t\_0 \cdot \left(\left(\frac{D}{d} \cdot \frac{M}{2}\right) \cdot \frac{h}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -1.00000000000000006e-9
Initial program 66.5%
lift-*.f64
N/A
count-2-rev
N/A
lower-+.f64
66.5
Applied rewrites66.5%
lift-*.f64
N/A
lift-pow.f64
N/A
lift-*.f64
N/A
lift-+.f64
N/A
lift-/.f64
N/A
count-2-rev
N/A
frac-times
N/A
lift-/.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-/.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lift-/.f64
N/A
lower-*.f64
N/A
Applied rewrites70.3%
lift-*.f64
N/A
lift-/.f64
N/A
lift-/.f64
N/A
frac-times
N/A
*-commutative
N/A
lower-/.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lower-*.f64
68.9
Applied rewrites68.9%
if -1.00000000000000006e-9 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.2%
Taylor expanded in M around 0
Applied rewrites96.0%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -5e+19) (* w0 (sqrt (* -0.25 (* (* D D) (* (* (/ M d) (/ M d)) (/ h l)))))) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+19) { tmp = w0 * sqrt((-0.25 * ((D * D) * (((M / d) * (M / d)) * (h / l))))); } else { tmp = w0; } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-5d+19)) then tmp = w0 * sqrt(((-0.25d0) * ((d * d) * (((m / d_1) * (m / d_1)) * (h / l))))) else tmp = w0 end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+19) { tmp = w0 * Math.sqrt((-0.25 * ((D * D) * (((M / d) * (M / d)) * (h / l))))); } else { tmp = w0; } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -5e+19: tmp = w0 * math.sqrt((-0.25 * ((D * D) * (((M / d) * (M / d)) * (h / l))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -5e+19) tmp = Float64(w0 * sqrt(Float64(-0.25 * Float64(Float64(D * D) * Float64(Float64(Float64(M / d) * Float64(M / d)) * Float64(h / l)))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -5e+19) tmp = w0 * sqrt((-0.25 * ((D * D) * (((M / d) * (M / d)) * (h / l))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -5e+19], N[(w0 * N[Sqrt[N[(-0.25 * N[(N[(D * D), $MachinePrecision] * N[(N[(N[(M / d), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -5 \cdot 10^{+19}:\\ \;\;\;\;w0 \cdot \sqrt{-0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(\frac{M}{d} \cdot \frac{M}{d}\right) \cdot \frac{h}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -5e19
Initial program 65.5%
Taylor expanded in M around inf
lower-*.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
44.3
Applied rewrites44.3%
lift-*.f64
N/A
lift-*.f64
N/A
lift-pow.f64
N/A
unpow-prod-down
N/A
associate-*r*
N/A
*-commutative
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
34.9
Applied rewrites34.9%
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
36.6
Applied rewrites36.6%
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
lower-/.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
*-commutative
N/A
lift-*.f64
N/A
lift-*.f64
N/A
*-commutative
N/A
associate-*l*
N/A
pow2
N/A
associate-/l*
N/A
lower-*.f64
N/A
pow2
N/A
lift-*.f64
N/A
times-frac
N/A
pow2
N/A
pow2
N/A
Applied rewrites50.3%
if -5e19 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.4%
Taylor expanded in M around 0
Applied rewrites95.6%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -2e+25) (* w0 (sqrt (* -0.25 (/ (* (* (* D M) (* D M)) h) (* (* d d) l))))) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25) { tmp = w0 * sqrt((-0.25 * ((((D * M) * (D * M)) * h) / ((d * d) * l)))); } else { tmp = w0; } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-2d+25)) then tmp = w0 * sqrt(((-0.25d0) * ((((d * m) * (d * m)) * h) / ((d_1 * d_1) * l)))) else tmp = w0 end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25) { tmp = w0 * Math.sqrt((-0.25 * ((((D * M) * (D * M)) * h) / ((d * d) * l)))); } else { tmp = w0; } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25: tmp = w0 * math.sqrt((-0.25 * ((((D * M) * (D * M)) * h) / ((d * d) * l)))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -2e+25) tmp = Float64(w0 * sqrt(Float64(-0.25 * Float64(Float64(Float64(Float64(D * M) * Float64(D * M)) * h) / Float64(Float64(d * d) * l))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -2e+25) tmp = w0 * sqrt((-0.25 * ((((D * M) * (D * M)) * h) / ((d * d) * l)))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -2e+25], N[(w0 * N[Sqrt[N[(-0.25 * N[(N[(N[(N[(D * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -2 \cdot 10^{+25}:\\ \;\;\;\;w0 \cdot \sqrt{-0.25 \cdot \frac{\left(\left(D \cdot M\right) \cdot \left(D \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -2.00000000000000018e25
Initial program 64.4%
Taylor expanded in M around inf
lower-*.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
45.7
Applied rewrites45.7%
lift-*.f64
N/A
lift-pow.f64
N/A
unpow2
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
45.7
Applied rewrites45.7%
if -2.00000000000000018e25 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.5%
Taylor expanded in M around 0
Applied rewrites94.7%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -2e+25) (* w0 (sqrt (* -0.25 (* (* (* h M) M) (/ (* D D) (* (* d d) l)))))) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25) { tmp = w0 * sqrt((-0.25 * (((h * M) * M) * ((D * D) / ((d * d) * l))))); } else { tmp = w0; } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-2d+25)) then tmp = w0 * sqrt(((-0.25d0) * (((h * m) * m) * ((d * d) / ((d_1 * d_1) * l))))) else tmp = w0 end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25) { tmp = w0 * Math.sqrt((-0.25 * (((h * M) * M) * ((D * D) / ((d * d) * l))))); } else { tmp = w0; } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25: tmp = w0 * math.sqrt((-0.25 * (((h * M) * M) * ((D * D) / ((d * d) * l))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -2e+25) tmp = Float64(w0 * sqrt(Float64(-0.25 * Float64(Float64(Float64(h * M) * M) * Float64(Float64(D * D) / Float64(Float64(d * d) * l)))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -2e+25) tmp = w0 * sqrt((-0.25 * (((h * M) * M) * ((D * D) / ((d * d) * l))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -2e+25], N[(w0 * N[Sqrt[N[(-0.25 * N[(N[(N[(h * M), $MachinePrecision] * M), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -2 \cdot 10^{+25}:\\ \;\;\;\;w0 \cdot \sqrt{-0.25 \cdot \left(\left(\left(h \cdot M\right) \cdot M\right) \cdot \frac{D \cdot D}{\left(d \cdot d\right) \cdot \ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -2.00000000000000018e25
Initial program 64.4%
Taylor expanded in M around inf
lower-*.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
45.7
Applied rewrites45.7%
lift-*.f64
N/A
lift-*.f64
N/A
lift-pow.f64
N/A
unpow-prod-down
N/A
associate-*r*
N/A
*-commutative
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
36.0
Applied rewrites36.0%
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
37.7
Applied rewrites37.7%
lift-/.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
associate-/l*
N/A
lift-*.f64
N/A
lift-*.f64
N/A
*-commutative
N/A
associate-*l*
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
*-commutative
N/A
lift-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
lower-/.f64
N/A
pow2
N/A
lift-*.f64
N/A
pow2
N/A
Applied rewrites40.8%
if -2.00000000000000018e25 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.5%
Taylor expanded in M around 0
Applied rewrites94.7%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -2e+25) (* w0 (sqrt (* -0.25 (* (* D D) (* (* M M) (/ h (* (* d d) l))))))) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25) { tmp = w0 * sqrt((-0.25 * ((D * D) * ((M * M) * (h / ((d * d) * l)))))); } else { tmp = w0; } 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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 real(8) :: tmp if (((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l)) <= (-2d+25)) then tmp = w0 * sqrt(((-0.25d0) * ((d * d) * ((m * m) * (h / ((d_1 * d_1) * l)))))) else tmp = w0 end if code = tmp end function
public static double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25) { tmp = w0 * Math.sqrt((-0.25 * ((D * D) * ((M * M) * (h / ((d * d) * l)))))); } else { tmp = w0; } return tmp; }
def code(w0, M, D, h, l, d): tmp = 0 if (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+25: tmp = w0 * math.sqrt((-0.25 * ((D * D) * ((M * M) * (h / ((d * d) * l)))))) else: tmp = w0 return tmp
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -2e+25) tmp = Float64(w0 * sqrt(Float64(-0.25 * Float64(Float64(D * D) * Float64(Float64(M * M) * Float64(h / Float64(Float64(d * d) * l))))))); else tmp = w0; end return tmp end
function tmp_2 = code(w0, M, D, h, l, d) tmp = 0.0; if (((((M * D) / (2.0 * d)) ^ 2.0) * (h / l)) <= -2e+25) tmp = w0 * sqrt((-0.25 * ((D * D) * ((M * M) * (h / ((d * d) * l)))))); else tmp = w0; end tmp_2 = tmp; end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -2e+25], N[(w0 * N[Sqrt[N[(-0.25 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[(h / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -2 \cdot 10^{+25}:\\ \;\;\;\;w0 \cdot \sqrt{-0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot \frac{h}{\left(d \cdot d\right) \cdot \ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -2.00000000000000018e25
Initial program 64.4%
Taylor expanded in M around inf
lower-*.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
45.7
Applied rewrites45.7%
lift-/.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-pow.f64
N/A
unpow-prod-down
N/A
associate-*r*
N/A
associate-/l*
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
associate-/l*
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
lower-/.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-*.f64
40.7
Applied rewrites40.7%
if -2.00000000000000018e25 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.5%
Taylor expanded in M around 0
Applied rewrites94.7%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -1e+272) (fma (/ (* (* (* M D) (* M D)) (* h w0)) (* d (* d l))) -0.125 w0) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -1e+272) { tmp = fma(((((M * D) * (M * D)) * (h * w0)) / (d * (d * l))), -0.125, w0); } else { tmp = w0; } return tmp; }
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -1e+272) tmp = fma(Float64(Float64(Float64(Float64(M * D) * Float64(M * D)) * Float64(h * w0)) / Float64(d * Float64(d * l))), -0.125, w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -1e+272], N[(N[(N[(N[(N[(M * D), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision] * N[(h * w0), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125 + w0), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -1 \cdot 10^{+272}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\left(M \cdot D\right) \cdot \left(M \cdot D\right)\right) \cdot \left(h \cdot w0\right)}{d \cdot \left(d \cdot \ell\right)}, -0.125, w0\right)\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -1.0000000000000001e272
Initial program 54.5%
Taylor expanded in M around 0
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
48.1
Applied rewrites48.1%
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lower-*.f64
50.2
Applied rewrites50.2%
lift-*.f64
N/A
lift-pow.f64
N/A
unpow2
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
N/A
*-commutative
N/A
lower-*.f64
50.2
Applied rewrites50.2%
if -1.0000000000000001e272 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 88.3%
Taylor expanded in M around 0
Applied rewrites88.8%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -1e+272) (fma (/ (* (* (* D M) (* D M)) (* h w0)) (* (* d d) l)) -0.125 w0) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -1e+272) { tmp = fma(((((D * M) * (D * M)) * (h * w0)) / ((d * d) * l)), -0.125, w0); } else { tmp = w0; } return tmp; }
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -1e+272) tmp = fma(Float64(Float64(Float64(Float64(D * M) * Float64(D * M)) * Float64(h * w0)) / Float64(Float64(d * d) * l)), -0.125, w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -1e+272], N[(N[(N[(N[(N[(D * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[(h * w0), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * -0.125 + w0), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -1 \cdot 10^{+272}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\left(D \cdot M\right) \cdot \left(D \cdot M\right)\right) \cdot \left(h \cdot w0\right)}{\left(d \cdot d\right) \cdot \ell}, -0.125, w0\right)\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -1.0000000000000001e272
Initial program 54.5%
Taylor expanded in M around 0
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
48.1
Applied rewrites48.1%
lift-*.f64
N/A
lift-pow.f64
N/A
unpow2
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
48.1
Applied rewrites48.1%
if -1.0000000000000001e272 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 88.3%
Taylor expanded in M around 0
Applied rewrites88.8%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -2e+103) (fma (* D (/ (* (* (* (* h M) M) w0) D) (* (* d d) l))) -0.125 w0) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -2e+103) { tmp = fma((D * (((((h * M) * M) * w0) * D) / ((d * d) * l))), -0.125, w0); } else { tmp = w0; } return tmp; }
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -2e+103) tmp = fma(Float64(D * Float64(Float64(Float64(Float64(Float64(h * M) * M) * w0) * D) / Float64(Float64(d * d) * l))), -0.125, w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -2e+103], N[(N[(D * N[(N[(N[(N[(N[(h * M), $MachinePrecision] * M), $MachinePrecision] * w0), $MachinePrecision] * D), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125 + w0), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -2 \cdot 10^{+103}:\\ \;\;\;\;\mathsf{fma}\left(D \cdot \frac{\left(\left(\left(h \cdot M\right) \cdot M\right) \cdot w0\right) \cdot D}{\left(d \cdot d\right) \cdot \ell}, -0.125, w0\right)\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -2e103
Initial program 60.8%
Taylor expanded in M around 0
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
41.9
Applied rewrites41.9%
lift-/.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-pow.f64
N/A
unpow-prod-down
N/A
lift-*.f64
N/A
associate-*r*
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
associate-/l*
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-*.f64
39.6
Applied rewrites39.6%
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lower-*.f64
40.5
lift-/.f64
N/A
lift-*.f64
N/A
associate-/l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
lower-/.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-*.f64
40.3
Applied rewrites40.3%
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-/.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
associate-*r/
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
associate-*r*
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
Applied rewrites42.3%
if -2e103 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.9%
Taylor expanded in M around 0
Applied rewrites92.1%
(FPCore (w0 M D h l d) :precision binary64 (if (<= (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l)) -1e+135) (fma (* D (* D (* (* M M) (/ (* h w0) (* (* d d) l))))) -0.125 w0) w0))
double code(double w0, double M, double D, double h, double l, double d) { double tmp; if ((pow(((M * D) / (2.0 * d)), 2.0) * (h / l)) <= -1e+135) { tmp = fma((D * (D * ((M * M) * ((h * w0) / ((d * d) * l))))), -0.125, w0); } else { tmp = w0; } return tmp; }
function code(w0, M, D, h, l, d) tmp = 0.0 if (Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)) <= -1e+135) tmp = fma(Float64(D * Float64(D * Float64(Float64(M * M) * Float64(Float64(h * w0) / Float64(Float64(d * d) * l))))), -0.125, w0); else tmp = w0; end return tmp end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision], -1e+135], N[(N[(D * N[(D * N[(N[(M * M), $MachinePrecision] * N[(N[(h * w0), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125 + w0), $MachinePrecision], w0]
\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell} \leq -1 \cdot 10^{+135}:\\ \;\;\;\;\mathsf{fma}\left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{h \cdot w0}{\left(d \cdot d\right) \cdot \ell}\right)\right), -0.125, w0\right)\\ \mathbf{else}:\\ \;\;\;\;w0\\ \end{array} \end{array}
if (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l)) < -9.99999999999999962e134
Initial program 60.1%
Taylor expanded in M around 0
+-commutative
N/A
*-commutative
N/A
lower-fma.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
pow-prod-down
N/A
lower-pow.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
42.6
Applied rewrites42.6%
lift-/.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
lift-pow.f64
N/A
unpow-prod-down
N/A
lift-*.f64
N/A
associate-*r*
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
associate-/l*
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
lower-/.f64
N/A
associate-*r*
N/A
lower-*.f64
N/A
lower-*.f64
N/A
unpow2
N/A
lower-*.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-*.f64
40.3
Applied rewrites40.3%
lift-*.f64
N/A
lift-*.f64
N/A
associate-*l*
N/A
lower-*.f64
N/A
lower-*.f64
41.1
lift-/.f64
N/A
lift-*.f64
N/A
associate-/l*
N/A
lower-*.f64
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
lower-/.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-*.f64
40.9
Applied rewrites40.9%
lift-*.f64
N/A
lift-/.f64
N/A
associate-*r/
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
associate-*r*
N/A
lift-*.f64
N/A
lift-*.f64
N/A
pow2
N/A
associate-/l*
N/A
lower-*.f64
N/A
pow2
N/A
lift-*.f64
N/A
lower-/.f64
N/A
lift-*.f64
N/A
pow2
N/A
lift-*.f64
N/A
lift-*.f64
42.6
Applied rewrites42.6%
if -9.99999999999999962e134 < (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64)) (/.f64 h l))
Initial program 87.9%
Taylor expanded in M around 0
Applied rewrites91.7%
(FPCore (w0 M D h l d) :precision binary64 w0)
double code(double w0, double M, double D, double h, double l, double d) { return w0; }
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(w0, m, d, h, l, d_1) use fmin_fmax_functions real(8), intent (in) :: w0 real(8), intent (in) :: m real(8), intent (in) :: d real(8), intent (in) :: h real(8), intent (in) :: l real(8), intent (in) :: d_1 code = w0 end function
public static double code(double w0, double M, double D, double h, double l, double d) { return w0; }
def code(w0, M, D, h, l, d): return w0
function code(w0, M, D, h, l, d) return w0 end
function tmp = code(w0, M, D, h, l, d) tmp = w0; end
code[w0_, M_, D_, h_, l_, d_] := w0
\begin{array}{l} \\ w0 \end{array}
Initial program 81.7%
Taylor expanded in M around 0
Applied rewrites72.3%
herbie shell --seed 2025040
(FPCore (w0 M D h l d)
:name "Henrywood and Agarwal, Equation (9a)"
:precision binary64
(* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))