Re: product() unexpected result

new topic     » goto parent     » topic index » view thread      » older message » newer message
/* OE */ 
include std/math.e 
? product( {} ) 
--> 1 
/* p64t Phix */ 
? product( {} ) 
--> 0 

example ''arithmetic'' thinking

Lets say I want to estimate how much redymix concrete I must order:

vol1 = product( { 1,2,3 } ) 
--> 6 
// I order 6 cubic meters of concrete 

/* Phix */ 
vol2 = product( {} ) 
-- 0 
--> zero 
// no dimensions, I do not order truckloads of concrete 

/* OE */ 
include std/math.e  
vol3 = product( {} ) 
-- 1 
--> one 
 
-- I order a cubic meter of redymix I don't know what do with 

example ''mathematical'' thinking

  • x0 = 1
  • sqrt( -1 )
    = j (electrical thinking)
    = i (math thinking)
  • ...
  • product( {} )
    = 1
    = 0

In ''math'' I am open to various ideas.

needed

  • OE and Phix not the same
  • an argument to select mode of operation is needed

be well
_tom

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu