503
503
else if (!strcmp(node->data.function.record->name, "Fabs"))
504
504
return node_create('b', '/', node_create('b', '*', node_derivative(node->data.function.child, name, symbol_table), node_copy(node->data.function.child)), node_create('f', symbol_table_lookup(symbol_table, "Sqrt"), node_create('b', '^', node_copy(node->data.function.child), node_create('c', 2.0))));
507
* Apply rule of step function derivative.
509
else if (!strcmp(node->data.function.record->name, "Step"))
510
return node_create('b', '*',node_derivative(node->data.function.child, name, symbol_table), node_create('f', symbol_table_lookup(symbol_table,"Delta"), node_copy(node->data.function.child)));
513
* Apply rule of floor function derivative.
515
else if (!strcmp(node->data.function.record->name, "Floor"))
516
return node_create('b', '*', node_derivative(node->data.function.child, name, symbol_table), node_create('f',symbol_table_lookup(symbol_table, "Delta"), node_copy(node->data.function.child)));
519
* Apply rule of smoothed heaviside function derivative.
521
else if (!strcmp(node->data.function.record->name, "HeavS")){
522
//printf("******************************** Derivative of smoothed heaviside function not implemented yet, return a Delta function ...");
523
return node_create('b', '*',node_derivative(node->data.function.child, name, symbol_table), node_create('f', symbol_table_lookup(symbol_table,"Delta"), node_copy(node->data.function.child)));
527
* Apply rule of delta function derivative.
529
else if (!strcmp(node->data.function.record->name, "Delta"))
530
return node_create('b', '*',node_derivative(node->data.function.child, name,symbol_table),node_create('f',symbol_table_lookup(symbol_table, "NanDelta"), node_copy(node->data.function.child)));
534
* Apply rule of nandelta function derivative.
536
else if (!strcmp(node->data.function.record->name, "NanDelta"))
537
return node_create('b', '*', node_derivative(node->data.function.child, name, symbol_table), node_create('f',symbol_table_lookup(symbol_table, "NanDelta"), node_copy(node->data.function.child)));
507
544
switch (node->data.un_op.operatorr) {