4 ms·
Nothing, we can compile x*3. We can't compile x**3, because we do not have a runtime library setup for WASM yet (Flang above had the same issue) and WASM can do
by certik 2y ago
Nothing, we can compile x*3. We can't compile x**3, because we do not have a runtime library setup for WASM yet (Flang above had the same issue) and WASM can do x**2, but arbitrary power, such as x**3, requires a runtime power function that we haven't implemented yet. If you want to help, you can fix it probably quite easily right here: https://github.com/lfortran/lfortran/blob/69d488b1d1fd26b163536199e0c5492ef990f285/src/libasr/codegen/asr_to_wasm.cpp#L1665 https://github.com/lfortran/lfortran/blob/69d488b1d1fd26b163....
- selimthegrim 2y agoHow about cube roots of fractions and rational numbers? (TI and Casio fans will get the deep cut)
- certik 2y agoThe LLVM backend just does the usual floating point calculation for those.