You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below, why is get_mean_stddev bound to an external function using transfun's current implementation?
varget_mean=tfun.redinit('0','+').next('/n'),get_stddev=tfun.decl('mean_value',get_mean).map('v-mean_value').map('v*v').sum().next('Math.sqrt(current/(n-1))')// unbiased std dev estimation// compute both mean and stddev at once,get_mean_stddev=get_stddev.next('{stddev:current, mean:mean_value}');
The text was updated successfully, but these errors were encountered:
...but actually can be solved in a constructive manner: since #7 we already have inlining of some external functions (see fext, flatorize). We could also inline the code generated by transfun, i.e. appfuns, as long as:
they are not already used as appfuns to generate smart code, only as external functions.
the code produced only uses let and const, no var (slight change).
When all "checks" are passed, we can simply add ._tf_get_argname_arr and ._tf_get_bodycode as methods to the generated appfun, then examples like the one above will be fully inlined.
Below, why is
get_mean_stddev bound
to an external function using transfun's current implementation?The text was updated successfully, but these errors were encountered: