Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function

redupif64

Private Function
std.math.complex.atan.redupif64
fn redupif64(x: f64) f64

Params

  • x: f64

File

math/complex/atan.zig:57
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
fn redupif64(x: f64) f64 {
    const DP1 = 3.14159265160560607910;
    const DP2 = 1.98418714791870343106e-9;
    const DP3 = 1.14423774522196636802e-17;

    var t = x / math.pi;
    if (t >= 0.0) {
        t += 0.5;
    } else {
        t -= 0.5;
    }

    const u: f64 = @trunc(t);
    return ((x - u * DP1) - u * DP2) - u * DP3;
}