real function signum( x) real x if ( x > 0 ) { signum = 1. } else if ( x < 0 ) { signum = -1. } else { signum = 0. } return; end