Group Abstract Group Abstract

Message Boards Message Boards

Why doesn't FixedPointList[ ] work when starting with integer?

Posted 3 years ago
POSTED BY: Zhenyu Zeng
10 Replies

FixedPoint is a procedural rather than mathematical function. This is quite clear from the documentation by the way, so that should have been the first place to check. As for the mathematical way to determine the exact value, Solve can be used for that.

POSTED BY: Daniel Lichtblau
Posted 3 years ago

I still don't know what is the difference between them.

POSTED BY: Zhenyu Zeng
Posted 3 years ago
POSTED BY: Eric Rimbey
Posted 3 years ago

Thanks for your reply. I know now. Have a nice day!

POSTED BY: Zhenyu Zeng
Posted 3 years ago

Eric, that is a very good explanation.

One could wish that the WL documentation had more of this nuts and bolts approach.

POSTED BY: Hans Milton
Posted 3 years ago

Hi Zhenyu

When you provide exact numerical input WL evaluates exact output. Compare

NestList[(# + 2/#)/2 &, 1, 6]

and

NestList[(# + 2/#)/2 &, 1., 6]

The first one will never terminate.

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hi Rohit,

May you tell me what's the WL evaluates

And may you tell me why the first wouldn't terminate?

POSTED BY: Zhenyu Zeng
POSTED BY: Daniel Lichtblau
Posted 3 years ago

But why the second will reach a fixed point?

POSTED BY: Zhenyu Zeng

Check the documentation for SameQ, in particular the first item under Details and Options.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard