@richmorin said:
Experimentation indicates that function arguments are passed to the Ruby method as an array of strings.
Well, obviously the entire formula begins as one big lengthy string, is repeatedly parsed and broken up into smaller and smaller tokens, until it can build it's param arrays to pass to internal DC functions.
However it's not always necessary internally (DC parsing) for the params to be passed as string representations, to the DC formula method(s), if it was already necessary for the DC parser to convert the sub-string operands to a Numeric (for say, some logical comparison, in order to make a code branching decision.)
@richmorin said:
So, it seems like the Ruby method should be performing coercion on the input values. (eg, a[0].to_f).
Exactly what they all of the mathematical DC functions do internally, just to be safe, before passing any values to methods in the Math module (or otherwise where a Numeric type is expected.)
IF you just have to modify the DCFunctionsV1 class, for your own use, it would only be smart, to also do .to_f() coercion.
@richmorin said:
Am I missing something?
Only that there are some DC functions that specifically use string args. (But we can ignore this for this issue...)