Skip to content

Commit

Permalink
Changed documentationBundle to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
OAGr committed Oct 15, 2024
1 parent 349c291 commit 4a8d25a
Show file tree
Hide file tree
Showing 6 changed files with 3,263 additions and 23 deletions.
16 changes: 7 additions & 9 deletions packages/ai/files/squiggleDocs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# Squiggle Documentation, One Page

This file is auto-generated from the documentation files in the Squiggle repository. It includes our Peggy Grammar. It is meant to be given to an LLM. It is not meant to be read by humans.

---

Write Squiggle code, using the attached documentation for how it works.

Squiggle is a very simple language. Don't try using language primitives/constructs you don't see below, or that aren't in our documentation. They are likely to fail.
Expand Down Expand Up @@ -1287,32 +1281,36 @@ Creates a [normal distribution](https://en.wikipedia.org/wiki/Normal_distributio

<Tabs items={["normal(5,1)", "normal(1B, 1B)"]}>
<Tab>

```squiggle
normalMean = 10
normalStdDev = 2
logOfLognormal = log(lognormal(normalMean, normalStdDev))
[logOfLognormal, normal(normalMean, normalStdDev)]
````
```

</details>

## To

```squiggle
(5thPercentile: number) to (95thPercentile: number)
to(5thPercentile: number, 95thPercentile: number)
````
```

The `to` function is an easy way to generate lognormal distributions using predicted _5th_ and _95th_ percentiles. It's the same as `lognormal({p5, p95})`, but easier to write and read.

<Tabs items={["5 to 10", "to(5, 10)", "1 to 10000"]}>
<Tab>

```squiggle
hours_the_project_will_take = 5 to 20
chance_of_doing_anything = 0.8
mx(hours_the_project_will_take, 0, [chance_of_doing_anything, 1 - chance_of_doing_anything])
````
```

</details>

<details>
Expand Down
Loading

0 comments on commit 4a8d25a

Please sign in to comment.