bridge/class-master/depend/pari/src/modules/elldata.c
/* Take an integer and convert it to base 26 */
Take an integer and convert it to base 26
Take an integer and convert it to base 26
static GEN
ellrecode(long x)
{
  GEN str;
  char *s;
  long d = 0, n = x;
  do { d++; n /= 26; } while (n);
  str = cgetg(nchar2nlong(d+1)+1, t_STR);
  s = GSTR(str); s[d] = 0;
  n = x;
  do { s[--d] = n%26 + 'a'; n /= 26; } while (n);
  return str;
}
static GEN ellrecode ( long x ) { GEN str ; char * s ; long d = 0 , n = x ; do { d ++ ; n /= 26 ; } while ( n ) ; str = cgetg ( nchar2nlong ( d + 1 ) + 1 , t_STR ) ; s = GSTR ( str ) ; s [ d ] = 0 ; n = x ; do { s [ -- d ] = n % 26 + ' ' ; n /= 26 ; } while ( n ) ; return str ; }
Take an integer and convert it to base 26
Take an integer and convert it to base 26