tests: timer_behavior: change sqrtf() to sqrt()

sqrtf() is used for floats but the argument and resulting
variable are both doubles. LLVM would complain about
implicit conversion from float to double. So use sqrt()
instead as it is used with doubles.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2024-10-28 11:58:07 -07:00 committed by Mahesh Mahadevan
commit cc5adf2e92

View file

@ -209,8 +209,8 @@ static void do_test_using(void (*sample_collection_fn)(void), const char *mechan
variance_cyc = variance_cyc / (double)(CONFIG_TIMER_TEST_SAMPLES - periodic_rollovers);
/* A measure of timer precision, ideal is 0 */
double stddev_us = sqrtf(variance_us);
double stddev_cyc = sqrtf(variance_cyc);
double stddev_us = sqrt(variance_us);
double stddev_cyc = sqrt(variance_cyc);
/* Use double precision math here as integer overflows are possible in doing all the
* conversions otherwise