Menu

Fixed Point (s31.32)

2026-06-12
2026-06-13
  • Jan Kromhout

    Jan Kromhout - 2026-06-12

    Mikael,

    Do you have ever consider to implement Fixed Point (s31.32) in FF as an
    alternative for real floating point. I understand that regular floating point
    on a scamp3 not is posible (software bug).

    With kindley regards
    Jan

     
  • Mikael Nordman

    Mikael Nordman - 2026-06-12

    No I have not considered implementing fixed point.

    What bug are you referring to ? Do you mean that the FF floating point routines have a bug?

     
  • Jan Kromhout

    Jan Kromhout - 2026-06-12

    after asking John to implement floatingpoint on the scamp , the answer was it is not posible by a bug in the Microchip assembler. So I tought fixedpoint math is an alternitive!

     
  • Mikael Nordman

    Mikael Nordman - 2026-06-12

    I have not used the FF floating point at all. No need for me. I tried it once and I got strange results.
    I just now realized that I was using degrees instead of radians.

    So probably the FF floating point is fine to use. I tried sin and cos using radians.

     
  • Jan Kromhout

    Jan Kromhout - 2026-06-12

    that in mind, John could make a version for the scamp3 without any problems?

     
  • Mikael Nordman

    Mikael Nordman - 2026-06-12

    Probably not. It will together with his BSP use most of the flash of his 64 Kbyte PIC24 chips.

    A chip with 128 Kbytes or more would be needed and a special linker file to locate the math library outside the areas used by flashforth.

     
  • Mikael Nordman

    Mikael Nordman - 2026-06-12

    Leaving out the trigonometric functions would make it fit better.

     
  • Jan Kromhout

    Jan Kromhout - 2026-06-12

    I want to try to program the floatingpoints fix s16.16 first. For that, I need the following sign operators: q*, q/, q-, q+, and qnegate. Do you perhaps have the code for that?

     
    • Mikael Nordman

      Mikael Nordman - 2026-06-13

      No I do not.

       

Log in to post a comment.

Auth0 Logo