[CCC DEV] REAL32 next steps

Adam Sampson ats at offog.org
Thu Jun 10 16:53:33 BST 2010


Matt Jadud <jadudm at gmail.com> writes:

> REAL32 a, b, result:
> SEQ
>   a := 3.0
>   b := 5.0
>   math.pow(a, b, result)

No, that won't work -- the compiler emits the constants 3.0 and 5.0 as
0.0. The operations are not the problem; saying "result := POWER (a, b)"
as per usual compiles fine, provided you've done "#INCLUDE
"maths.module"" at the top. (The maths library functions are pretty big,
though, so you may need to disable debugging information if you're short
on flash space; this may not be a problem on a bigger AVR, of course.)

I shall prod those who know more about occ21's backend than me...

-- 
Adam Sampson <ats at offog.org>                         <http://offog.org/>




More information about the developers mailing list