RIOT/tests/float/main.c
René Kijewski d46c7e00d4 tests: remove test_ prefix
Closes #1485.
2014-07-31 07:34:11 +02:00

42 lines
642 B
C

/*
* Copyright (C) 2013 INRIA
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file LICENSE in the top level directory for more
* details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Float test application
*
* @author Oliver Hahm <oliver.hahm@inria.fr>
*
* @}
*/
#include <stdio.h>
#include <math.h>
#include "board.h"
int main(void)
{
double x = 1234567.0 / 1024.0;
while (1) {
x += 0.1;
double z = x - floor(x);
if (z >= 1) {
putchar('+');
}
else {
putchar('-');
}
}
}