(FPCore (alpha beta) :precision binary64 (/ (+ (/ (- beta alpha) (+ (+ alpha beta) 2.0)) 1.0) 2.0))
double code(double alpha, double beta) { return (((beta - alpha) / ((alpha + beta) + 2.0)) + 1.0) / 2.0; }
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(alpha, beta) use fmin_fmax_functions real(8), intent (in) :: alpha real(8), intent (in) :: beta code = (((beta - alpha) / ((alpha + beta) + 2.0d0)) + 1.0d0) / 2.0d0 end function
public static double code(double alpha, double beta) { return (((beta - alpha) / ((alpha + beta) + 2.0)) + 1.0) / 2.0; }
def code(alpha, beta): return (((beta - alpha) / ((alpha + beta) + 2.0)) + 1.0) / 2.0
function code(alpha, beta) return Float64(Float64(Float64(Float64(beta - alpha) / Float64(Float64(alpha + beta) + 2.0)) + 1.0) / 2.0) end
function tmp = code(alpha, beta) tmp = (((beta - alpha) / ((alpha + beta) + 2.0)) + 1.0) / 2.0; end
code[alpha_, beta_] := N[(N[(N[(N[(beta - alpha), $MachinePrecision] / N[(N[(alpha + beta), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / 2.0), $MachinePrecision]
\begin{array}{l} \\ \frac{\frac{\beta - \alpha}{\left(\alpha + \beta\right) + 2} + 1}{2} \end{array}
herbie shell --seed 2025066
(FPCore (alpha beta)
:name "Octave 3.8, jcobi/1"
:precision binary64
:pre (and (> alpha -1.0) (> beta -1.0))
(/ (+ (/ (- beta alpha) (+ (+ alpha beta) 2.0)) 1.0) 2.0))
Please file a bug report with this information.
egglog executable not found in PATH | L | C | |
---|---|---|---|
run-egglog-multi-extractor | /home/nightlies/herbie/egglog-merge/src/core/egglog-herbie.rkt | 150 | 0 |
simplify-batch | /home/nightlies/herbie/egglog-merge/src/core/simplify.rkt | 20 | 0 |
(unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
initial-simplify | /home/nightlies/herbie/egglog-merge/src/core/preprocess.rkt | 57 | 0 |
find-preprocessing | /home/nightlies/herbie/egglog-merge/src/core/preprocess.rkt | 82 | 0 |
run-improve! | /home/nightlies/herbie/egglog-merge/src/core/mainloop.rkt | 45 | 0 |
get-alternatives/report | /home/nightlies/herbie/egglog-merge/src/api/sandbox.rkt | 174 | 0 |
(unnamed) | /home/nightlies/herbie/egglog-merge/src/api/sandbox.rkt | 267 | 6 |
(unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
in-engine | /home/nightlies/herbie/egglog-merge/src/api/sandbox.rkt | 285 | 2 |
(unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |