aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/log10.zig
diff options
context:
space:
mode:
authorLoris Cro <kappaloris@gmail.com>2023-06-18 09:06:40 +0200
committerGitHub <noreply@github.com>2023-06-18 09:06:40 +0200
commit216ef10dc471e4db60a30208be178d6c59efeaaf (patch)
tree8c239dab283ae9cb3b7fe099bae240bcc53f894e /lib/std/math/log10.zig
parent0fc1d396495c1ab482197021dedac8bea3f9401c (diff)
parent729a051e9e38674233190aea23c0ac8c134f2d67 (diff)
downloadzig-216ef10dc471e4db60a30208be178d6c59efeaaf.tar.gz
zig-216ef10dc471e4db60a30208be178d6c59efeaaf.zip
Merge branch 'master' into autodoc-searchkey
Diffstat (limited to 'lib/std/math/log10.zig')
-rw-r--r--lib/std/math/log10.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math/log10.zig b/lib/std/math/log10.zig
index b1ecb9ad2b..6b5758763c 100644
--- a/lib/std/math/log10.zig
+++ b/lib/std/math/log10.zig
@@ -58,7 +58,7 @@ pub fn log10_int(x: anytype) Log2Int(@TypeOf(x)) {
var log: u32 = 0;
inline for (0..11) |i| {
- // Unnecesary branches should be removed by the compiler
+ // Unnecessary branches should be removed by the compiler
if (bit_size > (1 << (11 - i)) * 5 * @log2(10.0) and val >= pow10((1 << (11 - i)) * 5)) {
const num_digits = (1 << (11 - i)) * 5;
val /= pow10(num_digits);