r8_sigmoid_test <- function ( ) #*****************************************************************************80 # ## r8_sigmoid_test() tests r8_sigmoid(). # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 12 September 2026 # # Author: # # John Burkardt # { source ( "/home/john/public_html/r_src/r8lib/r8_sigmoid.R" ) cat ( '\n' ) cat ( 'r8_sigmoid_test():\n' ) cat ( ' r8_sigmoid() evaluates the sigmoid function of R8.\n' ) cat ( '\n' ) cat ( ' X R8_SIGMOID(L,B,M,X)\n' ) cat ( '\n' ) x_test = c ( -4.0, -2.0, -1.0, -0.5, -0.25, 0.0, 0.25, 0.50, 1.0, 2.0, 4.0 ) l = 1.0 b = 0.0 m = 1.0 for ( i in 1 : 11 ) { x = x_test[i] value = r8_sigmoid ( l, b, m, x ) cat ( ' ', x, ' ', value, '\n' ) } }