1.0.0 API documentation
Loading...
Searching...
No Matches
ulp.hpp
Go to the documentation of this file.
1
14
15#pragma once
16
17// Dependencies
18#include "../detail/setup.hpp"
19#include "../detail/qualifier.hpp"
20#include "../detail/_vectorize.hpp"
21#include "../ext/scalar_int_sized.hpp"
22
23#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
24# pragma message("GLM: GLM_GTC_ulp extension included")
25#endif
26
27namespace glm
28{
31
37 template<typename genType>
38 GLM_FUNC_DECL genType next_float(genType x);
39
45 template<typename genType>
46 GLM_FUNC_DECL genType prev_float(genType x);
47
53 template<typename genType>
54 GLM_FUNC_DECL genType next_float(genType x, int ULPs);
55
61 template<typename genType>
62 GLM_FUNC_DECL genType prev_float(genType x, int ULPs);
63
67 GLM_FUNC_DECL int float_distance(float x, float y);
68
72 GLM_FUNC_DECL int64 float_distance(double x, double y);
73
81 template<length_t L, typename T, qualifier Q>
82 GLM_FUNC_DECL vec<L, T, Q> next_float(vec<L, T, Q> const& x);
83
91 template<length_t L, typename T, qualifier Q>
92 GLM_FUNC_DECL vec<L, T, Q> next_float(vec<L, T, Q> const& x, int ULPs);
93
101 template<length_t L, typename T, qualifier Q>
102 GLM_FUNC_DECL vec<L, T, Q> next_float(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs);
103
111 template<length_t L, typename T, qualifier Q>
112 GLM_FUNC_DECL vec<L, T, Q> prev_float(vec<L, T, Q> const& x);
113
121 template<length_t L, typename T, qualifier Q>
122 GLM_FUNC_DECL vec<L, T, Q> prev_float(vec<L, T, Q> const& x, int ULPs);
123
131 template<length_t L, typename T, qualifier Q>
132 GLM_FUNC_DECL vec<L, T, Q> prev_float(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs);
133
140 template<length_t L, typename T, qualifier Q>
141 GLM_FUNC_DECL vec<L, int, Q> float_distance(vec<L, float, Q> const& x, vec<L, float, Q> const& y);
142
149 template<length_t L, typename T, qualifier Q>
150 GLM_FUNC_DECL vec<L, int64, Q> float_distance(vec<L, double, Q> const& x, vec<L, double, Q> const& y);
151
153}//namespace glm
154
155#include "ulp.inl"
detail::int64 int64
64 bit signed integer type.
GLM_FUNC_DECL genType next_float(genType x)
Return the next ULP value(s) after the input value(s).
GLM_FUNC_DECL int float_distance(float x, float y)
Return the distance in the number of ULP between 2 single-precision floating-point scalars.
GLM_FUNC_DECL genType prev_float(genType x)
Return the previous ULP value(s) before the input value(s).