[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] sqrt problems
From: |
Jack Valmadre |
Subject: |
[avr-gcc-list] sqrt problems |
Date: |
Mon, 20 Oct 2003 08:47:43 +1000 |
Hi,
I'm going to write a program that uses the sqrt() function to work out the
hypotenuse of a right angled triangle. I'm testing the function using this
program on a 2313, but all the pins on PORTB go low.
#include <avr/io.h>
#include <math.h>
int main(void) {
DDRB = 0xFF;
PORTB = sqrt(9);
return 0;
}
How can I fix this?
Thanks,
Jack
- [avr-gcc-list] sqrt problems,
Jack Valmadre <=