|
Revision 4662, 1.0 KB
(checked in by pmoura, 5 days ago)
|
|
Updated copyright notice.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | ================================================================ |
|---|
| 2 | Logtalk - Open source object-oriented logic programming language |
|---|
| 3 | Release 2.35.0 |
|---|
| 4 | |
|---|
| 5 | Copyright (c) 1998-2009 Paulo Moura. All Rights Reserved. |
|---|
| 6 | Logtalk is free software. You can redistribute it and/or modify |
|---|
| 7 | it under the terms of the "Artistic License 2.0" as published by |
|---|
| 8 | The Perl Foundation. Consult the "LICENSE.txt" file for details. |
|---|
| 9 | ================================================================ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | % start by loading the example: |
|---|
| 13 | |
|---|
| 14 | | ?- logtalk_load(symdiff(loader)). |
|---|
| 15 | ... |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | % simplify the expression x^1 + x0 - x1 |
|---|
| 19 | |
|---|
| 20 | | ?- (x**1 + x*0 - x*1)::simplify(S). |
|---|
| 21 | |
|---|
| 22 | S = 0 |
|---|
| 23 | |
|---|
| 24 | yes |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | % differentiate and then simplify the expression 2x^3 + x^2 - 4x |
|---|
| 28 | |
|---|
| 29 | | ?- (2*x**3 + x**2 - 4*x)::diff(D), D::simplify(S). |
|---|
| 30 | |
|---|
| 31 | D = 2*(3*x**2*1)+2*x**1*1-4*1 |
|---|
| 32 | S = 2*(3*x**2)+2*x-4 |
|---|
| 33 | |
|---|
| 34 | yes |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | % differentiate and then simplify the expression ln(x^2 + 2x - 7) + 4x |
|---|
| 38 | |
|---|
| 39 | | ?- (log(x**2 + 2*x - 7) + 4*x)::diff(D), D::simplify(S). |
|---|
| 40 | |
|---|
| 41 | D = (2*x**1*1+2*1)*(x**2+2*x-7)** -1+4*1 |
|---|
| 42 | S = (2*x+2)*(x**2+2*x-7)** -1+4 |
|---|
| 43 | |
|---|
| 44 | yes |
|---|