16
16
* limitations under the License.
17
17
*/
18
18
19
- /**
20
- * Benchmark `float64_is_same_value`.
21
- */
22
19
#include "stdlib/number/float64/base/assert/is_same_value.h"
23
20
#include <stdlib.h>
24
21
#include <stdio.h>
35
32
/**
36
33
* Prints the TAP version.
37
34
*/
38
- void print_version ( void ) {
35
+ static void print_version ( void ) {
39
36
printf ( "TAP version 13\n" );
40
37
}
41
38
@@ -45,7 +42,7 @@ void print_version( void ) {
45
42
* @param total total number of tests
46
43
* @param passing total number of passing tests
47
44
*/
48
- void print_summary ( int total , int passing ) {
45
+ static void print_summary ( int total , int passing ) {
49
46
printf ( "#\n" );
50
47
printf ( "1..%d\n" , total ); // TAP plan
51
48
printf ( "# total %d\n" , total );
@@ -59,7 +56,7 @@ void print_summary( int total, int passing ) {
59
56
*
60
57
* @param elapsed elapsed time in seconds
61
58
*/
62
- void print_results ( double elapsed ) {
59
+ static void print_results ( double elapsed ) {
63
60
double rate = (double )ITERATIONS / elapsed ;
64
61
printf ( " ---\n" );
65
62
printf ( " iterations: %d\n" , ITERATIONS );
@@ -73,18 +70,18 @@ void print_results( double elapsed ) {
73
70
*
74
71
* @return clock time
75
72
*/
76
- double tic ( void ) {
73
+ static double tic ( void ) {
77
74
struct timeval now ;
78
75
gettimeofday ( & now , NULL );
79
76
return (double )now .tv_sec + (double )now .tv_usec /1.0e6 ;
80
77
}
81
78
82
79
/**
83
- * Generates a random number on the interval [0,1] .
80
+ * Generates a random number on the interval [0,1) .
84
81
*
85
82
* @return random number
86
83
*/
87
- double rand_double ( void ) {
84
+ static double rand_double ( void ) {
88
85
int r = rand ();
89
86
return (double )r / ( (double )RAND_MAX + 1.0 );
90
87
}
@@ -94,7 +91,7 @@ double rand_double( void ) {
94
91
*
95
92
* @return elapsed time in seconds
96
93
*/
97
- double benchmark ( void ) {
94
+ static double benchmark ( void ) {
98
95
double elapsed ;
99
96
double x ;
100
97
double t ;
0 commit comments