Standard lab part 1, G

50 views
Skip to first unread message

Oskar Kärrman

unread,
Dec 10, 2015, 8:25:39 AM12/10/15
to 2015 Functional Programming TDA452/ DIT 142
The lab description instructs us to write a function differentiate which should find the derivate of an expression, but we're not instructed to implement negative numbers, and the derivate of cos x is -sin x. What to do?

David Sands

unread,
Dec 10, 2015, 9:35:03 AM12/10/15
to chalmer...@googlegroups.com
I don’t think it says that you should not implement negative numbers.  You should be able to parse negative numbers.

Oskar Kärrman

unread,
Dec 10, 2015, 9:59:18 AM12/10/15
to 2015 Functional Programming TDA452/ DIT 142
Okay, with negative numbers there's no problem.
This is the part of the description which confused me:
In other words, an expression consists of:
* Numbers; these can be (positive) integers as well as floating point numbers

David Sands

unread,
Dec 10, 2015, 10:13:39 AM12/10/15
to chalmer...@googlegroups.com
Ah - yes.  Thanks.  That is not helpful.  I have fixed the description. 
Reply all
Reply to author
Forward
0 new messages