(FPCore (x y z) :precision binary64 (sqrt (+ (+ (* x x) (* y y)) (* z z))))
double code(double x, double y, double z) { return sqrt((((x * x) + (y * y)) + (z * z))); }
module fmin_fmax_functions implicit none private public fmax public fmin interface fmax module procedure fmax88 module procedure fmax44 module procedure fmax84 module procedure fmax48 end interface interface fmin module procedure fmin88 module procedure fmin44 module procedure fmin84 module procedure fmin48 end interface contains real(8) function fmax88(x, y) result (res) real(8), intent (in) :: x real(8), intent (in) :: y res = merge(y, merge(x, max(x, y), y /= y), x /= x) end function real(4) function fmax44(x, y) result (res) real(4), intent (in) :: x real(4), intent (in) :: y res = merge(y, merge(x, max(x, y), y /= y), x /= x) end function real(8) function fmax84(x, y) result(res) real(8), intent (in) :: x real(4), intent (in) :: y res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x) end function real(8) function fmax48(x, y) result(res) real(4), intent (in) :: x real(8), intent (in) :: y res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x) end function real(8) function fmin88(x, y) result (res) real(8), intent (in) :: x real(8), intent (in) :: y res = merge(y, merge(x, min(x, y), y /= y), x /= x) end function real(4) function fmin44(x, y) result (res) real(4), intent (in) :: x real(4), intent (in) :: y res = merge(y, merge(x, min(x, y), y /= y), x /= x) end function real(8) function fmin84(x, y) result(res) real(8), intent (in) :: x real(4), intent (in) :: y res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x) end function real(8) function fmin48(x, y) result(res) real(4), intent (in) :: x real(8), intent (in) :: y res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x) end function end module real(8) function code(x, y, z) use fmin_fmax_functions real(8), intent (in) :: x real(8), intent (in) :: y real(8), intent (in) :: z code = sqrt((((x * x) + (y * y)) + (z * z))) end function
public static double code(double x, double y, double z) { return Math.sqrt((((x * x) + (y * y)) + (z * z))); }
def code(x, y, z): return math.sqrt((((x * x) + (y * y)) + (z * z)))
function code(x, y, z) return sqrt(Float64(Float64(Float64(x * x) + Float64(y * y)) + Float64(z * z))) end
function tmp = code(x, y, z) tmp = sqrt((((x * x) + (y * y)) + (z * z))); end
code[x_, y_, z_] := N[Sqrt[N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] + N[(z * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l} \\ \sqrt{\left(x \cdot x + y \cdot y\right) + z \cdot z} \end{array}
herbie shell --seed 2025066
(FPCore (x y z)
:name "FRP.Yampa.Vector3:vector3Rho from Yampa-0.10.2"
:precision binary64
:pre (TRUE)
:alt
(! :herbie-platform default (if (< z -63964793941097760000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- z) (if (< z 7320293694404182000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (sqrt (+ (+ (* z z) (* x x)) (* y y))) z)))
(sqrt (+ (+ (* x x) (* y y)) (* z z))))
Please file a bug report with this information.
egglog executable not found in PATH | L | C | |
---|---|---|---|
run-egglog-multi-extractor | /home/nightlies/herbie/aditya-egglog-develop-2/src/core/egglog-herbie.rkt | 150 | 0 |
simplify-batch | /home/nightlies/herbie/aditya-egglog-develop-2/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/aditya-egglog-develop-2/src/core/preprocess.rkt | 56 | 0 |
find-preprocessing | /home/nightlies/herbie/aditya-egglog-develop-2/src/core/preprocess.rkt | 83 | 0 |
run-improve! | /home/nightlies/herbie/aditya-egglog-develop-2/src/core/mainloop.rkt | 44 | 0 |
get-alternatives/report | /home/nightlies/herbie/aditya-egglog-develop-2/src/api/sandbox.rkt | 174 | 0 |
(unnamed) | /home/nightlies/herbie/aditya-egglog-develop-2/src/api/sandbox.rkt | 265 | 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/aditya-egglog-develop-2/src/api/sandbox.rkt | 283 | 2 |
(unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |