diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-08-28 12:41:24 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-08-28 12:41:24 -0700 |
| commit | 6aeab0f323ff14d7ad248e18c372573f7a5a8cd1 (patch) | |
| tree | 7080297f629f39baa0b742985c5804cf6a2047e8 /lib/std/math.zig | |
| parent | 47f7ed1c4cb8acf7fed99a057fb84202962e4b1b (diff) | |
| parent | 05cf44933d753f7a5a53ab289ea60fd43761de57 (diff) | |
| download | zig-6aeab0f323ff14d7ad248e18c372573f7a5a8cd1.tar.gz zig-6aeab0f323ff14d7ad248e18c372573f7a5a8cd1.zip | |
Merge remote-tracking branch 'origin/master' into llvm13
Conflicts:
lib/libcxx/include/__config
d57c0cc3bfeff9af297279759ec2b631e6d95140 added support for DragonFlyBSD
to libc++ by updating some ifdefs. This needed to be synced with llvm13.
Diffstat (limited to 'lib/std/math.zig')
| -rw-r--r-- | lib/std/math.zig | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig index 9f92e2e82b..01cd68e0ed 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1,8 +1,3 @@ -// SPDX-License-Identifier: MIT -// Copyright (c) 2015-2021 Zig Contributors -// This file is part of [zig](https://ziglang.org/), which is MIT licensed. -// The MIT license requires this copyright notice to be included in all copies -// and substantial portions of the software. const std = @import("std.zig"); const assert = std.debug.assert; const mem = std.mem; @@ -111,11 +106,11 @@ pub const inf = @import("math/inf.zig").inf; /// the specified tolerance. /// /// The `tolerance` parameter is the absolute tolerance used when determining if -/// the two numbers are close enough, a good value for this parameter is a small +/// the two numbers are close enough; a good value for this parameter is a small /// multiple of `epsilon(T)`. /// -/// Note that this function is recommended for for comparing small numbers -/// around zero, using `approxEqRel` is suggested otherwise. +/// Note that this function is recommended for comparing small numbers +/// around zero; using `approxEqRel` is suggested otherwise. /// /// NaN values are never considered equal to any value. pub fn approxEqAbs(comptime T: type, x: T, y: T, tolerance: T) bool { @@ -138,7 +133,7 @@ pub fn approxEqAbs(comptime T: type, x: T, y: T, tolerance: T) bool { /// than zero. /// /// The `tolerance` parameter is the relative tolerance used when determining if -/// the two numbers are close enough, a good value for this parameter is usually +/// the two numbers are close enough; a good value for this parameter is usually /// `sqrt(epsilon(T))`, meaning that the two numbers are considered equal if at /// least half of the digits are equal. /// |
