vult-dsp / vult

Vult is a transcompiler well suited to write high-performance DSP code
https://vult-dsp.github.io/vult
Other
490 stars 25 forks source link

tanh not working in browser demo #18

Closed cristiano-belloni closed 7 years ago

cristiano-belloni commented 7 years ago

Hello! This:

fun saturate_table(x) @[table(size=10,min=0.0,max=6.0)] {
  return tanh(x);
}

Silently returns Code: Error when compiling without any further explanation. If I change tanh to sin it works. Might it be that the demo version is old and doesn't support tanh? For sure it doesn't support random (but in that case, we get an Ace popup).

cristiano-belloni commented 7 years ago

(It works in the command line, btw)

modlfo commented 7 years ago

Right, sorry about that. This bites me from time to time. There's a bug in the converter from OCaml to Js https://github.com/ocsigen/js_of_ocaml/pull/561 and I forget that, until this fix is released, I have to manually patch the Js code. I'll be releasing an updated version later in the day.

cristiano-belloni commented 7 years ago

Cool, thanks. I'll +1 the issue so maybe they remember to release it :)

modlfo commented 7 years ago

I have fixed the problem in the web demo. Random should work as well. I just need to remember to patch the code every time.

cristiano-belloni commented 7 years ago

Confirmed for both, thanks!