Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2003 18:13:16 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Parveen Patel <ppatel@cs.utah.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: floating point in the kernel
Message-ID:  <20030213001316.GD1980@dan.emsphone.com>
In-Reply-To: <20030212124123.M11977-100000@bas.flux.utah.edu>
References:  <20030212124123.M11977-100000@bas.flux.utah.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 12), Parveen Patel said:
> Can I use floating point operations inside the FreeBSD kernel version
> 4.7-stable? It used to be a policy not to use it for obvious
> performance probelms.

You're not supposed to.  I think this was the last time it was brought
up:

http://groups.google.com/groups?threadm=746alr%24d44%241%40FreeBSD.csie.NCTU.edu.tw

> Are there any known work arounds? Like some standard efficient
> techniques to convert floating point operations to fixed point
> operations without losing too much precision.

Multiply your numbers by 10^9, store everything in long longs, and
write your own printf_fake_fp function that shifts the decimal point?

-- 
	Dan Nelson
	dnelson@allantgroup.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030213001316.GD1980>