|
27 | 27 | <typename T,
|
28 | 28 | typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
29 | 29 | bool equal( T e1, T e2 ) {
|
30 | | - return std::abs(e1-e2)<std::numeric_limits<T>::epsilon(); |
| 30 | + return std::abs(e1-e2) < std::numeric_limits<T>::epsilon(); |
31 | 31 | }
|
32 | 32 | ... equal(10,5+5) ...
|
33 | 33 | \end{cppcode*}
|
|
62 | 62 | template<typename T>
|
63 | 63 | requires std::is_floating_point_v<T>
|
64 | 64 | bool equal( T e1, T e2 ) {
|
65 | | - return std::abs(e1-e2)<std::numeric_limits<T>::epsilon(); |
| 65 | + return std::abs(e1-e2) < std::numeric_limits<T>::epsilon(); |
66 | 66 | }
|
67 | 67 | ... equal(10,5+5) ...
|
68 | 68 | \end{cppcode*}
|
|
119 | 119 | template< typename T>
|
120 | 120 | concept MyFloatingPoint =
|
121 | 121 | std::is_floating_point_v<T> &&
|
122 | | - std::numeric_limits<T>::epsilon()>0; |
| 122 | + std::numeric_limits<T>::epsilon() > 0; |
123 | 123 |
|
124 | 124 | template<typename T>
|
125 | 125 | requires MyFloatingPoint<T>
|
|
0 commit comments