If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
mul vs div
24 posts
• Page 1 of 3 • 1, 2, 3
Re: mul vs div
excellent thanks I needed something like this
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: mul vs div
.
Last edited by MichaelBenjamin on Mon Sep 21, 2020 10:51 am, edited 1 time in total.
- MichaelBenjamin
- Posts: 275
- Joined: Tue Jul 13, 2010 1:32 pm
Re: mul vs div
In FS 3.06, if you substitute a double precision subtract in the final position the error goes away.
Curiously in FS64 you have to substitute all 3 elements (mult, div, sub) to get the same result.
Just an observation .. I'm not much of yer maths guy . But all is clearly not quite as it seems.
H
Curiously in FS64 you have to substitute all 3 elements (mult, div, sub) to get the same result.
Just an observation .. I'm not much of yer maths guy . But all is clearly not quite as it seems.
H
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
Re: mul vs div
Indeed, when working with co-efficents it becomes very clear that only using a divisible float value is realistic, but like you said; anything beyond a bipolar .5 is erratic. I was trying to get a negative pi to round more effectively and was sobered by only being able to find a suitable balance. But the balance will never be good, and especially after seeing the results in the highest sample rates; lesser sample rates suffer for the compensation.
Actually I'd come up with something interesting and if I remember in the correct way I'll let you know. I think I was rounding larger numbers into 100'ths and then using mere floats with three decimals, maybe. It's been so long since I gave it any thought; but at the time I mused that perhaps it was practical. Because only in the float's spectrum is it viable.
Actually I'd come up with something interesting and if I remember in the correct way I'll let you know. I think I was rounding larger numbers into 100'ths and then using mere floats with three decimals, maybe. It's been so long since I gave it any thought; but at the time I mused that perhaps it was practical. Because only in the float's spectrum is it viable.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: mul vs div
I gave it more thought, convert all floats to one thousand million so as to increase amounts of decimals and then when done divide to the right number. Double precision without double precision!
Whoa woot!
Whoa woot!
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: mul vs div
.
Last edited by MichaelBenjamin on Mon Sep 21, 2020 10:52 am, edited 1 time in total.
- MichaelBenjamin
- Posts: 275
- Joined: Tue Jul 13, 2010 1:32 pm
Re: mul vs div
I gave it more thought, convert all floats to one thousand million so as to increase amounts of decimals and then when done divide to the right number. Double precision without double precision!
If that worked, there would be no need for double precision! The precision of floats is best thought of as a number of "significant digits", not as a number of "decimal places". Single-precision float have about 6-7 significant decimal digits; so if you multiply a single-precision float by one thousand million, the final three integer digits and everything after the decimal point will always be zeros.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: mul vs div
trogluddite wrote:I gave it more thought, convert all floats to one thousand million so as to increase amounts of decimals and then when done divide to the right number. Double precision without double precision!
If that worked, there would be no need for double precision! The precision of floats is best thought of as a number of "significant digits", not as a number of "decimal places". Single-precision float have about 6-7 significant decimal digits; so if you multiply a single-precision float by one thousand million, the final three integer digits and everything after the decimal point will always be zeros.
If you make sure every number is that way then there's more decimal points when divided by the same number afrter the fact. it's the same as double, because there is less decimals involved.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
Re: mul vs div
You can't change the precision of multiplication or division by "moving the decimal point" (unless the infinity or denormal zones are involved). That's the entire point of floating point numbers - the error is always approximately relative to the magnitude (an epsilon, not a delta). Your proposed scaling would do nothing more than insert two more operations where rounding errors could occur.
Michael has already shown you an ideal way to test this - you can experiment with different scaling methods on one path of his schematic to see the results very plainly.
Michael has already shown you an ideal way to test this - you can experiment with different scaling methods on one path of his schematic to see the results very plainly.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
24 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 48 guests