Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #27760
| From | Dimiter_Popoff <dp@tgi-sci.com> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Use of soft float? |
| Date | 2018-05-20 14:24 +0300 |
| Organization | TGI |
| Message-ID | <pdrltg$945$1@dont-email.me> (permalink) |
| References | <pdrgnm$6lg$1@solani.org> |
On 20.5.2018 г. 12:56, Philipp Klaus Krause wrote: > While those who make heavy use of floating-point computations in > embedded sytems probably go for systems with hardware support for > floating-point calculations, there are plenty of systems without such > support out there. > And the existence of soft float implementations indicates that there is > a real need for doing floating-point computations on systems without > hardware floating-point support. I'd like to know a bit more about that. > > * What kind of computations do people use soft float for? Any real-world > examples? > * Which types of soft float do they use? IEEE 32- or 64-bit? Some other > C standard-compliant type? 16-bit IEEE? Other 16-bit? > > Philipp > I can only speak for myself of course, here it goes. Some 20 years ago on our first Nukeman ( http://tgi-sci.com/tgi/nmtb.htm ) I needed floating point. The need came late in the project, during spectrum evaluation one has to calculate isotope decay during the time acquisition has taken place (some isotopes have short half lives so this matters a lot). This took e^x or something like that, and the processor was an MC68340 - a CPU32 core (sort of a downgraded 68020) which had no FPU. So I wrote the FPU functions I needed - just those I needed, basic arithmetic plus the exponential thing I believe, may be something else I don't remember at the moment. The format was that the 68K series used, called "extended precision", 96 bit. However the precision was far far from it - the 68340 had 32*32->64 bit multiplication so I left the mantissa precision at just 32 bits, was plenty. Later when our spectrometers (multichannel analyzers) moved to power architecture I had again to deal with FP emulation as power has a very nice and fast FPU but it only does the fundamentals, i.e. mul, div, add, sub etc. Well, and FMAD (multiply/add) of course, this was crucial (could do what a 5420 DSP used to do formerly). I had to do square root again, e^x etc. (so the old 68340 code would run when compiled with vpa); I also had to handle the .x (extended precision, 96 bit) format, the FPU on the PPC core does 64 bit standard FP (again the precision I did was that of a 64 bit IEEE number, just format conversion without extending the mantissa precision). Another few years later I did a sort of complete FP library, was not in a dire need of it but I thought a respectable OS like DPS - and the entire environment - would be less respectable if there was not one I suppose. I did plenty, sin, sinh, log etc., don't remember it all now. It comes handy though, often used also in shell scripts... Dimiter ====================================================== Dimiter Popoff, TGI http://www.tgi-sci.com ====================================================== http://www.flickr.com/photos/didi_tgi/
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Use of soft float? Philipp Klaus Krause <pkk@spth.de> - 2018-05-20 11:56 +0200
Re: Use of soft float? Dimiter_Popoff <dp@tgi-sci.com> - 2018-05-20 14:24 +0300
Re: Use of soft float? Clifford Heath <no.spam@please.net> - 2018-05-21 09:24 +1000
Re: Use of soft float? Dimiter_Popoff <dp@tgi-sci.com> - 2018-05-21 10:35 +0300
Re: Use of soft float? Clifford Heath <no.spam@please.net> - 2018-05-22 09:33 +1000
Re: Use of soft float? Grant Edwards <invalid@invalid.invalid> - 2018-05-20 23:39 +0000
Re: Use of soft float? David Brown <david.brown@hesbynett.no> - 2018-05-21 12:12 +0200
Re: Use of soft float? upsidedown@downunder.com - 2018-05-22 00:36 +0300
Re: Use of soft float? Grant Edwards <invalid@invalid.invalid> - 2018-05-21 21:49 +0000
Re: Use of soft float? upsidedown@downunder.com - 2018-05-22 01:41 +0300
Re: Use of soft float? Clifford Heath <no.spam@please.net> - 2018-05-22 09:39 +1000
Re: Use of soft float? David Brown <david.brown@hesbynett.no> - 2018-05-22 11:23 +0200
Re: Use of soft float? Luke A. Guest <laguest@archeia.com> - 2018-06-06 04:37 +0100
Re: Use of soft float? Reinhardt Behm <rbehm@hushmail.com> - 2018-06-06 12:54 +0800
csiph-web