Shop OBEX P1 Docs P2 Docs Learn Events
FloatString v1.1 update — Parallax Forums

FloatString v1.1 update

camtcamt Posts: 45
edited 2007-09-15 07:14 in Propeller 1
An update to FloatString has been sent to the object exchange and is included below. It adds the FloatToFormat routine which returns a string of up to 9 characters with a specified number of decimal points. Useful for formated displays. See the Sensirion demo for an example of use.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cam Thompson
Micromega Corporation

Comments

  • gmkukagmkuka Posts: 16
    edited 2007-09-15 06:38
    I've been all over the place and I cannot seem to locate 'String to Float' conversions... 'Float to String' is abundant... Am I missing something???
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-15 07:14
    I complained some monthes ago about the tricky co-operation between Float32 (1.3) and FloatString.
    Using Float32 from your main program and from Float32 needs patching Float32 (put the VAR cells into DAT) and you have to know what you are doing!) It is nonsense to start another Float32-COG just for the needs of FloatString.

    This seems still to be an issue.

    It's not Cam's fault; it's a design flaw with SPIN.

    P.S.: Efficient multi COG Math32 is in fact very tricky as it needs so much overhead within a SPIN programm that the speed-up is mainly lost; there seems to be little interest in Floating Point Math here in the forum. Should it be otherwise, I am interested in disussing improvements there (e.g. chain computations avoiding the intermediate packing and unpacking, complex operations or matrix multiplication,... ) See also Micromega's FPU which for twice the price is not faster than a COG but has much more program space in its ROM....
Sign In or Register to comment.