**gluehbirne** wrote on Friday, September 24, 2010:

I tried to use the math-lib to calculate for example a square root, but it doesn’t work.

The result of this example which is calculated periodically inside a test task is y = 2.565…. while x is about 25.0

```
x = 25.0 + 0.001 * x;
y = sqrt(x);
```

These are my linker-flags:

```
LINKER_FLAGS = -lm -lc -lgcc -mthumb -nostartfiles -Xlinker -o$(TARGET).elf -Xlinker -M -Xlinker -cref -lc -t -Map=$(MAP).map
```

I use an AT91SAM7S256 with yagarto

```
binutils: 2.20
gcc: 4.4.2
newlib: 1.18.0
gdb: 7.0.1
FreeRTOS V6.0.4
```

Does anybody have any idea how to solve this problem?