question: public static double quantile ( double x , double location , double shape ) { return ( x <= .5 ) ? ( x == .5 ) ? location : ( x == 0. ) ? Double . NEGATIVE_INFINITY : location - shape / Math . tan ( Math . PI * x ) : ( x == 1. ) ? Double . POSITIVE_INFINITY : location + shape / Math . tan ( Math . PI * ( 1 - x ) ) ; }
target:  PDF function, static version.