GCC Code Coverage Report


Directory: include/polyfloat/
File: include/polyfloat/types/ops2.hpp
Date: 2026-11-09 15:28:50
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 32 32 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 //======================================================================================================================
2 /*
3 POLYFLOAT - Extended precision floating points
4 Copyright : POLYFLOAT Contributors & Maintainers
5 SPDX-License-Identifier: BSL-1.0
6 */
7 //======================================================================================================================
8 #pragma once
9 #include <eve/eve.hpp>
10
11 namespace plf
12 {
13 //====================================================================================================================
14 //! @name Binary Operator /
15 //! @{
16 //====================================================================================================================
17
18 //! @brief Returns the ratio of two poly float values
19 //! @related polyfloat
20 template<eve::value T1, eve::value T2>
21 requires(concepts::polyfloat<T1> || concepts::polyfloat<T2>)
22 1391499 as_polyfloat_t<T1, T2> operator/(T1 const& a, T2 const& b) noexcept
23 {
24 using type = as_polyfloat_t<T1, T2>;
25 1391499 type aa{plf::convert(a, eve::as<eve::element_type_t<type>>())};
26 1391499 type bb{plf::convert(b, eve::as<eve::element_type_t<type>>())}; //b can be int
27 1391499 return aa /= bb;
28 }
29
30 //====================================================================================================================
31 //! @}
32 //====================================================================================================================
33 }
34