2014-02-03 23:03:13 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 INRIA
|
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-02-03 23:03:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup tests
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Float test application
|
|
|
|
*
|
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2014-01-10 16:21:35 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
2014-07-15 18:47:39 +02:00
|
|
|
#include "board.h"
|
|
|
|
|
2014-01-10 16:21:35 +01:00
|
|
|
int main(void)
|
|
|
|
{
|
2014-07-25 08:17:06 +02:00
|
|
|
double x = 1234567.0 / 1024.0;
|
2014-01-25 11:29:35 +01:00
|
|
|
|
|
|
|
while (1) {
|
|
|
|
x += 0.1;
|
2014-07-25 08:17:06 +02:00
|
|
|
double z = x - floor(x);
|
2014-01-25 11:29:35 +01:00
|
|
|
|
|
|
|
if (z >= 1) {
|
|
|
|
putchar('+');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
putchar('-');
|
|
|
|
}
|
2014-01-10 16:21:35 +01:00
|
|
|
}
|
|
|
|
}
|