
Hello Picsters,
How many digit after the comma a negative float variable can take or what precision?
Regards,
Yves
Hello Picsters,
How many digit after the comma a negative float variable can take or what precision?
Regards,
Yves
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thumbs Up |
Received: 79 Given: 0 |
If you're talking about the decimal point position, it really doesn't matter much where it is until you start to approach the extreme end of the range (E+-38, or there abouts). You get 6-7 decimal digits total.
Keep that in mind if you do operations with variables that cover a wide range (ie large number + small number).
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thumbs Up |
Received: 114 Given: 31 |
Yves,
The important thing to understand is Significant Figures.
The accuracy of floating point maths available in PDS runs out after 6 or 7 significant figures.
Look up "Rules for significant figures" in Google then choose the www.nku.edu option as a useful one.
The tricky part is understanding when zero is significant or not.
John
Last edited by John Drew; 7th February 2019 at 03:02. Reason: Typo, my phone can't spell
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thumbs Up |
Received: 356 Given: 129 |
That's one of the reasons I created 64-bit floating point in Proton24. I'm sure it was John, who was developing astronomical equipment and he wanted a bit more accuracy, so I decided to create the 64-bit floats. Because they operate on the 16-bit architecture of the PIC24 and dsPIC devices, they are very fast to operate and very accurate. In Proton24, they are named "Double"
An 8-bit device is not suitable for 64-bit floating point IMO, because they take so much room up and are quite complex so will be quite slow on any 8-bit microcontroller platform.
For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thumbs Up |
Received: 114 Given: 31 |
The 64 bit floats in Proton 24 work a treat and give great accuracy. The orbit of the moon is really complex and there are hundreds of lines of code so accuracy is critical. The moon is is one of the most difficult astronomical bodies to track. Because it's moving the calculations also need to be fast because1 sec updates are necessary. The P24 series are ideal with Les's double floats.
John
If any users make use of Floats I recommend reading this article in Microchip Developers:http://microchipdeveloper.com/c:unde...epresentations
Last edited by John Drew; 8th February 2019 at 05:38.
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thank you all
Yves
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
Thumbs Up |
Received: 116 Given: 40 |
For expected precision on today's larger and faster PICs see NBitMath for calculation values of up to 31 bytes wide with no rounding down etc.
For display and step by step debugging see macroFORMAT which converts the up to 31 bytes wide values into a string.
Norm
This valuable resource relies upon the very
small amount of revenue generated by displaying online advertisements
to our visitors.
The advertisements we display are relevant to this web site and your
browsing history
Please consider supporting us by disabling your ad blocker.
Note: Some users have reported issues related to ad-blockers rendering
parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this
resource with adblocking enabled.
If you can, please report issues in the forum area WebSite / Forum Issues
There are currently 1 users browsing this thread. (0 members and 1 guests)
Actions : (Set Date) (Clear Date)
You do not have permission to view the list of names.