[all-commits] [llvm/llvm-project] 19c389: [libc] Fix couple of corner cases in remquo.

Siva Chandra via All-commits all-commits at lists.llvm.org
Wed Dec 2 11:49:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 19c3894f9436ef68f33f80ee1fd589166267b5a1
      https://github.com/llvm/llvm-project/commit/19c3894f9436ef68f33f80ee1fd589166267b5a1
  Author: Siva Chandra Reddy <sivachandra at google.com>
  Date:   2020-12-02 (Wed, 02 Dec 2020)

  Changed paths:
    M libc/test/src/math/CMakeLists.txt
    A libc/test/src/math/RemQuoTest.h
    M libc/test/src/math/remquo_test.cpp
    M libc/test/src/math/remquof_test.cpp
    M libc/test/src/math/remquol_test.cpp
    M libc/utils/FPUtil/DivisionAndRemainderOperations.h

  Log Message:
  -----------
  [libc] Fix couple of corner cases in remquo.

These two cases are fixed:
1. If numerator is not zero and denominator is infinity, then the
numerator is returned as the remainder.
2. If numerator and denominator are equal in magnitude, then quotient
with the right sign is returned.

The differet tests of remquo, remquof and remquol have been unified
into a single file to avoid duplication.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D92353




More information about the All-commits mailing list