From ddfa9dbec4cd134fe2de1e7a6bff03fafde15f3a Mon Sep 17 00:00:00 2001 From: mcDandy Date: Thu, 14 Aug 2025 20:39:32 +0200 Subject: [PATCH] Forgot sigmoid function in float node --- src/more_math/Parser/FloatEvalVisitor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/more_math/Parser/FloatEvalVisitor.py b/src/more_math/Parser/FloatEvalVisitor.py index e3b8429..77c690b 100644 --- a/src/more_math/Parser/FloatEvalVisitor.py +++ b/src/more_math/Parser/FloatEvalVisitor.py @@ -103,6 +103,7 @@ class FloatEvalVisitor(MathExprVisitor): def visitExpFunc(self, ctx): return math.exp(self.visit(ctx.expr())) def visitNormFunc(self, ctx): return math.sqrt(math.avg(x**2 for x in self.visit(ctx.expr()))) def visitFloorFunc(self, ctx): return math.floor(self.visit(ctx.expr())) + def visitSigmoidFunc(self, ctx): return 1/(1+math.exp(-self.visit(ctx.expr()))) def visitCeilFunc(self, ctx): return math.ceil(self.visit(ctx.expr())) def visitRoundFunc(self, ctx): return math.round(self.visit(ctx.expr())) def visitGammaFunc(self, ctx): return math.gamma(self.visit(ctx.expr())).exp()