FractalPark
Root finding

newtonCos

d0079630-8ed3-5379-9e37-52cb7f0f7379

Teaching overview

In FRM-like/1, newtonCos initializes z from pixel. The loop computes denom = sin(z)+(1,0), keeps z when its squared size is below 1e-10, and otherwise assigns z + (cos(z)-z)/denom. The pinned julia profile uses 96 iterations.

Source walkthrough

  1. frm-v1:9d5148d6443b6dd4f5f0015e415b8642a324fb222f5a7769e1d7765e432bd1bc:init/0

    Initialization: init/0 sets z from pixel.

  2. frm-v1:9d5148d6443b6dd4f5f0015e415b8642a324fb222f5a7769e1d7765e432bd1bc:loop/0

    Iteration: loop/0 defines denom = sin(z)+(1,0).

  3. frm-v1:9d5148d6443b6dd4f5f0015e415b8642a324fb222f5a7769e1d7765e432bd1bc:loop/1

    Branch: loop/1 keeps z when denom has squared size below 1e-10; otherwise it assigns z + (cos(z)-z)/denom.

  4. frm-v1:9d5148d6443b6dd4f5f0015e415b8642a324fb222f5a7769e1d7765e432bd1bc:bailout

    Termination: bailout tests |z - zPrev| >= 0.000001.

Syntax features

sequence

The cited annotations connect z = pixel, denom = sin(z)+(1,0), and the change-based bailout.

branch

The cited branch keeps z for a squared denom size below 1e-10; otherwise it applies z + (cos(z)-z)/denom.

Parameter experiment

Steps

  1. Use the pinned julia profile with all controls fixed. Run 48 iterations and then 96 iterations, and record whether the sin(z)+(1,0) denominator guard or the cosine update changes the observed iteration counts.

What to observe

The larger cap may expose additional guarded or unguarded cosine updates; record whether the iteration counts differ.

Exercise

State the two outcomes of the sin(z)+(1,0) denominator-size guard.

Completion check

Your response names all 4 annotations and gives both keeping z and z + (cos(z)-z)/denom.

Sources and rights

This teaching unit is grounded in the pinned runtime source revision.

rightsStatus is project-owned; implementationBasis is project-owned; publicationDecision is publish; decisionReason is publish-project-owned-native-recipe. This does not make a broader claim about any third-party original.

Formula Record

newtonCos

This canonical FractalPark implementation is published and runnable.

Deterministic preview of newtonCos

Canonical source

Language
frm-like/1
Standard library
1
Profile mode
parameter-plane
Profile center
-0.5, 0
Profile zoom
0.4
Profile iterations
96
Profile evidence
mechanical

Parameters

No declared parameters

Canonical source

This verified canonical revision is read-only. Remix creates a separate editable fork.

Loading canonical source…

Source and implementation

Formula ID
d0079630-8ed3-5379-9e37-52cb7f0f7379
Canonical name
newtonCos
Original name
newtonCos
Historical source
FractalPark
Current implementation
Project-owned

This is a FractalPark project-owned implementation. The linked file is the pinned canonical Definition.

Rights or attribution concern?

Send the Formula ID and supporting evidence. The maintainer can hold or withdraw the implementation while the claim is reviewed. contact@fractalpark.com