提交 0242a3b9 authored 作者: Frederic's avatar Frederic

Use the more stable implementation of expm1.

上级 b2ff8fe2
......@@ -2335,7 +2335,10 @@ class Expm1(UnaryScalarOp):
def c_code(self, node, name, (x, ), (z, ), sub):
if node.inputs[0].type in complex_types:
raise NotImplementedError('type not supported', type)
return "%(z)s = exp(%(x)s) - 1;" % locals()
return "%(z)s = expm1(%(x)s);" % locals()
def c_code_cache_version(self):
return (5,)
expm1 = Expm1(upgrade_to_float, name='expm1')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论