Global variable for rational number?
zteitler · Thu May 19, 2011 11:32 am
Hello,
I have a collection of rings (all with rational coefficients), for each of which I can compute a rational number; I would like to compute the minimum of the rational numbers over the list of rings. At the moment I can see two ways to do this: Either compute (and store) the rational number in each of my rings and use 'fetch' to bring them each into a single ring (the first one in the list) for comparison; or, instead of rational numbers, use an intvec of length 2 (numerator, denominator) and use custom routines for comparison (as, for positive integers, p/q > x/y if and only if p*y > x*q).
I would like to ask if there is a more direct or easier way to do this?
Incidentally, my list of rings is the list of charts in a resolution of singularities computed by the desing.lib package, and the rational number I'm computing is the log canonical threshold of the singularity. I hope to complete a package for computing multiplier ideals.
Thanks very much,
Zach Teitler
I have a collection of rings (all with rational coefficients), for each of which I can compute a rational number; I would like to compute the minimum of the rational numbers over the list of rings. At the moment I can see two ways to do this: Either compute (and store) the rational number in each of my rings and use 'fetch' to bring them each into a single ring (the first one in the list) for comparison; or, instead of rational numbers, use an intvec of length 2 (numerator, denominator) and use custom routines for comparison (as, for positive integers, p/q > x/y if and only if p*y > x*q).
I would like to ask if there is a more direct or easier way to do this?
Incidentally, my list of rings is the list of charts in a resolution of singularities computed by the desing.lib package, and the rational number I'm computing is the log canonical threshold of the singularity. I hope to complete a package for computing multiplier ideals.
Thanks very much,
Zach Teitler