From 3f8fb484795f41758d430dc88301b48a17a9aac4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Apr 2013 21:35:58 +1000 Subject: [PATCH] CPUInfo: test NaN and Infinity printing --- Tools/CPUInfo/CPUInfo.pde | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/CPUInfo/CPUInfo.pde b/Tools/CPUInfo/CPUInfo.pde index addf8d7b34..a182e56844 100644 --- a/Tools/CPUInfo/CPUInfo.pde +++ b/Tools/CPUInfo/CPUInfo.pde @@ -37,6 +37,10 @@ static void show_sizes(void) hal.console->printf("long long : %d\n", sizeof(long long)); hal.console->printf("bool : %d\n", sizeof(bool)); hal.console->printf("void* : %d\n", sizeof(void *)); + + hal.console->printf("printing NaN: %f\n", sqrt(-1.0f)); + hal.console->printf("printing +Inf: %f\n", 1.0f/0.0f); + hal.console->printf("printing -Inf: %f\n", -1.0f/0.0f); } #define TENTIMES(x) do { x; x; x; x; x; x; x; x; x; x; } while (0)