lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > What about an "operation mode" switch to in-place operations?
> 
> Much better.
>  
> >   complex_enter() -- in-place now
> >   c = cexp(c * I) * a + b
> >   complex_exit() -- restore
> >   return c
> 
> I guess that you have be careful not to write in this order, right?
> 	c = a * cexp(c * I) + b

Right: order matters for in-place operations.

Cheers,
Luis

-- 
Computers are useless. They can only give you answers.
                -- Pablo Picasso

-- 
Luis Carvalho (Kozure)
lua -e 'print((("lexcarvalho@NO.gmail.SPAM.com"):gsub("(%u+%.)","")))'