public function signed()
    {

        if ($this->q == 1) {
            return sprintf("%+d", $this->p);
        }
        return sprintf("%+d/%d", $this->p, $this->q);

    }
public function signed()
    {

        if ($this->q == 1) {
            return sprintf("%+d", $this->p);
        }
        return sprintf("%+d/%d", $this->p, $this->q);

    }
public function signed ( ) { if ( $ this -> q == 1 ) { return sprintf ( "%+d" , $ this -> p ) ; } return sprintf ( "%+d/%d" , $ this -> p , $ this -> q ) ; }
convert rational number to string, adding a '+' if the number is positive

@retval string
convert rational number to string adding a + if the number is positive