Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumProgramming Questions & HelpSyntax › Wiring using old version of Math.h?

Page Index Toggle Pages: 1
Wiring using old version of Math.h? (Read 5910 times)
08/30/09 at 13:33:38

roypardi   Offline
Junior Member
I Love YaBB 2!
Boston USA

Posts: 57
**
 
Hi - I was hacking around trying to solve some of the issues I've posted about in a separate thread ("error: variable or field declared void" http://spedr.com/46jbj). After commenting out some code I started getting an error about the function 'hypot' being undefined. I am using some 3rd party C code in my project. I thought this was odd since it seems like a standard math lib function and also, the same project compiles in Arduino. (fwiw - I'd use Arduino for this project just to keep it moving but I only have the Decimilla - and there is not enough program space)

Anyway - it looks like Wiring uses a version of math.h from 2002 and Arduino uses one from 2007. The Arduino version has the 'hypot' function defined.

Is there a reason Wiring uses the older version?

--Roy
 
IP Logged
 
Reply #1 - 09/01/09 at 06:42:58

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi Roy, you´re right, the hypot seems not being part of the avr-libc 1.4.5 present with the current Wiring distribution, this distribution hasn´t upgrade for a while (2007). So in the meantime, the hypot can be replaced by sqrt(x*x+y*y) as you know, I will rebuild the toolchain for Wiring 0021, and post an urgent release with the update.
 
IP Logged
 
Reply #2 - 10/13/09 at 01:49:04

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi Roy, the avr toolchain was completely updated for 0021, so the latest math.h is available with it. Le me know.
best.
 
IP Logged
 
Reply #3 - 10/13/09 at 01:56:09

roypardi   Offline
Junior Member
I Love YaBB 2!
Boston USA

Posts: 57
**
 
Cool! Thanks
 
IP Logged
 
Page Index Toggle Pages: 1