Ask Your Question
0

How do I nest functions?

asked 14 years ago

Mike gravatar image

updated 14 years ago

The following code

EllipticCurve([0,1]).reduction(5).cardinality()

returns an error, while the code

e = EllipticCurve([0,1]).reduction(5)
e.cardinality()

works fine. Is there a way to do this on one line? (Note: I don't particularly care about this with elliptic curves, I'd just like to be able to do things like this in one line. In other words, I'm not looking for a mathematical answer. Also, I'm asking for something different than, say, this

e = EllipticCurve([0,1]).reduction(5); e.cardinality()

.)

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 14 years ago

Shashank gravatar image

Actually it works. Can you post the error?

sage: EllipticCurve([0,1]).reduction(5).cardinality()
6
Preview: (hide)
link

Comments

I was spelling cardinality wrong in sage...

Mike gravatar imageMike ( 14 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 14 years ago

Seen: 487 times

Last updated: Jan 25 '11