Implementation of square root for the s1615 type, returning a s1615 result.
More...
Go to the source code of this file.
Implementation of square root for the s1615 type, returning a s1615 result.
The details of the algorithm are from "Elementary Functions: Algorithms and Implementation", 2nd edn, Jean-Michel Muller, Birkhauser, 2006.
- Author
- Dave Lester (david.nosp@m..r.l.nosp@m.ester.nosp@m.@man.nosp@m.chest.nosp@m.er.a.nosp@m.c.uk)
- Copyright
- © Dave Lester, Jamie Knight and The University of Manchester, 2014. All rights reserved. SpiNNaker Project Advanced Processor Technologies Group School of Computer Science The University of Manchester Manchester M13 9PL, UK
- Date
- 23 October, 2014
◆ sqrtfx
Value: _Generic((f), \
default: __builtin_trap() \
)
u3232 sqrtulk(u3232 x)
Square root.
s07 sqrthr(s07 x)
Square root.
u1616 sqrtuk(u1616 x)
Square root.
Definition: sqrt.c:405
u032 sqrtulr(u032 x)
Square root.
s87 sqrthk(s87 x)
Square root.
u88 sqrtuhk(u88 x)
Square root.
s1615 sqrtk(s1615 x)
Square root.
Definition: sqrt.c:395
s031 sqrtlr(s031 x)
Square root.
s3231 sqrtlk(s3231 x)
Square root.
u08 sqrtuhr(u08 x)
Square root.
u016 sqrtur(u016 x)
Square root.
s015 sqrtr(s015 x)
Square root.
short fract s07
An alternative name for the signed short fract type.
Definition: stdfix-full-iso.h:172
unsigned fract u016
An alternative name for the unsigned fract type.
Definition: stdfix-full-iso.h:193
unsigned accum u1616
An alternative name for the unsigned accum type.
Definition: stdfix-full-iso.h:202
long accum s3231
An alternative name for the signed long accum type.
Definition: stdfix-full-iso.h:187
fract s015
An alternative name for the signed fract type.
Definition: stdfix-full-iso.h:175
unsigned short fract u08
An alternative name for the unsigned short fract type.
Definition: stdfix-full-iso.h:190
long fract s031
An alternative name for the signed long fract type.
Definition: stdfix-full-iso.h:178
short accum s87
An alternative name for the signed short accum type.
Definition: stdfix-full-iso.h:181
unsigned short accum u88
An alternative name for the unsigned short accum type.
Definition: stdfix-full-iso.h:199
accum s1615
An alternative name for the signed accum type.
Definition: stdfix-full-iso.h:184
unsigned long fract u032
An alternative name for the unsigned long fract type.
Definition: stdfix-full-iso.h:196
unsigned long accum u3232
An alternative name for the unsigned long accum type.
Definition: stdfix-full-iso.h:205
Square root.
- Parameters
-
| [in] | f | Non-negative value to get the square root of |
- Returns
- the square root of
f
- Todo:
- Test that this actually works!
◆ recip_normalized_root()
| uint64_t recip_normalized_root |
( |
uint32_t |
x | ) |
|
Calculates the reciprocal square-root of the argument.
- Parameters
-
| [in] | x | An unsigned integer, representing a u1.31. Leading bit is 1. |
- Returns
- An unsigned 64-bit integer representing the reciprocal square-root of x, as a u0.64.
- Parameters
-
| [in] | x | An unsigned integer, representing a u1.31. Leading bit is 1. |
- Returns
- An unsigned 64-bit integer representing the reciprocal square-root of x, as a u0.64.
- Todo:
- INCORRECT FORMAT DOCUMENTATION. FIX THIS!
◆ sqrtk()
Square root.
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtuk()
Square root.
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrthr()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtr()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtlr()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrthk()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtlk()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtuhr()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtur()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtulr()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtuhk()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x
◆ sqrtulk()
Square root.
- Warning
- Unimplemented
- Parameters
-
| [in] | x | Non-negative value to get the square root of |
- Returns
- the square root of
x