Skip to content

Commit cc5adf2

Browse files
dcpleungmmahadevan108
authored andcommitted
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>
1 parent 5dc5fa5 commit cc5adf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/kernel/timer/timer_behavior/src/jitter_drift.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ static void do_test_using(void (*sample_collection_fn)(void), const char *mechan
209209
variance_cyc = variance_cyc / (double)(CONFIG_TIMER_TEST_SAMPLES - periodic_rollovers);
210210

211211
/* A measure of timer precision, ideal is 0 */
212-
double stddev_us = sqrtf(variance_us);
213-
double stddev_cyc = sqrtf(variance_cyc);
212+
double stddev_us = sqrt(variance_us);
213+
double stddev_cyc = sqrt(variance_cyc);
214214

215215
/* Use double precision math here as integer overflows are possible in doing all the
216216
* conversions otherwise

0 commit comments

Comments
 (0)