Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 23 MAR 2006 04:42:29PM Gerald Lovel wrote:

In mathematics, we use the big-Sigma notation to indicate the sum of a series of terms and the big-Pi notation to represent the product of a series.

In Basic+ we use the Sum() function to return the sum of a series and the … the …

You know, I never noticed this omission before? This seems odd, since products and factorials are just a common as sums in mathematics.


At 19 APR 2006 04:58PM James Mowbray wrote:

PROD probably doesn't exist in RevSoft's products (AREV and OI) due to the question: What do you do about non-numeric data in the list?

For the SUM function, the answer simple: return 0. What about PROD?

You'd think 0 would be the logical default, but there can be cases made where 1 would be preferred (nulls in the list). Seems simple enough to create the function. In math, you can be reasonably sure that all of the values are numeric.


At 19 APR 2006 05:15PM Gerald Lovel wrote:

Gee James,

I hadn't thought about non-numerics being replaced by the identity element of the operation – In fact, I didn't think about non-numerics at all. BASIC+ is a business-oriented language, and factorials and series products are much less common than sums in business applications. I was just amazed that I never noticed this omission.

Gerald


At 19 APR 2006 05:24PM James Mowbray wrote:

Hi, Gerald,

It's amazing that in whatever business-oriented environment, how many OBVIOUS mathematical functions are left out. It's only when you get to general purpose environments (Access, SQL), that they START including the more esoteric functions. And you need to get to the actual languages to get the real strange functions.

Ciao,

Jim

[email protected]

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/7aa4fe2e9078ed218525713a0071c117.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1