Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Double Precision Floats

  1. #1

    Double Precision Floats

    Do the Teensy cards handle Double precision data transfers? My project will generate double precision numbers and transmits them to a processor using a CAN bus. My processor must store, re-format (the data packet) and re-transmit those numbers on an ethernet link in multicast mode. The am reading a datasheet for the MIMXRT1062DVL6A - the processor inside Teensy 4.1. Support for 64-bit operations do no exist in the document. Can you confirm that the Teensy cannot handle double precision data even in data transfer mode.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,081
    Teensy 4.1 has a FPU which does perform 64 bit double math in hardware. When you declare "double" variables, the compiler does indeed store 64 bits.

    As for transmitting those 64 bits over CAN or other hardware, you have to copy the 8 bytes into whatever packet or other data buffer the peripheral will use. Maybe I'm reading too much into your question, but if you're expecting that to happen in a very automatic way, know that you will need to write some code to move the binary data in the way you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •