0

I have built simple program to calculate the exp of value. I got error;

#include <stdint.h>
#include "util.h"
#include <math.h>
#include <stdio.h>

int main() {               
 double value = -150;
    Start_Timer();
    for(int i=0; i<500 ;i++){
    result = exp(value);    
    value++;
}
    Stop_Timer();
  User_Time=End_Time-Begin_Time;
  printf("User_Time: %ld  - %ld =  %ld - \n", End_Time,Begin_Time,User_Time);
   printf("The Exponential of %ld is %ld\n", value, result);
    return 0;

}

Any idea how to use exp in Benchmark for testing. i have figured out that exp function need -x and -lm for compiling. How can i use them in the test C Failing to compile: Can't find math.h functions

I tried to edit the makefile in riscv-test/benchmark but i think , it is little bit tricky for me.

Error Message:https://github.com/riscv/riscv-tests/issues/142

ARK91
  • 373
  • 3
  • 13

0 Answers0