Platform
Resources
Pricing
Sign in
Get started
Ashwin Reddy
Robot Learning Enthusiast
Workspace
Fork
Published
By
Ashwin Reddy
Edited
Jul 12, 2018
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function
findZero
(
f
,
x0
,
epsilon
=
0.001
,
)
{
let
x
=
x0
;
let
deriv
=
(
x
)
=>
(
f
(
x
+
epsilon
)
-
f
(
x
)
)
/
(
epsilon
)
while
(
Math
.
abs
(
f
(
x
)
)
>=
epsilon
)
x
-=
f
(
x0
)
/
deriv
(
x0
)
;
return
x
;
}
Insert cell
findZero
(
(
x
)
=>
-
(
x
-
3
)
*
(
x
-
2
)
*
(
x
-
3
)
,
1
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
findZero
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML