On 4/12/2016 4:21 AM, Gál Zsolt wrote:
> Hello Philipp,
>
> I didn't have any problem without float variables in pic14 series.
> I read about floating point formats few days ago and I think It is
> waste of data memory and program memory also. I think there are
> many solution to avoid using it, and make calculation with integers.

I agree, I use 16-bit scale then divide by subtraction in PIC14 
for result displays up to 4 digits, done with a low priority 
display task in the main loop. Hard to imagine an 8-bit project 
that truly need half floats.

IEEE half float has 11 bits precision, just over 3 decimal digits, 
fine for graphics. But there's a wide variety in the number ranges 
we handle, 11 bits does not sound truly appealing, and there's 
only so many ways of allocating 16 bits for a float. Then IEEE 
half floats has to be packed and unpacked and... ouch. Scale and 
divide is quite small in size and works fine, as a pre-Arduino 
dinosaur I rarely add outside library dependencies for 8-bit thingies.

But y'know, it would be interesting to hear from a modern embedded 
hobbyist who's done only 8-bit Arduino, I suspect they might be 
happy to get 16-bit floats.

> Regards,
>
> Zsolt
>
> 2016-04-11 20:10 GMT+02:00 Philipp Klaus Krause:
>
>     Dear SDCC users,
>
>     SDCC currently implements 32-bit float as its only
>     floating-point data type.
>
>     Would you like to see a cheaper one in SDCC, that uses only 16
>     bits?
>
>     Would you use it?
>
>     Philipp
>
>     P.S.: Background info: There is growing hardware support for
>     floating
>     types smaller than float. And today WG14 decided to continue
>     work on
>     making this available in C, so it is likely to appear in the
>     next C
>     standard. None of the architectures targeted by SDCC has hardware
>     floating-point support. But having a floating-point type
>     cheaper than
>     float might still be worth it.
>
>     P.P.S.: Even if there is demand for this, I probably won't
>     find time to
>     implement it soon. On the other hand, the next C standard
>     seems to be
>     nearly 6 years away anyway.
>
> --
> ~~~~~~~~~~~~~~~~
> http://galzsolt.zzl.org

-- 
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to