May 05 2008

Another Mental Math Technique

Published by D'Arcy Gregoire under Math

This is just something that occured to me today; I haven’t yet had the time to really explore it. Once I do, I’m fairly certain that it’s range of use will expand however, for the time being, please note the limitation listed below.

Technique for performing mental multiplication for larger numbers.

This applies to any natural number that falls within 10 less than the next multiple of 50. For example, it will work with 248 but not 234; 495 but not 476, etc. There are definite patterns that emerge once you apply the technique to numbers outisde of this restriction, so I’m quite sure that I will be able to modify it to work with all natural numbers once I have a moment to look at it again… but for now, it’s a good quick trick for those ranges to which it applies.

Take your two numbers, I’ll use 497 and 343 as an example. For the purpose of clarity, let us refer to the first value; 497, as a and the second; 343, as b.

Round a and b to the nearest multiple of 50 and find their product:
500 x 350 = 175000

Next, take the difference of the rounded a minus a and multiply it by the rounded b:
500 - 497 = 3
3 x 350 = 1050

Let’s call that product x.

Now, do the same, but reverse a and b; rounded b minus b multiplied by a:
350 - 343 = 7
7 x 500 = 3500

Let’s call that product y.

Now, add x and y together and subtract the sum from your initial product of the rounded values:
1050 + 3500 = 4550
175000 - 4550 = 170450

We’re almost there. The last step is to find the product of the difference of the ones from 10 in the first values…so:
497, the value of ones is 7, so:
10 - 7 = 3
343, the value of ones is 3, so:
10 - 3 = 7
Now, find the product of those differences:
3 x 7 = 21

Add this to the large product above and you have your answer:
170450 + 21 = 170471

I’ll leave it to you to explore this technique on larger numbers with more digits.

It may look tiedious when written out in this manner, but it’s quite quick and easy to follow when running through the steps in your head.

Hope that helps!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Bumpzee
  • Fark
  • Furl
  • Slashdot
  • Technorati
  • Netscape
  • NewsVine
  • Reddit
  • YahooMyWeb

No responses yet

Apr 26 2008

Quick multiplication trick

Published by D'Arcy Gregoire under Math

Here’s a quick trick for mentally multiplying two numbers which are greater than or equal to 10 but less than 20.

Let’s use 18 and 19 as an example.

Add the second digit in one of the numbers to the other number.
18 + 9 = 27
Now, add a zero (mulitply by 10)
27 x 10 = 270
Multiply the last digit of each number
8 x 9 = 72
Add the two values together
270 + 72 = 342

18 x 19 = 342

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Bumpzee
  • Fark
  • Furl
  • Slashdot
  • Technorati
  • Netscape
  • NewsVine
  • Reddit
  • YahooMyWeb

No responses yet

Oct 24 2007

Convert time in seconds to time format

Published by D'Arcy Gregoire under General Nerdiness

I have a spreadsheet that I’m working on with thousands and thousands of time values listed strictly in seconds that I need to have converted into an hh:mm:ss format. Now, if we were just working in Excel, that’s as easy as saying =A1 / (1440*60) where A1 holds the value in seconds, then applying the time/37:30:55 format; a format that ensures that the value doesn’t roll over after 24 hours. The problem I had was that it all needed to be done in VBA which, apparently, doesn’t have any means of formatting a value in such a way… atleast none that I could fine in a day or so of searching…

So, just in case any one else out there is having the same issue, I thought I’d share the function that I ended up writing. It does the job quite nicely.


Function convertTime(i As String)
' D'Arcy Gregoire
' October 24, 2007
'
Dim hVal As Double
Dim hInt As Double
Dim hDec As Double
Dim hFin As String
Dim mVal As Double
Dim mInt As Integer
Dim mDec As Double
Dim mFin As String
Dim sVal As Double
Dim sInt As Integer
Dim sFin As String

' Hours
If i < 3600 Then
hFin = "00"
mVal = Evaluate(i / 60)
Else
hVal = Evaluate(Round(i, 0) / 3600)
hInt = InStrRev(hVal, ".")
If hInt = 0 Then
hFin = "0" & Trim(Str(hVal))
Else
hInt = Evaluate(Left(hVal, hInt - 1))
If hInt <= 9 Then
hFin = "0" & Trim(Str(hInt))
Else
hFin = Trim(Str(hInt))
End If
End If
hDec = InStrRev(hVal, ".")
If hDec = 0 Then
hDec = 0
Else
hDec = Evaluate(Mid(hVal, hDec, 99))
End If
mVal = Evaluate(60 * hDec)
End If

' Minutes
If i < 60 Then
mFin = "00"
sVal = i
Else
mInt = InStrRev(mVal, ".")
If mInt = 0 Then
mFin = "0" & Trim(Str(mVal))
Else
mInt = Evaluate(Left(mVal, mInt - 1))
If mInt <= 9 Then
mFin = "0" & Trim(Str(mInt))
Else
mFin = Trim(Str(mInt))
End If
End If
mDec = InStrRev(mVal, ".")
If mDec = 0 Then
mDec = 0
Else
mDec = Evaluate(Mid(mVal, mDec, 99))
End If
sVal = Evaluate(60 * mDec)
End If

' Seconds
If sVal <= 9 Then
sFin = "0" & Trim(Str(Evaluate(Round(sVal, 0))))
Else
sFin = Trim(Str(Evaluate(Round(sVal, 0))))
End If

' Display result
convertTime = hFin & ":" & mFin & ":" & sFin

End Function

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Bumpzee
  • Fark
  • Furl
  • Slashdot
  • Technorati
  • Netscape
  • NewsVine
  • Reddit
  • YahooMyWeb

No responses yet

- Next »