(sigmoidal(contrast,QuantumScale*midpoint,(double)i/MaxMap)
-(u0+u1)/2.0)/(u1-u0+MagickEpsilon)+0.5) ));
#else
- /* Scaled sigmoidal formula...
- (1/(1+exp(a*(b-u))) - 1/(1+exp(a))) /
- (1/(1+exp(a*(b-1)))/(1+exp(a)))) */
+ /* Scaled sigmoidal formula:
+ * (1/(1+exp(a*(b-u))) - 1/(1+exp(a*b)))
+ * / (1/(1+exp(a*(b-1))) - 1/(1+exp(a*b)))
+ * + 0.5
+ *
+ * Nicolas strongly suspects that the +0.5 in the code is at the
+ * wrong paren nesting (does not match the previous one).
+ */
sigmoidal_map[i]=(MagickRealType) ScaleMapToQuantum((MagickRealType)
(MaxMap*((1.0/(1.0+exp(contrast*(midpoint/(double) QuantumRange-
(double) i/MaxMap))))-(1.0/(1.0+exp(contrast*(midpoint/