|
AlvaroDíaz wrote:
In Prime can you use TOL as local inside Yng function?
|
Unfortunately this would have not the desired effect.
The way equality is implemented in the match and lookup functions is very bad and often confusing. In many cases its better to write ones own routine doing the job in a better .
As we have the modifier "near" (also available in Mathcad 15 if we use Lookup with capital L) I see no need to limit the equality to a range with tolerance TOL. Those functions should use full numeric precision when comparing numbers. Probably one could add a tolerance as function argument (maybe only in conjunction with "near") .
Fortunately match and lookup are rather easy to implement in a better way, with better error handling, etc. But it sure should not be necessary that we do that ourself.
Regards Werner
P.S.: Here is an alterative to my former "Yng" which does not depend on the value of TOL and I guess that now the result at the borders of the range are correct, corresponding to the routine provided by dferry. Also there is no need for the separate calculation of the vector height.
