#include <stdio.h>
#include <math.h>

float myLog(float x) {
  __asm {
    fldln2  ;// load log_e(2) in ST0
    fld x   ;// load ST0=x; ST1=log_e(2)
    fyl2x   ;// ST1=log_e(2)*log_2(x) = log_e(x); pop;
  }
}

int main() {
  float x = 25.0;
  printf("ln(%f) = %f \n", x, myLog(x)); // output result of myLog
  printf("ln(%f) = %f \n", x, log(x)); // check result with C log function
  return 0;
}