12d784b19SShourya Goel //===-- Implementation of iscanonicalf function ---------------------------===// 22d784b19SShourya Goel // 32d784b19SShourya Goel // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42d784b19SShourya Goel // See https://llvm.org/LICENSE.txt for license information. 52d784b19SShourya Goel // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 62d784b19SShourya Goel // 72d784b19SShourya Goel //===----------------------------------------------------------------------===// 82d784b19SShourya Goel 92d784b19SShourya Goel #include "src/math/iscanonicalf.h" 102d784b19SShourya Goel #include "src/__support/FPUtil/BasicOperations.h" 112d784b19SShourya Goel #include "src/__support/common.h" 122d784b19SShourya Goel #include "src/__support/macros/config.h" 132d784b19SShourya Goel 142d784b19SShourya Goel namespace LIBC_NAMESPACE_DECL { 152d784b19SShourya Goel 162d784b19SShourya Goel LLVM_LIBC_FUNCTION(int, iscanonicalf, (float x)) { 172d784b19SShourya Goel float temp; 18*2b8e81ceSShourya Goel return fputil::canonicalize(temp, x) == 0; 192d784b19SShourya Goel } 202d784b19SShourya Goel 212d784b19SShourya Goel } // namespace LIBC_NAMESPACE_DECL 22