News:

  • October 16, 2026, 12:23:58 PM

Login with username, password and session length

Author Topic: Precise MATH Instructions  (Read 23005 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Precise MATH Instructions
« Reply #15 on: July 30, 2021, 07:57:04 PM »
Are you sure you can't just add a little code to allow us to cast R's to a R:DP? :P

Yeah...um. Sorry.

I actually fought with similar issues while developing the motion functions. Single precision wasn't accurate enough in a few of the axis calculations so I had to selectively add double. It was a little tricky getting the balance of accuracy and performance.

I know, you should come out with a MATH co-processor POM!

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3850
    • Host Engineering
Re: Precise MATH Instructions
« Reply #16 on: July 31, 2021, 08:35:00 AM »
It appears that on the first couple of angles you are multiplying R11+R12 by 2 but also dividing by 2?  Definitely losing 1 bit of significance there.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: Precise MATH Instructions
« Reply #17 on: July 31, 2021, 05:12:00 PM »
It appears that on the first couple of angles you are multiplying R11+R12 by 2 but also dividing by 2?  Definitely losing 1 bit of significance there.

Yep, tunnel vision.  The formula calls for twice the mean angle, which would be the same as summing the two angles.  But, no change in resolution for me.  Either way, I'm still many bits away from having the resolution needed for this prospective project.  Thanks!