der.pl

loading
details
attribute value
description
owner Johannes Waldmann
uploaded 2017-08-17 03:45:07.0
disk size 593 Bytes
downloadable true
type
attribute value
name no_type
processor id 1
description this is the default benchmark type for rejected benchmarks and benchmarks that are not associated with a type.
owning community none
loading contents
%query: der(i,o).
%TWTYPES :- type der(dt,exp).

der(d(e(t)), const(1)).
der(d(e(const(A))),  const(0)).

der(d(e(X+Y)), DX+DY) :-
   der(d(e(X)),DX), der(d(e(Y)),DY).
der(d(e(X*Y)), X*DY + Y*DX) :-
   der(d(e(X)),DX), der(d(e(Y)),DY).
der(d(d(X)),DDX) :-
   der(d(X),DX), der(d(e(DX)),DDX).






/*TWDESC

  computes the repeated differentiation of a function.

*/

/*TWTYPES

dt(d(X)) :- dt(X).
dt(e(X)) :- exp(X).

exp(t).
exp(const(X)) :-
	int(X).
exp(A+B) :-
	exp(A),
	exp(B).
exp(A*B) :-
	exp(A),
	exp(B).

int(0).
int(1).
int(2).

*/



/*TWDEMO

selected_norms([dt,exp]).
*/
/*.

*/

popout

content may be truncated. 'popout' for larger text window.

actions get anonymous link download benchmark