[sage-devel] presentation about Maxima at Sage developer days
Subject: [sage-devel] presentation about Maxima at Sage developer days
From: Marshall Hampton
Date: Wed, 18 Jun 2008 14:02:28 -0600
You could get the python code even shorter if you really wanted to, but I
think it is most readable in the original version:
def compare(a, b, x):
c = limitinf(log(a)/log(b), x)
return '=' if c == 0 else ('>' if c in [oo, -oo] else '=')
Well, you can make the Python code above shorter too:
>
> def compare(a, b, x):
> c = limitinf(log(a)/log(b), x)
> if c == 0: return "<"
> elif c in [oo, -oo]: return ">"
> else: return "="
>