Ask Your Question
0

How do I nest functions?

asked 2011-01-25 23:05:37 +0100

Mike gravatar image

updated 2011-01-25 23:09:05 +0100

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()

.)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-01-25 23:15:44 +0100

Shashank gravatar image

Actually it works. Can you post the error?

sage: EllipticCurve([0,1]).reduction(5).cardinality()
6
edit flag offensive delete link more

Comments

I was spelling cardinality wrong in sage...

Mike gravatar imageMike ( 2011-01-26 11:25:56 +0100 )edit

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: 2011-01-25 23:05:37 +0100

Seen: 464 times

Last updated: Jan 25 '11