File: el_hypot.c

package info (click to toggle)
picolibc 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 27,124 kB
  • sloc: ansic: 266,005; asm: 22,255; perl: 2,388; sh: 1,016; python: 994; exp: 282; makefile: 94; xml: 39
file content (25 lines) | stat: -rw-r--r-- 607 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Copyright (C) 2015 by  Red Hat, Incorporated. All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * is freely granted, provided that this notice is preserved.
 */

#include "fdlibm.h"

#if !defined(_LDBL_EQ_DBL) || !defined(HAVE_ALIAS_ATTRIBUTE)

#if defined(_IEEE_LIBM) && defined(HAVE_ALIAS_ATTRIBUTE)
__strong_reference(__ieee754_hypotl, hypotl);
#endif

long double
__ieee754_hypotl (long double x, long double y)
{
#ifdef _LDBL_EQ_DBL
  return __ieee754_hypot (x, y);
#else
  /* Keep it simple for now...  */
  return sqrtl ((x * x) + (y * y));
#endif
}
#endif