modulus-sym icon indicating copy to clipboard operation
modulus-sym copied to clipboard

🚀[FEA]: Add "log1p" and "expm1" support for Node.from_sympy

Open 052279 opened this issue 2 years ago • 1 comments

Is this a new feature, an improvement, or a change to existing functionality?

Improvement

How would you describe the priority of this feature request

Medium

Please provide a clear description of problem you would like to solve.

I want to use log1p and expm1 in Node.from_sympy, but it raises error in SympyToTorch.forward. I think it would be possible to support these functions by including 'log1p': torch.log1p and 'expm1': torch.expm1 in TORCH_SYMPY_PRINTER.

Describe any alternatives you have considered

It is also possible to use log(1+Symol('x')) instead of log1p, but it will not be accurate for small values of x.

Additional context

No response

052279 avatar Oct 18 '23 13:10 052279

Thanks for bringing this up. We will discuss this and add it to our backlog.

ktangsali avatar Apr 11 '25 01:04 ktangsali