ReactOS 0.4.17-dev-1321-g5c122a9
sqrt_data.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS CRT
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: Data table for sqrt.
5 * COPYRIGHT: Imported from musl libc
6 * https://git.musl-libc.org/cgit/musl/tree/src/math/sqrt_data.h
7 * blob: 260c7f9c292beb48fd7a0985a58a7740d38c0d5e
8 * See https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
9 */
10
11#ifndef _SQRT_DATA_H
12#define _SQRT_DATA_H
13
14#include "libm.h"
15#include <stdint.h>
16
17/* if x in [1,2): i = (int)(64*x);
18 if x in [2,4): i = (int)(32*x-64);
19 __rsqrt_tab[i]*2^-16 is estimating 1/sqrt(x) with small relative error:
20 |__rsqrt_tab[i]*0x1p-16*sqrt(x) - 1| < -0x1.fdp-9 < 2^-8 */
21extern hidden const uint16_t __rsqrt_tab[128];
22
23#endif
unsigned short uint16_t
Definition: stdint.h:35
#define hidden
Definition: libm.h:73
hidden const uint16_t __rsqrt_tab[128]
Definition: sqrt_data.c:12