Subject: Re: [linux-audio-dev] Fixed vs Floating point comparison.
From: Erik de Castro Lopo (erikd-lad_AT_mega-nerd.com)
Date: Fri Oct 17 2003 - 11:50:53 EEST
On Thu, 16 Oct 2003 20:09:13 -0300
Juan Linietsky <coding_AT_reduz.com.ar> wrote:
> The code is available at:
> http://reduz.dyndns.org/resamp_fixp.c // fixed point version
> http://reduz.dyndns.org/resamp_float.c // floating point version, portable
> http://reduz.dyndns.org/resamp_float_fistl.c // X86 VERSION ONLY!! Uses fistl
> instruction
Any code which uses the X86 fistl instruction can be rewritten to use the
ISO 1999 C standard function lrint() and lrintf() to produce nearly exactly
the same code (ie on X86 lrint() becomes fistl instruction).
However, lrint() and lrintf() are portable across all architectures.
Erik
-- +-----------------------------------------------------------+ Erik de Castro Lopo nospam_AT_mega-nerd.com (Yes it's valid) +-----------------------------------------------------------+ "The Internet interprets censorship as damage, and routes around it." -- John Gilmore
This archive was generated by hypermail 2b28 : Fri Oct 17 2003 - 11:52:27 EEST