Skip to content

Instantly share code, notes, and snippets.

@jwerle
Last active December 24, 2015 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwerle/6719963 to your computer and use it in GitHub Desktop.
Save jwerle/6719963 to your computer and use it in GitHub Desktop.
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int
main (void) {
double v, r;
v = 1000.0;
r = log10(v);
printf("%f\n", r);
return 0;
}
Math.log(1000)/Math.LN10; // 2.9999999999999996
import math
math.log10(1000); // 3.0
Math.log10(1000); // 3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment