Skip to content

Commit f8b3c3a

Browse files
committed
minor changes
1 parent 906b38f commit f8b3c3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/math/generic/acosf16.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace LIBC_NAMESPACE_DECL {
2424
// Generated by Sollya using the following command:
2525
// > round(pi/2, SG, RN);
2626
// > round(pi, SG, RN);
27-
static constexpr float PI_2 = 0x1.921fb6p0f;
27+
static constexpr float PI_OVER_2 = 0x1.921fb6p0f;
2828
static constexpr float PI = 0x1.921fb6p1f;
2929

3030
static constexpr size_t N_EXCEPTS = 2;
@@ -98,9 +98,9 @@ LLVM_LIBC_FUNCTION(float16, acosf16, (float16 x)) {
9898
// 2: From complimentary angle identity:
9999
// x = sin(y) = cos(pi/2 - y)
100100
// 3: Let z = pi/2 - y, such that x = cos(z)
101-
// 4: From double angle formula; cos(2A) = 1 - sin^2(A):
101+
// 4: From double angle formula; cos(2A) = 1 - 2 * sin^2(A):
102102
// z = 2A, z/2 = A
103-
// cos(z) = 1 - 2 * sin*2(z/2)
103+
// cos(z) = 1 - 2 * sin^2(z/2)
104104
// 5: Make sin(z/2) subject of the formula:
105105
// sin(z/2) = sqrt((1 - cos(z))/2)
106106
// 6: Recall [3]; x = cos(z). Therefore:

0 commit comments

Comments
 (0)