June 25, 2024, 05:44:46 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Calculating where the decimal point should be

Started by Andy, February 10, 2016, 01:35:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Hi,

Well I've now managed multiplication of very large number which works well.

I am however lost on where the decimal point should be in the result when both numbers to be multiplied together have decimal points in them.

e.g. 123456.12345 x 8.1234 = answer with 5 decimal placed digits.
      123456.12345 x 8.12345 = answer with 5 decimal placed digits.
      123456.12345 x 8.123456 = answer with 5 decimal placed digits.
      123456.12345 x 8.1234567 = answer with 4 decimal placed digits.
      123456.12345 x 8.12345678 = answer with 5 decimal placed digits.

Anyone good at maths that can explain this and if so, how do I work out how many decimal places should be in my multiplication answer?

Thanks,
Andy.


     

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

February 10, 2016, 01:58:27 AM #1 Last Edit: February 10, 2016, 02:28:24 AM by andy1966
Okay,

I've got it, I was using an online calculator which wasn't giving all the decimal places, also the windows scientific calculator gets the decimals wrong too!

So the correct answer is to add the number of decimal places in each number together and that is how many decimal places you need.

e.g. number 1 has 2 decimal places, number 2 has 4 decimal places = answer with 6 decimal places.

Andy.
:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.