Re: [AD] C++ fix math

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



Sorry, I'm dropping in late in the conversation

Eric Botcazou wrote:
Yes, but the number of such conversions doesn't change: it's still one.

Laurence's proposal:
    radtofix: float --(conversion)--> fix --(fixmul)--> fix
    fixtorad: fix --(fixmul)--> fix --(conversion)--> float

My proposal:
>     radtofix: float --(fmul)--> float --(conversion)--> fix
    fixtorad: fix --(conversion)--> float --(fmul)--> float


If relative precision is important, then we should go with Eric's proposal. It will also be faster, since fixmul definately takes more than 6 cycles to run.
fmul is 5 cycles on the PPlain, 6 on the PPro.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/