Changes between Initial Version and Version 1 of Ticket #1410, comment 2


Ignore:
Timestamp:
2018-01-11T09:56:52Z (7 years ago)
Author:
Martin Sjölund

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1410, comment 2

    initial v1  
    11Creating something like this an interpreting it seems to be quite fast, but generating the C-code might be better (here max 1 var works, it needs to have a known derivative != 0, etc.).
    22
    3 {{{function newton_rhapson_1var
     3{{{#!mo
     4function newton_rhapson_1var
    45  input Real x;
    56  input Real tolerance;
     
    2526equation
    2627  //(nx,ny) = newton_rhapson(0.01,0.01,1e-6);
    27 end A;}}}
     28end A;
     29}}}
    2830
    2931I know how to implement this in the bootstrapped compiler (it involves an external C function that is able to call traverseExp+CevalFunction on a stored data-structure (the function) and a fresh table of variables to replace in it...)