The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Programming question and strange == result
10-08-2014, 10:14 PM
Post: #1
Programming question and strange == result
Made a very simple test program:

Quote:EXPORT TEST(X,Y)
BEGIN
RETURN CAS.quorem(X,Y);
END;

Running; TEST(x^2+x-3,x-1)
Results in: {(x^2+x-3)/(x-1),0}

Running: quorem(x^2+x-3,x-1)
Results in: [x+2 -1]

Why does the program give me that result? Have spent ALOT of time trying to figure this out..any ideas?

Another very strange thing I noticed:
2x-2==2(x-1) results in 0
2x-2==2x-2 results in 1
simplify(2x-2==2(x-1)) results in true
simplify(2x-2==2x-2) results in 1

Any reasonable explanation for this?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Programming question and strange == result - pr0 - 10-08-2014 10:14 PM



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