Post Reply 
Programming puzzles: processing lists!
05-24-2017, 03:29 PM
Post: #84
RE: Programming puzzles: processing lists!
(05-24-2017 01:33 PM)John Keith Wrote:  
(05-24-2017 12:44 AM)DavidM Wrote:  ... but I'm happy to share the library containing these commands if anyone's interested.
Of course we are. :-)

OK, now that I've given some thought to this, a potential issue has come to mind. 5 of the functions I created do inherent equality comparisons between elements of a list. In the case where the elements are numeric, there's a distinct difference between approximate and exact integers (eg. "1" vs. "1." [or "1," depending on your current fraction mark]). The way things are currently handled, "1" is considered to be different from "1.". So, for example, the LEQ command referenced above returns FALSE (0.) for the list { 1 1. }. It's not clear to me right now if this is actually a problem, or simply a non-intuitive feature. Smile

Even some of the built-in functions handle this situation differently. For example:
{ 1 } { 1. } == returns 0., whereas 1 1. == returns 1 (note that you have to be in exact mode to begin with when typing this in manually).

I could change the commands to make them look for this situation and accommodate it, but it would degrade performance somewhat. Is it worth it?
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Programming puzzles: processing lists! - DavidM - 05-24-2017 03:29 PM

User(s) browsing this thread: 2 Guest(s)