Incorrect Example Result for apoc.math.sigmoid document

Hi,

I’d like to point out a possible typo in the documentation for apoc.math.sigmoid.

In the example provided:

RETURN 1 / (1 + exp(-1)) AS result;

The document states the result is:

0.2689414213699951

However, the correct result of this calculation is actually:

0.7310585786300049

It seems the documented result is for exp(1) instead of exp(-1).

Additionally, I believe the example would be clearer and more intuitive if it directly used the APOC function like this:

RETURN apoc.math.sigmoid(1) AS result;

Which would return:

0.7310585786300049

This makes it easier for readers to understand the function behavior.
Thank you :smiley:

@p.s3xyy
thank you for reporting. let me forward this discrepancy to our documentation and engineering groups

The example result in the apoc.math.sigmoid documentation is incorrect—it doesn’t match the actual output of the sigmoid formula. The correct result for apoc.math.sigmoid(0) should be 0.5.

@jackswills004
is there doc which includes apoc.math.sigmoid(0) ?

Per the initial problem description and apoc.math.sigmoid - APOC Core Documentation the example per the doc is

RETURN apoc.math.sigmoid(-1) AS result;