Page MenuHomePhabricator

lntue (Tue Ly)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 1 2020, 2:12 PM (4 w, 4 d)

Recent Activity

Wed, Jul 29

lntue updated the diff for D84725: [libc] Add ULP function to MPFRNumber class to test correctly rounded functions such as SQRT, FMA..

Fix explicit specialization in class scope.

Wed, Jul 29, 1:37 PM · Restricted Project

Tue, Jul 28

lntue requested review of D84726: [libc] Add implementations for sqrt, sqrtf, and sqrtl..
Tue, Jul 28, 2:04 PM · Restricted Project
lntue requested review of D84725: [libc] Add ULP function to MPFRNumber class to test correctly rounded functions such as SQRT, FMA..
Tue, Jul 28, 2:02 PM · Restricted Project

Thu, Jul 23

lntue added inline comments to D84469: [libc] Adds implementation for memrchr..
Thu, Jul 23, 4:05 PM · Restricted Project
lntue committed rG1404d9d68a9c: [libc] Remove unused #include <vector> in fmin_test, fminf_test, and fminl_test. (authored by lntue).
[libc] Remove unused #include <vector> in fmin_test, fminf_test, and fminl_test.
Thu, Jul 23, 12:31 PM
lntue committed rG4096088e1941: [libc] Add implementations of fmax, fmaxf, and fmaxl. (authored by lntue).
[libc] Add implementations of fmax, fmaxf, and fmaxl.
Thu, Jul 23, 12:24 PM
lntue closed D84385: [libc] Add implementations of fmax, fmaxf, and fmaxl..
Thu, Jul 23, 12:24 PM · Restricted Project
lntue updated the diff for D84385: [libc] Add implementations of fmax, fmaxf, and fmaxl..

[libc] Add implementations of fmax, fmaxf, and fmaxl.

Thu, Jul 23, 12:13 PM · Restricted Project

Wed, Jul 22

Herald added a project to D84385: [libc] Add implementations of fmax, fmaxf, and fmaxl.: Restricted Project.
Wed, Jul 22, 11:09 PM · Restricted Project

Tue, Jul 21

lntue committed rG7ce32f87f962: Add implementations for fmin, fminf, and fminl. Testing infrastructure update… (authored by lntue).
Add implementations for fmin, fminf, and fminl. Testing infrastructure update…
Tue, Jul 21, 2:28 PM
lntue committed rG34f66c1438ef: Add implementations for fmin, fminf, and fminl. Testing infrastructure update… (authored by lntue).
Add implementations for fmin, fminf, and fminl. Testing infrastructure update…
Tue, Jul 21, 2:15 PM
lntue committed rGe138ad41e0e6: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point… (authored by lntue).
Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point…
Tue, Jul 21, 1:52 PM
lntue closed D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..
Tue, Jul 21, 1:52 PM · Restricted Project
lntue added inline comments to D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..
Tue, Jul 21, 10:41 AM · Restricted Project
lntue updated the diff for D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..

Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double).

Tue, Jul 21, 10:41 AM · Restricted Project

Mon, Jul 20

lntue added a comment to D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..

Why add support to the TEST macros for this when we have the MPFR macros which I think handle floats better than we can with TEST. Comparisons with floating points are not fun, its why we use the mpfr library in the first place. Is there even a need to use the TEST macros with floats?

Let me give some explanation from my side for this. For non-trivial math functions like trignometric functions, comparing with MPFR result makes sense because we can use MPFR as source of truth/correctness. But, for functions like fmin and friends, comparing with MPFR is an overkill. I agree that comparing floating points in general could be problematic and that is the reason why we did not allow floating comparisons until now. But, if we restrict ourselves to values which have an exact bit representation, then comparisons are precise and deterministic. For example, zero, infinity and small decimals like 10.0, 1.2345 etc. have exact bit representation in all relevant floating point formats Likewise, if a floating point number is actually constructed from the bit representation, then that number has exact bit representation by construction. So, comparing such numbers would be precise.

One can ask, how can we ensure one uses only exact floating point numbers in tests. I don't have a good answer other than saying "code review". May be we can write a clang-tidy driven tool in future. Irrespective, I think this patch improves the readability of the tests. @lntue is the expert here so he might have more to add.

Mon, Jul 20, 9:47 PM · Restricted Project
lntue added inline comments to D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..
Mon, Jul 20, 9:23 PM · Restricted Project
lntue updated the diff for D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..

Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double).

Mon, Jul 20, 9:22 PM · Restricted Project
lntue updated the diff for D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double)..

Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double).

Mon, Jul 20, 9:16 PM · Restricted Project

Fri, Jul 17

lntue accepted D83980: [libc][NFC] Use RemoveCVType to implement IsIntegral and IsPointerType..
Fri, Jul 17, 7:37 AM · Restricted Project

Wed, Jul 15

lntue added inline comments to D82997: [libc] Add implementations of fmin, fminf and fminl..
Wed, Jul 15, 11:54 PM · Restricted Project
lntue updated the diff for D82997: [libc] Add implementations of fmin, fminf and fminl..

Add implementations of fmin, fminf, and fminl. Testing infrastructure update is splitted to https://reviews.llvm.org/D83931.

Wed, Jul 15, 11:51 PM · Restricted Project
Herald added a project to D83931: Update Test (EXPECT_EQ and friends) to accept __uint128_t and floating point types (float, double, long double).: Restricted Project.
Wed, Jul 15, 11:33 PM · Restricted Project

Tue, Jul 14

lntue updated the diff for D82997: [libc] Add implementations of fmin, fminf and fminl..

Refactor utohexstr and overloads of raw_stream.operator<<

Tue, Jul 14, 11:18 PM · Restricted Project
lntue added inline comments to D82997: [libc] Add implementations of fmin, fminf and fminl..
Tue, Jul 14, 5:17 PM · Restricted Project
lntue updated the diff for D82997: [libc] Add implementations of fmin, fminf and fminl..

Add implementations of fmin, fminf, and fminl. Update Test to accept floating point types and __uint128_t.

Tue, Jul 14, 5:13 PM · Restricted Project

Fri, Jul 10

lntue updated the diff for D82997: [libc] Add implementations of fmin, fminf and fminl..

Fix clang-format

Fri, Jul 10, 10:24 AM · Restricted Project

Thu, Jul 9

lntue updated the diff for D82997: [libc] Add implementations of fmin, fminf and fminl..

Add implementations of fmin, fminf, and fminl

Thu, Jul 9, 12:34 PM · Restricted Project

Jul 2 2020

lntue updated the diff for D82997: [libc] Add implementations of fmin, fminf and fminl..

Fix clang-format

Jul 2 2020, 5:52 AM · Restricted Project

Jul 1 2020

lntue created D82997: [libc] Add implementations of fmin, fminf and fminl..
Jul 1 2020, 2:38 PM · Restricted Project