Developement test

This commit is contained in:
Christophe Riccio 2011-04-26 14:46:30 +01:00
parent 69c764eca9
commit eb95923402
2 changed files with 11 additions and 0 deletions

View file

@ -8,6 +8,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
#include <cmath>
#include <iostream>
namespace glm{
namespace gtx{
@ -36,7 +37,10 @@ namespace ulp
std::size_t Count = 0;
float Temp = a;
while((Temp = nextafterf(Temp, b)) != b)
{
std::cout << Temp << " " << b << std::endl;
++Count;
}
return Count;
}
@ -49,7 +53,10 @@ namespace ulp
std::size_t Count = 0;
double Temp = a;
while((Temp = nextafter(Temp, b)) != b)
{
std::cout << Temp << " " << b << std::endl;
++Count;
}
return Count;
}

View file

@ -13,6 +13,9 @@
int test_ulp_float()
{
double Temp = nextafter(0.02, 0.01);
std::cout << Temp << " 0.01, 0.02" << std::endl;
std::size_t A = glm::ulp(0.01, 0.02);
std::size_t B = glm::ulp(glm::vec2(0.01), glm::vec2(0.02));
std::size_t C = glm::ulp(glm::vec3(0.01), glm::vec3(0.02));
@ -26,6 +29,7 @@ int test_ulp_float()
int main()
{
std::cout << "Test 76" << std::endl;
test_ulp_float();
}