Tag Archives: numbers

Javascript, you’ve got to love it

In almost all computer languages a string is just a list of characters, like this sentence.

Strings in Javascript are fun!

The toString() method and the function String(..) both convert a number to a string.
With x = 12.3 and y=10000000

String(x)*2 gives 24.6
String(x)/String(y) gives 0.00000123
String((100 + 23).toString()-((-1)*String(x))) gives 135.3
(100 + 23).toString()+String(x) gives 12312.3

Work it out !!!!

Leave a comment

Filed under javascript, programming languages

Negative numbers: truth, existence, reality, abstraction.

There are things with names which I can pick up, see, feel, or if too radioactive then at least observe and measure…..this is the reality we have (though some philosophers, and neuroscientists would have us believe otherwise). But what with numbers?

I can see three coconuts, I can count them, and match the count to the quantity, but the number THREE is not real, it is an abstraction from all the occurrences of three object that I have seen or can visualize.

Well, if THREE is not real then MINUS THREE hasn’t got a chance at being real, it is in fact a second stage abstraction, as negative numbers were invented by humans to deal with situations not adequately described with “ordinary” numbers. It gets worse, as complex numbers were invented to get over the difficulties with “real” numbers (the positive and negative numbers). It is a shame about the use of the word “real” in this situation (see above). They should have been called “simple numbers”.

Abstraction is also the basis of geometry. Euclid says “A line is that with extent but no breadth”, which does make it difficult to see! 

Leave a comment

Filed under abstract, arithmetic, geometry, language in math

-1 x -1 = 1, but some need convincing

Here is a popular argument:   -1 x -1 has to be 1 or -1

If it was equal to -1 then -1 x -1 = -1 x -1 x 1 = -1 x1 and so dividing both sides by -1 we get -1 = 1, which is not a good idea!, hence -1 x -1 = 1

This argument begs so many questions that it is difficult to know where to start.

Here is a much better one, but it does stretch the idea of area a little :

minusonetimesminusone

From the diagram  (a – 1) x (b – 1) = a x b – a – b + 1

Set a = 0 and b = 0 to get  (0 – 1) x ( 0 – 1) = 1, and since 0 – 1 is equal to -1        we get -1 x -1 = 1

This has some connection with evaluating for example  3 x ( 8 – 2)  using the distributive law.

The distributive law is a law for  a(b + c) and says nothing about  a(b – c), but never mind, we go gaily about the common task.

Leave a comment

Filed under abstract, algebra, arithmetic

Properties of operations, associative law

Why, oh why, are we burdening the youth of today with the associative law of addition?

It is OBVIOUS !!!!!

Adding three numbers corresponds in a one-many way to putting three bundles of things in a bag, mixing them up (optional) and counting them. It would be a sad day if the count depended on the mixing.

This is an example of how far you have to go in abstract algebra to find a non-associative operation (and a fairly useless one at that)

Image

No further comment from me !

Leave a comment

Filed under arithmetic

Fractions are parts of the same whole, part 3

When is a whole not a whole? (again)

When it’s two wholes (or more) :-

John eats 1/2 of his pizza, Mary eats 3/4 of her pizza. So between them they ate 1/2 + 3/4 of a pizza, or 5/4 of a pizza.

So which whole are we referring to ? John’s pizza ……. No.   Mary’s pizza ……. No.    Both pizzas …….. No.    John’s pizza and  Mary’s pizza and  both pizzas …….. No.

Conclusion: What we are referring to as “the same whole” is an abstract unit of one pizza, and the fractions are measurements using this unit. Wouldn’t it be a good idea to start off like this, with fractions as measurements, and avoid years of misunderstanding, stress and confusion.

Is this so different from adding whole(adjective!) numbers , as when  adding two numbers they have to be counts of the same thing (or whole(!) before it is chopped up).?

Fun arithmetic:        3 apples + 4 bananas = 7 applanas

Desperately fun arithmetic :  1/2 of my money + 1/2 of your money = 1/2 of our money

 

Leave a comment

Filed under arithmetic, fractions