Skip to content

Instantly share code, notes, and snippets.

@HappyCerberus
Created October 19, 2012 12:38
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 HappyCerberus/3918045 to your computer and use it in GitHub Desktop.
Save HappyCerberus/3918045 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
int a = 8000;
double b;
b = (((float)a/65535)-1)/0.245;
printf("a = %d\n",a);
printf("((a/65535)-1)/0.245 = %f\n",b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment