diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7e80300 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.re linguist-language=Reason +*.rei linguist-language=Reason diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..097b5a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,61 @@ +.DS_Store +/node_modules* + +.merlin +.install +/lib/bs/ +/lib/js/ +/lib/ocaml/ +*.log +.bsb.lock +_esy +*.install +*.bs.js + +# Editor +/.idea/ + +_build +_opam + +scripts/*.js + +drafts/.git +drafts/.github +drafts/examples +drafts/scripts +drafts/coverage +drafts/assets +drafts/package-lock.json +drafts/yarn.lock +drafts/yarn-error.log +drafts/pnpm-lock.yaml +drafts/.npmignore +drafts/.gitattributes +drafts/.gitignore +drafts/.editorconfig +drafts/.node-version +drafts/.prettierignore +drafts/bsconfig.json +drafts/CONTRIBUTING.md +drafts/vite.config.js +drafts/lerna.json +drafts/.vscode +drafts/jest.config.js +drafts/babel.config.js +drafts/tsconfig.json +drafts/.screenrc +drafts/.changeset +drafts/.yarn +drafts/.circleci +drafts/.ci +drafts/azure-pipelines.yml +drafts/CODEOWNERS +drafts/CODE_OF_CONDUCT.md +drafts/Makefile +drafts/.bsb.lock +drafts/index.html +drafts/postcss.config.js +drafts/tailwind.config.js +drafts/tasks.json +drafts/circle.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b8e18c7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,46 @@ +# Contributing + +Thanks for your interest! Below we describe reason-react development setup for the project. + +```sh +git clone https://github.com/davesnx/bindings.git +cd bindings +``` + +## Installation + +To set up a development environment using [opam](https://opam.ocaml.org/), run `make init` to set up an opam [local switch](https://opam.ocaml.org/blog/opam-local-switches/) and download the required dependencies. + +## Developing + +```sh +make dev ## Build in watch mode +``` + +Running `make help` you can see the common commands to interact with the project: + +```sh + build-prod Build for production (--profile=prod) + build Build the project, including non installable libraries and executables + clean Clean artifacts + create-switch Create a local opam switch + dev Build in watch mode + format-check Checks if format is correct + format Format the codebase with ocamlformat + help Print this help message + init Create a local opam switch, install deps + install Update the package dependencies when new deps are added to dune-project + test-promote Updates snapshots and promotes it to correct + test-watch Run the unit tests in watch mode + test Run the unit tests +``` + +## Submitting a Pull Request + +When you are almost ready to open a PR, it's a good idea to run the test suite locally to make sure everything works: + +```sh +make test +``` + +If that all passes, then congratulations! You are well on your way to becoming a contributor 🎉 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0419516 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 David Sancho + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4502f3f --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +DUNE = opam exec -- dune + +.PHONY: help +help: ## Print this help message + @echo "List of available make commands"; + @echo ""; + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'; + @echo ""; + +.PHONY: build +build: ## Build the project, including non installable libraries and executables + @$(DUNE) build @@default + +.PHONY: build-prod +build-prod: ## Build for production (--profile=prod) + @$(DUNE) build --profile=prod @@default + +.PHONY: dev +dev: ## Build in watch mode + @$(DUNE) build -w @@default + +.PHONY: clean +clean: ## Clean artifacts + @$(DUNE) clean + +.PHONY: format +format: ## Format the codebase with ocamlformat + @$(DUNE) build @fmt --auto-promote + +.PHONY: format-check +format-check: ## Checks if format is correct + @$(DUNE) build @fmt + +.PHONY: install +install: ## Update the package dependencies when new deps are added to dune-project + @opam install . --deps-only --with-test + @npm install + +.PHONY: init +create-switch: ## Create a local opam switch + @opam switch create . 5.1.0 --no-install + +.PHONY: init +init: create-switch install ## Create a local opam switch, install deps diff --git a/README.md b/README.md new file mode 100644 index 0000000..0551f1d --- /dev/null +++ b/README.md @@ -0,0 +1,119 @@ +# bindings +Melange bindings repository for popular JavaScript libraries + +- **Learn**: if it's the first time you bind, having a bunch of examples in one place, helps. If it's the 99th time you do, having a cheatsheet is also good. +- **Use them by owning them**: The usage of this repository is to copy/paster into you project. This way you own the bindings and you can change them if you need. +- **To collaborate and unify efforts**: most bindings become outdated, abandoned or unmaintained. Having a central place to collaborate and unify efforts is a good way to avoid this, and when newer versions of Melange get released we can update all the bindings at once. + +## What are bindings +Bindings in Melange is the method to communicate with JavaScript and have some garanties on the type-checker. In other languages this is called FFI (Foreign Function Interface). + +The other direction, calling Reason from JavaScript is explained here: https://melange.re/v2.0.0/communicate-with-javascript/#use-melange-code-from-javascript + +```js +// file.js +export const add = (a, b) => a + b +``` + +Given a lovely `file.js`, the way to call the `add` function from Reason is to bind to it, by telling the compiler that each time you call `add` (in Reason files) it should be called with two integers and it will return an integer. + +In this particular case, the proper binding should be: + +![Binding explained with arrows](./binding-explained.png) + +## Particularities of bindings + +### 1) Bindings can be unsafe +If you lie (by having a mistake on the binding) to the compiler, this can cause a runtime crash. + +### 2) Bindings are creative and subjective +There are very different approaches on how to bind a library. In simple cases, there's no room for creativity, but in more complex cases there are many ways to do it. This can vary from the level of safety, the "cost" of the binding or even the external API you want to provide. + +### 3) Require knowledge about runtime representation +In order to bind a library, you need to know how Melange represents runtime data. This is not a big deal, but it's something to keep in mind. All information about runtime representation is available in the docs: https://melange.re/v2.0.0/communicate-with-javascript/#data-types-and-runtime-representation + +### 4) Some dynamic JavaScript patterns aren't possible to bind (but workarounds are possible) +Some patterns from JavaScript aren't possible to represent in the type-checker. A silly example would be: + +The following code is not possible to bind 1 to 1: + +```js +export const add = (a, b) => a + b +add.one = (a) => add(a, 1) +``` +You can't have a function and a property that is also a function in the same value in Reason. The workaround is often to bind differently than the original API. + +In this case, you could have: + + ```reason +[@mel.module "./file.js"] external add: (int, int) => int = "add" +[@mel.module "./file.js"] [@mel.scope "add"] external addOne: int => int = "one" +``` + +### 5) The cost of the binding (runtime overhead vs zero-cost) + +zero-cost bindings means to not have any runtime overhead. This is often preferred, but there are also cases where a small overhead is acceptable. For example, if you want to provide a more idiomatic API to Reason, you can have a small overhead by using a library. + +This is a source of dicussion on other communities and we don't have a strong opinion on this. We think that both approaches are valid and we should have both approaches in the bindings repo. + +In case of having the duality, it's a good idea to expose both approaches in the same package. For example: + +```bash +/packeges/lodash_zero +/packeges/lodash_safe +``` + +Read the full https://melange.re/v2.0.0/communicate-with-javascript + +## How it works + +Copy and paste into your apps, own the bindings, change them if you need and contribute back the changes. + +### What's the structure + +```bash +├── packages/ # stable bindings, build in CI and compiles with latest melange +└── drafts/ # the unstable bindings, not build in CI, neither compiles with latest melange, can contain ReScript code, JSX2 code, etc. +``` + +If a package needs testing, documentation or any additional piece is probably a good idea to promote it as a separate repo under melange-community. + +Inside each package we could specify different kinds of bindings depending on the safety level, the "cost" or even the library version. For example: + +```bash +$ ls -d packages/lodash* +/packages/lodash_safe +/packages/lodash_zero +/packages/lodash_v2 +``` + +### How to contribute + +1. Fork the repo +2. Create a new branch +3. Add your bindings +4. Create a PR + +## Tools to generate bindings + +There has been a bunch of attemps at automatic generate bindings. Mostly 1) from TypeScript definitions, 2) from JavaScript code. + +### From JavaScript + +- https://github.com/jchavarri/rebind Automated generation of Reason/BuckleScript bindings from JavaScript code +- https://github.com/emnh/js-to-reasonml-transpiler JavaScript to ReasonML transpiler for small code examples +- https://github.com/chenglou/jeason crappy js-to-reason converter +- https://github.com/jaredly/rejs JavaScript to Reason transpiler + +### From TypeScript + +- https://github.com/ocsigen/ts2ocaml Generate OCaml bindings from TypeScript definitions via the TypeScript compiler API +- https://github.com/jsiebern/re-typescript An opinionated attempt at finally solving typescript interop for ReasonML / OCaml +- https://github.com/andrewray/DefinitelyMaybeTyped TypeScript to js_of_ocaml +- https://github.com/rrdelaney/ReasonablyTyped Converts Flow and TypeScript definitions to Reason interfaces +- https://github.com/Diullei/ts2reason Automatic generation of ReasonML bindings using TypeScript definitions +- https://github.com/joshaber/ts2re Convert TypeScript type declarations to Reason + +### Using LLM + +ChatGPT has been reported as being very helpful as starting point, but we haven't explored it yet. diff --git a/binding-explained.png b/binding-explained.png new file mode 100644 index 0000000..5365c21 Binary files /dev/null and b/binding-explained.png differ diff --git a/bindings.opam b/bindings.opam new file mode 100644 index 0000000..a943c11 --- /dev/null +++ b/bindings.opam @@ -0,0 +1,28 @@ +opam-version: "2.0" +license: "MIT" +homepage: "https://github.com/davesnx/bindings" +bug-reports: "https://github.com/davesnx/bindings/issues" +depends: [ + "dune" {>= "3.9"} + "ocaml" {>= "5.1.0"} + "melange" {>= "2.0.0"} + "reason" {>= "3.10.0"} + "ocaml-lsp-server" {with-test} + "ocamlformat" {= "0.26.0" & with-dev-setup} + "odoc" {with-doc} +] +build: [ + ["dune" "subst"] {dev} + [ + "dune" + "build" + "-p" + name + "-j" + jobs + "@install" + "@runtest" {with-test} + "@doc" {with-doc} + ] +] +dev-repo: "git+https://github.com/davesnx/bindings.git" diff --git a/drafts/bs-Zarith/ChangeLog.md b/drafts/bs-Zarith/ChangeLog.md new file mode 100644 index 0000000..3da1146 --- /dev/null +++ b/drafts/bs-Zarith/ChangeLog.md @@ -0,0 +1,31 @@ +# Revision history for bs-zarith + +## 3.2.0 -- 2022-12-01 +* Drop print functions so it builds with the latest Rescript. These were likely seldomed used. + +## 3.1.0 -- 2020-10-25 + +* Drop support for Nativeint. It is not supported by bs-platform 8.3.0 and above. + +## 3.0.0 -- 2020-06-12 + +* New module Bigfloat. Experimental status. +* New module Natural. + +## 2.0.0 -- 2020-06-04 + +* Support unsigned integers. + +## 1.1.0 -- 2020-02-20 + +* Fix Bigint multiplication bug. + +## 1.0.1 -- 2018-04-23 + +* Add warnings "+A-44" to bsconfig.json. + +## 1.0.0 -- 2018-06-21 + +* Add Bigint module for arbitrary length integers. +* Add Z module for combining the operators of all integer types (int, Int32.t, Nativeint.t, Int64.t and Bigint.t). +* Add Q module for rational integers. diff --git a/drafts/bs-Zarith/README.md b/drafts/bs-Zarith/README.md new file mode 100644 index 0000000..9ab80a2 --- /dev/null +++ b/drafts/bs-Zarith/README.md @@ -0,0 +1,30 @@ +# bs-zarith + +The API is stable, but there is not a lot of testing. Use with caution. + +## Bigint + +```OCaml +let x = Bigint.of_string "1000000000000000000000000000000000000000" in +let y = Bigint.of_int 1 in +let z = Bigint.(y + x) in +Js.log(Bigint.to_string(z)); +``` + +## Z + +``` +let x = Z.Int64.of_string "230000232323322323" in +let y = Z.Int64.of_int 3 in +let z = Z.Int64.(x - y) in +Js.log(Z.Int64.to_string(z)); +``` + +## Q + +``` +let x = Q.Int.of_string "1/2" in +let y = Q.Int.make (Z.Int.one) (Z.Int.of_int 2) +let z = Q.Int.sub x y +Js.log(Q.Int.to_string(z)); +``` diff --git a/drafts/bs-Zarith/__tests__/bs_Bigfloat_test.ml b/drafts/bs-Zarith/__tests__/bs_Bigfloat_test.ml new file mode 100644 index 0000000..90c252d --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Bigfloat_test.ml @@ -0,0 +1,405 @@ +open Jest +open Expect + +module B = Bigfloat +let mk = B.mkBigfloat + +let _ = + describe "Bigfloat.add" + (fun () -> + test "1 + 1" + (fun _ -> + (expect (B.add (mk Bigint.one 0) (mk Bigint.one 0))) |> + (toEqual (mk (Bigint.of_int 2) 0))); + test "1.0 + 1.0" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 10) 1) (mk (Bigint.of_int 10) 1))) + |> (toEqual (mk (Bigint.of_int 20) 1))); + test "1.00 + 1" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 100) 2) (mk (Bigint.of_int 1) 0))) + |> (toEqual (mk (Bigint.of_int 200) 2))); + test "0.10 + 1.00" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 10) 2) (mk (Bigint.of_int 100) 2))) + |> (toEqual (mk (Bigint.of_int 110) 2))); + test "1.23 + 0.0354" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 123) 2) (mk (Bigint.of_int 354) 4))) + |> (toEqual (mk (Bigint.of_int 12654) 4))); + test + "1.000000 + 1.00000000" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 1000000) 6) + (mk (Bigint.of_int 100000000) 8))) + |> (toEqual (mk (Bigint.of_int 200000000) 8))); + test "1.500000 + 3.54" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 1500000) 6) + (mk (Bigint.of_int 354) 2))) + |> (toEqual (mk (Bigint.of_int 5040000) 6))); + test + "1.000000 + 9.0000000000" + (fun _ -> + (expect + (B.add (mk (Bigint.of_int 10000000) 6) + (mk (Bigint.of_int64 90000000000L) 10))) + |> (toEqual (mk (Bigint.of_int64 190000000000L) 10)))) +let _ = + describe "Bigfloat.sub" + (fun () -> + test "1 - 1" + (fun _ -> + (expect (B.sub (mk Bigint.one 0) (mk Bigint.one 0))) |> + (toEqual (mk Bigint.zero 0))); + test "2 - 1" + (fun _ -> + (expect (B.sub (mk (Bigint.of_int 2) 0) (mk Bigint.one 0))) |> + (toEqual (mk Bigint.one 0))); + test "10.0 - 5" + (fun _ -> + (expect + (B.sub (mk (Bigint.of_int 100) 1) (mk (Bigint.of_int 5) 0))) + |> (toEqual (mk (Bigint.of_int 50) 1))); + test "20.00 - 5.0" + (fun _ -> + (expect + (B.sub (mk (Bigint.of_int 2000) 2) (mk (Bigint.of_int 50) 1))) + |> (toEqual (mk (Bigint.of_int 1500) 2))); + test "20.00 - 0.5" + (fun _ -> + (expect + (B.sub (mk (Bigint.of_int 2000) 2) (mk (Bigint.of_int 5) 1))) + |> (toEqual (mk (Bigint.of_int 1950) 2)))) +let _ = + describe "Bigfloat.mul" + (fun () -> + test "1 * 1" + (fun _ -> + (expect (B.mul (mk Bigint.one 0) (mk Bigint.one 0))) |> + (toEqual (mk Bigint.one 0))); + test "2 * 1" + (fun _ -> + (expect (B.mul (mk (Bigint.of_int 2) 0) (mk Bigint.one 0))) |> + (toEqual (mk (Bigint.of_int 2) 0))); + test "2 * 1.00" + (fun _ -> + (expect + (B.mul (mk (Bigint.of_int 2) 0) (mk (Bigint.of_int 100) 2))) + |> (toEqual (mk (Bigint.of_int 200) 2))); + test "5.00 * 2.00" + (fun _ -> + (expect + (B.mul (mk (Bigint.of_int 500) 2) (mk (Bigint.of_int 100) 2))) + |> (toEqual (mk (Bigint.of_int 50000) 4))); + test "1.200 * 2.00" + (fun _ -> + (expect + (B.mul (mk (Bigint.of_int 1200) 3) (mk (Bigint.of_int 200) 2))) + |> (toEqual (mk (Bigint.of_int 240000) 5))); + test "31.123 * 0.02" + (fun _ -> + (expect + (B.mul (mk (Bigint.of_int 31123) 3) (mk (Bigint.of_int 2) 2))) + |> (toEqual (mk (Bigint.of_int 62246) 5)))) +let _ = + describe + "Bigfloat.firstNonZero" + (fun () -> + test "0" + (fun _ -> (expect (Bigint.firstNonZero Bigint.zero)) |> (toEqual None)); + test "1" + (fun _ -> + (expect (Bigint.firstNonZero Bigint.one)) |> + (toEqual (Some 0))); + test "10" + (fun _ -> + (expect (Bigint.firstNonZero (Bigint.of_int 10))) |> + (toEqual (Some 1))); + test "200" + (fun _ -> + (expect (Bigint.firstNonZero (Bigint.of_int 200))) |> + (toEqual (Some 2))); + test "90210" + (fun _ -> + (expect (Bigint.firstNonZero (Bigint.of_int 90210))) |> + (toEqual (Some 1))); + test "90000" + (fun _ -> + (expect (Bigint.firstNonZero (Bigint.of_int 90000))) |> + (toEqual (Some 4)))) +let _ = + describe + "Bigfloat.adjustDecimalPos" + (fun () -> + test "0, 0" + (fun _ -> + (expect (B.adjustDecimalPos (mk Bigint.one 0) (mk Bigint.one 0))) + |> (toEqual ((mk Bigint.one 0), (mk Bigint.one 0)))); + test "12.34, 5.6" + (fun _ -> + (expect + (B.adjustDecimalPos (mk (Bigint.of_int 1234) 2) + (mk (Bigint.of_int 56) 1))) + |> + (toEqual + ((mk (Bigint.of_int 1234) 2), (mk (Bigint.of_int 560) 2)))); + test "59.787800, 5" + (fun _ -> + (expect + (B.adjustDecimalPos (mk (Bigint.of_int64 59787800L) 6) + (mk (Bigint.of_int 5) 0))) + |> + (toEqual + ((mk (Bigint.of_int64 59787800L) 6), + (mk (Bigint.of_int 5000000) 6))))) +let _ = + describe "Bigfloat.div" + (fun () -> + test "1 / 1" + (fun _ -> + (expect (B.div (mk Bigint.one 0) (mk Bigint.one 0))) |> + (toEqual (mk Bigint.one 0))); + test "2 / 1" + (fun _ -> + (expect (B.div (mk (Bigint.of_int 2) 0) (mk Bigint.one 0))) |> + (toEqual (mk (Bigint.of_int 2) 0))); + test "4 / 2" + (fun _ -> + (expect (B.div (mk (Bigint.of_int 4) 0) (mk (Bigint.of_int 2) 0))) + |> (toEqual (mk (Bigint.of_int 2) 0))); + test "10 / 3" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int 10) 0) (mk (Bigint.of_int 3) 0))) + |> (toEqual (mk (Bigint.of_int 3) 0))); + test "1 / 0.5" + (fun _ -> + (expect (B.div (mk (Bigint.of_int 1) 0) (mk (Bigint.of_int 5) 1))) + |> (toEqual (mk (Bigint.of_int 20) 1))); + test "10.0 / 0.5" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int 100) 1) (mk (Bigint.of_int 5) 1))) + |> (toEqual (mk (Bigint.of_int 200) 1))); + test "20.0 / 0.02" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int 200) 1) (mk (Bigint.of_int 2) 2))) + |> (toEqual (mk (Bigint.of_int 100000) 2))); + test "100.0 / 0.03" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int 1000) 1) (mk (Bigint.of_int 3) 2))) + |> (toEqual (mk (Bigint.of_int 333300) 2))); + test + "43.001234 / 7.00000000" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int 43001234) 6) + (mk (Bigint.of_int 700000000) 8))) + |> (toEqual (mk (Bigint.of_int 600000000) 8))); + test + "99.000000 / 2.0000000000" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int64 99000000L) 6) + (mk + (Bigint.of_string + "20000000000") + 10))) + |> + (toEqual + (mk + (Bigint.of_string + "490000000000") + 10))); + test + "99.0 / 2.0000000000" + (fun _ -> + (expect + (B.div (mk (Bigint.of_int64 990L) 1) + (mk + (Bigint.of_string + "20000000000") + 10))) + |> + (toEqual + (mk + (Bigint.of_string + "490000000000") + 10)))) +let _ = + describe "Bigfloat.ofString" + (fun () -> + test "'0'" + (fun _ -> + (expect (B.ofString "0" 0)) |> + (toEqual + ((Some ((mk Bigint.zero 0)))))); + test "'1'" + (fun _ -> + (expect (B.ofString "1" 1)) |> + (toEqual + ((Some ((mk (Bigint.of_int 10) 1)))))); + test "'1.0'" + (fun _ -> + (expect (B.ofString "1.0" 1)) |> + (toEqual + ((Some ((mk (Bigint.of_int 10) 1)))))); + test "'1.01'" + (fun _ -> + (expect (B.ofString "1.01" 2)) |> + (toEqual + ((Some ((mk (Bigint.of_int 101) 2)))))); + test "'1.023'" + (fun _ -> + (expect (B.ofString "1.023" 3)) + |> + (toEqual + ((Some ((mk (Bigint.of_int 1023) 3)))))); + test "'123.456789'" + (fun _ -> + (expect + (B.ofString "123.456789" + 6)) + |> + (toEqual + ((Some ((mk (Bigint.of_int 123456789) 6))) + ))); + test "'0.0089'" + (fun _ -> + (expect + (B.ofString "00.0089" 4)) + |> + (toEqual + ((Some ((mk (Bigint.of_int 89) 4)))))); + test "'984'" + (fun _ -> + (expect (B.ofString "984" 6)) |> + (toEqual + ((Some ((mk (Bigint.of_int 984000000) 6)))))); + test "'3,267'" + (fun _ -> + (expect (B.ofString "3,267" 6)) + |> + (toEqual + ((Some ((mk (Bigint.of_int64 3267000000L) 6)))))); + test "'3,267.1'" + (fun _ -> + (expect + (B.ofString "3,267.1" 6)) + |> + (toEqual + ((Some ((mk (Bigint.of_int64 3267100000L) 6))))))) +let _ = + describe "Bigfloat.toString" + (fun () -> + test "0" + (fun _ -> + (expect (B.toString (mk Bigint.zero 0))) |> + (toEqual "0")); + test "0.0" + (fun _ -> + (expect (B.toString (mk Bigint.zero 1))) |> + (toEqual "0.0")); + test "1.0205" + (fun _ -> + (expect (B.toString (mk (Bigint.of_int 10205) 4))) |> + (toEqual "1.0205")); + test "1.000000" + (fun _ -> + (expect (B.toString (mk (Bigint.of_int 1000000) 6))) |> + (toEqual "1.000000")); + test "67.004020" + (fun _ -> + (expect (B.toString (mk (Bigint.of_int 67004020) 6))) |> + (toEqual "67.004020"))) +let _ = + describe + "Bigfloat.toStringWithCommas" + (fun () -> + test "0" + (fun _ -> + (expect (B.toStringWithCommas (mk Bigint.zero 0))) |> + (toEqual "0")); + test "1.000000" + (fun _ -> + (expect (B.toStringWithCommas (mk (Bigint.of_int 1000000) 6))) |> + (toEqual "1.000000")); + test "67.004020" + (fun _ -> + (expect (B.toStringWithCommas (mk (Bigint.of_int 67004020) 6))) + |> (toEqual "67.004020")); + test "1,267.004020" + (fun _ -> + (expect (B.toStringWithCommas (mk (Bigint.of_int 1267004020) 6))) + |> + (toEqual "1,267.004020")); + test "45,657,923.004020" + (fun _ -> + (expect + (B.toStringWithCommas + (mk + (Bigint.of_string + "45657923004020") 6))) + |> + (toEqual + "45,657,923.004020"))) +let _ = + describe "Bigfloat.compare" + (fun () -> + test "compare(0,1)" + (fun _ -> + (expect (B.compare (mk Bigint.zero 0) (mk Bigint.one 0))) |> + (toEqual (-1))); + test "compare(1,0)" + (fun _ -> + (expect (B.compare (mk Bigint.one 0) (mk Bigint.zero 0))) |> + (toEqual 1)); + test "compare(0,0)" + (fun _ -> + (expect (B.compare (mk Bigint.zero 0) (mk Bigint.zero 0))) |> + (toEqual 0)); + test "compare(1.0,0)" + (fun _ -> + (expect (B.compare (mk (Bigint.of_int 10) 1) (mk Bigint.zero 0))) + |> (toEqual 1)); + test + "compare(1.02,2.03)" + (fun _ -> + (expect + (B.compare (mk (Bigint.of_int 102) 2) + (mk (Bigint.of_int 203) 2))) + |> (toEqual (-1))); + test "compare(1.02,0.2)" + (fun _ -> + (expect + (B.compare (mk (Bigint.of_int 102) 1) (mk (Bigint.of_int 2) 1))) + |> (toEqual 1)); + test + "compare(1.01,1.010)" + (fun _ -> + (expect + (B.compare (mk (Bigint.of_int 101) 2) + (mk (Bigint.of_int 1010) 3))) + |> (toEqual 0)); + test + "compare(9.234,10.000)" + (fun _ -> + (expect + (B.compare (mk (Bigint.of_int 9234) 3) + (mk (Bigint.of_int 10000) 3))) + |> (toEqual (-1))); + test "compare(10,9.234)" + (fun _ -> + (expect + (B.compare (mk (Bigint.of_int 10) 0) + (mk (Bigint.of_int 9234) 3))) + |> (toEqual 1))) diff --git a/drafts/bs-Zarith/__tests__/bs_Bigint_test.ml b/drafts/bs-Zarith/__tests__/bs_Bigint_test.ml new file mode 100644 index 0000000..b90738f --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Bigint_test.ml @@ -0,0 +1,536 @@ +open Jest +open Expect + +let () = + +describe "Bigint" (fun () -> + test "zero equal to (Bigint.of_int 0)" (fun () -> + expect @@ Bigint.zero |> toEqual (Bigint.of_int 0)); + + test "one equal to (Bigint.of_int 1)" (fun () -> + expect @@ Bigint.one |> toEqual (Bigint.of_int 1)); + + test "minus_one equal to (Bigint.of_int (-1))" (fun () -> + expect @@ Bigint.minus_one |> toEqual (Bigint.of_int (-1))); + + test "zero equal to (Bigint.of_int 0)" (fun () -> + expect @@ Bigint.zero |> toEqual (Bigint.of_string "0")); + + test "one equal to (Bigint.of_int 1)" (fun () -> + expect @@ Bigint.one |> toEqual (Bigint.of_string "1")); + + test "minus_one equal to (Bigint.of_int (-1))" (fun () -> + expect @@ Bigint.minus_one |> toEqual (Bigint.of_string "-1")); + + test "2 + 1 = 3" (fun () -> + expect @@ (Bigint.add (Bigint.of_int 1) (Bigint.of_int 2)) |> toEqual (Bigint.of_int 3)); + + test "(-2) + (-1) = (-3)" (fun () -> + expect @@ Bigint.(Bigint.add (of_int (-1)) (of_int (-2))) |> toEqual (Bigint.of_int (-3))); + + test "0 + 0 = 0" (fun () -> + expect @@ Bigint.(Bigint.add zero zero) |> toEqual Bigint.zero); + + test "-3 + 3 = 0" (fun () -> + expect @@ Bigint.(Bigint.add (of_int (-3)) (of_int 3)) |> toEqual (Bigint.of_int 0)); + + test "of_string: 2 + 1 = 3" (fun () -> + expect @@ Bigint.(Bigint.add (of_string "1") (of_string "2")) |> toEqual (Bigint.of_int 3)); + + test "addition with numbers larger than int64 can hold" (fun () -> + let x = Bigint.of_string "1000000000000000000000000000000" in + let y = Bigint.of_string "1000000000000000000000000000000" in + let z = Bigint.add x y in + + expect @@ z |> toEqual (Bigint.of_string "2000000000000000000000000000000")); + + test "addition with numbers larger than int64 can hold" (fun () -> + let x = Bigint.of_string "1000000000000000000000000000000000000000" in + let y = Bigint.of_int 1 in + let z = (Bigint.add y x) in + expect @@ z |> toEqual (Bigint.of_string "1000000000000000000000000000000000000001")); + + test "zero to string" (fun () -> + expect @@ Bigint.to_string(Bigint.zero) |> toEqual "0"); + + test "one to string" (fun () -> + expect @@ Bigint.to_string(Bigint.one) |> toEqual "1"); + + test "minus_one to string" (fun () -> + expect @@ Bigint.to_string(Bigint.minus_one) |> toEqual "-1"); + + test "big to string" (fun () -> + expect @@ Bigint.to_string(Bigint.of_string "32389176649991293809043094891992939836566132213") |> toEqual "32389176649991293809043094891992939836566132213")); + + test "pow" (fun () -> + expect @@ Bigint.(pow (of_int 2) 0) |> toEqual (Bigint.of_int 1)); + + test "pow" (fun () -> + expect @@ Bigint.(pow (of_int 2) 1) |> toEqual (Bigint.of_int 2)); + + test "pow" (fun () -> + expect @@ Bigint.(pow (of_int 2) 2) |> toEqual (Bigint.of_int 4)); + + test "pow" (fun () -> + expect @@ Bigint.(pow (of_int 4) 4) |> toEqual (Bigint.of_int 256)); + + (* test that multiplications are handled correctly *) + test "1 * 1 = 1" (fun () -> + expect @@ Bigint.(mul one one) |> toEqual (Bigint.of_int 1)); + + test "1 * 0 = 0" (fun () -> + expect @@ Bigint.(mul one zero) |> toEqual Bigint.zero); + + test "0 * 0 = 0" (fun () -> + expect @@ Bigint.(mul zero zero) |> toEqual Bigint.zero); + + test "-1 * 1 = -1" (fun () -> + expect @@ Bigint.(mul (of_int (-1)) one) |> toEqual (Bigint.of_int (-1))); + + test "20 * 2 = 40" (fun () -> + expect @@ Bigint.(mul (of_int 20) (of_int 2)) |> toEqual (Bigint.of_int 40)); + + test "20 * -1 = -20" (fun () -> + expect @@ Bigint.(mul (of_int 20) (of_int (-1))) |> toEqual (Bigint.of_int (-20))); + + (* test that div handles signs correctly *) + test "div" (fun () -> + expect @@ Bigint.(div (of_int 6) (of_int 3)) |> toEqual (Bigint.of_int 2)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int (-6)) (of_int 3)) |> toEqual (Bigint.of_int (-2))); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 6) (of_int (-3))) |> toEqual (Bigint.of_int (-2))); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int (-6)) (of_int (-3))) |> toEqual (Bigint.of_int 2)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 7) (of_int 3)) |> toEqual (Bigint.of_int 2)); + + test "2 - 1 = 1" (fun () -> + expect @@ Bigint.(Bigint.sub (of_int 2) (of_int 1)) |> toEqual (Bigint.of_int 1)); + + test "10 - 7 = 3" (fun () -> + expect @@ Bigint.(Bigint.sub (of_int 10) (of_int 7)) |> toEqual (Bigint.of_int 3)); + + test "7 - 10 = -3" (fun () -> + expect @@ Bigint.(Bigint.sub (of_int 7) (of_int 10)) |> toEqual (Bigint.of_int (-3))); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int 4) (of_int 25)) |> toEqual (Bigint.of_int 4)); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_string "18446744073709551617") (of_string "18446744073709551616")) |> toEqual (Bigint.of_int 1)); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int 26) (of_int 25)) |> toEqual (Bigint.of_int 1)); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int 25) (of_int 25)) |> toEqual (Bigint.of_int 0)); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int 7) (of_int 3)) |> toEqual (Bigint.of_int 1)); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int 7) (of_int (-3))) |> toEqual (Bigint.of_int 1)); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int (-7)) (of_int 3)) |> toEqual (Bigint.of_int (-1))); + + test "rem" (fun () -> + expect @@ Bigint.(rem (of_int (-7)) (of_int (-3))) |> toEqual (Bigint.of_int (-1))); + + test "rem proof" (fun () -> + let a = Bigint.of_int (-7) in + let b = Bigint.of_int (-3) in + let c = Bigint.(Bigint.(+) (Bigint.mul b (div a b)) (rem a b)) in + expect @@ a |> toEqual c); + + test "rem proof" (fun () -> + let a = Bigint.of_int (21) in + let b = Bigint.of_int (4) in + let c = Bigint.(Bigint.(+) (Bigint.mul b (div a b)) (rem a b)) in + expect @@ a |> toEqual c); + + test "rem proof" (fun () -> + let a = Bigint.of_int (-21) in + let b = Bigint.of_int (4) in + let c = Bigint.(Bigint.(+) (Bigint.mul b (div a b)) (rem a b)) in + expect @@ a |> toEqual c); + + test "div_rem 7 3" (fun () -> + expect @@ Bigint.(div_rem (of_int 7) (of_int 3)) |> toEqual (Bigint.(of_int 2, of_int 1))); + + test "div_rem 7 (-3)" (fun () -> + expect @@ Bigint.(div_rem (of_int 7) (of_int (-3))) |> toEqual (Bigint.(of_int (-2), of_int 1))); + + test "div_rem (-7) 3" (fun () -> + expect @@ Bigint.(div_rem (of_int (-7)) (of_int 3)) |> toEqual (Bigint.(of_int (-2), of_int (-1)))); + + test "div_rem (-7) (-3)" (fun () -> + expect @@ Bigint.(div_rem (of_int (-7)) (of_int (-3))) |> toEqual (Bigint.(of_int 2, of_int (-1)))); + + test "div_rem 9 3" (fun () -> + expect @@ Bigint.(div_rem (of_int 9) (of_int 3)) |> toEqual (Bigint.(of_int 3, of_int 0))); + + test "div_rem 9 (-3)" (fun () -> + expect @@ Bigint.(div_rem (of_int 9) (of_int (-3))) |> toEqual (Bigint.(of_int (-3), of_int 0))); + + test "div_rem (-9) 3" (fun () -> + expect @@ Bigint.(div_rem (of_int (-9)) (of_int 3)) |> toEqual (Bigint.(of_int (-3), of_int 0))); + + test "div_rem (-9) (-3)" (fun () -> + expect @@ Bigint.(div_rem (of_int (-9)) (of_int (-3))) |> toEqual (Bigint.(of_int 3, of_int 0))); + + test "div_rem (1) (2)" (fun () -> + expect @@ Bigint.(div_rem (of_int (1)) (of_int (2))) |> toEqual (Bigint.(zero, of_int 1))); + + + test "ediv_rem 7 3" (fun () -> + expect @@ Bigint.(ediv_rem (of_int 7) (of_int 3)) |> toEqual (Bigint.(of_int 2, of_int 1))); + + test "ediv_rem 7 (-3)" (fun () -> + expect @@ Bigint.(ediv_rem (of_int 7) (of_int (-3))) |> toEqual (Bigint.(of_int (-2), of_int 1))); + + test "ediv_rem (-7) 3" (fun () -> + expect @@ Bigint.(ediv_rem (of_int (-7)) (of_int 3)) |> toEqual (Bigint.(of_int (-3), of_int 2))); + + test "ediv_rem (-7) (-3)" (fun () -> + expect @@ Bigint.(ediv_rem (of_int (-7)) (of_int (-3))) |> toEqual (Bigint.(of_int (-3), of_int 2))); + + test "ediv_rem (-8) 3" (fun () -> + expect @@ Bigint.(ediv_rem (of_int (-8)) (of_int 3)) |> toEqual (Bigint.(of_int (-3), of_int 1))); + + test "ediv_rem (-8) (-3)" (fun () -> + expect @@ Bigint.(ediv_rem (of_int (-8)) (of_int (-3))) |> toEqual (Bigint.(of_int (-3), of_int 1))); + + test "ediv_rem 9 3" (fun () -> + expect @@ Bigint.(ediv_rem (of_int 9) (of_int 3)) |> toEqual (Bigint.(of_int 3, of_int 0 ))); + + test "ediv_rem 9 (-3)" (fun () -> + expect @@ Bigint.(ediv_rem (of_int 9) (of_int (-3))) |> toEqual (Bigint.(of_int (-3), zero ))); + + test "ediv_rem (-9) 3" (fun () -> + expect @@ Bigint.(ediv_rem (of_int (-9)) (of_int 3)) |> toEqual (Bigint.(of_int (-3), of_int 0 ))); + + test "ediv_rem (-9) (-3)" (fun () -> + expect @@ Bigint.(ediv_rem (of_int (-9)) (of_int (-3))) |> toEqual (Bigint.(of_int (-3), zero ))); + + test "ediv_rem (1) (2)" (fun () -> + expect @@ Bigint.(ediv_rem (of_int 1) (of_int 2)) |> toEqual (Bigint.(zero, of_int 1 ))); + + test "is_even" (fun () -> + expect @@ Bigint.(is_even (of_int (8))) |> toEqual true); + + test "is_even" (fun () -> + expect @@ Bigint.(is_even (of_int (9))) |> toEqual false); + + test "is_even" (fun () -> + expect @@ Bigint.(is_even (of_string "839816238764918263491726983776763728736482736846")) |> toEqual true); + + test "is_even" (fun () -> + expect @@ Bigint.(is_even (of_string "98382938792846298734695872639470987109877098703")) |> toEqual false); + + test "is_odd" (fun () -> + expect @@ Bigint.(is_odd (of_string "839816238764918263491726983776763728736482736846")) |> toEqual false); + + test "is_odd" (fun () -> + expect @@ Bigint.(is_odd (of_string "98382938792846298734695872639470987109877098703")) |> toEqual true); + + + test "sign" (fun () -> + expect @@ Bigint.(sign (of_string "98382938792846298734695872639470987109877098703")) |> toEqual 1); + + test "sign" (fun () -> + expect @@ Bigint.(sign (of_string "0")) |> toEqual 0); + + test "sign" (fun () -> + expect @@ Bigint.(sign (of_string "-2839849727247283728372837287378723")) |> toEqual (-1)); + +(* comparisons *) + + test "2 = 3" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int 2) (of_int 3) ) |> toEqual false); + + test "2 = 2" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int 2) (of_int 2) ) |> toEqual true); + + test "0 = 0" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int 0) (of_int 0) ) |> toEqual true); + + test "0 = 0" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int 0) (of_int 0) ) |> toEqual true); + + test "0 = 0" (fun () -> + expect @@ Bigint.(Bigint.(=) zero (of_int 0) ) |> toEqual true); + + test "0 = 0" (fun () -> + expect @@ Bigint.(Bigint.(=) zero (of_string "0") ) |> toEqual true); + + test "0 = 0" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int 0) (of_string "0") ) |> toEqual true); + + test "-1 = -1" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int (-1)) (of_int (-1)) ) |> toEqual true); + + test "-1 = 1" (fun () -> + expect @@ Bigint.(Bigint.(=) (of_int (-1)) (of_int 1) ) |> toEqual false); + + + test "2 <= 3" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int 2) (of_int 3) ) |> toEqual true); + + test "2 <= 3" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int 2) (of_int 3) ) |> toEqual true); + + test "3 <= 3" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int 3) (of_int 3) ) |> toEqual true); + + test "0 <= 0" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int 0) (of_int 0) ) |> toEqual true); + + test "-1 <= 0" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int (-1)) (of_int 0) ) |> toEqual true); + + test "-3 <= -2" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int (-3)) (of_int (-2)) ) |> toEqual true); + + test "1 <= 0" (fun () -> + expect @@ Bigint.(Bigint.(<=) (of_int 1) (of_int 0) ) |> toEqual false); + + test "2 < 3" (fun () -> + expect @@ Bigint.(Bigint.(<) (of_int 2) (of_int 3) ) |> toEqual true); + + test "3 < 3" (fun () -> + expect @@ Bigint.(Bigint.(<) (of_int 3) (of_int 3) ) |> toEqual false); + + test "-1 < 0" (fun () -> + expect @@ Bigint.(Bigint.(<) (of_int (-1)) (of_int 0) ) |> toEqual true); + + test "-3 < -2" (fun () -> + expect @@ Bigint.(Bigint.(<) (of_int (-3)) (of_int (-2)) ) |> toEqual true); + + test "1 < 0" (fun () -> + expect @@ Bigint.(Bigint.(<) (of_int 1) (of_int 0) ) |> toEqual false); + + + test "2 >= 3" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int 2) (of_int 3) ) |> toEqual false); + + test "3 >= 3" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int 3) (of_int 3) ) |> toEqual true); + + test "-1 >= 0" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int (-1)) (of_int 0) ) |> toEqual false); + + test "-3 >= -2" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int (-3)) (of_int (-2)) ) |> toEqual false); + + test "1 >= 0" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int 1) (of_int 0) ) |> toEqual true); + + test "3 >= 2" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int 3) (of_int 2) ) |> toEqual true); + + test "3 >= -2" (fun () -> + expect @@ Bigint.(Bigint.(>=) (of_int 3) (of_int (-2)) ) |> toEqual true); + + + test "2 > 3" (fun () -> + expect @@ Bigint.(Bigint.(>) (of_int 2) (of_int 3) ) |> toEqual false); + + test "3 > 3" (fun () -> + expect @@ Bigint.(Bigint.(>) (of_int 3) (of_int 3) ) |> toEqual false); + + test "-1 > 0" (fun () -> + expect @@ Bigint.(Bigint.(>) (of_int (-1)) (of_int 0) ) |> toEqual false); + + test "-3 > -2" (fun () -> + expect @@ Bigint.(Bigint.(>) (of_int (-3)) (of_int (-2)) ) |> toEqual false); + + test "1 > 0" (fun () -> + expect @@ Bigint.(Bigint.(>) (of_int 1) (of_int 0) ) |> toEqual true); + + test "2 > 3" (fun () -> + expect @@ Bigint.(Bigint.(>) (of_int 2) (of_int 3) ) |> toEqual false); + + test "3 > 2" (fun () -> + expect @@ (Bigint.(>) (Bigint.of_int 3) (Bigint.of_int 2) ) |> toEqual true); + + test "3 > -2" (fun () -> + expect @@ (Bigint.(>) (Bigint.of_int 3) (Bigint.of_int (-2))) |> toEqual true); + + test "to_int max_int" (fun () -> + expect @@ Bigint.(to_int (of_int max_int)) |> toEqual max_int); + + test "to_int min_int" (fun () -> + expect @@ Bigint.(to_int (of_int min_int)) |> toEqual min_int); + + test "to_int greater than max_int should throw Overflow" (fun () -> + expect @@ (fun () -> Bigint.(to_int (of_string "21474836478"))) |> toThrowException Bigint.Overflow ); + + test "to_int smaller than min_int should throw Overflow" (fun () -> + expect @@ (fun () -> Bigint.(to_int (of_string "-21474836478"))) |> toThrowException Bigint.Overflow ); + + test "to_int32 max_int" (fun () -> + expect @@ Bigint.(to_int32 (of_int32 Int32.max_int)) |> toEqual Int32.max_int); + + test "to_int32 min_int" (fun () -> + expect @@ Bigint.(to_int32 (of_int32 Int32.min_int)) |> toEqual Int32.min_int); + + test "to_int32 greater than max_int should throw Overflow" (fun () -> + expect @@ (fun () -> Bigint.(to_int32 (of_string "21474836478"))) |> toThrowException Bigint.Overflow ); + + test "to_int32 smaller than min_int should throw Overflow" (fun () -> + expect @@ (fun () -> Bigint.(to_int32 (of_string "-21474836478"))) |> toThrowException Bigint.Overflow ); + + + test "to_int64 max_int" (fun () -> + expect @@ Bigint.(to_int64 (of_int64 Int64.max_int)) |> toEqual Int64.max_int); + + test "to_int64 min_int" (fun () -> + expect @@ Bigint.(to_int64 (of_int64 Int64.min_int)) |> toEqual Int64.min_int); + + test "to_int64 greater than max_int should throw Overflow" (fun () -> + expect @@ (fun () -> Bigint.(to_int64 (of_string "9223372036854775808"))) |> toThrowException Bigint.Overflow ); + + test "to_float" (fun () -> + expect @@ Bigint.(to_float (of_string "9007199254740992")) |> toEqual (9007199254740993.0)); + + test "3 <> 2" (fun () -> + expect @@ ((Bigint.of_int 3) <> (Bigint.of_int 2)) |> toEqual true); + + test "2 <> 2" (fun () -> + expect @@ ((Bigint.of_int 2) <> (Bigint.of_int 2)) |> toEqual false); + + test "0 <> 1" (fun () -> + expect @@ ((Bigint.of_int 0) <> (Bigint.of_int 1)) |> toEqual true); + + test "gcd 2 12" (fun () -> + expect @@ Bigint.(gcd (of_int 2) (of_int 12)) |> toEqual (Bigint.of_int 2)); + + test "gcd 12 20" (fun () -> + expect @@ Bigint.(gcd (of_int 12) (of_int 20)) |> toEqual (Bigint.of_int 4)); + + test "gcd 36 60" (fun () -> + expect @@ Bigint.(gcd (of_int 36) (of_int 60)) |> toEqual (Bigint.of_int 12)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 198) (of_int 163)) |> toEqual (Bigint.of_int 130)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 3) (of_int 7)) |> toEqual (Bigint.of_int 3)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 5) (of_int 3)) |> toEqual (Bigint.of_int 1)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 3) (of_int 2)) |> toEqual (Bigint.of_int 2)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 6) (of_int 11)) |> toEqual (Bigint.of_int 2)); +(* + * broken with negative numbers + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 1) (of_int (-1))) |> toEqual (Bigint.of_int 1)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int (-1)) (of_int 1)) |> toEqual (Bigint.of_int 1)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int (-1)) (of_int (-1))) |> toEqual (Bigint.of_int (-1))); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 1) (of_int (-2))) |> toEqual (Bigint.of_int 0)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int 1) (of_int (-2))) |> toEqual (Bigint.of_int 0)); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int (-3)) (of_int (-7))) |> toEqual (Bigint.of_int (-7))); + + test "logand" (fun () -> + expect @@ Bigint.(logand (of_int (-3)) (of_int 7)) |> toEqual (Bigint.of_int (5))); + *) + + test "logor" (fun () -> + expect @@ Bigint.(logor (of_int 6) (of_int 3)) |> toEqual (Bigint.of_int 7)); + + (* + * broken with negative numbers + test "logor" (fun () -> + expect @@ Bigint.(logor (of_int 1) (of_int (-2))) |> toEqual (Bigint.of_int (-1))); + + test "logor" (fun () -> + expect @@ Bigint.(logor (of_int 1) (of_int (-1))) |> toEqual (Bigint.of_int (-1))); + *) + test "logor" (fun () -> + expect @@ Bigint.(logor (of_int 1) (of_int (0))) |> toEqual (Bigint.of_int 1)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 1) (of_int 2)) |> toEqual (Bigint.zero)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 2) (of_int 2)) |> toEqual (Bigint.one)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 3) (of_int 2)) |> toEqual (Bigint.one)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 4) (of_int 2)) |> toEqual (Bigint.of_int 2)); + + test "div" (fun () -> + expect @@ Bigint.(div (of_int 9) (of_int 2)) |> toEqual (Bigint.of_int 4)); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int (-1))) |> toEqual 1); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int 1)) |> toEqual 1); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits zero) |> toEqual 0); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int 6)) |> toEqual 3); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int 5)) |> toEqual 3); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int 8)) |> toEqual 4); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int 16)) |> toEqual 5); + + test "numbits" (fun () -> + expect @@ Bigint.(numbits (of_int (-8))) |> toEqual 4); + + test "cdiv" (fun () -> + expect @@ Bigint.(cdiv (of_int 9) (of_int 2)) |> toEqual (Bigint.of_int 5)); + + test "cdiv" (fun () -> + expect @@ Bigint.(cdiv (of_int (-9)) (of_int 2)) |> toEqual (Bigint.of_int (-4))); + + test "cdiv" (fun () -> + expect @@ Bigint.(cdiv (of_int (-3)) (of_int 2)) |> toEqual (Bigint.of_int (-1))); + + test "cdiv" (fun () -> + expect @@ Bigint.(cdiv (of_int (100)) (of_int 40)) |> toEqual (Bigint.of_int 3)); + + test "fdiv" (fun () -> + expect @@ Bigint.(fdiv (of_int 9) (of_int 2)) |> toEqual (Bigint.of_int 4)); + + test "fdiv" (fun () -> + expect @@ Bigint.(fdiv (of_int (-9)) (of_int 2)) |> toEqual (Bigint.of_int (-5))); + + test "div" (fun () -> + expect @@ Bigint.(fdiv (of_int (-3)) (of_int 2)) |> toEqual (Bigint.of_int (-2))); + + test "div" (fun () -> + expect @@ Bigint.(fdiv (of_int (100)) (of_int 40)) |> toEqual (Bigint.of_int 2)); + + test "pow" (fun () -> + expect @@ Bigint.(pow (of_int 2) 2) |> toEqual (Bigint.of_int 4)) diff --git a/drafts/bs-Zarith/__tests__/bs_Natural_test.ml b/drafts/bs-Zarith/__tests__/bs_Natural_test.ml new file mode 100644 index 0000000..c9001ad --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Natural_test.ml @@ -0,0 +1,43 @@ +open Jest +open Expect + +let () = + +describe "Natural" (fun () -> + test "zero equal to (Natural.ofInt 0)" (fun () -> + expect @@ Some Natural.zero |> toEqual (Natural.ofInt 0)); + + test "one equal to (Natural.ofInt 1)" (fun () -> + expect @@ Some Natural.one |> toEqual (Natural.ofInt 1)); + + test "zero equal to (Natural.ofInt 0)" (fun () -> + expect @@ Natural.zero |> toEqual (Natural.unsafeOfString "0")); + + test "ofInt on a negative number should throw an error" (fun () -> + expect @@ Natural.ofInt (-1) |> toEqual None); + + test "ofInt64 on a negative number should throw an error" (fun () -> + expect @@ Natural.ofInt64 (-1L) |> toEqual None); + + test "ofString on a negative number should throw an error" (fun () -> + expect @@ Natural.ofString ("-100") |> toEqual None); + + test "unsafeOfInt on a negative number should throw an error" (fun () -> + expect @@ (fun () -> Natural.(unsafeOfInt (-1))) |> toThrowException Natural.Underflow ); + + test "one equal to (Natural.ofInt 1)" (fun () -> + expect @@ Natural.one |> toEqual (Natural.unsafeOfString "1")); + + test "2 + 1 = 3" (fun () -> + expect @@ (Natural.add (Natural.unsafeOfInt 1) (Natural.unsafeOfInt 2)) |> toEqual (Natural.unsafeOfInt 3)); + + test "0 + 0 = 0" (fun () -> + expect @@ Natural.(Natural.add zero zero) |> toEqual Natural.zero); + + test "unsafeOfString: 2 + 1 = 3" (fun () -> + expect @@ Natural.(Natural.add (unsafeOfString "1") (unsafeOfString "2")) |> toEqual (Natural.unsafeOfInt 3)); + + test "div" (fun () -> + expect @@ Natural.(fdiv (unsafeOfInt (100)) (unsafeOfInt 40)) |> toEqual (Natural.unsafeOfInt 2)); + + ) diff --git a/drafts/bs-Zarith/__tests__/bs_Q_Bigint_test.ml b/drafts/bs-Zarith/__tests__/bs_Q_Bigint_test.ml new file mode 100644 index 0000000..159547c --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Q_Bigint_test.ml @@ -0,0 +1,23 @@ +open Jest +open Expect + +let () = + +describe "Q.Bigint" (fun () -> + test "1/2 - 1/4 is 1/2" (fun () -> + expect @@ Q.Bigint.(sub (make (Z.Bigint.one) (Z.Bigint.of_int 2)) (make (Z.Bigint.of_int 1) (Z.Bigint.of_int 4)) ) |> toEqual (Q.Bigint.(make (Z.Bigint.of_int 1) (Z.Bigint.of_int 4)))); + + test "1/8 + (-1/8) is 0" (fun () -> + expect @@ Q.Bigint.(add (of_string "1/8") (of_string "-1/8")) |> toEqual Q.Bigint.zero)); + + test "1/8 + 14/16 is 1" (fun () -> + expect @@ Q.Bigint.(add (of_string "1/8") (of_string "14/16")) |> toEqual Q.Bigint.one); + + test "3 * 1/2 is 3/2" (fun () -> + expect @@ Q.Bigint.(mul (of_string "3/1") (of_string "1/2")) |> toEqual Q.Bigint.(of_string "3/2")); + + test "2/3 / 3/4 is 8/9" (fun () -> + expect @@ Q.Bigint.(div (of_string "2/3") (of_string "3/4")) |> toEqual Q.Bigint.(of_string "8/9")); + + test "zero equal to (Bigint.of_int 0)" (fun () -> + expect @@ Q.Bigint.zero |> toEqual (Q.Bigint.zero)); diff --git a/drafts/bs-Zarith/__tests__/bs_Q_Int_test.ml b/drafts/bs-Zarith/__tests__/bs_Q_Int_test.ml new file mode 100644 index 0000000..f86b862 --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Q_Int_test.ml @@ -0,0 +1,10 @@ +open Jest +open Expect + +let () = + +describe "Q.Int" (fun () -> + test "1/2 - 1/4 is 1/2" (fun () -> + expect @@ Q.Int.(sub (make (Z.Int.one) (Z.Int.of_int 2)) (make (Z.Int.of_int 1) (Z.Int.of_int 4)) ) |> toEqual (Q.Int.(make (Z.Int.of_int 1) (Z.Int.of_int 4)))); + + ) diff --git a/drafts/bs-Zarith/__tests__/bs_U_test.ml b/drafts/bs-Zarith/__tests__/bs_U_test.ml new file mode 100644 index 0000000..c4bf3e3 --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_U_test.ml @@ -0,0 +1,79 @@ +open Jest +open Expect +open U + +let () = + +describe "U.UInt8" (fun () -> + test "zero is int 0" (fun () -> + expect @@ UInt8.zero |> toEqual (UInt8.ofInt 0)); + + test "0 + 1" (fun () -> + expect @@ UInt8.(add zero one) |> toEqual (UInt8.ofInt 1)); + + test "-1 is converted to 255" (fun () -> + expect @@ UInt8.(ofString "-1") |> toEqual (Some (UInt8.ofInt 255))); + + test "256 is converted to zero" (fun () -> + expect @@ UInt8.(ofString "256") |> toEqual (Some (UInt8.zero))); + + test "255 + 10 is 9" (fun () -> + expect @@ UInt8.(add (ofInt 255) (ofInt 10)) |> toEqual (UInt8.ofInt 9)); + ); + +describe "U.UInt16" (fun () -> + test "zero is int 0" (fun () -> + expect @@ UInt16.zero |> toEqual (UInt16.ofInt 0)); + + test "0 + 1" (fun () -> + expect @@ UInt16.(add zero one) |> toEqual (UInt16.ofInt 1)); + + test "-1 is converted to 65535" (fun () -> + expect @@ UInt16.(ofString "-1") |> toEqual (Some (UInt16.ofInt 65535))); + + test "65536 is converted to zero" (fun () -> + expect @@ UInt16.(ofString "65536") |> toEqual (Some (UInt16.zero))); + + test "65535 + 10 is 9" (fun () -> + expect @@ UInt16.(add (ofInt 65535) (ofInt 10)) |> toEqual (UInt16.ofInt 9)); + ); + +describe "U.UInt32" (fun () -> + test "zero is int 0" (fun () -> + expect @@ UInt32.zero |> toEqual (UInt32.ofInt 0)); + + test "0 + 1" (fun () -> + expect @@ UInt32.(add zero one) |> toEqual (UInt32.ofInt 1)); + + test "-1 is converted to 4294967295" (fun () -> + expect @@ UInt32.(ofString "-1") |> toEqual (Some (UInt32.maxInt))); + + test "4294967296 is converted to zero" (fun () -> + expect @@ UInt32.(ofString "4294967296") |> toEqual (Some (UInt32.zero))); + + ); + +describe "U.UInt64" (fun () -> + test "zero is int 0" (fun () -> + expect @@ UInt64.zero |> toEqual (UInt64.ofInt 0)); + + test "0 + 1" (fun () -> + expect @@ UInt64.(add zero one) |> toEqual (UInt64.ofInt 1)); + + test "-1 is converted to 18446744073709551616" (fun () -> + expect @@ UInt64.(ofString "-1") |> toEqual (Some (UInt64.maxInt))); + + test "-2 is converted to 18446744073709551615" (fun () -> + expect @@ UInt64.(ofString "-2") |> toEqual (Some (UInt64.(sub maxInt one)))); + + test "-18446744073709551617 is converted to 18446744073709551616" (fun () -> + expect @@ UInt64.(ofString "-18446744073709551617") |> toEqual (Some (UInt64.maxInt))); + + test "18446744073709551617 is converted to zero" (fun () -> + expect @@ UInt64.(ofString "18446744073709551617") |> toEqual (Some (UInt64.zero))); + + test "18446744073709551618 is converted to one" (fun () -> + expect @@ UInt64.(ofString "18446744073709551618") |> toEqual (Some (UInt64.one))); + + + ) diff --git a/drafts/bs-Zarith/__tests__/bs_Z_Int64_test.ml b/drafts/bs-Zarith/__tests__/bs_Z_Int64_test.ml new file mode 100644 index 0000000..6890252 --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Z_Int64_test.ml @@ -0,0 +1,14 @@ +open Jest +open Expect + +let () = + +describe "Z.Int64" (fun () -> + test "add" (fun () -> + let x = Z.Int64.of_string "230000232323322323" in + let y = Z.Int64.of_int 3 in + let z = Z.Int64.(sub x y) in + + expect @@ z |> toEqual (Z.Int64.of_string "230000232323322320")); + + ) diff --git a/drafts/bs-Zarith/__tests__/bs_Z_Int_test.ml b/drafts/bs-Zarith/__tests__/bs_Z_Int_test.ml new file mode 100644 index 0000000..901214c --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_Z_Int_test.ml @@ -0,0 +1,74 @@ +open Jest +open Expect + +let () = + +describe "Z.Int" (fun () -> + test "rem" (fun () -> + expect @@ Z.Int.(rem (of_int 7) (of_int 3)) |> toEqual (Z.Int.of_int 1)); + + test "rem" (fun () -> + expect @@ Z.Int.(rem (of_int 7) (of_int (-3))) |> toEqual (Z.Int.of_int 1)); + + test "rem" (fun () -> + expect @@ Z.Int.(rem (of_int (-7)) (of_int 3)) |> toEqual (Z.Int.of_int (-1))); + + test "rem" (fun () -> + expect @@ Z.Int.(rem (of_int (-7)) (of_int (-3))) |> toEqual (Z.Int.of_int (-1))); + + + test "ediv_rem 7 3" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int 7) (of_int 3)) |> toEqual (Z.Int.(of_int 2, of_int 1))); + + test "ediv_rem 7 (-3)" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int 7) (of_int (-3))) |> toEqual (Z.Int.(of_int (-2), of_int 1))); + + test "ediv_rem (-7) 3" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int (-7)) (of_int 3)) |> toEqual (Z.Int.(of_int (-3), of_int 2))); + + test "ediv_rem (-7) (-3)" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int (-7)) (of_int (-3))) |> toEqual (Z.Int.(of_int (-3), of_int 2))); + + test "ediv_rem (-8) 3" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int (-8)) (of_int 3)) |> toEqual (Z.Int.(of_int (-3), of_int 1))); + + test "ediv_rem (-8) (-3)" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int (-8)) (of_int (-3))) |> toEqual (Z.Int.(of_int (-3), of_int 1))); + + test "ediv_rem 9 3" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int 9) (of_int 3)) |> toEqual (Z.Int.(of_int 3, of_int 0 ))); + + test "ediv_rem 9 (-3)" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int 9) (of_int (-3))) |> toEqual (Z.Int.(of_int (-3), zero ))); + + test "ediv_rem (-9) 3" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int (-9)) (of_int 3)) |> toEqual (Z.Int.(of_int (-3), of_int 0 ))); + + test "ediv_rem (-9) (-3)" (fun () -> + expect @@ Z.Int.(ediv_rem (of_int (-9)) (of_int (-3))) |> toEqual (Z.Int.(of_int (-3), zero ))); + + + test "is_even" (fun () -> + expect @@ Z.Int.(is_even (of_int (8))) |> toEqual true); + + test "is_even" (fun () -> + expect @@ Z.Int.(is_even (of_int (9))) |> toEqual false); + + test "is_odd" (fun () -> + expect @@ Z.Int.(is_odd (of_int (8))) |> toEqual false); + + test "is_odd" (fun () -> + expect @@ Z.Int.(is_odd (of_int (9))) |> toEqual true); + + + test "gcd 2 12" (fun () -> + expect @@ Z.Int.(gcd (of_int 2) (of_int 12)) |> toEqual (Z.Int.of_int 2)); + + test "gcd 12 20" (fun () -> + expect @@ Z.Int.(gcd (of_int 12) (of_int 20)) |> toEqual (Z.Int.of_int 4)); + + test "gcd 36 60" (fun () -> + expect @@ Z.Int.(gcd (of_int 36) (of_int 60)) |> toEqual (Z.Int.of_int 12)); + + + ) diff --git a/drafts/bs-Zarith/__tests__/bs_zarith_test.ml b/drafts/bs-Zarith/__tests__/bs_zarith_test.ml new file mode 100644 index 0000000..5786e64 --- /dev/null +++ b/drafts/bs-Zarith/__tests__/bs_zarith_test.ml @@ -0,0 +1,9 @@ +open Jest +open Expect + +let () = + +describe "Int32" (fun () -> + test "Int32" (fun () -> + expect @@ Int32.of_int 1 |> toEqual (Int32.of_int 1)); +); diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Bigfloat_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Bigfloat_test.js new file mode 100644 index 0000000..bec267c --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Bigfloat_test.js @@ -0,0 +1,280 @@ +'use strict'; + +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); +var Bigint = require("../src/Bigint.js"); +var Bigfloat = require("../src/Bigfloat.js"); + +Jest.describe("Bigfloat.add", (function (param) { + Jest.test("1 + 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.one, 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("1.0 + 1.0", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(20), 1), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(10), 1), Bigfloat.mkBigfloat(Bigint.of_int(10), 1)))); + })); + Jest.test("1.00 + 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(200), 2), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(100), 2), Bigfloat.mkBigfloat(Bigint.of_int(1), 0)))); + })); + Jest.test("0.10 + 1.00", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(110), 2), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(10), 2), Bigfloat.mkBigfloat(Bigint.of_int(100), 2)))); + })); + Jest.test("1.23 + 0.0354", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(12654), 4), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(123), 2), Bigfloat.mkBigfloat(Bigint.of_int(354), 4)))); + })); + Jest.test("1.000000 + 1.00000000", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(200000000), 8), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(1000000), 6), Bigfloat.mkBigfloat(Bigint.of_int(100000000), 8)))); + })); + Jest.test("1.500000 + 3.54", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(5040000), 6), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(1500000), 6), Bigfloat.mkBigfloat(Bigint.of_int(354), 2)))); + })); + Jest.test("1.000000 + 9.0000000000", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int64([ + 44, + 1021438976 + ]), 10), Jest.Expect.expect(Bigfloat.add(Bigfloat.mkBigfloat(Bigint.of_int(10000000), 6), Bigfloat.mkBigfloat(Bigint.of_int64([ + 20, + 4100654080 + ]), 10)))); + })); + })); + +Jest.describe("Bigfloat.sub", (function (param) { + Jest.test("1 - 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.zero, 0), Jest.Expect.expect(Bigfloat.sub(Bigfloat.mkBigfloat(Bigint.one, 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("2 - 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.one, 0), Jest.Expect.expect(Bigfloat.sub(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("10.0 - 5", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(50), 1), Jest.Expect.expect(Bigfloat.sub(Bigfloat.mkBigfloat(Bigint.of_int(100), 1), Bigfloat.mkBigfloat(Bigint.of_int(5), 0)))); + })); + Jest.test("20.00 - 5.0", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(1500), 2), Jest.Expect.expect(Bigfloat.sub(Bigfloat.mkBigfloat(Bigint.of_int(2000), 2), Bigfloat.mkBigfloat(Bigint.of_int(50), 1)))); + })); + Jest.test("20.00 - 0.5", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(1950), 2), Jest.Expect.expect(Bigfloat.sub(Bigfloat.mkBigfloat(Bigint.of_int(2000), 2), Bigfloat.mkBigfloat(Bigint.of_int(5), 1)))); + })); + })); + +Jest.describe("Bigfloat.mul", (function (param) { + Jest.test("1 * 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.one, 0), Jest.Expect.expect(Bigfloat.mul(Bigfloat.mkBigfloat(Bigint.one, 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("2 * 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Jest.Expect.expect(Bigfloat.mul(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("2 * 1.00", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(200), 2), Jest.Expect.expect(Bigfloat.mul(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Bigfloat.mkBigfloat(Bigint.of_int(100), 2)))); + })); + Jest.test("5.00 * 2.00", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(50000), 4), Jest.Expect.expect(Bigfloat.mul(Bigfloat.mkBigfloat(Bigint.of_int(500), 2), Bigfloat.mkBigfloat(Bigint.of_int(100), 2)))); + })); + Jest.test("1.200 * 2.00", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(240000), 5), Jest.Expect.expect(Bigfloat.mul(Bigfloat.mkBigfloat(Bigint.of_int(1200), 3), Bigfloat.mkBigfloat(Bigint.of_int(200), 2)))); + })); + Jest.test("31.123 * 0.02", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(62246), 5), Jest.Expect.expect(Bigfloat.mul(Bigfloat.mkBigfloat(Bigint.of_int(31123), 3), Bigfloat.mkBigfloat(Bigint.of_int(2), 2)))); + })); + })); + +Jest.describe("Bigfloat.firstNonZero", (function (param) { + Jest.test("0", (function (param) { + return Jest.Expect.toEqual(undefined, Jest.Expect.expect(Bigint.firstNonZero(Bigint.zero))); + })); + Jest.test("1", (function (param) { + return Jest.Expect.toEqual(0, Jest.Expect.expect(Bigint.firstNonZero(Bigint.one))); + })); + Jest.test("10", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigint.firstNonZero(Bigint.of_int(10)))); + })); + Jest.test("200", (function (param) { + return Jest.Expect.toEqual(2, Jest.Expect.expect(Bigint.firstNonZero(Bigint.of_int(200)))); + })); + Jest.test("90210", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigint.firstNonZero(Bigint.of_int(90210)))); + })); + Jest.test("90000", (function (param) { + return Jest.Expect.toEqual(4, Jest.Expect.expect(Bigint.firstNonZero(Bigint.of_int(90000)))); + })); + })); + +Jest.describe("Bigfloat.adjustDecimalPos", (function (param) { + Jest.test("0, 0", (function (param) { + return Jest.Expect.toEqual([ + Bigfloat.mkBigfloat(Bigint.one, 0), + Bigfloat.mkBigfloat(Bigint.one, 0) + ], Jest.Expect.expect(Bigfloat.adjustDecimalPos(Bigfloat.mkBigfloat(Bigint.one, 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("12.34, 5.6", (function (param) { + return Jest.Expect.toEqual([ + Bigfloat.mkBigfloat(Bigint.of_int(1234), 2), + Bigfloat.mkBigfloat(Bigint.of_int(560), 2) + ], Jest.Expect.expect(Bigfloat.adjustDecimalPos(Bigfloat.mkBigfloat(Bigint.of_int(1234), 2), Bigfloat.mkBigfloat(Bigint.of_int(56), 1)))); + })); + Jest.test("59.787800, 5", (function (param) { + return Jest.Expect.toEqual([ + Bigfloat.mkBigfloat(Bigint.of_int64([ + 0, + 59787800 + ]), 6), + Bigfloat.mkBigfloat(Bigint.of_int(5000000), 6) + ], Jest.Expect.expect(Bigfloat.adjustDecimalPos(Bigfloat.mkBigfloat(Bigint.of_int64([ + 0, + 59787800 + ]), 6), Bigfloat.mkBigfloat(Bigint.of_int(5), 0)))); + })); + })); + +Jest.describe("Bigfloat.div", (function (param) { + Jest.test("1 / 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.one, 0), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.one, 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("2 / 1", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("4 / 2", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(2), 0), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(4), 0), Bigfloat.mkBigfloat(Bigint.of_int(2), 0)))); + })); + Jest.test("10 / 3", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(3), 0), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(10), 0), Bigfloat.mkBigfloat(Bigint.of_int(3), 0)))); + })); + Jest.test("1 / 0.5", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(20), 1), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(1), 0), Bigfloat.mkBigfloat(Bigint.of_int(5), 1)))); + })); + Jest.test("10.0 / 0.5", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(200), 1), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(100), 1), Bigfloat.mkBigfloat(Bigint.of_int(5), 1)))); + })); + Jest.test("20.0 / 0.02", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(100000), 2), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(200), 1), Bigfloat.mkBigfloat(Bigint.of_int(2), 2)))); + })); + Jest.test("100.0 / 0.03", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(333300), 2), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(1000), 1), Bigfloat.mkBigfloat(Bigint.of_int(3), 2)))); + })); + Jest.test("43.001234 / 7.00000000", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(600000000), 8), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int(43001234), 6), Bigfloat.mkBigfloat(Bigint.of_int(700000000), 8)))); + })); + Jest.test("99.000000 / 2.0000000000", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_string("490000000000"), 10), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int64([ + 0, + 99000000 + ]), 6), Bigfloat.mkBigfloat(Bigint.of_string("20000000000"), 10)))); + })); + Jest.test("99.0 / 2.0000000000", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_string("490000000000"), 10), Jest.Expect.expect(Bigfloat.div(Bigfloat.mkBigfloat(Bigint.of_int64([ + 0, + 990 + ]), 1), Bigfloat.mkBigfloat(Bigint.of_string("20000000000"), 10)))); + })); + })); + +Jest.describe("Bigfloat.ofString", (function (param) { + Jest.test("'0'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.zero, 0), Jest.Expect.expect(Bigfloat.ofString("0", 0))); + })); + Jest.test("'1'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(10), 1), Jest.Expect.expect(Bigfloat.ofString("1", 1))); + })); + Jest.test("'1.0'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(10), 1), Jest.Expect.expect(Bigfloat.ofString("1.0", 1))); + })); + Jest.test("'1.01'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(101), 2), Jest.Expect.expect(Bigfloat.ofString("1.01", 2))); + })); + Jest.test("'1.023'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(1023), 3), Jest.Expect.expect(Bigfloat.ofString("1.023", 3))); + })); + Jest.test("'123.456789'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(123456789), 6), Jest.Expect.expect(Bigfloat.ofString("123.456789", 6))); + })); + Jest.test("'0.0089'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(89), 4), Jest.Expect.expect(Bigfloat.ofString("00.0089", 4))); + })); + Jest.test("'984'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int(984000000), 6), Jest.Expect.expect(Bigfloat.ofString("984", 6))); + })); + Jest.test("'3,267'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int64([ + 0, + 3267000000 + ]), 6), Jest.Expect.expect(Bigfloat.ofString("3,267", 6))); + })); + Jest.test("'3,267.1'", (function (param) { + return Jest.Expect.toEqual(Bigfloat.mkBigfloat(Bigint.of_int64([ + 0, + 3267100000 + ]), 6), Jest.Expect.expect(Bigfloat.ofString("3,267.1", 6))); + })); + })); + +Jest.describe("Bigfloat.toString", (function (param) { + Jest.test("0", (function (param) { + return Jest.Expect.toEqual("0", Jest.Expect.expect(Bigfloat.toString(Bigfloat.mkBigfloat(Bigint.zero, 0)))); + })); + Jest.test("0.0", (function (param) { + return Jest.Expect.toEqual("0.0", Jest.Expect.expect(Bigfloat.toString(Bigfloat.mkBigfloat(Bigint.zero, 1)))); + })); + Jest.test("1.0205", (function (param) { + return Jest.Expect.toEqual("1.0205", Jest.Expect.expect(Bigfloat.toString(Bigfloat.mkBigfloat(Bigint.of_int(10205), 4)))); + })); + Jest.test("1.000000", (function (param) { + return Jest.Expect.toEqual("1.000000", Jest.Expect.expect(Bigfloat.toString(Bigfloat.mkBigfloat(Bigint.of_int(1000000), 6)))); + })); + Jest.test("67.004020", (function (param) { + return Jest.Expect.toEqual("67.004020", Jest.Expect.expect(Bigfloat.toString(Bigfloat.mkBigfloat(Bigint.of_int(67004020), 6)))); + })); + })); + +Jest.describe("Bigfloat.toStringWithCommas", (function (param) { + Jest.test("0", (function (param) { + return Jest.Expect.toEqual("0", Jest.Expect.expect(Bigfloat.toStringWithCommas(Bigfloat.mkBigfloat(Bigint.zero, 0)))); + })); + Jest.test("1.000000", (function (param) { + return Jest.Expect.toEqual("1.000000", Jest.Expect.expect(Bigfloat.toStringWithCommas(Bigfloat.mkBigfloat(Bigint.of_int(1000000), 6)))); + })); + Jest.test("67.004020", (function (param) { + return Jest.Expect.toEqual("67.004020", Jest.Expect.expect(Bigfloat.toStringWithCommas(Bigfloat.mkBigfloat(Bigint.of_int(67004020), 6)))); + })); + Jest.test("1,267.004020", (function (param) { + return Jest.Expect.toEqual("1,267.004020", Jest.Expect.expect(Bigfloat.toStringWithCommas(Bigfloat.mkBigfloat(Bigint.of_int(1267004020), 6)))); + })); + Jest.test("45,657,923.004020", (function (param) { + return Jest.Expect.toEqual("45,657,923.004020", Jest.Expect.expect(Bigfloat.toStringWithCommas(Bigfloat.mkBigfloat(Bigint.of_string("45657923004020"), 6)))); + })); + })); + +Jest.describe("Bigfloat.compare", (function (param) { + Jest.test("compare(0,1)", (function (param) { + return Jest.Expect.toEqual(-1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.zero, 0), Bigfloat.mkBigfloat(Bigint.one, 0)))); + })); + Jest.test("compare(1,0)", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.one, 0), Bigfloat.mkBigfloat(Bigint.zero, 0)))); + })); + Jest.test("compare(0,0)", (function (param) { + return Jest.Expect.toEqual(0, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.zero, 0), Bigfloat.mkBigfloat(Bigint.zero, 0)))); + })); + Jest.test("compare(1.0,0)", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.of_int(10), 1), Bigfloat.mkBigfloat(Bigint.zero, 0)))); + })); + Jest.test("compare(1.02,2.03)", (function (param) { + return Jest.Expect.toEqual(-1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.of_int(102), 2), Bigfloat.mkBigfloat(Bigint.of_int(203), 2)))); + })); + Jest.test("compare(1.02,0.2)", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.of_int(102), 1), Bigfloat.mkBigfloat(Bigint.of_int(2), 1)))); + })); + Jest.test("compare(1.01,1.010)", (function (param) { + return Jest.Expect.toEqual(0, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.of_int(101), 2), Bigfloat.mkBigfloat(Bigint.of_int(1010), 3)))); + })); + Jest.test("compare(9.234,10.000)", (function (param) { + return Jest.Expect.toEqual(-1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.of_int(9234), 3), Bigfloat.mkBigfloat(Bigint.of_int(10000), 3)))); + })); + Jest.test("compare(10,9.234)", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigfloat.compare(Bigfloat.mkBigfloat(Bigint.of_int(10), 0), Bigfloat.mkBigfloat(Bigint.of_int(9234), 3)))); + })); + })); + +var B; + +var mk = Bigfloat.mkBigfloat; + +exports.B = B; +exports.mk = mk; +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Bigint_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Bigint_test.js new file mode 100644 index 0000000..abf6e93 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Bigint_test.js @@ -0,0 +1,723 @@ +'use strict'; + +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); +var Int32 = require("rescript/lib/js/int32.js"); +var Int64 = require("rescript/lib/js/int64.js"); +var Bigint = require("../src/Bigint.js"); +var Caml_obj = require("rescript/lib/js/caml_obj.js"); +var Pervasives = require("rescript/lib/js/pervasives.js"); + +Jest.describe("Bigint", (function (param) { + Jest.test("zero equal to (Bigint.of_int 0)", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(0), Jest.Expect.expect(Bigint.zero)); + })); + Jest.test("one equal to (Bigint.of_int 1)", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.one)); + })); + Jest.test("minus_one equal to (Bigint.of_int (-1))", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-1), Jest.Expect.expect(Bigint.minus_one)); + })); + Jest.test("zero equal to (Bigint.of_int 0)", (function (param) { + return Jest.Expect.toEqual(Bigint.of_string("0"), Jest.Expect.expect(Bigint.zero)); + })); + Jest.test("one equal to (Bigint.of_int 1)", (function (param) { + return Jest.Expect.toEqual(Bigint.of_string("1"), Jest.Expect.expect(Bigint.one)); + })); + Jest.test("minus_one equal to (Bigint.of_int (-1))", (function (param) { + return Jest.Expect.toEqual(Bigint.of_string("-1"), Jest.Expect.expect(Bigint.minus_one)); + })); + Jest.test("2 + 1 = 3", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(3), Jest.Expect.expect(Bigint.add(Bigint.of_int(1), Bigint.of_int(2)))); + })); + Jest.test("(-2) + (-1) = (-3)", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-3), Jest.Expect.expect(Bigint.add(Bigint.of_int(-1), Bigint.of_int(-2)))); + })); + Jest.test("0 + 0 = 0", (function (param) { + return Jest.Expect.toEqual(Bigint.zero, Jest.Expect.expect(Bigint.add(Bigint.zero, Bigint.zero))); + })); + Jest.test("-3 + 3 = 0", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(0), Jest.Expect.expect(Bigint.add(Bigint.of_int(-3), Bigint.of_int(3)))); + })); + Jest.test("of_string: 2 + 1 = 3", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(3), Jest.Expect.expect(Bigint.add(Bigint.of_string("1"), Bigint.of_string("2")))); + })); + Jest.test("addition with numbers larger than int64 can hold", (function (param) { + var x = Bigint.of_string("1000000000000000000000000000000"); + var y = Bigint.of_string("1000000000000000000000000000000"); + var z = Bigint.add(x, y); + return Jest.Expect.toEqual(Bigint.of_string("2000000000000000000000000000000"), Jest.Expect.expect(z)); + })); + Jest.test("addition with numbers larger than int64 can hold", (function (param) { + var x = Bigint.of_string("1000000000000000000000000000000000000000"); + var y = Bigint.of_int(1); + var z = Bigint.add(y, x); + return Jest.Expect.toEqual(Bigint.of_string("1000000000000000000000000000000000000001"), Jest.Expect.expect(z)); + })); + Jest.test("zero to string", (function (param) { + return Jest.Expect.toEqual("0", Jest.Expect.expect(Bigint.to_string(Bigint.zero))); + })); + Jest.test("one to string", (function (param) { + return Jest.Expect.toEqual("1", Jest.Expect.expect(Bigint.to_string(Bigint.one))); + })); + Jest.test("minus_one to string", (function (param) { + return Jest.Expect.toEqual("-1", Jest.Expect.expect(Bigint.to_string(Bigint.minus_one))); + })); + Jest.test("big to string", (function (param) { + return Jest.Expect.toEqual("32389176649991293809043094891992939836566132213", Jest.Expect.expect(Bigint.to_string(Bigint.of_string("32389176649991293809043094891992939836566132213")))); + })); + })); + +Jest.test("pow", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.pow(Bigint.of_int(2), 0))); + })); + +Jest.test("pow", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.pow(Bigint.of_int(2), 1))); + })); + +Jest.test("pow", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(4), Jest.Expect.expect(Bigint.pow(Bigint.of_int(2), 2))); + })); + +Jest.test("pow", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(256), Jest.Expect.expect(Bigint.pow(Bigint.of_int(4), 4))); + })); + +Jest.test("1 * 1 = 1", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.mul(Bigint.one, Bigint.one))); + })); + +Jest.test("1 * 0 = 0", (function (param) { + return Jest.Expect.toEqual(Bigint.zero, Jest.Expect.expect(Bigint.mul(Bigint.one, Bigint.zero))); + })); + +Jest.test("0 * 0 = 0", (function (param) { + return Jest.Expect.toEqual(Bigint.zero, Jest.Expect.expect(Bigint.mul(Bigint.zero, Bigint.zero))); + })); + +Jest.test("-1 * 1 = -1", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-1), Jest.Expect.expect(Bigint.mul(Bigint.of_int(-1), Bigint.one))); + })); + +Jest.test("20 * 2 = 40", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(40), Jest.Expect.expect(Bigint.mul(Bigint.of_int(20), Bigint.of_int(2)))); + })); + +Jest.test("20 * -1 = -20", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-20), Jest.Expect.expect(Bigint.mul(Bigint.of_int(20), Bigint.of_int(-1)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.div(Bigint.of_int(6), Bigint.of_int(3)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-2), Jest.Expect.expect(Bigint.div(Bigint.of_int(-6), Bigint.of_int(3)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-2), Jest.Expect.expect(Bigint.div(Bigint.of_int(6), Bigint.of_int(-3)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.div(Bigint.of_int(-6), Bigint.of_int(-3)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.div(Bigint.of_int(7), Bigint.of_int(3)))); + })); + +Jest.test("2 - 1 = 1", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.sub(Bigint.of_int(2), Bigint.of_int(1)))); + })); + +Jest.test("10 - 7 = 3", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(3), Jest.Expect.expect(Bigint.sub(Bigint.of_int(10), Bigint.of_int(7)))); + })); + +Jest.test("7 - 10 = -3", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-3), Jest.Expect.expect(Bigint.sub(Bigint.of_int(7), Bigint.of_int(10)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(4), Jest.Expect.expect(Bigint.rem(Bigint.of_int(4), Bigint.of_int(25)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.rem(Bigint.of_string("18446744073709551617"), Bigint.of_string("18446744073709551616")))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.rem(Bigint.of_int(26), Bigint.of_int(25)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(0), Jest.Expect.expect(Bigint.rem(Bigint.of_int(25), Bigint.of_int(25)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.rem(Bigint.of_int(7), Bigint.of_int(3)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.rem(Bigint.of_int(7), Bigint.of_int(-3)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-1), Jest.Expect.expect(Bigint.rem(Bigint.of_int(-7), Bigint.of_int(3)))); + })); + +Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-1), Jest.Expect.expect(Bigint.rem(Bigint.of_int(-7), Bigint.of_int(-3)))); + })); + +Jest.test("rem proof", (function (param) { + var a = Bigint.of_int(-7); + var b = Bigint.of_int(-3); + var c = Bigint.$plus(Bigint.mul(b, Bigint.div(a, b)), Bigint.rem(a, b)); + return Jest.Expect.toEqual(c, Jest.Expect.expect(a)); + })); + +Jest.test("rem proof", (function (param) { + var a = Bigint.of_int(21); + var b = Bigint.of_int(4); + var c = Bigint.$plus(Bigint.mul(b, Bigint.div(a, b)), Bigint.rem(a, b)); + return Jest.Expect.toEqual(c, Jest.Expect.expect(a)); + })); + +Jest.test("rem proof", (function (param) { + var a = Bigint.of_int(-21); + var b = Bigint.of_int(4); + var c = Bigint.$plus(Bigint.mul(b, Bigint.div(a, b)), Bigint.rem(a, b)); + return Jest.Expect.toEqual(c, Jest.Expect.expect(a)); + })); + +Jest.test("div_rem 7 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(2), + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(7), Bigint.of_int(3)))); + })); + +Jest.test("div_rem 7 (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-2), + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(7), Bigint.of_int(-3)))); + })); + +Jest.test("div_rem (-7) 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-2), + Bigint.of_int(-1) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(-7), Bigint.of_int(3)))); + })); + +Jest.test("div_rem (-7) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(2), + Bigint.of_int(-1) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(-7), Bigint.of_int(-3)))); + })); + +Jest.test("div_rem 9 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(3), + Bigint.of_int(0) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(9), Bigint.of_int(3)))); + })); + +Jest.test("div_rem 9 (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(0) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(9), Bigint.of_int(-3)))); + })); + +Jest.test("div_rem (-9) 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(0) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(-9), Bigint.of_int(3)))); + })); + +Jest.test("div_rem (-9) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(3), + Bigint.of_int(0) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(-9), Bigint.of_int(-3)))); + })); + +Jest.test("div_rem (1) (2)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.zero, + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.div_rem(Bigint.of_int(1), Bigint.of_int(2)))); + })); + +Jest.test("ediv_rem 7 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(2), + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(7), Bigint.of_int(3)))); + })); + +Jest.test("ediv_rem 7 (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-2), + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(7), Bigint.of_int(-3)))); + })); + +Jest.test("ediv_rem (-7) 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(2) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(-7), Bigint.of_int(3)))); + })); + +Jest.test("ediv_rem (-7) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(2) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(-7), Bigint.of_int(-3)))); + })); + +Jest.test("ediv_rem (-8) 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(-8), Bigint.of_int(3)))); + })); + +Jest.test("ediv_rem (-8) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(-8), Bigint.of_int(-3)))); + })); + +Jest.test("ediv_rem 9 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(3), + Bigint.of_int(0) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(9), Bigint.of_int(3)))); + })); + +Jest.test("ediv_rem 9 (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.zero + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(9), Bigint.of_int(-3)))); + })); + +Jest.test("ediv_rem (-9) 3", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.of_int(0) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(-9), Bigint.of_int(3)))); + })); + +Jest.test("ediv_rem (-9) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.of_int(-3), + Bigint.zero + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(-9), Bigint.of_int(-3)))); + })); + +Jest.test("ediv_rem (1) (2)", (function (param) { + return Jest.Expect.toEqual([ + Bigint.zero, + Bigint.of_int(1) + ], Jest.Expect.expect(Bigint.ediv_rem(Bigint.of_int(1), Bigint.of_int(2)))); + })); + +Jest.test("is_even", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.is_even(Bigint.of_int(8)))); + })); + +Jest.test("is_even", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.is_even(Bigint.of_int(9)))); + })); + +Jest.test("is_even", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.is_even(Bigint.of_string("839816238764918263491726983776763728736482736846")))); + })); + +Jest.test("is_even", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.is_even(Bigint.of_string("98382938792846298734695872639470987109877098703")))); + })); + +Jest.test("is_odd", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.is_odd(Bigint.of_string("839816238764918263491726983776763728736482736846")))); + })); + +Jest.test("is_odd", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.is_odd(Bigint.of_string("98382938792846298734695872639470987109877098703")))); + })); + +Jest.test("sign", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigint.sign(Bigint.of_string("98382938792846298734695872639470987109877098703")))); + })); + +Jest.test("sign", (function (param) { + return Jest.Expect.toEqual(0, Jest.Expect.expect(Bigint.sign(Bigint.of_string("0")))); + })); + +Jest.test("sign", (function (param) { + return Jest.Expect.toEqual(-1, Jest.Expect.expect(Bigint.sign(Bigint.of_string("-2839849727247283728372837287378723")))); + })); + +Jest.test("2 = 3", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("2 = 2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(2), Bigint.of_int(2)))); + })); + +Jest.test("0 = 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(0), Bigint.of_int(0)))); + })); + +Jest.test("0 = 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(0), Bigint.of_int(0)))); + })); + +Jest.test("0 = 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.zero, Bigint.of_int(0)))); + })); + +Jest.test("0 = 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.zero, Bigint.of_string("0")))); + })); + +Jest.test("0 = 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(0), Bigint.of_string("0")))); + })); + +Jest.test("-1 = -1", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(-1), Bigint.of_int(-1)))); + })); + +Jest.test("-1 = 1", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$eq(Bigint.of_int(-1), Bigint.of_int(1)))); + })); + +Jest.test("2 <= 3", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("2 <= 3", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("3 <= 3", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(3), Bigint.of_int(3)))); + })); + +Jest.test("0 <= 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(0), Bigint.of_int(0)))); + })); + +Jest.test("-1 <= 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(-1), Bigint.of_int(0)))); + })); + +Jest.test("-3 <= -2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(-3), Bigint.of_int(-2)))); + })); + +Jest.test("1 <= 0", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$less$eq(Bigint.of_int(1), Bigint.of_int(0)))); + })); + +Jest.test("2 < 3", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("3 < 3", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$less(Bigint.of_int(3), Bigint.of_int(3)))); + })); + +Jest.test("-1 < 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less(Bigint.of_int(-1), Bigint.of_int(0)))); + })); + +Jest.test("-3 < -2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$less(Bigint.of_int(-3), Bigint.of_int(-2)))); + })); + +Jest.test("1 < 0", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$less(Bigint.of_int(1), Bigint.of_int(0)))); + })); + +Jest.test("2 >= 3", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("3 >= 3", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(3), Bigint.of_int(3)))); + })); + +Jest.test("-1 >= 0", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(-1), Bigint.of_int(0)))); + })); + +Jest.test("-3 >= -2", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(-3), Bigint.of_int(-2)))); + })); + +Jest.test("1 >= 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(1), Bigint.of_int(0)))); + })); + +Jest.test("3 >= 2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(3), Bigint.of_int(2)))); + })); + +Jest.test("3 >= -2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great$eq(Bigint.of_int(3), Bigint.of_int(-2)))); + })); + +Jest.test("2 > 3", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("3 > 3", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great(Bigint.of_int(3), Bigint.of_int(3)))); + })); + +Jest.test("-1 > 0", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great(Bigint.of_int(-1), Bigint.of_int(0)))); + })); + +Jest.test("-3 > -2", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great(Bigint.of_int(-3), Bigint.of_int(-2)))); + })); + +Jest.test("1 > 0", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great(Bigint.of_int(1), Bigint.of_int(0)))); + })); + +Jest.test("2 > 3", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Bigint.$great(Bigint.of_int(2), Bigint.of_int(3)))); + })); + +Jest.test("3 > 2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great(Bigint.of_int(3), Bigint.of_int(2)))); + })); + +Jest.test("3 > -2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Bigint.$great(Bigint.of_int(3), Bigint.of_int(-2)))); + })); + +Jest.test("to_int max_int", (function (param) { + return Jest.Expect.toEqual(Pervasives.max_int, Jest.Expect.expect(Bigint.to_int(Bigint.of_int(Pervasives.max_int)))); + })); + +Jest.test("to_int min_int", (function (param) { + return Jest.Expect.toEqual(Pervasives.min_int, Jest.Expect.expect(Bigint.to_int(Bigint.of_int(Pervasives.min_int)))); + })); + +Jest.test("to_int greater than max_int should throw Overflow", (function (param) { + return Jest.Expect.toThrowException({ + RE_EXN_ID: Bigint.Overflow + }, Jest.Expect.expect(function (param) { + return Bigint.to_int(Bigint.of_string("21474836478")); + })); + })); + +Jest.test("to_int smaller than min_int should throw Overflow", (function (param) { + return Jest.Expect.toThrowException({ + RE_EXN_ID: Bigint.Overflow + }, Jest.Expect.expect(function (param) { + return Bigint.to_int(Bigint.of_string("-21474836478")); + })); + })); + +Jest.test("to_int32 max_int", (function (param) { + return Jest.Expect.toEqual(Int32.max_int, Jest.Expect.expect(Bigint.to_int32(Bigint.of_int32(Int32.max_int)))); + })); + +Jest.test("to_int32 min_int", (function (param) { + return Jest.Expect.toEqual(Int32.min_int, Jest.Expect.expect(Bigint.to_int32(Bigint.of_int32(Int32.min_int)))); + })); + +Jest.test("to_int32 greater than max_int should throw Overflow", (function (param) { + return Jest.Expect.toThrowException({ + RE_EXN_ID: Bigint.Overflow + }, Jest.Expect.expect(function (param) { + return Bigint.to_int32(Bigint.of_string("21474836478")); + })); + })); + +Jest.test("to_int32 smaller than min_int should throw Overflow", (function (param) { + return Jest.Expect.toThrowException({ + RE_EXN_ID: Bigint.Overflow + }, Jest.Expect.expect(function (param) { + return Bigint.to_int32(Bigint.of_string("-21474836478")); + })); + })); + +Jest.test("to_int64 max_int", (function (param) { + return Jest.Expect.toEqual(Int64.max_int, Jest.Expect.expect(Bigint.to_int64(Bigint.of_int64(Int64.max_int)))); + })); + +Jest.test("to_int64 min_int", (function (param) { + return Jest.Expect.toEqual(Int64.min_int, Jest.Expect.expect(Bigint.to_int64(Bigint.of_int64(Int64.min_int)))); + })); + +Jest.test("to_int64 greater than max_int should throw Overflow", (function (param) { + return Jest.Expect.toThrowException({ + RE_EXN_ID: Bigint.Overflow + }, Jest.Expect.expect(function (param) { + return Bigint.to_int64(Bigint.of_string("9223372036854775808")); + })); + })); + +Jest.test("to_float", (function (param) { + return Jest.Expect.toEqual(9007199254740993.0, Jest.Expect.expect(Bigint.to_float(Bigint.of_string("9007199254740992")))); + })); + +Jest.test("3 <> 2", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Caml_obj.notequal(Bigint.of_int(3), Bigint.of_int(2)))); + })); + +Jest.test("2 <> 2", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Caml_obj.notequal(Bigint.of_int(2), Bigint.of_int(2)))); + })); + +Jest.test("0 <> 1", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Caml_obj.notequal(Bigint.of_int(0), Bigint.of_int(1)))); + })); + +Jest.test("gcd 2 12", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.gcd(Bigint.of_int(2), Bigint.of_int(12)))); + })); + +Jest.test("gcd 12 20", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(4), Jest.Expect.expect(Bigint.gcd(Bigint.of_int(12), Bigint.of_int(20)))); + })); + +Jest.test("gcd 36 60", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(12), Jest.Expect.expect(Bigint.gcd(Bigint.of_int(36), Bigint.of_int(60)))); + })); + +Jest.test("logand", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(130), Jest.Expect.expect(Bigint.logand(Bigint.of_int(198), Bigint.of_int(163)))); + })); + +Jest.test("logand", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(3), Jest.Expect.expect(Bigint.logand(Bigint.of_int(3), Bigint.of_int(7)))); + })); + +Jest.test("logand", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.logand(Bigint.of_int(5), Bigint.of_int(3)))); + })); + +Jest.test("logand", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.logand(Bigint.of_int(3), Bigint.of_int(2)))); + })); + +Jest.test("logand", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.logand(Bigint.of_int(6), Bigint.of_int(11)))); + })); + +Jest.test("logor", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(7), Jest.Expect.expect(Bigint.logor(Bigint.of_int(6), Bigint.of_int(3)))); + })); + +Jest.test("logor", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(1), Jest.Expect.expect(Bigint.logor(Bigint.of_int(1), Bigint.of_int(0)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.zero, Jest.Expect.expect(Bigint.div(Bigint.of_int(1), Bigint.of_int(2)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.one, Jest.Expect.expect(Bigint.div(Bigint.of_int(2), Bigint.of_int(2)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.one, Jest.Expect.expect(Bigint.div(Bigint.of_int(3), Bigint.of_int(2)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.div(Bigint.of_int(4), Bigint.of_int(2)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(4), Jest.Expect.expect(Bigint.div(Bigint.of_int(9), Bigint.of_int(2)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(-1)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(1)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(0, Jest.Expect.expect(Bigint.numbits(Bigint.zero))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(3, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(6)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(3, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(5)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(4, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(8)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(5, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(16)))); + })); + +Jest.test("numbits", (function (param) { + return Jest.Expect.toEqual(4, Jest.Expect.expect(Bigint.numbits(Bigint.of_int(-8)))); + })); + +Jest.test("cdiv", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(5), Jest.Expect.expect(Bigint.cdiv(Bigint.of_int(9), Bigint.of_int(2)))); + })); + +Jest.test("cdiv", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-4), Jest.Expect.expect(Bigint.cdiv(Bigint.of_int(-9), Bigint.of_int(2)))); + })); + +Jest.test("cdiv", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-1), Jest.Expect.expect(Bigint.cdiv(Bigint.of_int(-3), Bigint.of_int(2)))); + })); + +Jest.test("cdiv", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(3), Jest.Expect.expect(Bigint.cdiv(Bigint.of_int(100), Bigint.of_int(40)))); + })); + +Jest.test("fdiv", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(4), Jest.Expect.expect(Bigint.fdiv(Bigint.of_int(9), Bigint.of_int(2)))); + })); + +Jest.test("fdiv", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-5), Jest.Expect.expect(Bigint.fdiv(Bigint.of_int(-9), Bigint.of_int(2)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(-2), Jest.Expect.expect(Bigint.fdiv(Bigint.of_int(-3), Bigint.of_int(2)))); + })); + +Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(2), Jest.Expect.expect(Bigint.fdiv(Bigint.of_int(100), Bigint.of_int(40)))); + })); + +Jest.test("pow", (function (param) { + return Jest.Expect.toEqual(Bigint.of_int(4), Jest.Expect.expect(Bigint.pow(Bigint.of_int(2), 2))); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Natural_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Natural_test.js new file mode 100644 index 0000000..4d1c8c6 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Natural_test.js @@ -0,0 +1,50 @@ +'use strict'; + +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); +var Natural = require("../src/Natural.js"); +var Caml_int64 = require("rescript/lib/js/caml_int64.js"); + +Jest.describe("Natural", (function (param) { + Jest.test("zero equal to (Natural.ofInt 0)", (function (param) { + return Jest.Expect.toEqual(Natural.ofInt(0), Jest.Expect.expect(Natural.zero)); + })); + Jest.test("one equal to (Natural.ofInt 1)", (function (param) { + return Jest.Expect.toEqual(Natural.ofInt(1), Jest.Expect.expect(Natural.one)); + })); + Jest.test("zero equal to (Natural.ofInt 0)", (function (param) { + return Jest.Expect.toEqual(Natural.unsafeOfString("0"), Jest.Expect.expect(Natural.zero)); + })); + Jest.test("ofInt on a negative number should throw an error", (function (param) { + return Jest.Expect.toEqual(undefined, Jest.Expect.expect(Natural.ofInt(-1))); + })); + Jest.test("ofInt64 on a negative number should throw an error", (function (param) { + return Jest.Expect.toEqual(undefined, Jest.Expect.expect(Natural.ofInt64(Caml_int64.neg_one))); + })); + Jest.test("ofString on a negative number should throw an error", (function (param) { + return Jest.Expect.toEqual(undefined, Jest.Expect.expect(Natural.ofString("-100"))); + })); + Jest.test("unsafeOfInt on a negative number should throw an error", (function (param) { + return Jest.Expect.toThrowException({ + RE_EXN_ID: Natural.Underflow + }, Jest.Expect.expect(function (param) { + return Natural.unsafeOfInt(-1); + })); + })); + Jest.test("one equal to (Natural.ofInt 1)", (function (param) { + return Jest.Expect.toEqual(Natural.unsafeOfString("1"), Jest.Expect.expect(Natural.one)); + })); + Jest.test("2 + 1 = 3", (function (param) { + return Jest.Expect.toEqual(Natural.unsafeOfInt(3), Jest.Expect.expect(Natural.add(Natural.unsafeOfInt(1), Natural.unsafeOfInt(2)))); + })); + Jest.test("0 + 0 = 0", (function (param) { + return Jest.Expect.toEqual(Natural.zero, Jest.Expect.expect(Natural.add(Natural.zero, Natural.zero))); + })); + Jest.test("unsafeOfString: 2 + 1 = 3", (function (param) { + return Jest.Expect.toEqual(Natural.unsafeOfInt(3), Jest.Expect.expect(Natural.add(Natural.unsafeOfString("1"), Natural.unsafeOfString("2")))); + })); + Jest.test("div", (function (param) { + return Jest.Expect.toEqual(Natural.unsafeOfInt(2), Jest.Expect.expect(Natural.fdiv(Natural.unsafeOfInt(100), Natural.unsafeOfInt(40)))); + })); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Q_Bigint_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Q_Bigint_test.js new file mode 100644 index 0000000..c5ef23e --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Q_Bigint_test.js @@ -0,0 +1,33 @@ +'use strict'; + +var Z = require("../src/Z.js"); +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); +var Curry = require("rescript/lib/js/curry.js"); +var Q_Internal = require("../src/Q_Internal.js"); + +Jest.describe("Q.Bigint", (function (param) { + Jest.test("1/2 - 1/4 is 1/2", (function (param) { + return Jest.Expect.toEqual(Curry._2(Q_Internal.QBigint.M.make, Curry._1(Z.Bigint.of_int, 1), Curry._1(Z.Bigint.of_int, 4)), Jest.Expect.expect(Curry._2(Q_Internal.QBigint.M.sub, Curry._2(Q_Internal.QBigint.M.make, Z.Bigint.one, Curry._1(Z.Bigint.of_int, 2)), Curry._2(Q_Internal.QBigint.M.make, Curry._1(Z.Bigint.of_int, 1), Curry._1(Z.Bigint.of_int, 4))))); + })); + Jest.test("1/8 + (-1/8) is 0", (function (param) { + return Jest.Expect.toEqual(Q_Internal.QBigint.M.zero, Jest.Expect.expect(Curry._2(Q_Internal.QBigint.M.add, Curry._1(Q_Internal.QBigint.M.of_string, "1/8"), Curry._1(Q_Internal.QBigint.M.of_string, "-1/8")))); + })); + })); + +Jest.test("1/8 + 14/16 is 1", (function (param) { + return Jest.Expect.toEqual(Q_Internal.QBigint.M.one, Jest.Expect.expect(Curry._2(Q_Internal.QBigint.M.add, Curry._1(Q_Internal.QBigint.M.of_string, "1/8"), Curry._1(Q_Internal.QBigint.M.of_string, "14/16")))); + })); + +Jest.test("3 * 1/2 is 3/2", (function (param) { + return Jest.Expect.toEqual(Curry._1(Q_Internal.QBigint.M.of_string, "3/2"), Jest.Expect.expect(Curry._2(Q_Internal.QBigint.M.mul, Curry._1(Q_Internal.QBigint.M.of_string, "3/1"), Curry._1(Q_Internal.QBigint.M.of_string, "1/2")))); + })); + +Jest.test("2/3 / 3/4 is 8/9", (function (param) { + return Jest.Expect.toEqual(Curry._1(Q_Internal.QBigint.M.of_string, "8/9"), Jest.Expect.expect(Curry._2(Q_Internal.QBigint.M.div, Curry._1(Q_Internal.QBigint.M.of_string, "2/3"), Curry._1(Q_Internal.QBigint.M.of_string, "3/4")))); + })); + +Jest.test("zero equal to (Bigint.of_int 0)", (function (param) { + return Jest.Expect.toEqual(Q_Internal.QBigint.M.zero, Jest.Expect.expect(Q_Internal.QBigint.M.zero)); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Q_Int_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Q_Int_test.js new file mode 100644 index 0000000..5f7fc08 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Q_Int_test.js @@ -0,0 +1,14 @@ +'use strict'; + +var Z = require("../src/Z.js"); +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); +var Curry = require("rescript/lib/js/curry.js"); +var Q_Internal = require("../src/Q_Internal.js"); + +Jest.describe("Q.Int", (function (param) { + Jest.test("1/2 - 1/4 is 1/2", (function (param) { + return Jest.Expect.toEqual(Curry._2(Q_Internal.QInt.M.make, Z.Int.of_int(1), Z.Int.of_int(4)), Jest.Expect.expect(Curry._2(Q_Internal.QInt.M.sub, Curry._2(Q_Internal.QInt.M.make, Z.Int.one, Z.Int.of_int(2)), Curry._2(Q_Internal.QInt.M.make, Z.Int.of_int(1), Z.Int.of_int(4))))); + })); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_U_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_U_test.js new file mode 100644 index 0000000..52a26c3 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_U_test.js @@ -0,0 +1,81 @@ +'use strict'; + +var U = require("../src/U.js"); +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); + +Jest.describe("U.UInt8", (function (param) { + Jest.test("zero is int 0", (function (param) { + return Jest.Expect.toEqual(U.UInt8.ofInt(0), Jest.Expect.expect(U.UInt8.zero)); + })); + Jest.test("0 + 1", (function (param) { + return Jest.Expect.toEqual(U.UInt8.ofInt(1), Jest.Expect.expect(U.UInt8.add(U.UInt8.zero, U.UInt8.one))); + })); + Jest.test("-1 is converted to 255", (function (param) { + return Jest.Expect.toEqual(U.UInt8.ofInt(255), Jest.Expect.expect(U.UInt8.ofString("-1"))); + })); + Jest.test("256 is converted to zero", (function (param) { + return Jest.Expect.toEqual(U.UInt8.zero, Jest.Expect.expect(U.UInt8.ofString("256"))); + })); + Jest.test("255 + 10 is 9", (function (param) { + return Jest.Expect.toEqual(U.UInt8.ofInt(9), Jest.Expect.expect(U.UInt8.add(U.UInt8.ofInt(255), U.UInt8.ofInt(10)))); + })); + })); + +Jest.describe("U.UInt16", (function (param) { + Jest.test("zero is int 0", (function (param) { + return Jest.Expect.toEqual(U.UInt16.ofInt(0), Jest.Expect.expect(U.UInt16.zero)); + })); + Jest.test("0 + 1", (function (param) { + return Jest.Expect.toEqual(U.UInt16.ofInt(1), Jest.Expect.expect(U.UInt16.add(U.UInt16.zero, U.UInt16.one))); + })); + Jest.test("-1 is converted to 65535", (function (param) { + return Jest.Expect.toEqual(U.UInt16.ofInt(65535), Jest.Expect.expect(U.UInt16.ofString("-1"))); + })); + Jest.test("65536 is converted to zero", (function (param) { + return Jest.Expect.toEqual(U.UInt16.zero, Jest.Expect.expect(U.UInt16.ofString("65536"))); + })); + Jest.test("65535 + 10 is 9", (function (param) { + return Jest.Expect.toEqual(U.UInt16.ofInt(9), Jest.Expect.expect(U.UInt16.add(U.UInt16.ofInt(65535), U.UInt16.ofInt(10)))); + })); + })); + +Jest.describe("U.UInt32", (function (param) { + Jest.test("zero is int 0", (function (param) { + return Jest.Expect.toEqual(U.UInt32.ofInt(0), Jest.Expect.expect(U.UInt32.zero)); + })); + Jest.test("0 + 1", (function (param) { + return Jest.Expect.toEqual(U.UInt32.ofInt(1), Jest.Expect.expect(U.UInt32.add(U.UInt32.zero, U.UInt32.one))); + })); + Jest.test("-1 is converted to 4294967295", (function (param) { + return Jest.Expect.toEqual(U.UInt32.maxInt, Jest.Expect.expect(U.UInt32.ofString("-1"))); + })); + Jest.test("4294967296 is converted to zero", (function (param) { + return Jest.Expect.toEqual(U.UInt32.zero, Jest.Expect.expect(U.UInt32.ofString("4294967296"))); + })); + })); + +Jest.describe("U.UInt64", (function (param) { + Jest.test("zero is int 0", (function (param) { + return Jest.Expect.toEqual(U.UInt64.ofInt(0), Jest.Expect.expect(U.UInt64.zero)); + })); + Jest.test("0 + 1", (function (param) { + return Jest.Expect.toEqual(U.UInt64.ofInt(1), Jest.Expect.expect(U.UInt64.add(U.UInt64.zero, U.UInt64.one))); + })); + Jest.test("-1 is converted to 18446744073709551616", (function (param) { + return Jest.Expect.toEqual(U.UInt64.maxInt, Jest.Expect.expect(U.UInt64.ofString("-1"))); + })); + Jest.test("-2 is converted to 18446744073709551615", (function (param) { + return Jest.Expect.toEqual(U.UInt64.sub(U.UInt64.maxInt, U.UInt64.one), Jest.Expect.expect(U.UInt64.ofString("-2"))); + })); + Jest.test("-18446744073709551617 is converted to 18446744073709551616", (function (param) { + return Jest.Expect.toEqual(U.UInt64.maxInt, Jest.Expect.expect(U.UInt64.ofString("-18446744073709551617"))); + })); + Jest.test("18446744073709551617 is converted to zero", (function (param) { + return Jest.Expect.toEqual(U.UInt64.zero, Jest.Expect.expect(U.UInt64.ofString("18446744073709551617"))); + })); + Jest.test("18446744073709551618 is converted to one", (function (param) { + return Jest.Expect.toEqual(U.UInt64.one, Jest.Expect.expect(U.UInt64.ofString("18446744073709551618"))); + })); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Z_Int64_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Z_Int64_test.js new file mode 100644 index 0000000..879d6da --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Z_Int64_test.js @@ -0,0 +1,15 @@ +'use strict'; + +var Z = require("../src/Z.js"); +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); + +Jest.describe("Z.Int64", (function (param) { + Jest.test("add", (function (param) { + var x = Z.Int64.of_string("230000232323322323"); + var y = Z.Int64.of_int(3); + var z = Z.Int64.sub(x, y); + return Jest.Expect.toEqual(Z.Int64.of_string("230000232323322320"), Jest.Expect.expect(z)); + })); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_Z_Int_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_Z_Int_test.js new file mode 100644 index 0000000..91bd4f5 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_Z_Int_test.js @@ -0,0 +1,102 @@ +'use strict'; + +var Z = require("../src/Z.js"); +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); + +Jest.describe("Z.Int", (function (param) { + Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(1), Jest.Expect.expect(Z.Int.rem(Z.Int.of_int(7), Z.Int.of_int(3)))); + })); + Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(1), Jest.Expect.expect(Z.Int.rem(Z.Int.of_int(7), Z.Int.of_int(-3)))); + })); + Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(-1), Jest.Expect.expect(Z.Int.rem(Z.Int.of_int(-7), Z.Int.of_int(3)))); + })); + Jest.test("rem", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(-1), Jest.Expect.expect(Z.Int.rem(Z.Int.of_int(-7), Z.Int.of_int(-3)))); + })); + Jest.test("ediv_rem 7 3", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(2), + Z.Int.of_int(1) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(7), Z.Int.of_int(3)))); + })); + Jest.test("ediv_rem 7 (-3)", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-2), + Z.Int.of_int(1) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(7), Z.Int.of_int(-3)))); + })); + Jest.test("ediv_rem (-7) 3", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.of_int(2) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(-7), Z.Int.of_int(3)))); + })); + Jest.test("ediv_rem (-7) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.of_int(2) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(-7), Z.Int.of_int(-3)))); + })); + Jest.test("ediv_rem (-8) 3", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.of_int(1) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(-8), Z.Int.of_int(3)))); + })); + Jest.test("ediv_rem (-8) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.of_int(1) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(-8), Z.Int.of_int(-3)))); + })); + Jest.test("ediv_rem 9 3", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(3), + Z.Int.of_int(0) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(9), Z.Int.of_int(3)))); + })); + Jest.test("ediv_rem 9 (-3)", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.zero + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(9), Z.Int.of_int(-3)))); + })); + Jest.test("ediv_rem (-9) 3", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.of_int(0) + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(-9), Z.Int.of_int(3)))); + })); + Jest.test("ediv_rem (-9) (-3)", (function (param) { + return Jest.Expect.toEqual([ + Z.Int.of_int(-3), + Z.Int.zero + ], Jest.Expect.expect(Z.Int.ediv_rem(Z.Int.of_int(-9), Z.Int.of_int(-3)))); + })); + Jest.test("is_even", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Z.Int.is_even(Z.Int.of_int(8)))); + })); + Jest.test("is_even", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Z.Int.is_even(Z.Int.of_int(9)))); + })); + Jest.test("is_odd", (function (param) { + return Jest.Expect.toEqual(false, Jest.Expect.expect(Z.Int.is_odd(Z.Int.of_int(8)))); + })); + Jest.test("is_odd", (function (param) { + return Jest.Expect.toEqual(true, Jest.Expect.expect(Z.Int.is_odd(Z.Int.of_int(9)))); + })); + Jest.test("gcd 2 12", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(2), Jest.Expect.expect(Z.Int.gcd(Z.Int.of_int(2), Z.Int.of_int(12)))); + })); + Jest.test("gcd 12 20", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(4), Jest.Expect.expect(Z.Int.gcd(Z.Int.of_int(12), Z.Int.of_int(20)))); + })); + Jest.test("gcd 36 60", (function (param) { + return Jest.Expect.toEqual(Z.Int.of_int(12), Jest.Expect.expect(Z.Int.gcd(Z.Int.of_int(36), Z.Int.of_int(60)))); + })); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/__tests__/bs_zarith_test.js b/drafts/bs-Zarith/lib/js/__tests__/bs_zarith_test.js new file mode 100644 index 0000000..79143bf --- /dev/null +++ b/drafts/bs-Zarith/lib/js/__tests__/bs_zarith_test.js @@ -0,0 +1,11 @@ +'use strict'; + +var Jest = require("@glennsl/bs-jest/lib/js/src/jest.js"); + +Jest.describe("Int32", (function (param) { + Jest.test("Int32", (function (param) { + return Jest.Expect.toEqual(1, Jest.Expect.expect(1)); + })); + })); + +/* Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/src/Bigfloat.js b/drafts/bs-Zarith/lib/js/src/Bigfloat.js new file mode 100644 index 0000000..77fa7d8 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/Bigfloat.js @@ -0,0 +1,386 @@ +'use strict'; + +var Bigint = require("./Bigint.js"); +var $$String = require("rescript/lib/js/string.js"); +var Js_string = require("rescript/lib/js/js_string.js"); +var Caml_array = require("rescript/lib/js/caml_array.js"); +var Caml_format = require("rescript/lib/js/caml_format.js"); + +function mkBigfloat(v, d) { + return { + value: v, + decimalPos: d + }; +} + +var zero = { + value: Bigint.zero, + decimalPos: 0 +}; + +var one = { + value: Bigint.one, + decimalPos: 0 +}; + +var minusOne = { + value: Bigint.minus_one, + decimalPos: 0 +}; + +function repeatString(n, s) { + if (n === 0) { + return ""; + } else { + return s + repeatString(n - 1 | 0, s); + } +} + +var addCommas = (function (s) { + var sp = s.split("."); + var l = sp[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); + if (sp.length > 1) { + return l.concat(".", sp[1]); + } else { + return l; + } + }); + +var removeCommas = (function (s) { + return s.replace(/,/g, ""); + }); + +function ofInt(i) { + return { + value: Bigint.of_int(i), + decimalPos: 0 + }; +} + +function ofInt32(i) { + return { + value: Bigint.of_int32(i), + decimalPos: 0 + }; +} + +function ofInt64(i) { + return { + value: Bigint.of_int64(i), + decimalPos: 0 + }; +} + +function ofString(string, decimalPos) { + var s = removeCommas(string); + var a = Js_string.split(".", s); + if (a.length === 1) { + return { + value: Bigint.mul(Bigint.of_string(s), Bigint.pow(Bigint.of_int(10), decimalPos)), + decimalPos: decimalPos + }; + } + if (a.length !== 2) { + return ; + } + var leftSide = Caml_array.get(a, 0); + var rightSide = Caml_array.get(a, 1); + var rightSideLength = rightSide.length; + var rr = rightSideLength === decimalPos ? rightSide : ( + rightSideLength < decimalPos ? rightSide + repeatString(decimalPos - rightSideLength | 0, "0") : $$String.sub(rightSide, 0, decimalPos) + ); + return { + value: Bigint.of_string(leftSide + rr), + decimalPos: decimalPos + }; +} + +function ofFloat(f, decimalPos) { + var s = f.toString(); + var a = Js_string.split(".", s); + if (a.length === 1) { + return { + value: Bigint.of_float(f), + decimalPos: decimalPos + }; + } + if (a.length !== 2) { + return { + value: Bigint.zero, + decimalPos: decimalPos + }; + } + var leftSide = Caml_array.get(a, 0); + var rightSide = Caml_array.get(a, 1); + var rightSideLength = rightSide.length; + var rr = rightSideLength === decimalPos ? rightSide : ( + rightSideLength < decimalPos ? rightSide + repeatString(decimalPos - rightSideLength | 0, "0") : $$String.sub(rightSide, 0, decimalPos) + ); + return { + value: Bigint.of_string(leftSide + rr), + decimalPos: decimalPos + }; +} + +function toInt(t) { + return Bigint.to_int(Bigint.div(t.value, Bigint.pow(Bigint.of_int(10), t.decimalPos))); +} + +function toInt32(t) { + return Bigint.to_int32(Bigint.div(t.value, Bigint.pow(Bigint.of_int(10), t.decimalPos))); +} + +function toInt64(t) { + return Bigint.to_int64(Bigint.div(t.value, Bigint.pow(Bigint.of_int(10), t.decimalPos))); +} + +function toString(t) { + var s = Bigint.to_string(t.value); + var sl = s.length; + if (t.decimalPos === 0) { + return s; + } + if (sl <= t.decimalPos) { + return "0." + (repeatString(t.decimalPos - sl | 0, "0") + s); + } + var r = Js_string.slice(sl - t.decimalPos | 0, sl, s); + var l = Js_string.slice(0, sl - t.decimalPos | 0, s); + return l + ("." + r); +} + +function toStringWithCommas(t) { + return addCommas(toString(t)); +} + +function toFloat(t) { + return Caml_format.float_of_string(toString(t)); +} + +function abs(t) { + return { + value: Bigint.abs(t.value), + decimalPos: t.decimalPos + }; +} + +function neg(t) { + return { + value: Bigint.neg(t.value), + decimalPos: t.decimalPos + }; +} + +function add(x, y) { + if (x.decimalPos === y.decimalPos) { + return { + value: Bigint.add(x.value, y.value), + decimalPos: x.decimalPos + }; + } + if (x.decimalPos > y.decimalPos) { + var decimalPos = x.decimalPos - y.decimalPos | 0; + return { + value: Bigint.add(x.value, Bigint.mul(y.value, Bigint.pow(Bigint.of_int(10), decimalPos))), + decimalPos: x.decimalPos + }; + } + var decimalPos$1 = y.decimalPos - x.decimalPos | 0; + return { + value: Bigint.add(y.value, Bigint.mul(x.value, Bigint.pow(Bigint.of_int(10), decimalPos$1))), + decimalPos: y.decimalPos + }; +} + +function sub(x, y) { + if (x.decimalPos === y.decimalPos) { + return { + value: Bigint.sub(x.value, y.value), + decimalPos: x.decimalPos + }; + } + if (x.decimalPos > y.decimalPos) { + var decimalPos = x.decimalPos - y.decimalPos | 0; + return { + value: Bigint.sub(x.value, Bigint.mul(y.value, Bigint.pow(Bigint.of_int(10), decimalPos))), + decimalPos: x.decimalPos + }; + } + var decimalPos$1 = y.decimalPos - x.decimalPos | 0; + return { + value: Bigint.sub(y.value, Bigint.mul(x.value, Bigint.pow(Bigint.of_int(10), decimalPos$1))), + decimalPos: y.decimalPos + }; +} + +function mul(x, y) { + return { + value: Bigint.mul(x.value, y.value), + decimalPos: x.decimalPos + y.decimalPos | 0 + }; +} + +function elongateBy(x, decimalPos) { + return { + value: Bigint.mul(x.value, Bigint.pow(Bigint.of_int(10), decimalPos)), + decimalPos: x.decimalPos + }; +} + +function adjustDecimalPos(x, y) { + if (x.decimalPos === y.decimalPos) { + return [ + x, + y + ]; + } + if (x.decimalPos > y.decimalPos) { + var decimalPos = x.decimalPos - y.decimalPos | 0; + return [ + x, + { + value: Bigint.mul(y.value, Bigint.pow(Bigint.of_int(10), decimalPos)), + decimalPos: x.decimalPos + } + ]; + } + var decimalPos$1 = y.decimalPos - x.decimalPos | 0; + return [ + { + value: Bigint.mul(x.value, Bigint.pow(Bigint.of_int(10), decimalPos$1)), + decimalPos: y.decimalPos + }, + y + ]; +} + +function div(x, y) { + if (x.decimalPos === 0 && y.decimalPos === 0) { + return { + value: Bigint.div(x.value, y.value), + decimalPos: x.decimalPos + }; + } + var match = adjustDecimalPos(x, y); + var y$1 = match[1]; + var x$1 = match[0]; + var xFirstNonZero = Bigint.firstNonZero(x$1.value); + var yFirstNonZero = Bigint.firstNonZero(y$1.value); + if (xFirstNonZero === undefined) { + return { + value: Bigint.zero, + decimalPos: x$1.decimalPos + }; + } + if (yFirstNonZero === undefined) { + return { + value: Bigint.zero, + decimalPos: x$1.decimalPos + }; + } + if (xFirstNonZero >= x$1.decimalPos && yFirstNonZero >= y$1.decimalPos) { + return elongateBy({ + value: Bigint.div(x$1.value, y$1.value), + decimalPos: x$1.decimalPos + }, x$1.decimalPos); + } + var reposition = xFirstNonZero > yFirstNonZero ? y$1.decimalPos - yFirstNonZero | 0 : x$1.decimalPos - xFirstNonZero | 0; + var x$2 = elongateBy(x$1, reposition); + var y$2 = elongateBy(y$1, reposition); + return elongateBy({ + value: Bigint.div(x$2.value, y$2.value), + decimalPos: x$2.decimalPos + }, x$2.decimalPos); +} + +function compare(x, y) { + var match = adjustDecimalPos(x, y); + return Bigint.compare(match[0].value, match[1].value); +} + +function equal(x, y) { + return compare(x, y) === 0; +} + +function leq(x, y) { + return compare(x, y) < 1; +} + +function geq(x, y) { + return compare(x, y) > -1; +} + +function lt(x, y) { + return compare(x, y) < 0; +} + +function gt(x, y) { + return compare(x, y) > 0; +} + +function leqZero(x) { + return Bigint.compare(x.value, Bigint.zero) <= 0; +} + +function geqZero(x) { + return Bigint.compare(x.value, Bigint.zero) >= 0; +} + +function ltZero(x) { + return Bigint.compare(x.value, Bigint.zero) < 0; +} + +function gtZero(x) { + return Bigint.compare(x.value, Bigint.zero) > 0; +} + +function min(x, y) { + if (compare(x, y) < 0) { + return y; + } else { + return x; + } +} + +function max(x, y) { + if (compare(x, y) < 0) { + return x; + } else { + return y; + } +} + +exports.mkBigfloat = mkBigfloat; +exports.zero = zero; +exports.one = one; +exports.minusOne = minusOne; +exports.ofInt = ofInt; +exports.ofInt32 = ofInt32; +exports.ofInt64 = ofInt64; +exports.ofFloat = ofFloat; +exports.ofString = ofString; +exports.toInt = toInt; +exports.toInt32 = toInt32; +exports.toInt64 = toInt64; +exports.toFloat = toFloat; +exports.toString = toString; +exports.toStringWithCommas = toStringWithCommas; +exports.adjustDecimalPos = adjustDecimalPos; +exports.abs = abs; +exports.neg = neg; +exports.add = add; +exports.sub = sub; +exports.mul = mul; +exports.div = div; +exports.compare = compare; +exports.equal = equal; +exports.leq = leq; +exports.geq = geq; +exports.lt = lt; +exports.gt = gt; +exports.leqZero = leqZero; +exports.geqZero = geqZero; +exports.ltZero = ltZero; +exports.gtZero = gtZero; +exports.min = min; +exports.max = max; +/* No side effect */ diff --git a/drafts/bs-Zarith/lib/js/src/Bigint.js b/drafts/bs-Zarith/lib/js/src/Bigint.js new file mode 100644 index 0000000..d1696db --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/Bigint.js @@ -0,0 +1,985 @@ +'use strict'; + +var List = require("rescript/lib/js/list.js"); +var Int32 = require("rescript/lib/js/int32.js"); +var Int64 = require("rescript/lib/js/int64.js"); +var $$String = require("rescript/lib/js/string.js"); +var Caml_obj = require("rescript/lib/js/caml_obj.js"); +var Caml_int64 = require("rescript/lib/js/caml_int64.js"); +var Pervasives = require("rescript/lib/js/pervasives.js"); +var Belt_Option = require("rescript/lib/js/belt_Option.js"); +var Caml_format = require("rescript/lib/js/caml_format.js"); +var Caml_string = require("rescript/lib/js/caml_string.js"); +var Caml_exceptions = require("rescript/lib/js/caml_exceptions.js"); + +var Overflow = /* @__PURE__ */Caml_exceptions.create("Bigint.Overflow"); + +var zero = /* Bigint */{ + _0: /* Pos */0, + _1: /* [] */0 +}; + +var one = /* Bigint */{ + _0: /* Pos */0, + _1: { + hd: 1, + tl: /* [] */0 + } +}; + +var two = /* Bigint */{ + _0: /* Pos */0, + _1: { + hd: 2, + tl: /* [] */0 + } +}; + +function trimzeros(listy) { + var trimzeros$p = function (listy$p) { + if (!listy$p) { + return /* [] */0; + } + var car = listy$p.hd; + if (car === 0 && !listy$p.tl) { + return /* [] */0; + } + var cdr$p = trimzeros$p(listy$p.tl); + if (car !== 0 || cdr$p) { + return { + hd: car, + tl: cdr$p + }; + } else { + return /* [] */0; + } + }; + return trimzeros$p(listy); +} + +function charlist_of_string(str) { + var last = str.length - 1 | 0; + var _pos = last; + var _result = /* [] */0; + while(true) { + var result = _result; + var pos = _pos; + if (pos < 0) { + return result; + } + _result = { + hd: Caml_string.get(str, pos), + tl: result + }; + _pos = pos - 1 | 0; + continue ; + }; +} + +function of_string(str) { + var len = str.length; + var to_intlist = function (first) { + var substr = $$String.sub(str, first, len - first | 0); + var digit = function ($$char) { + return $$char - /* '0' */48 | 0; + }; + return trimzeros(List.map(digit, List.rev(charlist_of_string(substr)))); + }; + if (Caml_string.get(str, 0) === /* '-' */45) { + return /* Bigint */{ + _0: /* Neg */1, + _1: to_intlist(1) + }; + } else { + return /* Bigint */{ + _0: /* Pos */0, + _1: to_intlist(0) + }; + } +} + +function explode(s) { + return List.init(s.length, (function (param) { + return Caml_string.get(s, param); + })); +} + +function is_digit($$char) { + if ($$char >= 48) { + return $$char <= 57; + } else { + return false; + } +} + +function is_string_of_digits(s) { + if (s.length === 0) { + return false; + } + var chars = explode(s); + var chars$1 = List.hd(chars) === /* '-' */45 ? List.tl(chars) : chars; + return List.fold_right((function (c, x) { + if (is_digit(c)) { + return x; + } else { + return false; + } + }), chars$1, true); +} + +function of_string_opt(s) { + if (is_string_of_digits(s)) { + return of_string(s); + } + +} + +function of_substring(s, pos, len) { + return of_string($$String.sub(s, pos, len)); +} + +function of_int(i) { + return of_string(String(i)); +} + +function of_int32(i) { + return of_string(Int32.to_string(i)); +} + +function of_int64(i) { + return of_string(Int64.to_string(i)); +} + +function of_float(i) { + return of_string(Int64.to_string(Caml_int64.of_float(i))); +} + +function to_string(param) { + var value = param._1; + if (!value) { + return "0"; + } + var reversed = List.rev(value); + return $$String.concat("", { + hd: param._0 === /* Pos */0 ? "" : "-", + tl: List.map((function (prim) { + return String(prim); + }), reversed) + }); +} + +function cmp(_list1, _list2) { + while(true) { + var list2 = _list2; + var list1 = _list1; + if (List.length(list1) > List.length(list2)) { + return 1; + } + if (List.length(list1) < List.length(list2)) { + return -1; + } + if (!list1 && !list2) { + return 0; + } + var reverselist1 = List.rev(list1); + var reverselist2 = List.rev(list2); + if (Caml_obj.greaterthan(List.hd(reverselist1), List.hd(reverselist2))) { + return 1; + } + if (Caml_obj.lessthan(List.hd(reverselist1), List.hd(reverselist2))) { + return -1; + } + var list1$p = List.rev(List.tl(reverselist1)); + var list2$p = List.rev(List.tl(reverselist2)); + _list2 = list2$p; + _list1 = list1$p; + continue ; + }; +} + +function add$p(_list1, _list2, _carry) { + while(true) { + var carry = _carry; + var list2 = _list2; + var list1 = _list1; + var exit = 0; + if (list2) { + exit = 2; + } else { + if (carry === 0) { + return list1; + } + exit = 2; + } + if (exit === 2 && !list1 && carry === 0) { + return list2; + } + if (list2) { + if (list1) { + var sum = (List.hd(list1) + List.hd(list2) | 0) + carry | 0; + return { + hd: sum % 10, + tl: add$p(List.tl(list1), List.tl(list2), sum / 10 | 0) + }; + } + _carry = 0; + _list1 = { + hd: carry, + tl: /* [] */0 + }; + continue ; + } + _carry = 0; + _list2 = { + hd: carry, + tl: /* [] */0 + }; + continue ; + }; +} + +function sub$p(list1, _list2, _carry) { + while(true) { + var carry = _carry; + var list2 = _list2; + var exit = 0; + if (list1) { + exit = 2; + } else if (!list2) { + if (carry === 0) { + return /* [] */0; + } + exit = 2; + } + if (exit === 2 && !list2) { + if (carry === 0) { + return list1; + } + _carry = 0; + _list2 = { + hd: carry, + tl: /* [] */0 + }; + continue ; + } + var diff = (List.hd(list1) - List.hd(list2) | 0) - carry | 0; + if (diff >= 0) { + return { + hd: diff, + tl: sub$p(List.tl(list1), List.tl(list2), 0) + }; + } else { + return { + hd: diff + 10 | 0, + tl: sub$p(List.tl(list1), List.tl(list2), 1) + }; + } + }; +} + +function mul$p(list1, list2$p, powerof2) { + if (cmp(powerof2, list1) === 1) { + return [ + list1, + /* [] */0 + ]; + } + var match = mul$p(list1, add$p(list2$p, list2$p, 0), add$p(powerof2, powerof2, 0)); + var product = match[1]; + var remainder = match[0]; + if (cmp(remainder, powerof2) === -1) { + return [ + remainder, + product + ]; + } else { + return [ + trimzeros(sub$p(remainder, powerof2, 0)), + add$p(product, list2$p, 0) + ]; + } +} + +function add(param, param$1) { + var value2 = param$1._1; + var neg2 = param$1._0; + var value1 = param._1; + var neg1 = param._0; + if (neg1 === neg2) { + return /* Bigint */{ + _0: neg1, + _1: add$p(value1, value2, 0) + }; + } else if (cmp(value1, value2) === 1) { + return /* Bigint */{ + _0: neg1, + _1: trimzeros(sub$p(value1, value2, 0)) + }; + } else if (cmp(value1, value2) === -1) { + return /* Bigint */{ + _0: neg2, + _1: trimzeros(sub$p(value2, value1, 0)) + }; + } else { + return zero; + } +} + +function sub(param, param$1) { + var value2 = param$1._1; + var value1 = param._1; + var neg1 = param._0; + if (neg1 === param$1._0) { + if (cmp(value1, value2) === 1) { + if (neg1 === /* Neg */1) { + return /* Bigint */{ + _0: /* Neg */1, + _1: trimzeros(sub$p(value1, value2, 0)) + }; + } else { + return /* Bigint */{ + _0: /* Pos */0, + _1: trimzeros(sub$p(value1, value2, 0)) + }; + } + } else if (cmp(value1, value2) === -1) { + if (neg1 === /* Neg */1) { + return /* Bigint */{ + _0: /* Pos */0, + _1: trimzeros(sub$p(value2, value1, 0)) + }; + } else { + return /* Bigint */{ + _0: /* Neg */1, + _1: trimzeros(sub$p(value2, value1, 0)) + }; + } + } else { + return zero; + } + } else { + return /* Bigint */{ + _0: neg1, + _1: add$p(value1, value2, 0) + }; + } +} + +function mul(param, param$1) { + var match = mul$p(param._1, param$1._1, { + hd: 1, + tl: /* [] */0 + }); + var product = match[1]; + if (param._0 === param$1._0) { + return /* Bigint */{ + _0: /* Pos */0, + _1: product + }; + } else { + return /* Bigint */{ + _0: /* Neg */1, + _1: product + }; + } +} + +function div_rem$p(list1, list2$p, powerof2) { + if (cmp(list2$p, list1) === 1) { + return [ + /* [] */0, + list1 + ]; + } + var match = div_rem$p(list1, add$p(list2$p, list2$p, 0), add$p(powerof2, powerof2, 0)); + var remainder = match[1]; + var quotient = match[0]; + if (cmp(remainder, list2$p) === -1) { + return [ + quotient, + remainder + ]; + } else { + return [ + add$p(quotient, powerof2, 0), + trimzeros(sub$p(remainder, list2$p, 0)) + ]; + } +} + +function div_rem(param, param$1) { + var neg1 = param._0; + var match = div_rem$p(param._1, param$1._1, { + hd: 1, + tl: /* [] */0 + }); + var rem = match[1]; + var quotient = match[0]; + var rem$1 = rem === /* [] */0 ? zero : /* Bigint */({ + _0: neg1, + _1: rem + }); + if (neg1 === param$1._0) { + return [ + /* Bigint */{ + _0: /* Pos */0, + _1: quotient + }, + rem$1 + ]; + } else { + return [ + /* Bigint */{ + _0: /* Neg */1, + _1: quotient + }, + rem$1 + ]; + } +} + +function compare(param, param$1) { + var v2 = param$1._1; + var neg2 = param$1._0; + var v1 = param._1; + if (param._0) { + if (neg2) { + return -cmp(v1, v2) | 0; + } else { + return -1; + } + } else if (neg2) { + return 1; + } else { + return cmp(v1, v2); + } +} + +function sign(n) { + if (Caml_obj.equal(n, zero)) { + return 0; + } else if (compare(n, zero) < 0) { + return -1; + } else { + return 1; + } +} + +function gt(x, y) { + return compare(x, y) > 0; +} + +function lt(x, y) { + return compare(x, y) < 0; +} + +function div(a, b) { + return div_rem(a, b)[0]; +} + +function rem(a, b) { + return div_rem(a, b)[1]; +} + +function ediv_rem$p(_t0, _t1, _cum) { + while(true) { + var cum = _cum; + var t1 = _t1; + var t0 = _t0; + var v0 = t0._1; + var t0$p = /* Bigint */{ + _0: /* Pos */0, + _1: v0 + }; + var v1 = t1._1; + var t1$p = /* Bigint */{ + _0: /* Pos */0, + _1: v1 + }; + var r = sub(t0$p, t1$p); + if (cmp(v0, v1) !== 1) { + if (cmp(r._1, { + hd: 0, + tl: /* [] */0 + }) === 0) { + return [ + cum, + r + ]; + } else { + return [ + add(cum, one), + r + ]; + } + } + _cum = add(cum, one); + _t1 = t1$p; + _t0 = r; + continue ; + }; +} + +function ediv_rem(a, b) { + if (Caml_obj.equal(b, zero)) { + throw { + RE_EXN_ID: "Division_by_zero", + Error: new Error() + }; + } + if (!a._0) { + return div_rem(a, b); + } + var match = ediv_rem$p(a, b, zero); + var r = trimzeros(match[1]._1); + return [ + /* Bigint */{ + _0: /* Neg */1, + _1: match[0]._1 + }, + /* Bigint */{ + _0: /* Pos */0, + _1: r + } + ]; +} + +function ediv(a, b) { + return ediv_rem(a, b)[0]; +} + +function erem(a, b) { + return ediv_rem(a, b)[1]; +} + +function cdiv(a, b) { + var match = div_rem(a, b); + var quotient = match[0]; + if (gt(match[1], zero)) { + return add(quotient, one); + } else { + return quotient; + } +} + +function fdiv(a, b) { + var match = div_rem(a, b); + var quotient = match[0]; + if (lt(match[1], zero)) { + return sub(quotient, one); + } else { + return quotient; + } +} + +function divexact(a, b) { + return div_rem(a, b)[0]; +} + +function is_even(param) { + var match = div_rem$p(param._1, { + hd: 2, + tl: /* [] */0 + }, { + hd: 1, + tl: /* [] */0 + }); + var remainder = match[1]; + if (remainder === /* [] */0) { + return true; + } else { + return Caml_obj.equal(remainder, { + hd: 0, + tl: /* [] */0 + }); + } +} + +function is_odd(a) { + return !is_even(a); +} + +function gcd(x, y) { + var _a = x; + var _b = y; + while(true) { + var b = _b; + var a = _a; + var c = erem(a, b); + if (Caml_obj.equal(c, zero)) { + return b; + } + _b = c; + _a = b; + continue ; + }; +} + +function pow(base, exp) { + if (exp < 0) { + throw { + RE_EXN_ID: "Invalid_argument", + _1: "The exponent must be greater zero or greater.", + Error: new Error() + }; + } + if (exp === 0) { + return one; + } else if (exp === 1) { + return base; + } else { + var _exp = exp; + var _acc = one; + while(true) { + var acc = _acc; + var exp$1 = _exp; + if (exp$1 <= 0) { + return acc; + } + _acc = mul(acc, base); + _exp = exp$1 - 1 | 0; + continue ; + }; + } +} + +function abs(param) { + return /* Bigint */{ + _0: /* Pos */0, + _1: param._1 + }; +} + +function shift_left(x, n) { + return mul(x, pow(of_string(String(2)), n)); +} + +function shift_right(x, n) { + return div(x, pow(of_string(String(2)), n)); +} + +function neg(param) { + var n = param._1; + if (param._0) { + return /* Bigint */{ + _0: /* Pos */0, + _1: n + }; + } else { + return /* Bigint */{ + _0: /* Neg */1, + _1: n + }; + } +} + +function equal(x, y) { + return compare(x, y) === 0; +} + +function leq(x, y) { + return compare(x, y) < 1; +} + +function geq(x, y) { + return compare(x, y) > -1; +} + +function succ(x) { + return add(x, one); +} + +function pred(x) { + return sub(x, one); +} + +function numbits(n$p) { + var result = 0; + var n = abs(n$p); + while(gt(n, zero)) { + result = result + 1 | 0; + n = div(n, two); + }; + return result; +} + +function logand(n1$p, n2$p) { + var byte_val = one; + var result = zero; + var n1 = n1$p; + var n2 = n2$p; + while(gt(n1, zero) || gt(n2, zero)) { + if (equal(rem(n1, two), one) && equal(rem(n2, two), one)) { + result = add(result, byte_val); + } + n1 = div(n1, two); + n2 = div(n2, two); + byte_val = mul(byte_val, two); + }; + return result; +} + +function logor(n1$p, n2$p) { + var byte_val = one; + var result = zero; + var n1 = n1$p; + var n2 = n2$p; + while(gt(n1, zero) || gt(n2, zero)) { + if (equal(rem(n1, two), one) || equal(rem(n2, two), one)) { + result = add(result, byte_val); + } + n1 = div(n1, two); + n2 = div(n2, two); + byte_val = mul(byte_val, two); + }; + return result; +} + +function logxor(n1$p, n2$p) { + var byte_val = one; + var result = zero; + var n1 = n1$p; + var n2 = n2$p; + while(gt(n1, zero) || gt(n2, zero)) { + if (!equal(rem(n1, two), rem(n2, two))) { + result = add(result, byte_val); + } + n1 = div(n1, two); + n2 = div(n2, two); + byte_val = mul(byte_val, two); + }; + return result; +} + +function lognot(n1) { + var byte_val = one; + while(lt(byte_val, n1)) { + byte_val = mul(byte_val, two); + }; + return sub(byte_val, n1); +} + +function min(x, y) { + if (leq(x, y)) { + return x; + } else { + return y; + } +} + +function max(x, y) { + if (geq(x, y)) { + return x; + } else { + return y; + } +} + +function firstNonZero(x) { + var str = to_string(x); + var strChars = explode(str); + return List.fold_right((function (s, param) { + var x = param[1]; + var i = param[0]; + if (Belt_Option.isNone(x)) { + if (s !== /* '0' */48) { + return [ + i, + i + ]; + } else { + return [ + i + 1 | 0, + x + ]; + } + } else { + return [ + i, + x + ]; + } + }), strChars, [ + 0, + undefined + ])[1]; +} + +function $tilde$plus(x) { + return x; +} + +function $less$great(x, y) { + return !equal(x, y); +} + +function to_int(i) { + if (gt(i, of_string(String(Pervasives.max_int))) || lt(i, of_string(String(Pervasives.min_int)))) { + throw { + RE_EXN_ID: Overflow, + Error: new Error() + }; + } + return Caml_format.int_of_string(to_string(i)); +} + +function to_int32(i) { + if (gt(i, of_string(Int32.to_string(Int32.max_int))) || lt(i, of_string(Int32.to_string(Int32.min_int)))) { + throw { + RE_EXN_ID: Overflow, + Error: new Error() + }; + } + return Caml_format.int_of_string(to_string(i)); +} + +function to_int64(i) { + if (gt(i, of_string(Int64.to_string(Int64.max_int))) || lt(i, of_string(Int64.to_string(Int64.min_int)))) { + throw { + RE_EXN_ID: Overflow, + Error: new Error() + }; + } + return Caml_format.int64_of_string(to_string(i)); +} + +function to_float(i) { + return Caml_format.float_of_string(to_string(i)); +} + +function round_to_float(x, exact) { + var i = exact ? x : logor(x, one); + return Caml_format.float_of_string(to_string(i)); +} + +var minus_one = /* Bigint */{ + _0: /* Neg */1, + _1: { + hd: 1, + tl: /* [] */0 + } +}; + +var $tilde$neg = neg; + +var $plus = add; + +var $neg = sub; + +var $star = mul; + +var $slash = div; + +var $slash$great = cdiv; + +var $slash$less = fdiv; + +var $slash$pipe = divexact; + +var mod = rem; + +var land = logand; + +var lor = logor; + +var lxor = logxor; + +var $tilde$bang = lognot; + +var lsl = shift_left; + +var asr = shift_right; + +var $tilde$ = of_int; + +var $star$star = pow; + +var $eq = equal; + +var $less = lt; + +var $great = gt; + +var $less$eq = leq; + +var $great$eq = geq; + +exports.Overflow = Overflow; +exports.zero = zero; +exports.one = one; +exports.minus_one = minus_one; +exports.of_int = of_int; +exports.of_int32 = of_int32; +exports.of_int64 = of_int64; +exports.of_float = of_float; +exports.of_string = of_string; +exports.of_string_opt = of_string_opt; +exports.of_substring = of_substring; +exports.succ = succ; +exports.pred = pred; +exports.abs = abs; +exports.neg = neg; +exports.add = add; +exports.sub = sub; +exports.mul = mul; +exports.div = div; +exports.rem = rem; +exports.div_rem = div_rem; +exports.cdiv = cdiv; +exports.fdiv = fdiv; +exports.ediv_rem = ediv_rem; +exports.ediv = ediv; +exports.erem = erem; +exports.divexact = divexact; +exports.logand = logand; +exports.logor = logor; +exports.logxor = logxor; +exports.lognot = lognot; +exports.shift_left = shift_left; +exports.shift_right = shift_right; +exports.numbits = numbits; +exports.to_int = to_int; +exports.to_int32 = to_int32; +exports.to_int64 = to_int64; +exports.to_float = to_float; +exports.to_string = to_string; +exports.compare = compare; +exports.equal = equal; +exports.leq = leq; +exports.geq = geq; +exports.lt = lt; +exports.gt = gt; +exports.sign = sign; +exports.min = min; +exports.max = max; +exports.is_even = is_even; +exports.is_odd = is_odd; +exports.gcd = gcd; +exports.pow = pow; +exports.$tilde$neg = $tilde$neg; +exports.$tilde$plus = $tilde$plus; +exports.$plus = $plus; +exports.$neg = $neg; +exports.$star = $star; +exports.$slash = $slash; +exports.$slash$great = $slash$great; +exports.$slash$less = $slash$less; +exports.$slash$pipe = $slash$pipe; +exports.mod = mod; +exports.land = land; +exports.lor = lor; +exports.lxor = lxor; +exports.$tilde$bang = $tilde$bang; +exports.lsl = lsl; +exports.asr = asr; +exports.$tilde$ = $tilde$; +exports.$star$star = $star$star; +exports.$eq = $eq; +exports.$less = $less; +exports.$great = $great; +exports.$less$eq = $less$eq; +exports.$great$eq = $great$eq; +exports.$less$great = $less$great; +exports.round_to_float = round_to_float; +exports.firstNonZero = firstNonZero; +/* No side effect */ diff --git a/drafts/bs-Zarith/lib/js/src/Natural.js b/drafts/bs-Zarith/lib/js/src/Natural.js new file mode 100644 index 0000000..a80c93d --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/Natural.js @@ -0,0 +1,323 @@ +'use strict'; + +var Bigint = require("./Bigint.js"); +var Caml_exceptions = require("rescript/lib/js/caml_exceptions.js"); +var Caml_js_exceptions = require("rescript/lib/js/caml_js_exceptions.js"); + +var Underflow = /* @__PURE__ */Caml_exceptions.create("Natural.Underflow"); + +var DecodeError = /* @__PURE__ */Caml_exceptions.create("Natural.DecodeError"); + +var zero = /* Natural */{ + _0: Bigint.zero +}; + +var one = /* Natural */{ + _0: Bigint.one +}; + +function ofInt(x) { + var r = Bigint.of_int(x); + if (Bigint.lt(r, Bigint.zero)) { + return ; + } else { + return /* Natural */{ + _0: r + }; + } +} + +function ofInt32(x) { + var r = Bigint.of_int32(x); + if (Bigint.lt(r, Bigint.zero)) { + return ; + } else { + return /* Natural */{ + _0: r + }; + } +} + +function ofInt64(x) { + var r = Bigint.of_int64(x); + if (Bigint.lt(r, Bigint.zero)) { + return ; + } else { + return /* Natural */{ + _0: r + }; + } +} + +function ofFloat(x) { + var r = Bigint.of_float(x); + if (Bigint.lt(r, Bigint.zero)) { + return ; + } else { + return /* Natural */{ + _0: r + }; + } +} + +function ofString(x) { + var r = Bigint.of_string_opt(x); + if (r !== undefined && !Bigint.lt(r, Bigint.zero)) { + return /* Natural */{ + _0: r + }; + } + +} + +function unsafeOfInt(x) { + var x$1 = ofInt(x); + if (x$1 !== undefined) { + return x$1; + } + throw { + RE_EXN_ID: Underflow, + Error: new Error() + }; +} + +function unsafeOfInt32(x) { + var x$1 = ofInt32(x); + if (x$1 !== undefined) { + return x$1; + } + throw { + RE_EXN_ID: Underflow, + Error: new Error() + }; +} + +function unsafeOfInt64(x) { + var x$1 = ofInt64(x); + if (x$1 !== undefined) { + return x$1; + } + throw { + RE_EXN_ID: Underflow, + Error: new Error() + }; +} + +function unsafeOfFloat(x) { + var x$1 = ofFloat(x); + if (x$1 !== undefined) { + return x$1; + } + throw { + RE_EXN_ID: Underflow, + Error: new Error() + }; +} + +function unsafeOfString(x) { + var x$1 = ofString(x); + if (x$1 !== undefined) { + return x$1; + } + throw { + RE_EXN_ID: DecodeError, + Error: new Error() + }; +} + +function toInt(x) { + return Bigint.to_int(x._0); +} + +function toInt32(x) { + return Bigint.to_int32(x._0); +} + +function toInt64(x) { + return Bigint.to_int64(x._0); +} + +function toFloat(x) { + return Bigint.to_float(x._0); +} + +function toString(x) { + return Bigint.to_string(x._0); +} + +function succ(x) { + return /* Natural */{ + _0: Bigint.add(x._0, Bigint.one) + }; +} + +function pred(x) { + var r = Bigint.sub(x._0, Bigint.one); + if (Bigint.lt(r, Bigint.zero)) { + throw { + RE_EXN_ID: Underflow, + Error: new Error() + }; + } + return /* Natural */{ + _0: r + }; +} + +function predSafe(x) { + var x$1; + try { + x$1 = pred(x); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === Underflow) { + return ; + } + throw exn; + } + return x$1; +} + +function add(x, y) { + return /* Natural */{ + _0: Bigint.add(x._0, y._0) + }; +} + +function sub(x, y) { + var r = Bigint.sub(x._0, y._0); + if (Bigint.lt(r, Bigint.zero)) { + throw { + RE_EXN_ID: Underflow, + Error: new Error() + }; + } + return /* Natural */{ + _0: r + }; +} + +function subSafe(x, y) { + var r; + try { + r = sub(x, y); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === Underflow) { + return ; + } + throw exn; + } + return r; +} + +function mul(x, y) { + return /* Natural */{ + _0: Bigint.mul(x._0, y._0) + }; +} + +function div(x, y) { + return /* Natural */{ + _0: Bigint.div(x._0, y._0) + }; +} + +function rem(x, y) { + return /* Natural */{ + _0: Bigint.rem(x._0, y._0) + }; +} + +function divRem(x, y) { + var match = Bigint.div_rem(x._0, y._0); + return [ + /* Natural */{ + _0: match[0] + }, + /* Natural */{ + _0: match[1] + } + ]; +} + +function cdiv(x, y) { + return /* Natural */{ + _0: Bigint.cdiv(x._0, y._0) + }; +} + +function fdiv(x, y) { + return /* Natural */{ + _0: Bigint.fdiv(x._0, y._0) + }; +} + +function edivRem(x, y) { + var match = Bigint.ediv_rem(x._0, y._0); + return [ + /* Natural */{ + _0: match[0] + }, + /* Natural */{ + _0: match[1] + } + ]; +} + +function ediv(x, y) { + return /* Natural */{ + _0: Bigint.ediv(x._0, y._0) + }; +} + +function erem(x, y) { + return /* Natural */{ + _0: Bigint.erem(x._0, y._0) + }; +} + +function divexact(x, y) { + return /* Natural */{ + _0: Bigint.divexact(x._0, y._0) + }; +} + +exports.Underflow = Underflow; +exports.DecodeError = DecodeError; +exports.zero = zero; +exports.one = one; +exports.ofInt = ofInt; +exports.ofInt32 = ofInt32; +exports.ofInt64 = ofInt64; +exports.ofFloat = ofFloat; +exports.ofString = ofString; +exports.unsafeOfInt = unsafeOfInt; +exports.unsafeOfInt32 = unsafeOfInt32; +exports.unsafeOfInt64 = unsafeOfInt64; +exports.unsafeOfFloat = unsafeOfFloat; +exports.unsafeOfString = unsafeOfString; +exports.toInt = toInt; +exports.toInt32 = toInt32; +exports.toInt64 = toInt64; +exports.toFloat = toFloat; +exports.toString = toString; +exports.succ = succ; +exports.pred = pred; +exports.predSafe = predSafe; +exports.add = add; +exports.sub = sub; +exports.subSafe = subSafe; +exports.mul = mul; +exports.div = div; +exports.rem = rem; +exports.divRem = divRem; +exports.cdiv = cdiv; +exports.fdiv = fdiv; +exports.edivRem = edivRem; +exports.ediv = ediv; +exports.erem = erem; +exports.divexact = divexact; +/* No side effect */ diff --git a/drafts/bs-Zarith/lib/js/src/Q.js b/drafts/bs-Zarith/lib/js/src/Q.js new file mode 100644 index 0000000..b4675f8 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/Q.js @@ -0,0 +1,16 @@ +'use strict'; + + +var Int; + +var Int32; + +var Int64; + +var Bigint; + +exports.Int = Int; +exports.Int32 = Int32; +exports.Int64 = Int64; +exports.Bigint = Bigint; +/* No side effect */ diff --git a/drafts/bs-Zarith/lib/js/src/Q_Internal.js b/drafts/bs-Zarith/lib/js/src/Q_Internal.js new file mode 100644 index 0000000..f5a7f3e --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/Q_Internal.js @@ -0,0 +1,3791 @@ +'use strict'; + +var Z = require("./Z.js"); +var Curry = require("rescript/lib/js/curry.js"); +var $$String = require("rescript/lib/js/string.js"); +var Caml_float = require("rescript/lib/js/caml_float.js"); +var Caml_int64 = require("rescript/lib/js/caml_int64.js"); +var Pervasives = require("rescript/lib/js/pervasives.js"); +var Caml_js_exceptions = require("rescript/lib/js/caml_js_exceptions.js"); + +function mk(n, d) { + return { + num: n, + den: d + }; +} + +function make_real(n, d) { + if (n === Z.Int.zero || d === Z.Int.one) { + return { + num: n, + den: Z.Int.one + }; + } + var g = Curry._2(Z.Int.gcd, n, d); + if (g === Z.Int.one) { + return { + num: n, + den: d + }; + } else { + return { + num: Curry._2(Z.Int.divexact, n, g), + den: Curry._2(Z.Int.divexact, d, g) + }; + } +} + +function make(n, d) { + var sd = Curry._1(Z.Int.sign, d); + if (sd === 0) { + return { + num: Curry._1(Z.Int.of_int, Curry._1(Z.Int.sign, n)), + den: Z.Int.zero + }; + } else if (sd > 0) { + return make_real(n, d); + } else { + return make_real(Curry._1(Z.Int.neg, n), Curry._1(Z.Int.neg, d)); + } +} + +function eval_of_int(n) { + return { + num: n, + den: Z.Int.one + }; +} + +function of_int(n) { + var n$1 = Curry._1(Z.Int.of_int, n); + return { + num: n$1, + den: Z.Int.one + }; +} + +function of_int32(n) { + var n$1 = Curry._1(Z.Int.of_int32, n); + return { + num: n$1, + den: Z.Int.one + }; +} + +function of_int64(n) { + var n$1 = Curry._1(Z.Int.of_int64, n); + return { + num: n$1, + den: Z.Int.one + }; +} + +function of_bigint(n) { + var n$1 = Curry._1(Z.Int.of_bigint, n); + return { + num: n$1, + den: Z.Int.one + }; +} + +function of_ints(n, d) { + return make(Curry._1(Z.Int.of_int, n), Curry._1(Z.Int.of_int, d)); +} + +var zero_num = Z.Int.zero; + +var zero_den = Z.Int.one; + +var zero = { + num: zero_num, + den: zero_den +}; + +var one_num = Z.Int.one; + +var one_den = Z.Int.one; + +var one = { + num: one_num, + den: one_den +}; + +var minus_one_num = Z.Int.minus_one; + +var minus_one_den = Z.Int.one; + +var minus_one = { + num: minus_one_num, + den: minus_one_den +}; + +var inf_num = Z.Int.one; + +var inf_den = Z.Int.zero; + +var inf = { + num: inf_num, + den: inf_den +}; + +var minus_inf_num = Z.Int.minus_one; + +var minus_inf_den = Z.Int.zero; + +var minus_inf = { + num: minus_inf_num, + den: minus_inf_den +}; + +var undef_num = Z.Int.zero; + +var undef_den = Z.Int.zero; + +var undef = { + num: undef_num, + den: undef_den +}; + +function of_float(d) { + if (d === Pervasives.infinity) { + return inf; + } + if (d === Pervasives.neg_infinity) { + return minus_inf; + } + if (Pervasives.classify_float(d) === /* FP_nan */4) { + return undef; + } + var match = Caml_float.frexp_float(d); + var m = Curry._1(Z.Int.of_float, Caml_float.ldexp_float(match[0], 53)); + var e = match[1] - 53 | 0; + if (e < 0) { + return make_real(m, Curry._2(Z.Int.shift_left, Z.Int.one, -e | 0)); + } + var n = Curry._2(Z.Int.shift_left, m, e); + return { + num: n, + den: Z.Int.one + }; +} + +function of_string(s) { + try { + var i = $$String.index(s, /* '/' */47); + return make(Curry._3(Z.Int.of_substring, s, 0, i), Curry._3(Z.Int.of_substring, s, i + 1 | 0, (s.length - i | 0) - 1 | 0)); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + if (s === "inf" || s === "+inf") { + return inf; + } + if (s === "-inf") { + return minus_inf; + } + if (s === "undef") { + return undef; + } + var n = Curry._1(Z.Int.of_string, s); + return { + num: n, + den: Z.Int.one + }; + } + throw exn; + } +} + +function classify(n) { + if (n.den !== Z.Int.zero) { + if (n.num === Z.Int.zero) { + return /* ZERO */0; + } else { + return /* NZERO */4; + } + } + var match = Curry._1(Z.Int.sign, n.num); + switch (match) { + case -1 : + return /* MINF */2; + case 0 : + return /* UNDEF */3; + case 1 : + return /* INF */1; + default: + return /* UNDEF */3; + } +} + +function is_real(n) { + return n.den !== Z.Int.zero; +} + +function num(x) { + return x.num; +} + +function den(x) { + return x.den; +} + +function sign(x) { + return Curry._1(Z.Int.sign, x.num); +} + +function equal(x, y) { + if (Curry._2(Z.Int.equal, x.num, y.num)) { + return Curry._2(Z.Int.equal, x.den, y.den); + } else { + return false; + } +} + +function compare(x, y) { + var match = classify(x); + var match$1 = classify(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return 0; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + default: + exit = 2; + } + break; + case /* MINF */2 : + if (match$1 !== 1) { + if (match$1 !== 0) { + switch (match$1) { + case /* MINF */2 : + return 0; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + exit = 2; + break; + + } + } else { + exit = 2; + } + } else { + exit$1 = 3; + } + break; + case /* UNDEF */3 : + if (match$1 !== 3) { + return -1; + } else { + return 0; + } + case /* ZERO */0 : + case /* NZERO */4 : + exit$1 = 3; + break; + + } + if (exit$1 === 3) { + switch (match$1) { + case /* INF */1 : + return -1; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + return 1; + default: + exit = 2; + } + } + if (exit === 2 && match < 4) { + switch (match) { + case /* ZERO */0 : + break; + case /* INF */1 : + return 1; + case /* MINF */2 : + return -1; + + } + } + if (match$1 !== 2) { + if (x.den === y.den) { + return Curry._2(Z.Int.compare, x.num, y.num); + } else { + return Curry._2(Z.Int.compare, Curry._2(Z.Int.mul, x.num, y.den), Curry._2(Z.Int.mul, y.num, x.den)); + } + } else { + return 1; + } +} + +function min(a, b) { + if (compare(a, b) <= 0) { + return a; + } else { + return b; + } +} + +function max(a, b) { + if (compare(a, b) >= 0) { + return a; + } else { + return b; + } +} + +function leq(a, b) { + return compare(a, b) <= 0; +} + +function geq(a, b) { + return compare(a, b) >= 0; +} + +function lt(a, b) { + return compare(a, b) < 0; +} + +function gt(a, b) { + return compare(a, b) > 0; +} + +function to_string(n) { + var match = classify(n); + switch (match) { + case /* ZERO */0 : + return "0"; + case /* INF */1 : + return "+inf"; + case /* MINF */2 : + return "-inf"; + case /* UNDEF */3 : + return "undef"; + case /* NZERO */4 : + if (Curry._2(Z.Int.equal, n.den, Z.Int.one)) { + return Curry._1(Z.Int.to_string, n.num); + } else { + return Curry._1(Z.Int.to_string, n.num) + ("/" + Curry._1(Z.Int.to_string, n.den)); + } + + } +} + +function eval_to_int(x) { + return Curry._2(Z.Int.div, x.num, x.den); +} + +function to_int(x) { + return Curry._1(Z.Int.to_int, eval_to_int(x)); +} + +function to_int32(x) { + return Curry._1(Z.Int.to_int32, eval_to_int(x)); +} + +function to_int64(x) { + return Curry._1(Z.Int.to_int64, eval_to_int(x)); +} + +function to_bigint(x) { + return Curry._1(Z.Int.to_bigint, eval_to_int(x)); +} + +function to_float(x) { + var match = classify(x); + switch (match) { + case /* ZERO */0 : + return 0.0; + case /* INF */1 : + return Pervasives.infinity; + case /* MINF */2 : + return Pervasives.neg_infinity; + case /* UNDEF */3 : + return Number.NaN; + case /* NZERO */4 : + var p = x.num; + var q = x.den; + var np = Curry._1(Z.Int.numbits, p); + var nq = Curry._1(Z.Int.numbits, q); + if (np <= 53 && nq <= 53) { + return Caml_int64.to_float(Curry._1(Z.Int.to_int64, p)) / Caml_int64.to_float(Curry._1(Z.Int.to_int64, q)); + } + var n = 55 - (np - nq | 0) | 0; + var match$1 = n >= 0 ? [ + Curry._2(Z.Int.shift_left, p, n), + q + ] : [ + p, + Curry._2(Z.Int.shift_left, q, -n | 0) + ]; + var match$2 = Curry._2(Z.Int.ediv_rem, match$1[0], match$1[1]); + var f = Curry._2(Z.Int.round_to_float, match$2[0], Curry._1(Z.Int.sign, match$2[1]) === 0); + return Caml_float.ldexp_float(f, -n | 0); + + } +} + +function neg(x) { + return { + num: Curry._1(Z.Int.neg, x.num), + den: x.den + }; +} + +function abs(x) { + return { + num: Curry._1(Z.Int.abs, x.num), + den: x.den + }; +} + +function aors(zaors, x, y) { + if (x.den === y.den) { + return make_real(Curry._2(zaors, x.num, y.num), x.den); + } else { + return make_real(Curry._2(zaors, Curry._2(Z.Int.mul, x.num, y.den), Curry._2(Z.Int.mul, y.num, x.den)), Curry._2(Z.Int.mul, x.den, y.den)); + } +} + +function add(x, y) { + if (!(x.den === Z.Int.zero || y.den === Z.Int.zero)) { + return aors(Z.Int.add, x, y); + } + var match = classify(x); + var match$1 = classify(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return y; + case /* INF */1 : + switch (match$1) { + case /* MINF */2 : + return undef; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* INF */1 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + return undef; + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef; + } else { + return inf; + } + case 2 : + if (match$1 >= 2) { + return minus_inf; + } else { + return inf; + } + + } +} + +function sub(x, y) { + if (!(x.den === Z.Int.zero || y.den === Z.Int.zero)) { + return aors(Z.Int.sub, x, y); + } + var match = classify(x); + var match$1 = classify(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return neg(y); + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return undef; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* MINF */2 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + exit = 2; + break; + case /* MINF */2 : + return undef; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef; + } else { + return inf; + } + case 2 : + if (match$1 >= 2) { + return inf; + } else { + return minus_inf; + } + + } +} + +function mul(x, y) { + if (x.den === Z.Int.zero || y.den === Z.Int.zero) { + return { + num: Curry._1(Z.Int.of_int, Math.imul(Curry._1(Z.Int.sign, x.num), Curry._1(Z.Int.sign, y.num))), + den: Z.Int.zero + }; + } else { + return make_real(Curry._2(Z.Int.mul, x.num, y.num), Curry._2(Z.Int.mul, x.den, y.den)); + } +} + +function inv(x) { + var match = Curry._1(Z.Int.sign, x.num); + switch (match) { + case -1 : + return { + num: Curry._1(Z.Int.neg, x.den), + den: Curry._1(Z.Int.neg, x.num) + }; + case 0 : + break; + case 1 : + return { + num: x.den, + den: x.num + }; + default: + + } + if (x.den === Z.Int.zero) { + return undef; + } else { + return inf; + } +} + +function div(x, y) { + if (Curry._1(Z.Int.sign, y.num) >= 0) { + return mul(x, { + num: y.den, + den: y.num + }); + } else { + return mul(x, { + num: Curry._1(Z.Int.neg, y.den), + den: Curry._1(Z.Int.neg, y.num) + }); + } +} + +function mul_2exp(x, n) { + if (x.den === Z.Int.zero) { + return x; + } else { + return make_real(Curry._2(Z.Int.shift_left, x.num, n), x.den); + } +} + +function div_2exp(x, n) { + if (x.den === Z.Int.zero) { + return x; + } else { + return make_real(x.num, Curry._2(Z.Int.shift_left, x.den, n)); + } +} + +function $tilde$plus(x) { + return x; +} + +function $less$great(a, b) { + return !equal(a, b); +} + +function mk$1(n, d) { + return { + num: n, + den: d + }; +} + +function make_real$1(n, d) { + if (n === Z.Int32.zero || d === Z.Int32.one) { + return { + num: n, + den: Z.Int32.one + }; + } + var g = Curry._2(Z.Int32.gcd, n, d); + if (g === Z.Int32.one) { + return { + num: n, + den: d + }; + } else { + return { + num: Curry._2(Z.Int32.divexact, n, g), + den: Curry._2(Z.Int32.divexact, d, g) + }; + } +} + +function make$1(n, d) { + var sd = Curry._1(Z.Int32.sign, d); + if (sd === 0) { + return { + num: Curry._1(Z.Int32.of_int, Curry._1(Z.Int32.sign, n)), + den: Z.Int32.zero + }; + } else if (sd > 0) { + return make_real$1(n, d); + } else { + return make_real$1(Curry._1(Z.Int32.neg, n), Curry._1(Z.Int32.neg, d)); + } +} + +function eval_of_int$1(n) { + return { + num: n, + den: Z.Int32.one + }; +} + +function of_int$1(n) { + var n$1 = Curry._1(Z.Int32.of_int, n); + return { + num: n$1, + den: Z.Int32.one + }; +} + +function of_int32$1(n) { + var n$1 = Curry._1(Z.Int32.of_int32, n); + return { + num: n$1, + den: Z.Int32.one + }; +} + +function of_int64$1(n) { + var n$1 = Curry._1(Z.Int32.of_int64, n); + return { + num: n$1, + den: Z.Int32.one + }; +} + +function of_bigint$1(n) { + var n$1 = Curry._1(Z.Int32.of_bigint, n); + return { + num: n$1, + den: Z.Int32.one + }; +} + +function of_ints$1(n, d) { + return make$1(Curry._1(Z.Int32.of_int, n), Curry._1(Z.Int32.of_int, d)); +} + +var zero_num$1 = Z.Int32.zero; + +var zero_den$1 = Z.Int32.one; + +var zero$1 = { + num: zero_num$1, + den: zero_den$1 +}; + +var one_num$1 = Z.Int32.one; + +var one_den$1 = Z.Int32.one; + +var one$1 = { + num: one_num$1, + den: one_den$1 +}; + +var minus_one_num$1 = Z.Int32.minus_one; + +var minus_one_den$1 = Z.Int32.one; + +var minus_one$1 = { + num: minus_one_num$1, + den: minus_one_den$1 +}; + +var inf_num$1 = Z.Int32.one; + +var inf_den$1 = Z.Int32.zero; + +var inf$1 = { + num: inf_num$1, + den: inf_den$1 +}; + +var minus_inf_num$1 = Z.Int32.minus_one; + +var minus_inf_den$1 = Z.Int32.zero; + +var minus_inf$1 = { + num: minus_inf_num$1, + den: minus_inf_den$1 +}; + +var undef_num$1 = Z.Int32.zero; + +var undef_den$1 = Z.Int32.zero; + +var undef$1 = { + num: undef_num$1, + den: undef_den$1 +}; + +function of_float$1(d) { + if (d === Pervasives.infinity) { + return inf$1; + } + if (d === Pervasives.neg_infinity) { + return minus_inf$1; + } + if (Pervasives.classify_float(d) === /* FP_nan */4) { + return undef$1; + } + var match = Caml_float.frexp_float(d); + var m = Curry._1(Z.Int32.of_float, Caml_float.ldexp_float(match[0], 53)); + var e = match[1] - 53 | 0; + if (e < 0) { + return make_real$1(m, Curry._2(Z.Int32.shift_left, Z.Int32.one, -e | 0)); + } + var n = Curry._2(Z.Int32.shift_left, m, e); + return { + num: n, + den: Z.Int32.one + }; +} + +function of_string$1(s) { + try { + var i = $$String.index(s, /* '/' */47); + return make$1(Curry._3(Z.Int32.of_substring, s, 0, i), Curry._3(Z.Int32.of_substring, s, i + 1 | 0, (s.length - i | 0) - 1 | 0)); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + if (s === "inf" || s === "+inf") { + return inf$1; + } + if (s === "-inf") { + return minus_inf$1; + } + if (s === "undef") { + return undef$1; + } + var n = Curry._1(Z.Int32.of_string, s); + return { + num: n, + den: Z.Int32.one + }; + } + throw exn; + } +} + +function classify$1(n) { + if (n.den !== Z.Int32.zero) { + if (n.num === Z.Int32.zero) { + return /* ZERO */0; + } else { + return /* NZERO */4; + } + } + var match = Curry._1(Z.Int32.sign, n.num); + switch (match) { + case -1 : + return /* MINF */2; + case 0 : + return /* UNDEF */3; + case 1 : + return /* INF */1; + default: + return /* UNDEF */3; + } +} + +function is_real$1(n) { + return n.den !== Z.Int32.zero; +} + +function num$1(x) { + return x.num; +} + +function den$1(x) { + return x.den; +} + +function sign$1(x) { + return Curry._1(Z.Int32.sign, x.num); +} + +function equal$1(x, y) { + if (Curry._2(Z.Int32.equal, x.num, y.num)) { + return Curry._2(Z.Int32.equal, x.den, y.den); + } else { + return false; + } +} + +function compare$1(x, y) { + var match = classify$1(x); + var match$1 = classify$1(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return 0; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + default: + exit = 2; + } + break; + case /* MINF */2 : + if (match$1 !== 1) { + if (match$1 !== 0) { + switch (match$1) { + case /* MINF */2 : + return 0; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + exit = 2; + break; + + } + } else { + exit = 2; + } + } else { + exit$1 = 3; + } + break; + case /* UNDEF */3 : + if (match$1 !== 3) { + return -1; + } else { + return 0; + } + case /* ZERO */0 : + case /* NZERO */4 : + exit$1 = 3; + break; + + } + if (exit$1 === 3) { + switch (match$1) { + case /* INF */1 : + return -1; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + return 1; + default: + exit = 2; + } + } + if (exit === 2 && match < 4) { + switch (match) { + case /* ZERO */0 : + break; + case /* INF */1 : + return 1; + case /* MINF */2 : + return -1; + + } + } + if (match$1 !== 2) { + if (x.den === y.den) { + return Curry._2(Z.Int32.compare, x.num, y.num); + } else { + return Curry._2(Z.Int32.compare, Curry._2(Z.Int32.mul, x.num, y.den), Curry._2(Z.Int32.mul, y.num, x.den)); + } + } else { + return 1; + } +} + +function min$1(a, b) { + if (compare$1(a, b) <= 0) { + return a; + } else { + return b; + } +} + +function max$1(a, b) { + if (compare$1(a, b) >= 0) { + return a; + } else { + return b; + } +} + +function leq$1(a, b) { + return compare$1(a, b) <= 0; +} + +function geq$1(a, b) { + return compare$1(a, b) >= 0; +} + +function lt$1(a, b) { + return compare$1(a, b) < 0; +} + +function gt$1(a, b) { + return compare$1(a, b) > 0; +} + +function to_string$1(n) { + var match = classify$1(n); + switch (match) { + case /* ZERO */0 : + return "0"; + case /* INF */1 : + return "+inf"; + case /* MINF */2 : + return "-inf"; + case /* UNDEF */3 : + return "undef"; + case /* NZERO */4 : + if (Curry._2(Z.Int32.equal, n.den, Z.Int32.one)) { + return Curry._1(Z.Int32.to_string, n.num); + } else { + return Curry._1(Z.Int32.to_string, n.num) + ("/" + Curry._1(Z.Int32.to_string, n.den)); + } + + } +} + +function eval_to_int$1(x) { + return Curry._2(Z.Int32.div, x.num, x.den); +} + +function to_int$1(x) { + return Curry._1(Z.Int32.to_int, eval_to_int$1(x)); +} + +function to_int32$1(x) { + return Curry._1(Z.Int32.to_int32, eval_to_int$1(x)); +} + +function to_int64$1(x) { + return Curry._1(Z.Int32.to_int64, eval_to_int$1(x)); +} + +function to_bigint$1(x) { + return Curry._1(Z.Int32.to_bigint, eval_to_int$1(x)); +} + +function to_float$1(x) { + var match = classify$1(x); + switch (match) { + case /* ZERO */0 : + return 0.0; + case /* INF */1 : + return Pervasives.infinity; + case /* MINF */2 : + return Pervasives.neg_infinity; + case /* UNDEF */3 : + return Number.NaN; + case /* NZERO */4 : + var p = x.num; + var q = x.den; + var np = Curry._1(Z.Int32.numbits, p); + var nq = Curry._1(Z.Int32.numbits, q); + if (np <= 53 && nq <= 53) { + return Caml_int64.to_float(Curry._1(Z.Int32.to_int64, p)) / Caml_int64.to_float(Curry._1(Z.Int32.to_int64, q)); + } + var n = 55 - (np - nq | 0) | 0; + var match$1 = n >= 0 ? [ + Curry._2(Z.Int32.shift_left, p, n), + q + ] : [ + p, + Curry._2(Z.Int32.shift_left, q, -n | 0) + ]; + var match$2 = Curry._2(Z.Int32.ediv_rem, match$1[0], match$1[1]); + var f = Curry._2(Z.Int32.round_to_float, match$2[0], Curry._1(Z.Int32.sign, match$2[1]) === 0); + return Caml_float.ldexp_float(f, -n | 0); + + } +} + +function neg$1(x) { + return { + num: Curry._1(Z.Int32.neg, x.num), + den: x.den + }; +} + +function abs$1(x) { + return { + num: Curry._1(Z.Int32.abs, x.num), + den: x.den + }; +} + +function aors$1(zaors, x, y) { + if (x.den === y.den) { + return make_real$1(Curry._2(zaors, x.num, y.num), x.den); + } else { + return make_real$1(Curry._2(zaors, Curry._2(Z.Int32.mul, x.num, y.den), Curry._2(Z.Int32.mul, y.num, x.den)), Curry._2(Z.Int32.mul, x.den, y.den)); + } +} + +function add$1(x, y) { + if (!(x.den === Z.Int32.zero || y.den === Z.Int32.zero)) { + return aors$1(Z.Int32.add, x, y); + } + var match = classify$1(x); + var match$1 = classify$1(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return y; + case /* INF */1 : + switch (match$1) { + case /* MINF */2 : + return undef$1; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* INF */1 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + return undef$1; + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf$1; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef$1; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef$1; + } else { + return inf$1; + } + case 2 : + if (match$1 >= 2) { + return minus_inf$1; + } else { + return inf$1; + } + + } +} + +function sub$1(x, y) { + if (!(x.den === Z.Int32.zero || y.den === Z.Int32.zero)) { + return aors$1(Z.Int32.sub, x, y); + } + var match = classify$1(x); + var match$1 = classify$1(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return neg$1(y); + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return undef$1; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* MINF */2 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + exit = 2; + break; + case /* MINF */2 : + return undef$1; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf$1; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef$1; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef$1; + } else { + return inf$1; + } + case 2 : + if (match$1 >= 2) { + return inf$1; + } else { + return minus_inf$1; + } + + } +} + +function mul$1(x, y) { + if (x.den === Z.Int32.zero || y.den === Z.Int32.zero) { + return { + num: Curry._1(Z.Int32.of_int, Math.imul(Curry._1(Z.Int32.sign, x.num), Curry._1(Z.Int32.sign, y.num))), + den: Z.Int32.zero + }; + } else { + return make_real$1(Curry._2(Z.Int32.mul, x.num, y.num), Curry._2(Z.Int32.mul, x.den, y.den)); + } +} + +function inv$1(x) { + var match = Curry._1(Z.Int32.sign, x.num); + switch (match) { + case -1 : + return { + num: Curry._1(Z.Int32.neg, x.den), + den: Curry._1(Z.Int32.neg, x.num) + }; + case 0 : + break; + case 1 : + return { + num: x.den, + den: x.num + }; + default: + + } + if (x.den === Z.Int32.zero) { + return undef$1; + } else { + return inf$1; + } +} + +function div$1(x, y) { + if (Curry._1(Z.Int32.sign, y.num) >= 0) { + return mul$1(x, { + num: y.den, + den: y.num + }); + } else { + return mul$1(x, { + num: Curry._1(Z.Int32.neg, y.den), + den: Curry._1(Z.Int32.neg, y.num) + }); + } +} + +function mul_2exp$1(x, n) { + if (x.den === Z.Int32.zero) { + return x; + } else { + return make_real$1(Curry._2(Z.Int32.shift_left, x.num, n), x.den); + } +} + +function div_2exp$1(x, n) { + if (x.den === Z.Int32.zero) { + return x; + } else { + return make_real$1(x.num, Curry._2(Z.Int32.shift_left, x.den, n)); + } +} + +function $tilde$plus$1(x) { + return x; +} + +function $less$great$1(a, b) { + return !equal$1(a, b); +} + +function mk$2(n, d) { + return { + num: n, + den: d + }; +} + +function make_real$2(n, d) { + if (n === Z.Int64.zero || d === Z.Int64.one) { + return { + num: n, + den: Z.Int64.one + }; + } + var g = Curry._2(Z.Int64.gcd, n, d); + if (g === Z.Int64.one) { + return { + num: n, + den: d + }; + } else { + return { + num: Curry._2(Z.Int64.divexact, n, g), + den: Curry._2(Z.Int64.divexact, d, g) + }; + } +} + +function make$2(n, d) { + var sd = Curry._1(Z.Int64.sign, d); + if (sd === 0) { + return { + num: Curry._1(Z.Int64.of_int, Curry._1(Z.Int64.sign, n)), + den: Z.Int64.zero + }; + } else if (sd > 0) { + return make_real$2(n, d); + } else { + return make_real$2(Curry._1(Z.Int64.neg, n), Curry._1(Z.Int64.neg, d)); + } +} + +function eval_of_int$2(n) { + return { + num: n, + den: Z.Int64.one + }; +} + +function of_int$2(n) { + var n$1 = Curry._1(Z.Int64.of_int, n); + return { + num: n$1, + den: Z.Int64.one + }; +} + +function of_int32$2(n) { + var n$1 = Curry._1(Z.Int64.of_int32, n); + return { + num: n$1, + den: Z.Int64.one + }; +} + +function of_int64$2(n) { + var n$1 = Curry._1(Z.Int64.of_int64, n); + return { + num: n$1, + den: Z.Int64.one + }; +} + +function of_bigint$2(n) { + var n$1 = Curry._1(Z.Int64.of_bigint, n); + return { + num: n$1, + den: Z.Int64.one + }; +} + +function of_ints$2(n, d) { + return make$2(Curry._1(Z.Int64.of_int, n), Curry._1(Z.Int64.of_int, d)); +} + +var zero_num$2 = Z.Int64.zero; + +var zero_den$2 = Z.Int64.one; + +var zero$2 = { + num: zero_num$2, + den: zero_den$2 +}; + +var one_num$2 = Z.Int64.one; + +var one_den$2 = Z.Int64.one; + +var one$2 = { + num: one_num$2, + den: one_den$2 +}; + +var minus_one_num$2 = Z.Int64.minus_one; + +var minus_one_den$2 = Z.Int64.one; + +var minus_one$2 = { + num: minus_one_num$2, + den: minus_one_den$2 +}; + +var inf_num$2 = Z.Int64.one; + +var inf_den$2 = Z.Int64.zero; + +var inf$2 = { + num: inf_num$2, + den: inf_den$2 +}; + +var minus_inf_num$2 = Z.Int64.minus_one; + +var minus_inf_den$2 = Z.Int64.zero; + +var minus_inf$2 = { + num: minus_inf_num$2, + den: minus_inf_den$2 +}; + +var undef_num$2 = Z.Int64.zero; + +var undef_den$2 = Z.Int64.zero; + +var undef$2 = { + num: undef_num$2, + den: undef_den$2 +}; + +function of_float$2(d) { + if (d === Pervasives.infinity) { + return inf$2; + } + if (d === Pervasives.neg_infinity) { + return minus_inf$2; + } + if (Pervasives.classify_float(d) === /* FP_nan */4) { + return undef$2; + } + var match = Caml_float.frexp_float(d); + var m = Curry._1(Z.Int64.of_float, Caml_float.ldexp_float(match[0], 53)); + var e = match[1] - 53 | 0; + if (e < 0) { + return make_real$2(m, Curry._2(Z.Int64.shift_left, Z.Int64.one, -e | 0)); + } + var n = Curry._2(Z.Int64.shift_left, m, e); + return { + num: n, + den: Z.Int64.one + }; +} + +function of_string$2(s) { + try { + var i = $$String.index(s, /* '/' */47); + return make$2(Curry._3(Z.Int64.of_substring, s, 0, i), Curry._3(Z.Int64.of_substring, s, i + 1 | 0, (s.length - i | 0) - 1 | 0)); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + if (s === "inf" || s === "+inf") { + return inf$2; + } + if (s === "-inf") { + return minus_inf$2; + } + if (s === "undef") { + return undef$2; + } + var n = Curry._1(Z.Int64.of_string, s); + return { + num: n, + den: Z.Int64.one + }; + } + throw exn; + } +} + +function classify$2(n) { + if (n.den !== Z.Int64.zero) { + if (n.num === Z.Int64.zero) { + return /* ZERO */0; + } else { + return /* NZERO */4; + } + } + var match = Curry._1(Z.Int64.sign, n.num); + switch (match) { + case -1 : + return /* MINF */2; + case 0 : + return /* UNDEF */3; + case 1 : + return /* INF */1; + default: + return /* UNDEF */3; + } +} + +function is_real$2(n) { + return n.den !== Z.Int64.zero; +} + +function num$2(x) { + return x.num; +} + +function den$2(x) { + return x.den; +} + +function sign$2(x) { + return Curry._1(Z.Int64.sign, x.num); +} + +function equal$2(x, y) { + if (Curry._2(Z.Int64.equal, x.num, y.num)) { + return Curry._2(Z.Int64.equal, x.den, y.den); + } else { + return false; + } +} + +function compare$2(x, y) { + var match = classify$2(x); + var match$1 = classify$2(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return 0; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + default: + exit = 2; + } + break; + case /* MINF */2 : + if (match$1 !== 1) { + if (match$1 !== 0) { + switch (match$1) { + case /* MINF */2 : + return 0; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + exit = 2; + break; + + } + } else { + exit = 2; + } + } else { + exit$1 = 3; + } + break; + case /* UNDEF */3 : + if (match$1 !== 3) { + return -1; + } else { + return 0; + } + case /* ZERO */0 : + case /* NZERO */4 : + exit$1 = 3; + break; + + } + if (exit$1 === 3) { + switch (match$1) { + case /* INF */1 : + return -1; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + return 1; + default: + exit = 2; + } + } + if (exit === 2 && match < 4) { + switch (match) { + case /* ZERO */0 : + break; + case /* INF */1 : + return 1; + case /* MINF */2 : + return -1; + + } + } + if (match$1 !== 2) { + if (x.den === y.den) { + return Curry._2(Z.Int64.compare, x.num, y.num); + } else { + return Curry._2(Z.Int64.compare, Curry._2(Z.Int64.mul, x.num, y.den), Curry._2(Z.Int64.mul, y.num, x.den)); + } + } else { + return 1; + } +} + +function min$2(a, b) { + if (compare$2(a, b) <= 0) { + return a; + } else { + return b; + } +} + +function max$2(a, b) { + if (compare$2(a, b) >= 0) { + return a; + } else { + return b; + } +} + +function leq$2(a, b) { + return compare$2(a, b) <= 0; +} + +function geq$2(a, b) { + return compare$2(a, b) >= 0; +} + +function lt$2(a, b) { + return compare$2(a, b) < 0; +} + +function gt$2(a, b) { + return compare$2(a, b) > 0; +} + +function to_string$2(n) { + var match = classify$2(n); + switch (match) { + case /* ZERO */0 : + return "0"; + case /* INF */1 : + return "+inf"; + case /* MINF */2 : + return "-inf"; + case /* UNDEF */3 : + return "undef"; + case /* NZERO */4 : + if (Curry._2(Z.Int64.equal, n.den, Z.Int64.one)) { + return Curry._1(Z.Int64.to_string, n.num); + } else { + return Curry._1(Z.Int64.to_string, n.num) + ("/" + Curry._1(Z.Int64.to_string, n.den)); + } + + } +} + +function eval_to_int$2(x) { + return Curry._2(Z.Int64.div, x.num, x.den); +} + +function to_int$2(x) { + return Curry._1(Z.Int64.to_int, eval_to_int$2(x)); +} + +function to_int32$2(x) { + return Curry._1(Z.Int64.to_int32, eval_to_int$2(x)); +} + +function to_int64$2(x) { + return Curry._1(Z.Int64.to_int64, eval_to_int$2(x)); +} + +function to_bigint$2(x) { + return Curry._1(Z.Int64.to_bigint, eval_to_int$2(x)); +} + +function to_float$2(x) { + var match = classify$2(x); + switch (match) { + case /* ZERO */0 : + return 0.0; + case /* INF */1 : + return Pervasives.infinity; + case /* MINF */2 : + return Pervasives.neg_infinity; + case /* UNDEF */3 : + return Number.NaN; + case /* NZERO */4 : + var p = x.num; + var q = x.den; + var np = Curry._1(Z.Int64.numbits, p); + var nq = Curry._1(Z.Int64.numbits, q); + if (np <= 53 && nq <= 53) { + return Caml_int64.to_float(Curry._1(Z.Int64.to_int64, p)) / Caml_int64.to_float(Curry._1(Z.Int64.to_int64, q)); + } + var n = 55 - (np - nq | 0) | 0; + var match$1 = n >= 0 ? [ + Curry._2(Z.Int64.shift_left, p, n), + q + ] : [ + p, + Curry._2(Z.Int64.shift_left, q, -n | 0) + ]; + var match$2 = Curry._2(Z.Int64.ediv_rem, match$1[0], match$1[1]); + var f = Curry._2(Z.Int64.round_to_float, match$2[0], Curry._1(Z.Int64.sign, match$2[1]) === 0); + return Caml_float.ldexp_float(f, -n | 0); + + } +} + +function neg$2(x) { + return { + num: Curry._1(Z.Int64.neg, x.num), + den: x.den + }; +} + +function abs$2(x) { + return { + num: Curry._1(Z.Int64.abs, x.num), + den: x.den + }; +} + +function aors$2(zaors, x, y) { + if (x.den === y.den) { + return make_real$2(Curry._2(zaors, x.num, y.num), x.den); + } else { + return make_real$2(Curry._2(zaors, Curry._2(Z.Int64.mul, x.num, y.den), Curry._2(Z.Int64.mul, y.num, x.den)), Curry._2(Z.Int64.mul, x.den, y.den)); + } +} + +function add$2(x, y) { + if (!(x.den === Z.Int64.zero || y.den === Z.Int64.zero)) { + return aors$2(Z.Int64.add, x, y); + } + var match = classify$2(x); + var match$1 = classify$2(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return y; + case /* INF */1 : + switch (match$1) { + case /* MINF */2 : + return undef$2; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* INF */1 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + return undef$2; + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf$2; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef$2; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef$2; + } else { + return inf$2; + } + case 2 : + if (match$1 >= 2) { + return minus_inf$2; + } else { + return inf$2; + } + + } +} + +function sub$2(x, y) { + if (!(x.den === Z.Int64.zero || y.den === Z.Int64.zero)) { + return aors$2(Z.Int64.sub, x, y); + } + var match = classify$2(x); + var match$1 = classify$2(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return neg$2(y); + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return undef$2; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* MINF */2 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + exit = 2; + break; + case /* MINF */2 : + return undef$2; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf$2; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef$2; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef$2; + } else { + return inf$2; + } + case 2 : + if (match$1 >= 2) { + return inf$2; + } else { + return minus_inf$2; + } + + } +} + +function mul$2(x, y) { + if (x.den === Z.Int64.zero || y.den === Z.Int64.zero) { + return { + num: Curry._1(Z.Int64.of_int, Math.imul(Curry._1(Z.Int64.sign, x.num), Curry._1(Z.Int64.sign, y.num))), + den: Z.Int64.zero + }; + } else { + return make_real$2(Curry._2(Z.Int64.mul, x.num, y.num), Curry._2(Z.Int64.mul, x.den, y.den)); + } +} + +function inv$2(x) { + var match = Curry._1(Z.Int64.sign, x.num); + switch (match) { + case -1 : + return { + num: Curry._1(Z.Int64.neg, x.den), + den: Curry._1(Z.Int64.neg, x.num) + }; + case 0 : + break; + case 1 : + return { + num: x.den, + den: x.num + }; + default: + + } + if (x.den === Z.Int64.zero) { + return undef$2; + } else { + return inf$2; + } +} + +function div$2(x, y) { + if (Curry._1(Z.Int64.sign, y.num) >= 0) { + return mul$2(x, { + num: y.den, + den: y.num + }); + } else { + return mul$2(x, { + num: Curry._1(Z.Int64.neg, y.den), + den: Curry._1(Z.Int64.neg, y.num) + }); + } +} + +function mul_2exp$2(x, n) { + if (x.den === Z.Int64.zero) { + return x; + } else { + return make_real$2(Curry._2(Z.Int64.shift_left, x.num, n), x.den); + } +} + +function div_2exp$2(x, n) { + if (x.den === Z.Int64.zero) { + return x; + } else { + return make_real$2(x.num, Curry._2(Z.Int64.shift_left, x.den, n)); + } +} + +function $tilde$plus$2(x) { + return x; +} + +function $less$great$2(a, b) { + return !equal$2(a, b); +} + +function mk$3(n, d) { + return { + num: n, + den: d + }; +} + +function make_real$3(n, d) { + if (n === Z.Bigint.zero || d === Z.Bigint.one) { + return { + num: n, + den: Z.Bigint.one + }; + } + var g = Curry._2(Z.Bigint.gcd, n, d); + if (g === Z.Bigint.one) { + return { + num: n, + den: d + }; + } else { + return { + num: Curry._2(Z.Bigint.divexact, n, g), + den: Curry._2(Z.Bigint.divexact, d, g) + }; + } +} + +function make$3(n, d) { + var sd = Curry._1(Z.Bigint.sign, d); + if (sd === 0) { + return { + num: Curry._1(Z.Bigint.of_int, Curry._1(Z.Bigint.sign, n)), + den: Z.Bigint.zero + }; + } else if (sd > 0) { + return make_real$3(n, d); + } else { + return make_real$3(Curry._1(Z.Bigint.neg, n), Curry._1(Z.Bigint.neg, d)); + } +} + +function eval_of_int$3(n) { + return { + num: n, + den: Z.Bigint.one + }; +} + +function of_int$3(n) { + var n$1 = Curry._1(Z.Bigint.of_int, n); + return { + num: n$1, + den: Z.Bigint.one + }; +} + +function of_int32$3(n) { + var n$1 = Curry._1(Z.Bigint.of_int32, n); + return { + num: n$1, + den: Z.Bigint.one + }; +} + +function of_int64$3(n) { + var n$1 = Curry._1(Z.Bigint.of_int64, n); + return { + num: n$1, + den: Z.Bigint.one + }; +} + +function of_bigint$3(n) { + var n$1 = Curry._1(Z.Bigint.of_bigint, n); + return { + num: n$1, + den: Z.Bigint.one + }; +} + +function of_ints$3(n, d) { + return make$3(Curry._1(Z.Bigint.of_int, n), Curry._1(Z.Bigint.of_int, d)); +} + +var zero_num$3 = Z.Bigint.zero; + +var zero_den$3 = Z.Bigint.one; + +var zero$3 = { + num: zero_num$3, + den: zero_den$3 +}; + +var one_num$3 = Z.Bigint.one; + +var one_den$3 = Z.Bigint.one; + +var one$3 = { + num: one_num$3, + den: one_den$3 +}; + +var minus_one_num$3 = Z.Bigint.minus_one; + +var minus_one_den$3 = Z.Bigint.one; + +var minus_one$3 = { + num: minus_one_num$3, + den: minus_one_den$3 +}; + +var inf_num$3 = Z.Bigint.one; + +var inf_den$3 = Z.Bigint.zero; + +var inf$3 = { + num: inf_num$3, + den: inf_den$3 +}; + +var minus_inf_num$3 = Z.Bigint.minus_one; + +var minus_inf_den$3 = Z.Bigint.zero; + +var minus_inf$3 = { + num: minus_inf_num$3, + den: minus_inf_den$3 +}; + +var undef_num$3 = Z.Bigint.zero; + +var undef_den$3 = Z.Bigint.zero; + +var undef$3 = { + num: undef_num$3, + den: undef_den$3 +}; + +function of_float$3(d) { + if (d === Pervasives.infinity) { + return inf$3; + } + if (d === Pervasives.neg_infinity) { + return minus_inf$3; + } + if (Pervasives.classify_float(d) === /* FP_nan */4) { + return undef$3; + } + var match = Caml_float.frexp_float(d); + var m = Curry._1(Z.Bigint.of_float, Caml_float.ldexp_float(match[0], 53)); + var e = match[1] - 53 | 0; + if (e < 0) { + return make_real$3(m, Curry._2(Z.Bigint.shift_left, Z.Bigint.one, -e | 0)); + } + var n = Curry._2(Z.Bigint.shift_left, m, e); + return { + num: n, + den: Z.Bigint.one + }; +} + +function of_string$3(s) { + try { + var i = $$String.index(s, /* '/' */47); + return make$3(Curry._3(Z.Bigint.of_substring, s, 0, i), Curry._3(Z.Bigint.of_substring, s, i + 1 | 0, (s.length - i | 0) - 1 | 0)); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + if (s === "inf" || s === "+inf") { + return inf$3; + } + if (s === "-inf") { + return minus_inf$3; + } + if (s === "undef") { + return undef$3; + } + var n = Curry._1(Z.Bigint.of_string, s); + return { + num: n, + den: Z.Bigint.one + }; + } + throw exn; + } +} + +function classify$3(n) { + if (n.den !== Z.Bigint.zero) { + if (n.num === Z.Bigint.zero) { + return /* ZERO */0; + } else { + return /* NZERO */4; + } + } + var match = Curry._1(Z.Bigint.sign, n.num); + switch (match) { + case -1 : + return /* MINF */2; + case 0 : + return /* UNDEF */3; + case 1 : + return /* INF */1; + default: + return /* UNDEF */3; + } +} + +function is_real$3(n) { + return n.den !== Z.Bigint.zero; +} + +function num$3(x) { + return x.num; +} + +function den$3(x) { + return x.den; +} + +function sign$3(x) { + return Curry._1(Z.Bigint.sign, x.num); +} + +function equal$3(x, y) { + if (Curry._2(Z.Bigint.equal, x.num, y.num)) { + return Curry._2(Z.Bigint.equal, x.den, y.den); + } else { + return false; + } +} + +function compare$3(x, y) { + var match = classify$3(x); + var match$1 = classify$3(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return 0; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + default: + exit = 2; + } + break; + case /* MINF */2 : + if (match$1 !== 1) { + if (match$1 !== 0) { + switch (match$1) { + case /* MINF */2 : + return 0; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + exit = 2; + break; + + } + } else { + exit = 2; + } + } else { + exit$1 = 3; + } + break; + case /* UNDEF */3 : + if (match$1 !== 3) { + return -1; + } else { + return 0; + } + case /* ZERO */0 : + case /* NZERO */4 : + exit$1 = 3; + break; + + } + if (exit$1 === 3) { + switch (match$1) { + case /* INF */1 : + return -1; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + return 1; + default: + exit = 2; + } + } + if (exit === 2 && match < 4) { + switch (match) { + case /* ZERO */0 : + break; + case /* INF */1 : + return 1; + case /* MINF */2 : + return -1; + + } + } + if (match$1 !== 2) { + if (x.den === y.den) { + return Curry._2(Z.Bigint.compare, x.num, y.num); + } else { + return Curry._2(Z.Bigint.compare, Curry._2(Z.Bigint.mul, x.num, y.den), Curry._2(Z.Bigint.mul, y.num, x.den)); + } + } else { + return 1; + } +} + +function min$3(a, b) { + if (compare$3(a, b) <= 0) { + return a; + } else { + return b; + } +} + +function max$3(a, b) { + if (compare$3(a, b) >= 0) { + return a; + } else { + return b; + } +} + +function leq$3(a, b) { + return compare$3(a, b) <= 0; +} + +function geq$3(a, b) { + return compare$3(a, b) >= 0; +} + +function lt$3(a, b) { + return compare$3(a, b) < 0; +} + +function gt$3(a, b) { + return compare$3(a, b) > 0; +} + +function to_string$3(n) { + var match = classify$3(n); + switch (match) { + case /* ZERO */0 : + return "0"; + case /* INF */1 : + return "+inf"; + case /* MINF */2 : + return "-inf"; + case /* UNDEF */3 : + return "undef"; + case /* NZERO */4 : + if (Curry._2(Z.Bigint.equal, n.den, Z.Bigint.one)) { + return Curry._1(Z.Bigint.to_string, n.num); + } else { + return Curry._1(Z.Bigint.to_string, n.num) + ("/" + Curry._1(Z.Bigint.to_string, n.den)); + } + + } +} + +function eval_to_int$3(x) { + return Curry._2(Z.Bigint.div, x.num, x.den); +} + +function to_int$3(x) { + return Curry._1(Z.Bigint.to_int, eval_to_int$3(x)); +} + +function to_int32$3(x) { + return Curry._1(Z.Bigint.to_int32, eval_to_int$3(x)); +} + +function to_int64$3(x) { + return Curry._1(Z.Bigint.to_int64, eval_to_int$3(x)); +} + +function to_bigint$3(x) { + return Curry._1(Z.Bigint.to_bigint, eval_to_int$3(x)); +} + +function to_float$3(x) { + var match = classify$3(x); + switch (match) { + case /* ZERO */0 : + return 0.0; + case /* INF */1 : + return Pervasives.infinity; + case /* MINF */2 : + return Pervasives.neg_infinity; + case /* UNDEF */3 : + return Number.NaN; + case /* NZERO */4 : + var p = x.num; + var q = x.den; + var np = Curry._1(Z.Bigint.numbits, p); + var nq = Curry._1(Z.Bigint.numbits, q); + if (np <= 53 && nq <= 53) { + return Caml_int64.to_float(Curry._1(Z.Bigint.to_int64, p)) / Caml_int64.to_float(Curry._1(Z.Bigint.to_int64, q)); + } + var n = 55 - (np - nq | 0) | 0; + var match$1 = n >= 0 ? [ + Curry._2(Z.Bigint.shift_left, p, n), + q + ] : [ + p, + Curry._2(Z.Bigint.shift_left, q, -n | 0) + ]; + var match$2 = Curry._2(Z.Bigint.ediv_rem, match$1[0], match$1[1]); + var f = Curry._2(Z.Bigint.round_to_float, match$2[0], Curry._1(Z.Bigint.sign, match$2[1]) === 0); + return Caml_float.ldexp_float(f, -n | 0); + + } +} + +function neg$3(x) { + return { + num: Curry._1(Z.Bigint.neg, x.num), + den: x.den + }; +} + +function abs$3(x) { + return { + num: Curry._1(Z.Bigint.abs, x.num), + den: x.den + }; +} + +function aors$3(zaors, x, y) { + if (x.den === y.den) { + return make_real$3(Curry._2(zaors, x.num, y.num), x.den); + } else { + return make_real$3(Curry._2(zaors, Curry._2(Z.Bigint.mul, x.num, y.den), Curry._2(Z.Bigint.mul, y.num, x.den)), Curry._2(Z.Bigint.mul, x.den, y.den)); + } +} + +function add$3(x, y) { + if (!(x.den === Z.Bigint.zero || y.den === Z.Bigint.zero)) { + return aors$3(Z.Bigint.add, x, y); + } + var match = classify$3(x); + var match$1 = classify$3(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return y; + case /* INF */1 : + switch (match$1) { + case /* MINF */2 : + return undef$3; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* INF */1 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + return undef$3; + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf$3; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef$3; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef$3; + } else { + return inf$3; + } + case 2 : + if (match$1 >= 2) { + return minus_inf$3; + } else { + return inf$3; + } + + } +} + +function sub$3(x, y) { + if (!(x.den === Z.Bigint.zero || y.den === Z.Bigint.zero)) { + return aors$3(Z.Bigint.sub, x, y); + } + var match = classify$3(x); + var match$1 = classify$3(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return neg$3(y); + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return undef$3; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* MINF */2 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + exit = 2; + break; + case /* MINF */2 : + return undef$3; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf$3; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef$3; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef$3; + } else { + return inf$3; + } + case 2 : + if (match$1 >= 2) { + return inf$3; + } else { + return minus_inf$3; + } + + } +} + +function mul$3(x, y) { + if (x.den === Z.Bigint.zero || y.den === Z.Bigint.zero) { + return { + num: Curry._1(Z.Bigint.of_int, Math.imul(Curry._1(Z.Bigint.sign, x.num), Curry._1(Z.Bigint.sign, y.num))), + den: Z.Bigint.zero + }; + } else { + return make_real$3(Curry._2(Z.Bigint.mul, x.num, y.num), Curry._2(Z.Bigint.mul, x.den, y.den)); + } +} + +function inv$3(x) { + var match = Curry._1(Z.Bigint.sign, x.num); + switch (match) { + case -1 : + return { + num: Curry._1(Z.Bigint.neg, x.den), + den: Curry._1(Z.Bigint.neg, x.num) + }; + case 0 : + break; + case 1 : + return { + num: x.den, + den: x.num + }; + default: + + } + if (x.den === Z.Bigint.zero) { + return undef$3; + } else { + return inf$3; + } +} + +function div$3(x, y) { + if (Curry._1(Z.Bigint.sign, y.num) >= 0) { + return mul$3(x, { + num: y.den, + den: y.num + }); + } else { + return mul$3(x, { + num: Curry._1(Z.Bigint.neg, y.den), + den: Curry._1(Z.Bigint.neg, y.num) + }); + } +} + +function mul_2exp$3(x, n) { + if (x.den === Z.Bigint.zero) { + return x; + } else { + return make_real$3(Curry._2(Z.Bigint.shift_left, x.num, n), x.den); + } +} + +function div_2exp$3(x, n) { + if (x.den === Z.Bigint.zero) { + return x; + } else { + return make_real$3(x.num, Curry._2(Z.Bigint.shift_left, x.den, n)); + } +} + +function $tilde$plus$3(x) { + return x; +} + +function $less$great$3(a, b) { + return !equal$3(a, b); +} + +function Q(funarg) { + var make_real = function (n, d) { + if (n === funarg.zero || d === funarg.one) { + return { + num: n, + den: funarg.one + }; + } + var g = Curry._2(funarg.gcd, n, d); + if (g === funarg.one) { + return { + num: n, + den: d + }; + } else { + return { + num: Curry._2(funarg.divexact, n, g), + den: Curry._2(funarg.divexact, d, g) + }; + } + }; + var make = function (n, d) { + var sd = Curry._1(funarg.sign, d); + if (sd === 0) { + return { + num: Curry._1(funarg.of_int, Curry._1(funarg.sign, n)), + den: funarg.zero + }; + } else if (sd > 0) { + return make_real(n, d); + } else { + return make_real(Curry._1(funarg.neg, n), Curry._1(funarg.neg, d)); + } + }; + var eval_of_int = function (n) { + return { + num: n, + den: funarg.one + }; + }; + var of_int = function (n) { + var n$1 = Curry._1(funarg.of_int, n); + return { + num: n$1, + den: funarg.one + }; + }; + var of_int32 = function (n) { + var n$1 = Curry._1(funarg.of_int32, n); + return { + num: n$1, + den: funarg.one + }; + }; + var of_int64 = function (n) { + var n$1 = Curry._1(funarg.of_int64, n); + return { + num: n$1, + den: funarg.one + }; + }; + var of_bigint = function (n) { + var n$1 = Curry._1(funarg.of_bigint, n); + return { + num: n$1, + den: funarg.one + }; + }; + var of_ints = function (n, d) { + return make(Curry._1(funarg.of_int, n), Curry._1(funarg.of_int, d)); + }; + var zero_num = funarg.zero; + var zero_den = funarg.one; + var zero = { + num: zero_num, + den: zero_den + }; + var one_num = funarg.one; + var one_den = funarg.one; + var one = { + num: one_num, + den: one_den + }; + var minus_one_num = funarg.minus_one; + var minus_one_den = funarg.one; + var minus_one = { + num: minus_one_num, + den: minus_one_den + }; + var inf_num = funarg.one; + var inf_den = funarg.zero; + var inf = { + num: inf_num, + den: inf_den + }; + var minus_inf_num = funarg.minus_one; + var minus_inf_den = funarg.zero; + var minus_inf = { + num: minus_inf_num, + den: minus_inf_den + }; + var undef_num = funarg.zero; + var undef_den = funarg.zero; + var undef = { + num: undef_num, + den: undef_den + }; + var of_float = function (d) { + if (d === Pervasives.infinity) { + return inf; + } + if (d === Pervasives.neg_infinity) { + return minus_inf; + } + if (Pervasives.classify_float(d) === /* FP_nan */4) { + return undef; + } + var match = Caml_float.frexp_float(d); + var m = Curry._1(funarg.of_float, Caml_float.ldexp_float(match[0], 53)); + var e = match[1] - 53 | 0; + if (e < 0) { + return make_real(m, Curry._2(funarg.shift_left, funarg.one, -e | 0)); + } + var n = Curry._2(funarg.shift_left, m, e); + return { + num: n, + den: funarg.one + }; + }; + var of_string = function (s) { + try { + var i = $$String.index(s, /* '/' */47); + return make(Curry._3(funarg.of_substring, s, 0, i), Curry._3(funarg.of_substring, s, i + 1 | 0, (s.length - i | 0) - 1 | 0)); + } + catch (raw_exn){ + var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.RE_EXN_ID === "Not_found") { + if (s === "inf" || s === "+inf") { + return inf; + } + if (s === "-inf") { + return minus_inf; + } + if (s === "undef") { + return undef; + } + var n = Curry._1(funarg.of_string, s); + return { + num: n, + den: funarg.one + }; + } + throw exn; + } + }; + var classify = function (n) { + if (n.den !== funarg.zero) { + if (n.num === funarg.zero) { + return /* ZERO */0; + } else { + return /* NZERO */4; + } + } + var match = Curry._1(funarg.sign, n.num); + switch (match) { + case -1 : + return /* MINF */2; + case 0 : + return /* UNDEF */3; + case 1 : + return /* INF */1; + default: + return /* UNDEF */3; + } + }; + var is_real = function (n) { + return n.den !== funarg.zero; + }; + var num = function (x) { + return x.num; + }; + var den = function (x) { + return x.den; + }; + var sign = function (x) { + return Curry._1(funarg.sign, x.num); + }; + var equal = function (x, y) { + if (Curry._2(funarg.equal, x.num, y.num)) { + return Curry._2(funarg.equal, x.den, y.den); + } else { + return false; + } + }; + var compare = function (x, y) { + var match = classify(x); + var match$1 = classify(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return 0; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + default: + exit = 2; + } + break; + case /* MINF */2 : + if (match$1 !== 1) { + if (match$1 !== 0) { + switch (match$1) { + case /* MINF */2 : + return 0; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + exit = 2; + break; + + } + } else { + exit = 2; + } + } else { + exit$1 = 3; + } + break; + case /* UNDEF */3 : + if (match$1 !== 3) { + return -1; + } else { + return 0; + } + case /* ZERO */0 : + case /* NZERO */4 : + exit$1 = 3; + break; + + } + if (exit$1 === 3) { + switch (match$1) { + case /* INF */1 : + return -1; + case /* MINF */2 : + exit = 2; + break; + case /* UNDEF */3 : + return 1; + default: + exit = 2; + } + } + if (exit === 2 && match < 4) { + switch (match) { + case /* ZERO */0 : + break; + case /* INF */1 : + return 1; + case /* MINF */2 : + return -1; + + } + } + if (match$1 !== 2) { + if (x.den === y.den) { + return Curry._2(funarg.compare, x.num, y.num); + } else { + return Curry._2(funarg.compare, Curry._2(funarg.mul, x.num, y.den), Curry._2(funarg.mul, y.num, x.den)); + } + } else { + return 1; + } + }; + var min = function (a, b) { + if (compare(a, b) <= 0) { + return a; + } else { + return b; + } + }; + var max = function (a, b) { + if (compare(a, b) >= 0) { + return a; + } else { + return b; + } + }; + var leq = function (a, b) { + return compare(a, b) <= 0; + }; + var geq = function (a, b) { + return compare(a, b) >= 0; + }; + var lt = function (a, b) { + return compare(a, b) < 0; + }; + var gt = function (a, b) { + return compare(a, b) > 0; + }; + var to_string = function (n) { + var match = classify(n); + switch (match) { + case /* ZERO */0 : + return "0"; + case /* INF */1 : + return "+inf"; + case /* MINF */2 : + return "-inf"; + case /* UNDEF */3 : + return "undef"; + case /* NZERO */4 : + if (Curry._2(funarg.equal, n.den, funarg.one)) { + return Curry._1(funarg.to_string, n.num); + } else { + return Curry._1(funarg.to_string, n.num) + ("/" + Curry._1(funarg.to_string, n.den)); + } + + } + }; + var eval_to_int = function (x) { + return Curry._2(funarg.div, x.num, x.den); + }; + var to_int = function (x) { + return Curry._1(funarg.to_int, eval_to_int(x)); + }; + var to_int32 = function (x) { + return Curry._1(funarg.to_int32, eval_to_int(x)); + }; + var to_int64 = function (x) { + return Curry._1(funarg.to_int64, eval_to_int(x)); + }; + var to_bigint = function (x) { + return Curry._1(funarg.to_bigint, eval_to_int(x)); + }; + var to_float = function (x) { + var match = classify(x); + switch (match) { + case /* ZERO */0 : + return 0.0; + case /* INF */1 : + return Pervasives.infinity; + case /* MINF */2 : + return Pervasives.neg_infinity; + case /* UNDEF */3 : + return Number.NaN; + case /* NZERO */4 : + var p = x.num; + var q = x.den; + var np = Curry._1(funarg.numbits, p); + var nq = Curry._1(funarg.numbits, q); + if (np <= 53 && nq <= 53) { + return Caml_int64.to_float(Curry._1(funarg.to_int64, p)) / Caml_int64.to_float(Curry._1(funarg.to_int64, q)); + } + var n = 55 - (np - nq | 0) | 0; + var match$1 = n >= 0 ? [ + Curry._2(funarg.shift_left, p, n), + q + ] : [ + p, + Curry._2(funarg.shift_left, q, -n | 0) + ]; + var match$2 = Curry._2(funarg.ediv_rem, match$1[0], match$1[1]); + var f = Curry._2(funarg.round_to_float, match$2[0], Curry._1(funarg.sign, match$2[1]) === 0); + return Caml_float.ldexp_float(f, -n | 0); + + } + }; + var neg = function (x) { + return { + num: Curry._1(funarg.neg, x.num), + den: x.den + }; + }; + var abs = function (x) { + return { + num: Curry._1(funarg.abs, x.num), + den: x.den + }; + }; + var aors = function (zaors, x, y) { + if (x.den === y.den) { + return make_real(Curry._2(zaors, x.num, y.num), x.den); + } else { + return make_real(Curry._2(zaors, Curry._2(funarg.mul, x.num, y.den), Curry._2(funarg.mul, y.num, x.den)), Curry._2(funarg.mul, x.den, y.den)); + } + }; + var add = function (x, y) { + if (!(x.den === funarg.zero || y.den === funarg.zero)) { + return aors(funarg.add, x, y); + } + var match = classify(x); + var match$1 = classify(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return y; + case /* INF */1 : + switch (match$1) { + case /* MINF */2 : + return undef; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* INF */1 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + return undef; + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef; + } else { + return inf; + } + case 2 : + if (match$1 >= 2) { + return minus_inf; + } else { + return inf; + } + + } + }; + var sub = function (x, y) { + if (!(x.den === funarg.zero || y.den === funarg.zero)) { + return aors(funarg.sub, x, y); + } + var match = classify(x); + var match$1 = classify(y); + var exit = 0; + var exit$1 = 0; + switch (match) { + case /* ZERO */0 : + return neg(y); + case /* INF */1 : + switch (match$1) { + case /* INF */1 : + return undef; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* MINF */2 : + case /* NZERO */4 : + exit = 1; + break; + + } + break; + case /* MINF */2 : + switch (match$1) { + case /* INF */1 : + exit = 2; + break; + case /* MINF */2 : + return undef; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return minus_inf; + + } + break; + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + switch (match$1) { + case /* INF */1 : + case /* MINF */2 : + exit = 2; + break; + case /* ZERO */0 : + case /* UNDEF */3 : + exit$1 = 3; + break; + case /* NZERO */4 : + return Pervasives.failwith("impossible case"); + + } + break; + + } + if (exit$1 === 3) { + if (match$1 === 3) { + return undef; + } + if (match$1 === 0) { + return x; + } + exit = 1; + } + switch (exit) { + case 1 : + if (match >= 3) { + return undef; + } else { + return inf; + } + case 2 : + if (match$1 >= 2) { + return inf; + } else { + return minus_inf; + } + + } + }; + var mul = function (x, y) { + if (x.den === funarg.zero || y.den === funarg.zero) { + return { + num: Curry._1(funarg.of_int, Math.imul(Curry._1(funarg.sign, x.num), Curry._1(funarg.sign, y.num))), + den: funarg.zero + }; + } else { + return make_real(Curry._2(funarg.mul, x.num, y.num), Curry._2(funarg.mul, x.den, y.den)); + } + }; + var inv = function (x) { + var match = Curry._1(funarg.sign, x.num); + switch (match) { + case -1 : + return { + num: Curry._1(funarg.neg, x.den), + den: Curry._1(funarg.neg, x.num) + }; + case 0 : + break; + case 1 : + return { + num: x.den, + den: x.num + }; + default: + + } + if (x.den === funarg.zero) { + return undef; + } else { + return inf; + } + }; + var div = function (x, y) { + if (Curry._1(funarg.sign, y.num) >= 0) { + return mul(x, { + num: y.den, + den: y.num + }); + } else { + return mul(x, { + num: Curry._1(funarg.neg, y.den), + den: Curry._1(funarg.neg, y.num) + }); + } + }; + var mul_2exp = function (x, n) { + if (x.den === funarg.zero) { + return x; + } else { + return make_real(Curry._2(funarg.shift_left, x.num, n), x.den); + } + }; + var div_2exp = function (x, n) { + if (x.den === funarg.zero) { + return x; + } else { + return make_real(x.num, Curry._2(funarg.shift_left, x.den, n)); + } + }; + var $tilde$plus = function (x) { + return x; + }; + var $less$great = function (a, b) { + return !equal(a, b); + }; + return { + make: make, + zero: zero, + one: one, + minus_one: minus_one, + inf: inf, + minus_inf: minus_inf, + undef: undef, + of_bigint: of_bigint, + of_int: of_int, + of_int32: of_int32, + of_int64: of_int64, + of_ints: of_ints, + of_float: of_float, + of_string: of_string, + num: num, + den: den, + classify: classify, + is_real: is_real, + sign: sign, + compare: compare, + equal: equal, + min: min, + max: max, + leq: leq, + geq: geq, + lt: lt, + gt: gt, + to_bigint: to_bigint, + to_int: to_int, + to_int32: to_int32, + to_int64: to_int64, + to_string: to_string, + to_float: to_float, + neg: neg, + abs: abs, + add: add, + sub: sub, + mul: mul, + inv: inv, + div: div, + mul_2exp: mul_2exp, + div_2exp: div_2exp, + $tilde$neg: neg, + $tilde$plus: $tilde$plus, + $plus: add, + $neg: sub, + $star: mul, + $slash: div, + lsl: mul_2exp, + asr: div_2exp, + $tilde$: of_int, + $slash$slash: of_ints, + $tilde$$: eval_of_int, + $slash$slash$slash: make, + $eq: equal, + $less: lt, + $great: gt, + $less$eq: leq, + $great$eq: geq, + $less$great: $less$great + }; +} + +var QInt = { + M: { + mk: mk, + make_real: make_real, + make: make, + of_bigint: of_bigint, + of_int: of_int, + of_int32: of_int32, + of_int64: of_int64, + of_ints: of_ints, + zero: zero, + one: one, + minus_one: minus_one, + inf: inf, + minus_inf: minus_inf, + undef: undef, + of_float: of_float, + of_string: of_string, + classify: classify, + is_real: is_real, + num: num, + den: den, + sign: sign, + equal: equal, + compare: compare, + min: min, + max: max, + leq: leq, + geq: geq, + lt: lt, + gt: gt, + to_string: to_string, + to_bigint: to_bigint, + to_int: to_int, + to_int32: to_int32, + to_int64: to_int64, + to_float: to_float, + neg: neg, + abs: abs, + aors: aors, + add: add, + sub: sub, + mul: mul, + inv: inv, + div: div, + mul_2exp: mul_2exp, + div_2exp: div_2exp, + $tilde$neg: neg, + $tilde$plus: $tilde$plus, + $plus: add, + $neg: sub, + $star: mul, + $slash: div, + lsl: mul_2exp, + asr: div_2exp, + $tilde$: of_int, + $slash$slash: of_ints, + $tilde$$: eval_of_int, + $slash$slash$slash: make, + $eq: equal, + $less: lt, + $great: gt, + $less$eq: leq, + $great$eq: geq, + $less$great: $less$great + } +}; + +var QInt32 = { + M: { + mk: mk$1, + make_real: make_real$1, + make: make$1, + of_bigint: of_bigint$1, + of_int: of_int$1, + of_int32: of_int32$1, + of_int64: of_int64$1, + of_ints: of_ints$1, + zero: zero$1, + one: one$1, + minus_one: minus_one$1, + inf: inf$1, + minus_inf: minus_inf$1, + undef: undef$1, + of_float: of_float$1, + of_string: of_string$1, + classify: classify$1, + is_real: is_real$1, + num: num$1, + den: den$1, + sign: sign$1, + equal: equal$1, + compare: compare$1, + min: min$1, + max: max$1, + leq: leq$1, + geq: geq$1, + lt: lt$1, + gt: gt$1, + to_string: to_string$1, + to_bigint: to_bigint$1, + to_int: to_int$1, + to_int32: to_int32$1, + to_int64: to_int64$1, + to_float: to_float$1, + neg: neg$1, + abs: abs$1, + aors: aors$1, + add: add$1, + sub: sub$1, + mul: mul$1, + inv: inv$1, + div: div$1, + mul_2exp: mul_2exp$1, + div_2exp: div_2exp$1, + $tilde$neg: neg$1, + $tilde$plus: $tilde$plus$1, + $plus: add$1, + $neg: sub$1, + $star: mul$1, + $slash: div$1, + lsl: mul_2exp$1, + asr: div_2exp$1, + $tilde$: of_int$1, + $slash$slash: of_ints$1, + $tilde$$: eval_of_int$1, + $slash$slash$slash: make$1, + $eq: equal$1, + $less: lt$1, + $great: gt$1, + $less$eq: leq$1, + $great$eq: geq$1, + $less$great: $less$great$1 + } +}; + +var QInt64 = { + M: { + mk: mk$2, + make_real: make_real$2, + make: make$2, + of_bigint: of_bigint$2, + of_int: of_int$2, + of_int32: of_int32$2, + of_int64: of_int64$2, + of_ints: of_ints$2, + zero: zero$2, + one: one$2, + minus_one: minus_one$2, + inf: inf$2, + minus_inf: minus_inf$2, + undef: undef$2, + of_float: of_float$2, + of_string: of_string$2, + classify: classify$2, + is_real: is_real$2, + num: num$2, + den: den$2, + sign: sign$2, + equal: equal$2, + compare: compare$2, + min: min$2, + max: max$2, + leq: leq$2, + geq: geq$2, + lt: lt$2, + gt: gt$2, + to_string: to_string$2, + to_bigint: to_bigint$2, + to_int: to_int$2, + to_int32: to_int32$2, + to_int64: to_int64$2, + to_float: to_float$2, + neg: neg$2, + abs: abs$2, + aors: aors$2, + add: add$2, + sub: sub$2, + mul: mul$2, + inv: inv$2, + div: div$2, + mul_2exp: mul_2exp$2, + div_2exp: div_2exp$2, + $tilde$neg: neg$2, + $tilde$plus: $tilde$plus$2, + $plus: add$2, + $neg: sub$2, + $star: mul$2, + $slash: div$2, + lsl: mul_2exp$2, + asr: div_2exp$2, + $tilde$: of_int$2, + $slash$slash: of_ints$2, + $tilde$$: eval_of_int$2, + $slash$slash$slash: make$2, + $eq: equal$2, + $less: lt$2, + $great: gt$2, + $less$eq: leq$2, + $great$eq: geq$2, + $less$great: $less$great$2 + } +}; + +var QBigint = { + M: { + mk: mk$3, + make_real: make_real$3, + make: make$3, + of_bigint: of_bigint$3, + of_int: of_int$3, + of_int32: of_int32$3, + of_int64: of_int64$3, + of_ints: of_ints$3, + zero: zero$3, + one: one$3, + minus_one: minus_one$3, + inf: inf$3, + minus_inf: minus_inf$3, + undef: undef$3, + of_float: of_float$3, + of_string: of_string$3, + classify: classify$3, + is_real: is_real$3, + num: num$3, + den: den$3, + sign: sign$3, + equal: equal$3, + compare: compare$3, + min: min$3, + max: max$3, + leq: leq$3, + geq: geq$3, + lt: lt$3, + gt: gt$3, + to_string: to_string$3, + to_bigint: to_bigint$3, + to_int: to_int$3, + to_int32: to_int32$3, + to_int64: to_int64$3, + to_float: to_float$3, + neg: neg$3, + abs: abs$3, + aors: aors$3, + add: add$3, + sub: sub$3, + mul: mul$3, + inv: inv$3, + div: div$3, + mul_2exp: mul_2exp$3, + div_2exp: div_2exp$3, + $tilde$neg: neg$3, + $tilde$plus: $tilde$plus$3, + $plus: add$3, + $neg: sub$3, + $star: mul$3, + $slash: div$3, + lsl: mul_2exp$3, + asr: div_2exp$3, + $tilde$: of_int$3, + $slash$slash: of_ints$3, + $tilde$$: eval_of_int$3, + $slash$slash$slash: make$3, + $eq: equal$3, + $less: lt$3, + $great: gt$3, + $less$eq: leq$3, + $great$eq: geq$3, + $less$great: $less$great$3 + } +}; + +exports.Q = Q; +exports.QInt = QInt; +exports.QInt32 = QInt32; +exports.QInt64 = QInt64; +exports.QBigint = QBigint; +/* No side effect */ diff --git a/drafts/bs-Zarith/lib/js/src/U.js b/drafts/bs-Zarith/lib/js/src/U.js new file mode 100644 index 0000000..ad6c63a --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/U.js @@ -0,0 +1,517 @@ +'use strict'; + +var Int64 = require("rescript/lib/js/int64.js"); +var Bigint = require("./Bigint.js"); +var Belt_Int = require("rescript/lib/js/belt_Int.js"); +var Caml_obj = require("rescript/lib/js/caml_obj.js"); +var Caml_int32 = require("rescript/lib/js/caml_int32.js"); +var Caml_int64 = require("rescript/lib/js/caml_int64.js"); +var Caml_format = require("rescript/lib/js/caml_format.js"); + +function add(x, y) { + return x + y & 255; +} + +function sub(x, y) { + return x - y & 255; +} + +function mul(x, y) { + return Math.imul(x, y) & 255; +} + +var div = Caml_int32.div; + +var rem = Caml_int32.mod_; + +function logand(prim0, prim1) { + return prim0 & prim1; +} + +function logor(prim0, prim1) { + return prim0 | prim1; +} + +function logxor(prim0, prim1) { + return prim0 ^ prim1; +} + +function shiftLeft(x, y) { + return (x << y) & 255; +} + +function shiftRight(prim0, prim1) { + return (prim0 >>> prim1) | 0; +} + +function ofInt(x) { + return x & 255; +} + +function toInt(x) { + return x; +} + +function ofInt64(x) { + return Caml_int64.to_int32(x) & 255; +} + +var toInt64 = Caml_int64.of_int32; + +function ofString(x) { + var x$1 = Belt_Int.fromString(x); + if (x$1 !== undefined) { + return x$1 & 255; + } + +} + +function toString(prim) { + return String(prim); +} + +var zero = 0; + +var one = 1; + +function succ(n) { + return add(n, one); +} + +function pred(n) { + return sub(n, one); +} + +function lognot(n) { + return n ^ 255; +} + +var compare = Caml_obj.compare; + +var equal = Caml_obj.equal; + +var max = Caml_obj.max; + +var min = Caml_obj.min; + +var Infix = { + $plus: add, + $neg: sub, + $star: mul, + $slash: div, + mod: rem, + land: logand, + lor: logor, + lxor: logxor, + lsl: shiftLeft, + lsr: shiftRight +}; + +var UInt8 = { + add: add, + sub: sub, + mul: mul, + div: div, + rem: rem, + maxInt: 255, + logand: logand, + logor: logor, + logxor: logxor, + shiftLeft: shiftLeft, + shiftRight: shiftRight, + ofInt: ofInt, + toInt: toInt, + ofInt64: ofInt64, + toInt64: toInt64, + ofString: ofString, + toString: toString, + zero: zero, + one: one, + lognot: lognot, + succ: succ, + pred: pred, + compare: compare, + equal: equal, + max: max, + min: min, + Infix: Infix +}; + +function add$1(x, y) { + return x + y & 65535; +} + +function sub$1(x, y) { + return x - y & 65535; +} + +function mul$1(x, y) { + return Math.imul(x, y) & 65535; +} + +var div$1 = Caml_int32.div; + +var rem$1 = Caml_int32.mod_; + +function logand$1(prim0, prim1) { + return prim0 & prim1; +} + +function logor$1(prim0, prim1) { + return prim0 | prim1; +} + +function logxor$1(prim0, prim1) { + return prim0 ^ prim1; +} + +function shiftLeft$1(x, y) { + return (x << y) & 65535; +} + +function shiftRight$1(prim0, prim1) { + return (prim0 >>> prim1) | 0; +} + +function ofInt$1(x) { + return x & 65535; +} + +function toInt$1(x) { + return x; +} + +function ofInt64$1(x) { + return Caml_int64.to_int32(x) & 65535; +} + +var toInt64$1 = Caml_int64.of_int32; + +function ofString$1(x) { + var x$1 = Belt_Int.fromString(x); + if (x$1 !== undefined) { + return x$1 & 65535; + } + +} + +function toString$1(prim) { + return String(prim); +} + +var zero$1 = 0; + +var one$1 = 1; + +function succ$1(n) { + return add$1(n, one$1); +} + +function pred$1(n) { + return sub$1(n, one$1); +} + +function lognot$1(n) { + return n ^ 65535; +} + +var compare$1 = Caml_obj.compare; + +var equal$1 = Caml_obj.equal; + +var max$1 = Caml_obj.max; + +var min$1 = Caml_obj.min; + +var Infix$1 = { + $plus: add$1, + $neg: sub$1, + $star: mul$1, + $slash: div$1, + mod: rem$1, + land: logand$1, + lor: logor$1, + lxor: logxor$1, + lsl: shiftLeft$1, + lsr: shiftRight$1 +}; + +var UInt16 = { + add: add$1, + sub: sub$1, + mul: mul$1, + div: div$1, + rem: rem$1, + maxInt: 65535, + logand: logand$1, + logor: logor$1, + logxor: logxor$1, + shiftLeft: shiftLeft$1, + shiftRight: shiftRight$1, + ofInt: ofInt$1, + toInt: toInt$1, + ofInt64: ofInt64$1, + toInt64: toInt64$1, + ofString: ofString$1, + toString: toString$1, + zero: zero$1, + one: one$1, + lognot: lognot$1, + succ: succ$1, + pred: pred$1, + compare: compare$1, + equal: equal$1, + max: max$1, + min: min$1, + Infix: Infix$1 +}; + +var maxInt = Caml_format.int64_of_string("4294967295"); + +var logand$2 = Caml_int64.and_; + +function add$2(x, y) { + return Caml_int64.and_(Caml_int64.add(x, y), maxInt); +} + +function sub$2(x, y) { + return Caml_int64.and_(Caml_int64.sub(x, y), maxInt); +} + +function mul$2(x, y) { + return Caml_int64.and_(Caml_int64.mul(x, y), maxInt); +} + +function div$2(x, y) { + return Caml_int64.and_(Caml_int64.div(x, y), maxInt); +} + +function rem$2(x, y) { + return Caml_int64.sub(x, Caml_int64.mul(y, Caml_int64.div(x, y))); +} + +var logor$2 = Caml_int64.or_; + +var logxor$2 = Caml_int64.xor; + +var shiftLeft$2 = Caml_int64.lsl_; + +var shiftRight$2 = Caml_int64.asr_; + +function ofInt$2(x) { + return Caml_int64.and_(Caml_int64.of_int32(x), maxInt); +} + +var toInt$2 = Caml_int64.to_int32; + +function ofInt64$2(x) { + return Caml_int64.and_(Caml_int64.of_int32(Caml_int64.to_int32(x)), maxInt); +} + +function toInt64$2(x) { + return Caml_int64.of_int32(Caml_int64.to_int32(x)); +} + +function ofString$2(x) { + var x$1 = Belt_Int.fromString(x); + if (x$1 !== undefined) { + return Caml_int64.and_(Caml_int64.of_int32(x$1), maxInt); + } + +} + +var zero$2 = Caml_int64.and_(Caml_int64.zero, maxInt); + +var one$2 = Caml_int64.and_(Caml_int64.one, maxInt); + +function succ$2(n) { + return add$2(n, one$2); +} + +function pred$2(n) { + return sub$2(n, one$2); +} + +function lognot$2(n) { + return Caml_int64.xor(n, maxInt); +} + +var compare$2 = Caml_obj.compare; + +var equal$2 = Caml_obj.equal; + +var max$2 = Caml_obj.max; + +var min$2 = Caml_obj.min; + +var Infix$2 = { + $plus: add$2, + $neg: sub$2, + $star: mul$2, + $slash: div$2, + mod: rem$2, + land: logand$2, + lor: logor$2, + lxor: logxor$2, + lsl: shiftLeft$2, + lsr: shiftRight$2 +}; + +var UInt32 = { + add: add$2, + sub: sub$2, + mul: mul$2, + div: div$2, + rem: rem$2, + maxInt: maxInt, + logand: logand$2, + logor: logor$2, + logxor: logxor$2, + shiftLeft: shiftLeft$2, + shiftRight: shiftRight$2, + ofInt: ofInt$2, + toInt: toInt$2, + ofInt64: ofInt64$2, + toInt64: toInt64$2, + ofString: ofString$2, + toString: Int64.to_string, + zero: zero$2, + one: one$2, + lognot: lognot$2, + succ: succ$2, + pred: pred$2, + compare: compare$2, + equal: equal$2, + max: max$2, + min: min$2, + Infix: Infix$2 +}; + +var maxInt$1 = Bigint.of_string("18446744073709551616"); + +function rem$3(x, y) { + return Bigint.sub(x, Bigint.mul(y, Bigint.div(x, y))); +} + +function reduce(x) { + if (!Bigint.lt(x, Bigint.zero)) { + if (Bigint.gt(x, maxInt$1)) { + return Bigint.sub(Bigint.rem(x, maxInt$1), Bigint.one); + } else { + return x; + } + } + var r = Bigint.rem(x, maxInt$1); + return Bigint.add(maxInt$1, Bigint.add(r, Bigint.one)); +} + +function add$3(x, y) { + return reduce(Bigint.add(x, y)); +} + +function sub$3(x, y) { + return reduce(Bigint.sub(x, y)); +} + +function mul$3(x, y) { + return reduce(Bigint.mul(x, y)); +} + +function div$3(x, y) { + return reduce(Bigint.div(x, y)); +} + +function ofInt$3(x) { + return reduce(Bigint.of_int(x)); +} + +var toInt$3 = Bigint.to_int; + +function ofInt64$3(x) { + return reduce(Bigint.of_int(Caml_int64.to_int32(x))); +} + +function toInt64$3(x) { + return Caml_int64.of_int32(Bigint.to_int(x)); +} + +function ofString$3(x) { + var _x = Belt_Int.fromString(x); + if (_x !== undefined) { + return reduce(Bigint.of_string(x)); + } + +} + +var zero$3 = reduce(Bigint.of_int(0)); + +var one$3 = reduce(Bigint.of_int(1)); + +function succ$3(n) { + return reduce(Bigint.add(n, one$3)); +} + +function pred$3(n) { + return reduce(Bigint.sub(n, one$3)); +} + +function lognot$3(n) { + return Bigint.logxor(n, maxInt$1); +} + +var compare$3 = Caml_obj.compare; + +var equal$3 = Caml_obj.equal; + +var max$3 = Caml_obj.max; + +var min$3 = Caml_obj.min; + +var Infix$3 = { + $plus: add$3, + $neg: sub$3, + $star: mul$3, + $slash: div$3, + mod: rem$3, + land: Bigint.logand, + lor: Bigint.logor, + lxor: Bigint.logxor, + lsl: Bigint.shift_left, + lsr: Bigint.shift_right +}; + +var UInt64 = { + add: add$3, + sub: sub$3, + mul: mul$3, + div: div$3, + rem: rem$3, + maxInt: maxInt$1, + logand: Bigint.logand, + logor: Bigint.logor, + logxor: Bigint.logxor, + shiftLeft: Bigint.shift_left, + shiftRight: Bigint.shift_right, + ofInt: ofInt$3, + toInt: toInt$3, + ofInt64: ofInt64$3, + toInt64: toInt64$3, + ofString: ofString$3, + toString: Bigint.to_string, + zero: zero$3, + one: one$3, + lognot: lognot$3, + succ: succ$3, + pred: pred$3, + compare: compare$3, + equal: equal$3, + max: max$3, + min: min$3, + Infix: Infix$3 +}; + +exports.UInt8 = UInt8; +exports.UInt16 = UInt16; +exports.UInt32 = UInt32; +exports.UInt64 = UInt64; +/* maxInt Not a pure module */ diff --git a/drafts/bs-Zarith/lib/js/src/Z.js b/drafts/bs-Zarith/lib/js/src/Z.js new file mode 100644 index 0000000..c19b481 --- /dev/null +++ b/drafts/bs-Zarith/lib/js/src/Z.js @@ -0,0 +1,1228 @@ +'use strict'; + +var Caml = require("rescript/lib/js/caml.js"); +var Int32 = require("rescript/lib/js/int32.js"); +var Int64 = require("rescript/lib/js/int64.js"); +var Bigint = require("./Bigint.js"); +var $$String = require("rescript/lib/js/string.js"); +var Caml_obj = require("rescript/lib/js/caml_obj.js"); +var Caml_int32 = require("rescript/lib/js/caml_int32.js"); +var Caml_int64 = require("rescript/lib/js/caml_int64.js"); +var Pervasives = require("rescript/lib/js/pervasives.js"); +var Caml_format = require("rescript/lib/js/caml_format.js"); +var Caml_exceptions = require("rescript/lib/js/caml_exceptions.js"); + +var Overflow = /* @__PURE__ */Caml_exceptions.create("Z.ZInt.Overflow"); + +function of_int(x) { + return x; +} + +function of_int32(prim) { + return prim; +} + +var of_int64 = Caml_int64.to_int32; + +function of_float(prim) { + return prim | 0; +} + +var of_string = Caml_format.int_of_string; + +function of_substring(s, pos, len) { + return Caml_format.int_of_string($$String.sub(s, pos, len)); +} + +function succ(x) { + return x + 1 | 0; +} + +function pred(x) { + return x - 1 | 0; +} + +function neg(prim) { + return -prim | 0; +} + +function add(x, y) { + return x + y | 0; +} + +function sub(x, y) { + return x - y | 0; +} + +function mul(x, y) { + return Math.imul(x, y); +} + +var div = Caml_int32.div; + +var rem = Caml_int32.mod_; + +function div_rem(a, b) { + return [ + Caml_int32.div(a, b), + Caml_int32.mod_(a, b) + ]; +} + +function sign(n) { + if (n === 0) { + return 0; + } else if (n < 0) { + return -1; + } else { + return 1; + } +} + +function ediv_rem$p(_a, _b, _cum) { + while(true) { + var cum = _cum; + var b = _b; + var a = _a; + var a$1 = Pervasives.abs(a); + var b$1 = Pervasives.abs(b); + var r = a$1 - b$1 | 0; + if (Caml.int_compare(a$1, b$1) !== 1) { + return [ + cum + 1 | 0, + r + ]; + } + _cum = cum + 1 | 0; + _b = b$1; + _a = r; + continue ; + }; +} + +function ediv_rem(a, b) { + if (a > -1) { + return div_rem(a, b); + } + var match = ediv_rem$p(a, b, 0); + return [ + -match[0] | 0, + Pervasives.abs(match[1]) + ]; +} + +function ediv(a, b) { + return ediv_rem(a, b)[0]; +} + +function erem(a, b) { + return ediv_rem(a, b)[1]; +} + +function logand(x, y) { + return x & y; +} + +function logor(x, y) { + return x | y; +} + +function logxor(x, y) { + return x ^ y; +} + +var lognot = Pervasives.lnot; + +function shift_left(prim0, prim1) { + return (prim0 << prim1); +} + +function shift_right(prim0, prim1) { + return (prim0 >> prim1); +} + +function numbits(n) { + var nref = n; + var count = 0; + while(nref > count) { + if ((nref & count) === 1) { + count = count + 1 | 0; + } else { + nref = (nref >>> 1); + } + }; + return count; +} + +function to_int(x) { + return x; +} + +function to_int32(prim) { + return prim; +} + +var to_int64 = Caml_int64.of_int32; + +function to_float(prim) { + return prim; +} + +function round_to_float(x, exact) { + var m = Caml_int64.of_int32(x); + return Caml_int64.to_float(exact ? m : Caml_int64.or_(m, Caml_int64.one)); +} + +function to_string(prim) { + return String(prim); +} + +var compare = Caml_obj.compare; + +var equal = Caml_obj.equal; + +var leq = Caml_obj.lessequal; + +var geq = Caml_obj.greaterequal; + +var lt = Caml_obj.lessthan; + +var gt = Caml_obj.greaterthan; + +function cdiv(a, b) { + var match = div_rem(a, b); + var quotient = match[0]; + if (Caml_obj.greaterthan(match[1], 0)) { + return quotient + 1 | 0; + } else { + return quotient; + } +} + +function fdiv(a, b) { + var match = div_rem(a, b); + var quotient = match[0]; + if (Caml_obj.lessthan(match[1], 0)) { + return quotient - 1 | 0; + } else { + return quotient; + } +} + +var min = Caml_obj.min; + +var max = Caml_obj.max; + +function is_even(i) { + return i % 2 === 0; +} + +function is_odd(i) { + return i % 2 !== 0; +} + +function gcd(x, y) { + var _a = x; + var _b = y; + while(true) { + var b = _b; + var a = _a; + var c = erem(a, b); + if (c === 0) { + return b; + } + _b = c; + _a = b; + continue ; + }; +} + +function pow(base, exp) { + if (exp < 0) { + throw { + RE_EXN_ID: "Invalid_argument", + _1: "The exponent must be greater zero or greater.", + Error: new Error() + }; + } + if (exp === 0) { + return 1; + } else if (exp === 1) { + return base; + } else { + var _exp = exp; + var _acc = 1; + while(true) { + var acc = _acc; + var exp$1 = _exp; + if (exp$1 <= 0) { + return acc; + } + _acc = Math.imul(acc, base); + _exp = exp$1 - 1 | 0; + continue ; + }; + } +} + +function $tilde$plus(x) { + return x; +} + +function land(prim0, prim1) { + return prim0 & prim1; +} + +function lor(prim0, prim1) { + return prim0 | prim1; +} + +function lxor(prim0, prim1) { + return prim0 ^ prim1; +} + +var $tilde$bang = Pervasives.lnot; + +function lsl(prim0, prim1) { + return (prim0 << prim1); +} + +function asr(prim0, prim1) { + return (prim0 >> prim1); +} + +var $star$star = pow; + +var $less = Caml_obj.lessthan; + +var $great = Caml_obj.greaterthan; + +var $less$eq = Caml_obj.lessequal; + +var $great$eq = Caml_obj.greaterequal; + +function $less$great(a, b) { + return !Caml_obj.equal(a, b); +} + +var ZInt = { + Overflow: Overflow, + zero: 0, + one: 1, + minus_one: -1, + of_int: of_int, + of_int32: of_int32, + of_int64: of_int64, + of_bigint: Bigint.to_int, + of_float: of_float, + of_string: of_string, + of_substring: of_substring, + succ: succ, + pred: pred, + abs: Pervasives.abs, + neg: neg, + add: add, + sub: sub, + mul: mul, + div: div, + rem: rem, + div_rem: div_rem, + cdiv: cdiv, + fdiv: fdiv, + ediv_rem: ediv_rem, + ediv: ediv, + erem: erem, + divexact: div, + logand: logand, + logor: logor, + logxor: logxor, + lognot: lognot, + shift_left: shift_left, + shift_right: shift_right, + numbits: numbits, + to_int: to_int, + to_int32: to_int32, + to_int64: to_int64, + to_bigint: Bigint.of_int, + to_float: to_float, + round_to_float: round_to_float, + to_string: to_string, + compare: compare, + equal: equal, + leq: leq, + geq: geq, + lt: lt, + gt: gt, + sign: sign, + min: min, + max: max, + is_even: is_even, + is_odd: is_odd, + gcd: gcd, + pow: pow, + $tilde$neg: neg, + $tilde$plus: $tilde$plus, + $plus: add, + $neg: sub, + $star: mul, + $slash: div, + $slash$great: cdiv, + $slash$less: fdiv, + $slash$pipe: div, + mod: rem, + land: land, + lor: lor, + lxor: lxor, + $tilde$bang: $tilde$bang, + lsl: lsl, + asr: asr, + $tilde$: of_int, + $star$star: $star$star, + $eq: equal, + $less: $less, + $great: $great, + $less$eq: $less$eq, + $great$eq: $great$eq, + $less$great: $less$great +}; + +var Overflow$1 = /* @__PURE__ */Caml_exceptions.create("Z.ZInt32.Overflow"); + +function of_int$1(prim) { + return prim; +} + +function of_int32$1(x) { + return x; +} + +var of_int64$1 = Caml_int64.to_int32; + +function of_float$1(prim) { + return prim | 0; +} + +var of_string$1 = Caml_format.int_of_string; + +function of_substring$1(s, pos, len) { + return Caml_format.int_of_string($$String.sub(s, pos, len)); +} + +function succ$1(x) { + return x + Int32.one | 0; +} + +function pred$1(x) { + return x - Int32.one | 0; +} + +function neg$1(prim) { + return -prim | 0; +} + +function add$1(prim0, prim1) { + return prim0 + prim1 | 0; +} + +function sub$1(prim0, prim1) { + return prim0 - prim1 | 0; +} + +function mul$1(prim0, prim1) { + return Math.imul(prim0, prim1); +} + +function mod(a, n) { + return a - Math.imul(n, Caml_int32.div(a, n)) | 0; +} + +var div$1 = Caml_int32.div; + +var rem$1 = mod; + +function div_rem$1(a, b) { + return [ + Caml_int32.div(a, b), + mod(a, b) + ]; +} + +function sign$1(n) { + if (n === 0) { + return 0; + } else if (Int32.compare(n, 0) < 0) { + return -1; + } else { + return 1; + } +} + +function ediv_rem$p$1(_a, _b, _cum) { + while(true) { + var cum = _cum; + var b = _b; + var a = _a; + var a$1 = Int32.abs(a); + var b$1 = Int32.abs(b); + var r = a$1 - b$1 | 0; + if (Caml.int_compare(a$1, b$1) !== 1) { + return [ + cum + Int32.one | 0, + r + ]; + } + _cum = cum + Int32.one | 0; + _b = b$1; + _a = r; + continue ; + }; +} + +function gt$1(x, y) { + return Int32.compare(x, y) > 0; +} + +function ediv_rem$1(a, b) { + if (gt$1(a, Int32.minus_one)) { + return div_rem$1(a, b); + } + var match = ediv_rem$p$1(a, b, Int32.zero); + return [ + -match[0] | 0, + Int32.abs(match[1]) + ]; +} + +function ediv$1(a, b) { + return ediv_rem$1(a, b)[0]; +} + +function erem$1(a, b) { + return ediv_rem$1(a, b)[1]; +} + +function logand$1(prim0, prim1) { + return prim0 & prim1; +} + +function logor$1(prim0, prim1) { + return prim0 | prim1; +} + +function logxor$1(prim0, prim1) { + return prim0 ^ prim1; +} + +function shift_left$1(prim0, prim1) { + return (prim0 << prim1); +} + +function shift_right$1(prim0, prim1) { + return (prim0 >> prim1); +} + +function numbits$1(n) { + var nref = n; + var count = Int32.zero; + while(nref > count) { + if ((nref & count) === Int32.one) { + count = count + Int32.one | 0; + } else { + nref = (nref >>> 1); + } + }; + return count; +} + +function to_int$1(prim) { + return prim; +} + +function to_int32$1(x) { + return x; +} + +var to_int64$1 = Caml_int64.of_int32; + +function to_float$1(x) { + return Caml_int64.to_float(Caml_int64.of_int32(x)); +} + +function round_to_float$1(x, exact) { + var m = Caml_int64.of_int32(x); + return Caml_int64.to_float(exact ? m : Caml_int64.or_(m, Caml_int64.one)); +} + +function equal$1(x, y) { + return x === y; +} + +function leq$1(x, y) { + return Int32.compare(x, y) < 1; +} + +function geq$1(x, y) { + return Int32.compare(x, y) > -1; +} + +function lt$1(x, y) { + return Int32.compare(x, y) < 0; +} + +function min$1(x, y) { + if (leq$1(x, y)) { + return x; + } else { + return y; + } +} + +function max$1(x, y) { + if (geq$1(x, y)) { + return x; + } else { + return y; + } +} + +function cdiv$1(a, b) { + var match = div_rem$1(a, b); + var quotient = match[0]; + if (gt$1(match[1], Int32.zero)) { + return quotient + Int32.one | 0; + } else { + return quotient; + } +} + +function fdiv$1(a, b) { + var match = div_rem$1(a, b); + var quotient = match[0]; + if (lt$1(match[1], Int32.zero)) { + return quotient - Int32.one | 0; + } else { + return quotient; + } +} + +function is_even$1(i) { + return mod(i, 2) === Int32.zero; +} + +function is_odd$1(i) { + return mod(i, 2) !== Int32.zero; +} + +function gcd$1(x, y) { + var _a = x; + var _b = y; + while(true) { + var b = _b; + var a = _a; + var c = erem$1(a, b); + if (c === Int32.zero) { + return b; + } + _b = c; + _a = b; + continue ; + }; +} + +function pow$1(base, exp) { + if (exp < 0) { + throw { + RE_EXN_ID: "Invalid_argument", + _1: "The exponent must be greater zero or greater.", + Error: new Error() + }; + } + if (exp === 0) { + return Int32.one; + } else if (exp === 1) { + return base; + } else { + var _exp = exp; + var _acc = Int32.one; + while(true) { + var acc = _acc; + var exp$1 = _exp; + if (exp$1 <= 0) { + return acc; + } + _acc = Math.imul(acc, base); + _exp = exp$1 - 1 | 0; + continue ; + }; + } +} + +function $tilde$plus$1(x) { + return x; +} + +var $star$star$1 = pow$1; + +var $less$1 = Caml_obj.lessthan; + +var $great$1 = Caml_obj.greaterthan; + +var $less$eq$1 = Caml_obj.lessequal; + +var $great$eq$1 = Caml_obj.greaterequal; + +function $less$great$1(a, b) { + return a !== b; +} + +var ZInt32 = { + Overflow: Overflow$1, + zero: Int32.zero, + one: Int32.one, + minus_one: Int32.minus_one, + of_int: of_int$1, + of_int32: of_int32$1, + of_int64: of_int64$1, + of_bigint: Bigint.to_int32, + of_float: of_float$1, + of_string: of_string$1, + of_substring: of_substring$1, + succ: succ$1, + pred: pred$1, + abs: Int32.abs, + neg: neg$1, + add: add$1, + sub: sub$1, + mul: mul$1, + div: div$1, + rem: rem$1, + div_rem: div_rem$1, + cdiv: cdiv$1, + fdiv: fdiv$1, + ediv_rem: ediv_rem$1, + ediv: ediv$1, + erem: erem$1, + divexact: div$1, + logand: logand$1, + logor: logor$1, + logxor: logxor$1, + lognot: Int32.lognot, + shift_left: shift_left$1, + shift_right: shift_right$1, + numbits: numbits$1, + to_int: to_int$1, + to_int32: to_int32$1, + to_int64: to_int64$1, + to_bigint: Bigint.of_int32, + to_float: to_float$1, + round_to_float: round_to_float$1, + to_string: Int32.to_string, + compare: Int32.compare, + equal: equal$1, + leq: leq$1, + geq: geq$1, + lt: lt$1, + gt: gt$1, + sign: sign$1, + min: min$1, + max: max$1, + is_even: is_even$1, + is_odd: is_odd$1, + gcd: gcd$1, + pow: pow$1, + $tilde$neg: neg$1, + $tilde$plus: $tilde$plus$1, + $plus: add$1, + $neg: sub$1, + $star: mul$1, + $slash: div$1, + $slash$great: cdiv$1, + $slash$less: fdiv$1, + $slash$pipe: div$1, + mod: mod, + land: logand$1, + lor: logor$1, + lxor: logxor$1, + $tilde$bang: Int32.lognot, + lsl: shift_left$1, + asr: shift_right$1, + $tilde$: of_int$1, + $star$star: $star$star$1, + $eq: equal$1, + $less: $less$1, + $great: $great$1, + $less$eq: $less$eq$1, + $great$eq: $great$eq$1, + $less$great: $less$great$1 +}; + +var Overflow$2 = /* @__PURE__ */Caml_exceptions.create("Z.ZInt64.Overflow"); + +var two = [ + 0, + 2 +]; + +var of_int$2 = Caml_int64.of_int32; + +var of_int32$2 = Caml_int64.of_int32; + +function of_int64$2(x) { + return x; +} + +var of_float$2 = Caml_int64.of_float; + +var of_string$2 = Caml_format.int64_of_string; + +function of_substring$2(s, pos, len) { + return Caml_format.int64_of_string($$String.sub(s, pos, len)); +} + +function succ$2(x) { + return Caml_int64.add(x, Int64.one); +} + +function pred$2(x) { + return Caml_int64.sub(x, Int64.one); +} + +var neg$2 = Caml_int64.neg; + +var add$2 = Caml_int64.add; + +var sub$2 = Caml_int64.sub; + +var mul$2 = Caml_int64.mul; + +function mod$1(a, n) { + return Caml_int64.sub(a, Caml_int64.mul(n, Caml_int64.div(a, n))); +} + +var div$2 = Caml_int64.div; + +var rem$2 = mod$1; + +function div_rem$2(a, b) { + return [ + Caml_int64.div(a, b), + mod$1(a, b) + ]; +} + +function sign$2(n) { + if (n === Caml_int64.zero) { + return 0; + } else if (Int64.compare(n, Caml_int64.zero) < 0) { + return -1; + } else { + return 1; + } +} + +function ediv_rem$p$2(_a, _b, _cum) { + while(true) { + var cum = _cum; + var b = _b; + var a = _a; + var a$1 = Int64.abs(a); + var b$1 = Int64.abs(b); + var r = Caml_int64.sub(a$1, b$1); + if (Caml_int64.compare(a$1, b$1) !== 1) { + return [ + Caml_int64.add(cum, Int64.one), + r + ]; + } + _cum = Caml_int64.add(cum, Int64.one); + _b = b$1; + _a = r; + continue ; + }; +} + +function gt$2(x, y) { + return Int64.compare(x, y) > 0; +} + +function ediv_rem$2(a, b) { + if (gt$2(a, Int64.minus_one)) { + return div_rem$2(a, b); + } + var match = ediv_rem$p$2(a, b, Int64.zero); + return [ + Caml_int64.neg(match[0]), + Int64.abs(match[1]) + ]; +} + +function ediv$2(a, b) { + return ediv_rem$2(a, b)[0]; +} + +function erem$2(a, b) { + return ediv_rem$2(a, b)[1]; +} + +var logand$2 = Caml_int64.and_; + +var logor$2 = Caml_int64.or_; + +var logxor$2 = Caml_int64.xor; + +var shift_left$2 = Caml_int64.lsl_; + +var shift_right$2 = Caml_int64.asr_; + +function numbits$2(n) { + var nref = n; + var count = Int64.zero; + while(Caml.i64_gt(nref, count)) { + if (Caml_int64.and_(nref, count) === Int64.one) { + count = Caml_int64.add(count, Int64.one); + } else { + nref = Caml_int64.lsr_(nref, 1); + } + }; + return Caml_int64.to_int32(count); +} + +var to_int$2 = Caml_int64.to_int32; + +var to_int32$2 = Caml_int64.to_int32; + +function to_int64$2(x) { + return x; +} + +var to_float$2 = Caml_int64.to_float; + +function round_to_float$2(x, exact) { + return Caml_int64.to_float(exact ? x : Caml_int64.or_(x, Caml_int64.one)); +} + +function equal$2(x, y) { + return x === y; +} + +function leq$2(x, y) { + return Int64.compare(x, y) < 1; +} + +function geq$2(x, y) { + return Int64.compare(x, y) > -1; +} + +function lt$2(x, y) { + return Int64.compare(x, y) < 0; +} + +function min$2(x, y) { + if (leq$2(x, y)) { + return x; + } else { + return y; + } +} + +function max$2(x, y) { + if (geq$2(x, y)) { + return x; + } else { + return y; + } +} + +function cdiv$2(a, b) { + var match = div_rem$2(a, b); + var quotient = match[0]; + if (gt$2(match[1], Int64.zero)) { + return Caml_int64.add(quotient, Int64.one); + } else { + return quotient; + } +} + +function fdiv$2(a, b) { + var match = div_rem$2(a, b); + var quotient = match[0]; + if (lt$2(match[1], Int64.zero)) { + return Caml_int64.sub(quotient, Int64.one); + } else { + return quotient; + } +} + +function is_even$2(i) { + return Caml.i64_eq(mod$1(i, two), Int64.zero); +} + +function is_odd$2(i) { + return Caml.i64_neq(mod$1(i, two), Int64.zero); +} + +function gcd$2(x, y) { + var _a = x; + var _b = y; + while(true) { + var b = _b; + var a = _a; + var c = erem$2(a, b); + if (Caml.i64_eq(c, Int64.zero)) { + return b; + } + _b = c; + _a = b; + continue ; + }; +} + +function pow$2(base, exp) { + if (exp < 0) { + throw { + RE_EXN_ID: "Invalid_argument", + _1: "The exponent must be greater zero or greater.", + Error: new Error() + }; + } + if (exp === 0) { + return Int64.one; + } else if (exp === 1) { + return base; + } else { + var _exp = exp; + var _acc = Int64.one; + while(true) { + var acc = _acc; + var exp$1 = _exp; + if (exp$1 <= 0) { + return acc; + } + _acc = Caml_int64.mul(acc, base); + _exp = exp$1 - 1 | 0; + continue ; + }; + } +} + +function $tilde$plus$2(x) { + return x; +} + +var $star$star$2 = pow$2; + +var $less$2 = Caml_obj.lessthan; + +var $great$2 = Caml_obj.greaterthan; + +var $less$eq$2 = Caml_obj.lessequal; + +var $great$eq$2 = Caml_obj.greaterequal; + +function $less$great$2(a, b) { + return a !== b; +} + +var ZInt64 = { + Overflow: Overflow$2, + zero: Int64.zero, + one: Int64.one, + minus_one: Int64.minus_one, + of_int: of_int$2, + of_int32: of_int32$2, + of_int64: of_int64$2, + of_bigint: Bigint.to_int64, + of_float: of_float$2, + of_string: of_string$2, + of_substring: of_substring$2, + succ: succ$2, + pred: pred$2, + abs: Int64.abs, + neg: neg$2, + add: add$2, + sub: sub$2, + mul: mul$2, + div: div$2, + rem: rem$2, + div_rem: div_rem$2, + cdiv: cdiv$2, + fdiv: fdiv$2, + ediv_rem: ediv_rem$2, + ediv: ediv$2, + erem: erem$2, + divexact: div$2, + logand: logand$2, + logor: logor$2, + logxor: logxor$2, + lognot: Int64.lognot, + shift_left: shift_left$2, + shift_right: shift_right$2, + numbits: numbits$2, + to_int: to_int$2, + to_int32: to_int32$2, + to_int64: to_int64$2, + to_bigint: Bigint.of_int64, + to_float: to_float$2, + round_to_float: round_to_float$2, + to_string: Int64.to_string, + compare: Int64.compare, + equal: equal$2, + leq: leq$2, + geq: geq$2, + lt: lt$2, + gt: gt$2, + sign: sign$2, + min: min$2, + max: max$2, + is_even: is_even$2, + is_odd: is_odd$2, + gcd: gcd$2, + pow: pow$2, + $tilde$neg: neg$2, + $tilde$plus: $tilde$plus$2, + $plus: add$2, + $neg: sub$2, + $star: mul$2, + $slash: div$2, + $slash$great: cdiv$2, + $slash$less: fdiv$2, + $slash$pipe: div$2, + mod: mod$1, + land: logand$2, + lor: logor$2, + lxor: logxor$2, + $tilde$bang: Int64.lognot, + lsl: shift_left$2, + asr: shift_right$2, + $tilde$: of_int$2, + $star$star: $star$star$2, + $eq: equal$2, + $less: $less$2, + $great: $great$2, + $less$eq: $less$eq$2, + $great$eq: $great$eq$2, + $less$great: $less$great$2 +}; + +var Overflow$3 = /* @__PURE__ */Caml_exceptions.create("Z.ZBigint.Overflow"); + +function of_bigint(x) { + return x; +} + +function to_bigint(x) { + return x; +} + +function $tilde$plus$3(x) { + return x; +} + +var $star$star$3 = Bigint.pow; + +var $less$3 = Caml_obj.lessthan; + +var $great$3 = Caml_obj.greaterthan; + +var $less$eq$3 = Caml_obj.lessequal; + +var $great$eq$3 = Caml_obj.greaterequal; + +function $less$great$3(a, b) { + return !Bigint.equal(a, b); +} + +var ZBigint = { + Overflow: Overflow$3, + zero: Bigint.zero, + one: Bigint.one, + minus_one: Bigint.minus_one, + of_int: Bigint.of_int, + of_int32: Bigint.of_int32, + of_int64: Bigint.of_int64, + of_bigint: of_bigint, + of_float: Bigint.of_float, + of_string: Bigint.of_string, + of_substring: Bigint.of_substring, + succ: Bigint.succ, + pred: Bigint.pred, + abs: Bigint.abs, + neg: Bigint.neg, + add: Bigint.add, + sub: Bigint.sub, + mul: Bigint.mul, + div: Bigint.div, + rem: Bigint.rem, + div_rem: Bigint.div_rem, + cdiv: Bigint.cdiv, + fdiv: Bigint.fdiv, + ediv_rem: Bigint.ediv_rem, + ediv: Bigint.ediv, + erem: Bigint.erem, + divexact: Bigint.div, + logand: Bigint.logand, + logor: Bigint.logor, + logxor: Bigint.logxor, + lognot: Bigint.lognot, + shift_left: Bigint.shift_left, + shift_right: Bigint.shift_right, + numbits: Bigint.numbits, + to_int: Bigint.to_int, + to_int32: Bigint.to_int32, + to_int64: Bigint.to_int64, + to_bigint: to_bigint, + to_float: Bigint.to_float, + round_to_float: Bigint.round_to_float, + to_string: Bigint.to_string, + compare: Bigint.compare, + equal: Bigint.equal, + leq: Bigint.leq, + geq: Bigint.geq, + lt: Bigint.lt, + gt: Bigint.gt, + sign: Bigint.sign, + min: Bigint.min, + max: Bigint.max, + is_even: Bigint.is_even, + is_odd: Bigint.is_odd, + gcd: Bigint.gcd, + pow: Bigint.pow, + $tilde$neg: Bigint.neg, + $tilde$plus: $tilde$plus$3, + $plus: Bigint.add, + $neg: Bigint.sub, + $star: Bigint.mul, + $slash: Bigint.div, + $slash$great: Bigint.cdiv, + $slash$less: Bigint.fdiv, + $slash$pipe: Bigint.div, + mod: Bigint.rem, + land: Bigint.logand, + lor: Bigint.logor, + lxor: Bigint.logxor, + $tilde$bang: Bigint.lognot, + lsl: Bigint.shift_left, + asr: Bigint.shift_right, + $tilde$: Bigint.of_int, + $star$star: $star$star$3, + $eq: Bigint.equal, + $less: $less$3, + $great: $great$3, + $less$eq: $less$eq$3, + $great$eq: $great$eq$3, + $less$great: $less$great$3 +}; + +var Int = ZInt; + +var Int32$1 = ZInt32; + +var Int64$1 = ZInt64; + +var Bigint$1 = ZBigint; + +exports.Int = Int; +exports.Int32 = Int32$1; +exports.Int64 = Int64$1; +exports.Bigint = Bigint$1; +/* No side effect */ diff --git a/drafts/bs-Zarith/package.json b/drafts/bs-Zarith/package.json new file mode 100644 index 0000000..c9fc8ab --- /dev/null +++ b/drafts/bs-Zarith/package.json @@ -0,0 +1,33 @@ +{ + "name": "bs-zarith", + "version": "3.2.0", + "description": "Support Unsigned, Bigint, Bigfloat, Q (rational numbers) and Z (integer numbers) in BuckleScript", + "main": "index.js", + "scripts": { + "build": "yarn clean && yarn run re:build", + "build-dirty": "yarn run re:build", + "clean": "rescript clean", + "start": "yarn run dev | yarn run re:watch", + "test": "yarn run re:build && yarn run jest", + "re:watch": "rescript build -w", + "re:build": "rescript build", + "re:build-deps": "rescript build -with-deps" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/plow-technologies/bs-zarith.git" + }, + "keywords": [ + "bucklescript" + ], + "author": "James M.C. Haver II", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/plow-technologies/bs-zarith/issues" + }, + "homepage": "https://github.com/plow-technologies/bs-zarith#readme", + "devDependencies": { + "@glennsl/bs-jest": "0.5.1", + "rescript": "^10.0.1" + } +} diff --git a/drafts/bs-Zarith/src/Bigfloat.ml b/drafts/bs-Zarith/src/Bigfloat.ml new file mode 100644 index 0000000..2d467a1 --- /dev/null +++ b/drafts/bs-Zarith/src/Bigfloat.ml @@ -0,0 +1,282 @@ +(* + * Module: Bigfloat + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * Status: Experimental + * + * Support arbitrary percision floating point numbers in OCaml. + * The user declares the level of precision + *) + +type t = { + value: Bigint.t; + decimalPos: int; + } + +let mkBigfloat v d = { value = v; decimalPos = d } + +let zero = { value = Bigint.zero; decimalPos = 0 } + +let one = { value = Bigint.one; decimalPos = 0 } + +let minusOne = { value = Bigint.minus_one; decimalPos = 0 } + +(** Internal utility functions *) +let rec repeatString n s = if n = 0 then "" else s ^ (repeatString (n - 1) s) + +let addCommas: string -> string = + [%bs.raw + {| + function (s) { + var sp = s.split("."); + var l = sp[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,"); + if (sp.length > 1) { + return l.concat(".", sp[1]); + } else { + return l; + } + } + |}] + +let removeCommas: string -> string = + [%bs.raw + {| + function (s) { + return s.replace(/,/g, ""); + } + |}] + +(** of conversions *) + +let ofInt i = + { value = (Bigint.of_int i); decimalPos = 0 } + +let ofInt32 i = + { value = (Bigint.of_int32 i); decimalPos = 0 } + +let ofInt64 i = + { value = (Bigint.of_int64 i); decimalPos = 0 } + +let ofString (string : string) decimalPos = + let s = removeCommas string in + let a = Js.String.split "." s in + if Array.length a = 1 + then + Some + { value = (Bigint.mul (Bigint.of_string s) (Bigint.pow (Bigint.of_int 10) decimalPos)); + decimalPos } + else + if Array.length a = 2 + then + let leftSide = a.(0) in + let rightSide = a.(1) in + let rightSideLength = String.length rightSide in + let rr = + (if rightSideLength = decimalPos + then rightSide + else + if rightSideLength < decimalPos + then + rightSide ^ + (repeatString (decimalPos - rightSideLength) "0") + else + String.sub rightSide 0 decimalPos) in + Some { value = (Bigint.of_string (leftSide ^ rr)); decimalPos } + else None + +let ofFloat (f : float) decimalPos = + (let s = Js.Float.toString f in + let a = Js.String.split "." s in + if (Array.length a) = 1 + then { value = (Bigint.of_float f); decimalPos } + else + if (Array.length a) = 2 + then + let leftSide = a.(0) in + let rightSide = a.(1) in + let rightSideLength = String.length rightSide in + let rr = + if rightSideLength = decimalPos + then rightSide + else + if rightSideLength < decimalPos + then + rightSide ^ + (repeatString (decimalPos - rightSideLength) "0") + else String.sub rightSide 0 decimalPos in + { value = (Bigint.of_string (leftSide ^ rr)); decimalPos } + else { value = Bigint.zero; decimalPos } : t) + + +(** to conversions *) + +let toInt t = + Bigint.to_int (Bigint.div t.value (Bigint.pow (Bigint.of_int 10) t.decimalPos)) + +let toInt32 t = + Bigint.to_int32 (Bigint.div t.value (Bigint.pow (Bigint.of_int 10) t.decimalPos)) + +let toInt64 t = + Bigint.to_int64 (Bigint.div t.value (Bigint.pow (Bigint.of_int 10) t.decimalPos)) + +let toString (t : t) = + let s = Bigint.to_string t.value in + let sl = String.length s in + if t.decimalPos = 0 + then s + else + if sl <= t.decimalPos + then + "0." ^ (repeatString (t.decimalPos - sl) "0") ^ s + else + (let r = Js.String.slice ~from:(sl - t.decimalPos) ~to_:sl s in + let l = Js.String.slice ~from:0 ~to_:(sl - t.decimalPos) s in + l ^ "." ^ r) + +let toStringWithCommas (t : t) = (addCommas (toString t) : string) + +let toFloat (t : t) = (float_of_string (toString t) : float) + +(** Arithmetic *) + +let abs t = {t with value = Bigint.abs t.value} + +let neg t = {t with value = Bigint.neg t.value} + +let add (x : t) (y : t) = + if x.decimalPos = y.decimalPos + then { value = (Bigint.add x.value y.value); decimalPos = (x.decimalPos) } + else + if x.decimalPos > y.decimalPos + then + (let decimalPos = x.decimalPos - y.decimalPos in + { + value = + (let open Bigint in + add x.value (mul y.value (pow (of_int 10) decimalPos))); + decimalPos = (x.decimalPos) + }) + else + (let decimalPos = y.decimalPos - x.decimalPos in + { + value = + (let open Bigint in + add y.value (mul x.value (pow (of_int 10) decimalPos))); + decimalPos = (y.decimalPos) + }) + +let sub x y = + if x.decimalPos = y.decimalPos + then { value = (Bigint.sub x.value y.value); decimalPos = (x.decimalPos) } + else + if x.decimalPos > y.decimalPos + then + (let decimalPos = x.decimalPos - y.decimalPos in + { + value = + (let open Bigint in + sub x.value (mul y.value (pow (of_int 10) decimalPos))); + decimalPos = (x.decimalPos) + }) + else + (let decimalPos = y.decimalPos - x.decimalPos in + { + value = + (let open Bigint in + sub y.value (mul x.value (pow (of_int 10) decimalPos))); + decimalPos = (y.decimalPos) + }) + +let mul x y = + { + value = (Bigint.mul x.value y.value); + decimalPos = (x.decimalPos + y.decimalPos) + } + +let elongateBy x decimalPos = + { + x with + value = + (let open Bigint in Bigint.mul x.value (pow (of_int 10) decimalPos)) + } + +(* let truncate x decimalPos = + * let diff = x.decimalPos - decimalPos in + * { value = (let open Bigint in div x.value (pow (of_int 10) diff)); decimalPos + * } *) + +let adjustDecimalPos (x : t) (y : t) = + if x.decimalPos = y.decimalPos + then (x, y) + else + if x.decimalPos > y.decimalPos + then + (let decimalPos = x.decimalPos - y.decimalPos in + (x, + { + value = + (Bigint.mul y.value (Bigint.pow (Bigint.of_int 10) decimalPos)); + decimalPos = (x.decimalPos) + })) + else + (let decimalPos = y.decimalPos - x.decimalPos in + ({ + value = (Bigint.mul x.value (Bigint.pow (Bigint.of_int 10) decimalPos)); + decimalPos = (y.decimalPos) + }, y)) + +let div x y = + if (x.decimalPos = 0) && (y.decimalPos = 0) + then { value = (Bigint.div x.value y.value); decimalPos = (x.decimalPos) } + else + (let (x,y) = adjustDecimalPos x y in + let xFirstNonZero = Bigint.firstNonZero x.value in + let yFirstNonZero = Bigint.firstNonZero y.value in + match (xFirstNonZero, yFirstNonZero) with + | (((Some (xFirstNonZero))[@explicit_arity ]),((Some + (yFirstNonZero))[@explicit_arity ])) -> + if (xFirstNonZero >= x.decimalPos) && (yFirstNonZero >= y.decimalPos) + then + elongateBy + { value = (Bigint.div x.value y.value); decimalPos = (x.decimalPos) + } x.decimalPos + else + (let reposition = + if xFirstNonZero > yFirstNonZero + then y.decimalPos - yFirstNonZero + else x.decimalPos - xFirstNonZero in + let x = elongateBy x reposition in + let y = elongateBy y reposition in + elongateBy + { + value = (let open Bigint in div x.value y.value); + decimalPos = (x.decimalPos) + } x.decimalPos) + | _ -> { x with value = Bigint.zero }) + +(** comparison *) + +let compare x y = + let (x,y) = adjustDecimalPos x y in Bigint.compare x.value y.value + +let equal x y = (compare x y) = 0 + +let leq x y = (compare x y) < 1 + +let geq x y = (compare x y) > -1 + +let lt x y = (compare x y) < 0 + +let gt x y = (compare x y) > 0 + +let leqZero x = (Bigint.compare x.value Bigint.zero) <= 0 + +let geqZero x = (Bigint.compare x.value Bigint.zero) >= 0 + +let ltZero x = (Bigint.compare x.value Bigint.zero) < 0 + +let gtZero x = (Bigint.compare x.value Bigint.zero) > 0 + +let min x y = (if (compare x y) < 0 then y else x : t) + +let max x y = (if (compare x y) < 0 then x else y : t) diff --git a/drafts/bs-Zarith/src/Bigfloat.mli b/drafts/bs-Zarith/src/Bigfloat.mli new file mode 100644 index 0000000..7646dff --- /dev/null +++ b/drafts/bs-Zarith/src/Bigfloat.mli @@ -0,0 +1,135 @@ +(* + * Module: Bigfloat + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * Status: Experimental + * + * Support arbitrary percision floating point numbers in OCaml. + * The user declares the level of precision + *) + +type t = { + value: Bigint.t; + decimalPos: int; + } +(** Product type with a Bigint.t value and decimalPos is a non-negative number + representing the location of the decimal point + *) + +val mkBigfloat: Bigint.t -> int -> t + +val zero: t +(** The number 0 with 0 decimalPos. *) + +val one: t +(** The number 1 with 0 decimalPos. *) + +val minusOne: t +(** The number -1 with 0 decimalPos. *) + + +(** of conversions *) + + +val ofInt: int -> t +(** Converts from a base integer. *) + +val ofInt32: Int32.t -> t +(** Converts from a 32-bit integer. *) + +val ofInt64: Int64.t -> t +(** Converts from a 64-bit integer. *) + +val ofFloat: float -> int -> t +(** Converts from a float. *) + +val ofString: string -> int -> t option +(** Converts a string to an integer. + An optional [-] prefix indicates a negative number. + *) + +(** to conversions *) + + +val toInt: t -> int +(** Converts to a base integer. May raise [Overflow]. *) + +val toInt32: t -> int32 +(** Converts to a 32-bit integer. May raise [Overflow]. *) + +val toInt64: t -> int64 +(** Converts to a 64-bit integer. May raise [Overflow]. *) + +val toFloat: t -> float +(** String representation of t. *) + +val toString: t -> string +(** String representation of t. *) + +val toStringWithCommas: t -> string +(** String representation of t with commas between every three digits left of the decimal. *) + + +(** queries *) + +val adjustDecimalPos: t -> t -> (t * t) + +(** arithmetic *) + +val abs: t -> t +(** Absolute value. *) + +val neg: t -> t +(** Unary negation. *) + +val add: t -> t -> t +(** Addition. *) + +val sub: t -> t -> t +(** Subtraction. *) + +val mul: t -> t -> t +(** Multiplication. *) + +val div: t -> t -> t +(** Integer division. *) + +(** comparison *) + +val compare : t -> t -> int +(** Comparison. [compare x y] returns 0 if [x] equals [y], + -1 if [x] is smaller than [y], and 1 if [x] is greater than [y]. + *) + +val equal: t -> t -> bool +(** Equality test. *) + +val leq: t -> t -> bool +(** Less than or equal. *) + +val geq: t -> t -> bool +(** Greater than or equal. *) + +val lt: t -> t -> bool +(** Less than (and not equal). *) + +val gt: t -> t -> bool +(** Greater than (and not equal). *) + +val leqZero: t -> bool +(** Less than or equal to zero. *) + +val geqZero: t -> bool +(** Greater than or equal to zero. *) + +val ltZero: t -> bool +(** Less than (and not equal) to zero. *) + +val gtZero: t -> bool +(** Greater than (and not equal) to zero. *) + +val min: t -> t -> t +(** Returns the minimum of its arguments. *) + +val max: t -> t -> t +(** Returns the maximum of its arguments. *) diff --git a/drafts/bs-Zarith/src/Bigint.ml b/drafts/bs-Zarith/src/Bigint.ml new file mode 100644 index 0000000..153b7c2 --- /dev/null +++ b/drafts/bs-Zarith/src/Bigint.ml @@ -0,0 +1,476 @@ +(* + * Module: Bigint + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * Status: Experimental + * + * Support arbitrary percision integers in OCaml. + *) + +exception Overflow + +type sign = Pos | Neg + +type t = Bigint of sign * int list + +let zero = Bigint (Pos, []) +let one = Bigint (Pos, [1]) +let two = Bigint (Pos, [2]) +let minus_one = Bigint (Neg, [1]) + +(* internal *) +let radix = 10 +let car = List.hd +let cdr = List.tl +let map = List.map +let reverse = List.rev +let strcat = String.concat +let strlen = String.length +let strsub = String.sub + +let trimzeros listy = + let rec trimzeros' listy' = + match listy' with + | [] -> [] + | [0] -> [] + | car::cdr -> + let cdr' = trimzeros' cdr + in match (car, cdr') with + | 0, [] -> [] + | car, cdr' -> car::cdr' + in trimzeros' listy + +let charlist_of_string str = + let last = strlen str - 1 + in let rec charlist pos result = + if pos < 0 + then result + else charlist (pos - 1) (str.[pos] :: result) + in charlist last [] + +let of_string str = + let len = strlen str + in let to_intlist first = + let substr = strsub str first (len - first) in + let digit char = int_of_char char - int_of_char '0' in + trimzeros (map digit (reverse (charlist_of_string substr))) + in if str.[0] = '-' + then Bigint (Neg, to_intlist 1) + else Bigint (Pos, to_intlist 0) + +let explode s = List.init (String.length s) (String.get s) + +let is_digit char = let c = Char.code char in (c >= 48) && (c <= 57) + +let is_string_of_digits s = + if (String.length s) == 0 + then false + else + let chars = explode s in + let chars = if List.hd chars == '-' then List.tl chars else chars in + List.fold_right (fun c -> fun x -> (is_digit c) && x) chars true + +let of_string_opt s = + if is_string_of_digits s + then Some (of_string s) + else None + +let of_substring s ~pos ~len = of_string (String.sub s pos len) + +let of_int i = of_string (string_of_int i) +let of_int32 i = of_string (Int32.to_string i) +let of_int64 i = of_string (Int64.to_string i) +let of_float i = of_string (Int64.to_string (Int64.of_float i)) + +let to_string (Bigint (sign, value)) = + match value with + | [] -> "0" + | value -> + let reversed = reverse value + in strcat "" + ((if sign = Pos then "" else "-") :: + (map string_of_int reversed)) + +(* cmp list1 list2 = bigger list *) +let rec cmp list1 list2 = + if List.length list1 > List.length list2 + then 1 + else if List.length list1 < List.length list2 + then -1 + else match (list1, list2) with + | [], [] -> 0 + | list1, list2 -> + let reverselist1 = reverse list1 in + let reverselist2 = reverse list2 in + if car reverselist1 > car reverselist2 + then 1 + else if car reverselist1 < car reverselist2 + then -1 + else let list1' = reverse (cdr reverselist1) in + let list2' = reverse (cdr reverselist2) in + cmp list1' list2' + + +let rec add' list1 list2 carry = match (list1, list2, carry) with + | list1, [], 0 -> list1 + | [], list2, 0 -> list2 + | list1, [], carry -> add' list1 [carry] 0 + | [], list2, carry -> add' [carry] list2 0 + | list1, list2, carry -> + let sum = (car list1) + (car list2) + carry + in sum mod radix :: add' (cdr list1) (cdr list2) (sum / radix) + +let rec sub' list1 list2 carry = match (list1, list2, carry) with + | [], [], 0 -> [] + | list1, [], 0 -> list1 + | list1, [], carry -> sub' list1 [carry] 0 + | list1, list2, carry -> + let diff = (car list1) - (car list2) - carry in + if (diff >= 0) + then diff :: sub' (cdr list1) (cdr list2) 0 + else diff + 10 :: sub' (cdr list1) (cdr list2) 1 + +let double listy = add' listy listy 0 + +let rec mul' list1 list2' powerof2 = + if (cmp powerof2 list1) = 1 + then list1, [] + else let remainder, product = + mul' list1 (double list2') (double powerof2) + in if (cmp remainder powerof2) = -1 + then remainder, product + else trimzeros (sub' remainder powerof2 0), + add' product list2' 0 + + +let add (Bigint (neg1, value1)) (Bigint (neg2, value2)) = + if neg1 = neg2 + then Bigint (neg1, add' value1 value2 0) + else if (cmp value1 value2) = 1 + then Bigint (neg1, trimzeros (sub' value1 value2 0)) + else if cmp value1 value2 = -1 + then Bigint (neg2, trimzeros (sub' value2 value1 0)) + else zero + +let sub (Bigint (neg1, value1)) (Bigint (neg2, value2)) = + if neg1 = neg2 + then (if (cmp value1 value2) = 1 + then (if neg1 = Neg + then Bigint (Neg, trimzeros(sub' value1 value2 0)) + else Bigint (Pos, trimzeros(sub' value1 value2 0))) + else if (cmp value1 value2) = -1 + then (if neg1 = Neg + then Bigint (Pos, trimzeros(sub' value2 value1 0)) + else Bigint (Neg, trimzeros(sub' value2 value1 0))) + else zero) + else Bigint (neg1, add' value1 value2 0) + +let mul (Bigint (neg1, value1)) (Bigint (neg2, value2)) = + let _, product = mul' value1 value2 [1] + in if neg1 = neg2 + then Bigint (Pos, product) + else Bigint (Neg, product) + +let rec div_rem' list1 list2' powerof2 = + if (cmp list2' list1) = 1 + then [], list1 + else let quotient, remainder = + div_rem' list1 (double list2') (double powerof2) + in if (cmp remainder list2') = -1 + then quotient, remainder + else add' quotient powerof2 0, + trimzeros (sub' remainder list2' 0) + +let div_rem (Bigint (neg1, value1)) (Bigint (neg2, value2)) = + let quotient, rem = div_rem' value1 value2 [1] in + let rem = if rem = [] then zero else Bigint (neg1, rem) + in if neg1 = neg2 + then (Bigint (Pos, quotient), rem) + else (Bigint (Neg, quotient), rem) + +let compare (Bigint (neg1, v1)) (Bigint (neg2, v2)) = + match (neg1, neg2) with + | (Neg,Pos) -> -1 + | (Pos,Neg) -> 1 + | (Neg,Neg) -> ~-(cmp v1 v2) + | (Pos,Pos) -> cmp v1 v2 + +let sign n = + if n = zero + then 0 + else + if (compare n zero) < 0 + then -1 + else 1 + +let gt x y = (compare x y) > 0 + +let lt x y = (compare x y) < 0 + +let div a b = + let quotient, _ = div_rem a b + in quotient + +let rem a b = + let _, remainder = div_rem a b + in remainder + +let rec ediv_rem' t0 t1 cum = + let (Bigint (_, v0)) = t0 in + let t0' = (Bigint (Pos, v0)) in + let (Bigint (_, v1)) = t1 in + let t1' = (Bigint (Pos, v1)) in + let r = sub t0' t1' in + if (cmp v0 v1) = 1 + then ediv_rem' r t1' (add cum one) + else + let (Bigint (_, rv)) = r in + if (cmp rv [0]) = 0 + then (cum, r) + else ((add cum one), r) + +let ediv_rem a b = + if b = zero + then raise Division_by_zero + else + let (Bigint (neg1, _)) = a in + let (Bigint (neg2, _)) = b in + match (neg1, neg2) with + | (Pos, Pos) -> div_rem a b + | (Pos, Neg) -> div_rem a b + | (Neg, _) -> + let (Bigint (_, q), Bigint(_, r)) = ediv_rem' a b zero in + let r = trimzeros r in + (Bigint (Neg, q), Bigint (Pos, r)) + +let ediv a b = + let quotient, _ = ediv_rem a b + in quotient + +let erem a b = + let _, remainder = ediv_rem a b + in remainder + +let cdiv a b = + let quotient, remainder = div_rem a b in + if gt remainder zero then (add quotient one) else quotient + +let fdiv a b = + let quotient, remainder = div_rem a b in + if lt remainder zero then (sub quotient one) else quotient + +let divexact a b = + let quotient, _ = div_rem a b + in quotient + +let is_even (Bigint (_neg, value)) = + let _, remainder = div_rem' value [2] [1] + in (remainder = [] || remainder = [0]) + +let is_odd a = + not (is_even a) + +(** Elementary number theory *) + +let rec gcd' a b = + let c = erem a b + in if c = zero + then b + else gcd' b c + +let gcd x y = gcd' x y + +let rec pow' base exp acc = + if exp <= 0 + then acc + else (pow' base (exp - 1) (mul acc base)) + +let pow base exp = + if exp < 0 + then raise (Invalid_argument "The exponent must be greater zero or greater.") + else if exp = 0 + then one + else if exp = 1 + then base + else pow' base exp one + +let abs (Bigint (_neg, value)) = Bigint (Pos, value) + + +(* need to test theses *) +let shift_left x n = mul x (pow (of_int 2) n) + +let shift_right x n = div x (pow (of_int 2) n) + +let neg (Bigint (sn, n)) = + match sn with + | Pos -> Bigint (Neg, n) + | Neg -> Bigint (Pos, n) + + +let equal x y = (compare x y) = 0 + +let leq x y = (compare x y) < 1 + +let geq x y = (compare x y) > -1 + +let succ x = add x one + +let pred x = sub x one + +let numbits n' = + let result = ref 0 in + let n = ref @@ abs n' in + while (gt !n zero) do + result := !result + 1; + n := div !n two; + done; + !result + +let logand n1' n2' = + let byte_val = ref one in + let result = ref zero in + let n1 = ref n1' in + let n2 = ref n2' in + while (gt !n1 zero || gt !n2 zero) do + if (equal (rem !n1 two) one && equal (rem !n2 two) one) + then result := add !result !byte_val + else (); + n1 := div !n1 two; + n2 := div !n2 two; + byte_val := mul !byte_val two; + done; + !result + +let logor n1' n2' = + let byte_val = ref one in + let result = ref zero in + let n1 = ref n1' in + let n2 = ref n2' in + while (gt !n1 zero || gt !n2 zero) do + if (equal (rem !n1 two) one || equal (rem !n2 two) one) + then result := add !result !byte_val + else (); + n1 := div !n1 two; + n2 := div !n2 two; + byte_val := mul !byte_val two; + done; + !result + +let logxor n1' n2' = + let byte_val = ref one in + let result = ref zero in + let n1 = ref n1' in + let n2 = ref n2' in + while (gt !n1 zero || gt !n2 zero) do + if (not @@ equal (rem !n1 two) (rem !n2 two)) + then result := add !result !byte_val + else (); + n1 := div !n1 two; + n2 := div !n2 two; + byte_val := mul !byte_val two; + done; + !result + +let lognot n1 = + let byte_val = ref one in + while (lt !byte_val n1) do + byte_val := mul !byte_val two; + done; + sub !byte_val n1 + +let min x y = + if leq x y then x else y + +let max x y = + if geq x y then x else y + + +let firstNonZero x = + let str = to_string x in + let strChars = explode str in + let (_,m) = + List.fold_right + (fun (s: char) -> + fun (i,x) -> + if Belt.Option.isNone x + then + (if s <> '0' + then (i, Some i) + else ((i + 1), x)) + else (i, x)) strChars (0, None) in + m + +let (~-) = neg + +let (~+) x = x + +let (+) = add + +let (-) = sub + +let ( * ) = mul + +let (/) = div + +let (/>) = cdiv + +let (/<) = fdiv + +let (/|) = divexact + +let (mod) = (rem) + +let (land) = (logand) + +let (lor) = (logor) + +let (lxor) = (logxor) + +let (~!) = (lognot) + +let (lsl) = shift_left + +let (asr) = shift_right + +let (~$) = of_int + +let ( ** ) = pow + +let (=) = equal + +let (<) = lt + +let (>) = gt + +let (<=) = leq + +let (>=) = geq + +let (<>) x y = not (equal x y) + + +let to_int i = + if ((i > of_int max_int) || (i < of_int min_int) ) + then raise Overflow + else int_of_string (to_string i) + +let to_int32 i = + if ((i > of_int32 Int32.max_int) || (i < of_int32 Int32.min_int) ) + then raise Overflow + else Int32.of_string (to_string i) + +let to_int64 i = + if ((i > of_int64 Int64.max_int) || (i < of_int64 Int64.min_int) ) + then raise Overflow + else Int64.of_string (to_string i) + +let to_float i = + float_of_string (to_string i) + +let round_to_float x exact = + let m = x in + (* Unless the fractional part is exactly 0, round m to an odd integer *) + let m = if exact then m else logor m one in + (* Then convert m to float, with the current rounding mode. *) + to_float m diff --git a/drafts/bs-Zarith/src/Bigint.mli b/drafts/bs-Zarith/src/Bigint.mli new file mode 100644 index 0000000..b07a61c --- /dev/null +++ b/drafts/bs-Zarith/src/Bigint.mli @@ -0,0 +1,518 @@ +(* + * Module: Bigint + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * Status: Experimental + * + * Support arbitrary percision integers in OCaml. + *) + +exception Overflow +(** Raised by conversion functions when the value cannot be represented in + the destination type. + *) + +type sign = Pos | Neg +(** Sum type representing the Bigint's sign. *) + +type t = Bigint of sign * int list +(** Type of Bigint, arbitrary length integer. *) + +(** {1 Construction} *) + +val zero: t +(** The number 0. *) + +val one: t +(** The number 1. *) + +val minus_one: t +(** The number -1. *) + +val of_int: int -> t +(** Converts from a base integer. *) + +val of_int32: Int32.t -> t +(** Converts from a 32-bit integer. *) + +val of_int64: Int64.t -> t +(** Converts from a 64-bit integer. *) + +val of_float: float -> t +(** Converts from a float. *) + +val of_string: string -> t +(** Converts a string to an integer. + An optional [-] prefix indicates a negative number. + *) + +val of_string_opt: string -> t option +(** Safe version of of_string + *) + +val of_substring : string -> pos:int -> len:int -> t +(** + + *) + +(** {1 Basic arithmetic operations} *) + +val succ: t -> t +(** Returns its argument plus one. *) + +val pred: t -> t +(** Returns its argument minus one. *) + +val abs: t -> t +(** Absolute value. *) + +val neg: t -> t +(** Unary negation. *) + +val add: t -> t -> t +(** Addition. *) + +val sub: t -> t -> t +(** Subtraction. *) + +val mul: t -> t -> t +(** Multiplication. *) + +val div: t -> t -> t +(** Integer division. The result is truncated towards zero + and obeys the rule of signs. + Raises [Division_by_zero] if the divisor (second argument) is 0. + *) + +val rem: t -> t -> t +(** Integer remainder. Can raise a [Division_by_zero]. + The result of [rem a b] has the sign of [a], and its absolute value is + strictly smaller than the absolute value of [b]. + The result satisfies the equality [a = b * div a b + rem a b]. + *) + +val div_rem: t -> t -> (t * t) +(** Computes both the integer quotient and the remainder. + [div_rem a b] is equal to [(div a b, rem a b)]. + Raises [Division_by_zero] if [b = 0]. + *) + +val cdiv: t -> t -> t +(** Integer division with rounding towards +oo (ceiling). + Can raise a [Division_by_zero]. + *) + +val fdiv: t -> t -> t +(** Integer division with rounding towards -oo (floor). + Can raise a [Division_by_zero]. + *) + +val ediv_rem: t -> t -> (t * t) +(** Euclidean division and remainder. [ediv_rem a b] returns a pair [(q, r)] + such that [a = b * q + r] and [0 <= r < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + +val ediv: t -> t -> t +(** Euclidean division. [ediv a b] is equal to [fst (ediv_rem a b)]. + The result satisfies [0 <= a - b * ediv a b < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + +val erem: t -> t -> t +(** Euclidean remainder. [erem a b] is equal to [snd (ediv_rem a b)]. + The result satisfies [0 <= erem a b < |b|] and + [a = b * ediv a b + erem a b]. Raises [Division_by_zero] if [b = 0]. + *) + +val divexact: t -> t -> t +(** [divexact a b] divides [a] by [b], only producing correct result when the + division is exact, i.e., when [b] evenly divides [a]. + It should be faster than general division. + Can raise a [Division_by_zero]. + *) + + +(** {1 Bit-level operations} *) + +(** For all bit-level operations, negative numbers are considered in 2's + complement representation, starting with a virtual infinite number of + 1s. + *) + +val logand: t -> t -> t +(** Bitwise logical and. *) + +val logor: t -> t -> t +(** Bitwise logical or. *) + +val logxor: t -> t -> t +(** Bitwise logical exclusive or. *) + +val lognot: t -> t +(** Bitwise logical negation. + The identity [lognot a]=[-a-1] always hold. + *) + +val shift_left : t -> int -> t +(** Shifts to the left. + Equivalent to a multiplication by a power of 2. + The second argument must be non-negative. + *) + +val shift_right : t -> int -> t +(** Shifts to the right. + This is an arithmetic shift, + equivalent to a division by a power of 2 with rounding towards -oo. + The second argument must be non-negative. + *) + +(* val shift_right_trunc: t -> int -> t *) +(** Shifts to the right, rounding towards 0. + This is equivalent to a division by a power of 2, with truncation. + The second argument must be non-negative. + *) + +val numbits : t -> int +(** Returns the number of significant bits in the given number. + If [x] is zero, [numbits x] returns 0. Otherwise, + [numbits x] returns a positive integer [n] such that + [2^{n-1} <= |x| < 2^n]. Note that [numbits] is defined + for negative arguments, and that [numbits (-x) = numbits x]. *) + +(* val trailing_zeros: t -> int *) +(** Returns the number of trailing 0 bits in the given number. + If [x] is zero, [trailing_zeros x] returns [max_int]. + Otherwise, [trailing_zeros x] returns a nonnegative integer [n] + which is the largest [n] such that [2^n] divides [x] evenly. + Note that [trailing_zeros] is defined for negative arguments, + and that [trailing_zeros (-x) = trailing_zeros x]. *) + +(* val testbit: t -> int -> bool *) +(** [testbit x n] return the value of bit number [n] in [x]: + [true] if the bit is 1, [false] if the bit is 0. + Bits are numbered from 0. Raise [Invalid_argument] if [n] + is negative. *) + +(* val popcount: t -> int *) +(** Counts the number of bits set. + Raises [Overflow] for negative arguments, as those have an infinite + number of bits set. + *) + +(* val hamdist: t -> t -> int *) +(** Counts the number of different bits. + Raises [Overflow] if the arguments have different signs + (in which case the distance is infinite). + *) + +(** {1 Conversions} *) + +(** Note that, when converting to an integer type that cannot represent the + converted value, an [Overflow] exception is raised. + *) + +val to_int: t -> int +(** Converts to a base integer. May raise [Overflow]. *) + +val to_int32: t -> int32 +(** Converts to a 32-bit integer. May raise [Overflow]. *) + +val to_int64: t -> int64 +(** Converts to a 64-bit integer. May raise [Overflow]. *) + +val to_float: t -> float +(** Converts to a floating-point value. + This function rounds the given integer according to the current + rounding mode of the processor. In default mode, it returns + the floating-point number nearest to the given integer, + breaking ties by rounding to even. *) + +val to_string: t -> string +(** Gives a human-readable, decimal string representation of the argument. *) + +(** {1 Ordering} *) + +val compare : t -> t -> int +(** Comparison. [compare x y] returns 0 if [x] equals [y], + -1 if [x] is smaller than [y], and 1 if [x] is greater than [y]. + + Note that Pervasive.compare can be used to compare reliably two integers + only on OCaml 3.12.1 and later versions. + *) + +val equal: t -> t -> bool +(** Equality test. *) + +val leq: t -> t -> bool +(** Less than or equal. *) + +val geq: t -> t -> bool +(** Greater than or equal. *) + +val lt: t -> t -> bool +(** Less than (and not equal). *) + +val gt: t -> t -> bool +(** Greater than (and not equal). *) + +val sign: t -> int +(** Returns -1, 0, or 1 when the argument is respectively negative, null, or + positive. + *) + +val min: t -> t -> t +(** Returns the minimum of its arguments. *) + +val max: t -> t -> t +(** Returns the maximum of its arguments. *) + +val is_even: t -> bool +(** Returns true if the argument is even (divisible by 2), false if odd. *) + +val is_odd: t -> bool +(** Returns true if the argument is odd, false if even. *) + +(* val hash: t -> int *) +(** Hashes a number. + This functions gives the same result as OCaml's polymorphic hashing + function. + The result is consistent with equality: if [a] = [b], then [hash a] = + [hash b]. + *) + +(** {1 Elementary number theory} *) + +val gcd: t -> t -> t +(** Greatest common divisor. + The result is always positive. + Raises a [Division_by_zero] is either argument is null. + *) + +(* val gcdext: t -> t -> (t * t * t) *) +(** [gcdext u v] returns [(g,s,t)] where [g] is the greatest common divisor + and [g=us+vt]. + [g] is always positive. + Raises a [Division_by_zero] is either argument is null. + + Note: the function is based on the GMP [mpn_gcdext] function. The exact choice of [s] and [t] such that [g=us+vt] is not specified, as it may vary from a version of GMP to another (it has changed notably in GMP 4.3.0 and 4.3.1). + *) + +(* val lcm: t -> t -> t *) +(** + Least common multiple. + The result is always positive. + Raises a [Division_by_zero] is either argument is null. + *) + +(* val powm: t -> t -> t -> t *) +(** [powm base exp mod] computes [base]^[exp] modulo [mod]. + Negative [exp] are supported, in which case ([base]^-1)^(-[exp]) modulo + [mod] is computed. + However, if [exp] is negative but [base] has no inverse modulo [mod], then + a [Division_by_zero] is raised. + *) + +(* val powm_sec: t -> t -> t -> t *) +(** [powm_sec base exp mod] computes [base]^[exp] modulo [mod]. + Unlike [Z.powm], this function is designed to take the same time + and have the same cache access patterns for any two same-size + arguments. Used in cryptographic applications, it provides better + resistance to side-channel attacks than [Z.powm]. + The exponent [exp] must be positive, and the modulus [mod] + must be odd. Otherwise, [Invalid_arg] is raised. *) + +(* val invert: t -> t -> t *) +(** [invert base mod] returns the inverse of [base] modulo [mod]. + Raises a [Division_by_zero] if [base] is not invertible modulo [mod]. + *) + +(* val probab_prime: t -> int -> int *) +(** [probab_prime x r] returns 0 if [x] is definitely composite, + 1 if [x] is probably prime, and 2 if [x] is definitely prime. + The [r] argument controls how many Miller-Rabin probabilistic + primality tests are performed (5 to 10 is a reasonable value). + *) + +(* val nextprime: t -> t *) +(** Returns the next prime greater than the argument. + The result is only prime with very high probability. + *) + + +(** {1 Powers} *) + +val pow: t -> int -> t +(** [pow base exp] raises [base] to the [exp] power. + [exp] must be non-negative. + Note that only exponents fitting in a machine integer are supported, as + larger exponents would surely make the result's size overflow the + address space. + Raises an [Invalid_argument] on negative [exp]. + *) + +(* val sqrt: t -> t *) +(** Returns the square root. The result is truncated (rounded down + to an integer). + Raises an [Invalid_argument] on negative arguments. + *) + +(* val sqrt_rem: t -> (t * t) *) +(** Returns the square root truncated, and the remainder. + Raises an [Invalid_argument] on negative arguments. + *) + +(* val root: t -> int -> t *) +(** [root base n] computes the [n]-th root of [exp]. + [n] must be non-negative. + *) + +(* val perfect_power: t -> bool *) +(** True if the argument has the form [a^b], with [b>1] *) + +(* val perfect_square: t -> bool *) +(** True if the argument has the form [a^2]. *) + +(* val log2: t -> int *) +(** Returns the base-2 logarithm of its argument, rounded down to + an integer. If [x] is positive, [log2 x] returns the largest [n] + such that [2^n <= x]. If [x] is negative or zero, [log2 x] raise + the [Invalid_argument] exception. *) + +(* val log2up: t -> int *) +(** Returns the base-2 logarithm of its argument, rounded up to + an integer. If [x] is positive, [log2up x] returns the smallest [n] + such that [x <= 2^n]. If [x] is negative or zero, [log2up x] raise + the [Invalid_argument] exception. *) + + +(** {1 Representation} *) + +(* val size: t -> int *) +(** Returns the number of machine words used to represent the number. *) + +(* val extract: t -> int -> int -> t *) +(** [extract a off len] returns a non-negative number corresponding to bits + [off] to [off]+[len]-1 of [b]. + Negative [a] are considered in infinite-length 2's complement + representation. + *) + +(* signed_extract: t -> int -> int -> t *) +(** [signed_extract a off len] extracts bits [off] to [off]+[len]-1 of [b], + as [extract] does, then sign-extends bit [len-1] of the result + (that is, bit [off + len - 1] of [a]). The result is between + [- 2{^[len]-1}] (included) and [2{^[len]-1}] (excluded), + and equal to [extract a off len] modulo [2{^len}]. + *) + +(* val to_bits: t -> string *) +(** Returns a binary representation of the argument. + The string result should be interpreted as a sequence of bytes, + corresponding to the binary representation of the absolute value of + the argument in little endian ordering. + The sign is not stored in the string. + *) + +(* val of_bits: string -> t *) +(** Constructs a number from a binary string representation. + The string is interpreted as a sequence of bytes in little endian order, + and the result is always positive. + We have the identity: [of_bits (to_bits x) = abs x]. + However, we can have [to_bits (of_bits s) <> s] due to the presence of + trailing zeros in s. + *) + + +(** {1 Prefix and infix operators} *) + +(** + Classic (and less classic) prefix and infix [int] operators are + redefined on [t]. + + This makes it easy to typeset expressions. + Using OCaml 3.12's local open, you can simply write + [Z.(~$2 + ~$5 * ~$10)]. + *) + +val (~-): t -> t +(** Negation [neg]. *) + +val (~+): t -> t +(** Identity. *) + +val (+): t -> t -> t +(** Addition [add]. *) + +val (-): t -> t -> t +(** Subtraction [sub]. *) + +val ( * ): t -> t -> t +(** Multiplication [mul]. *) + +val (/): t -> t -> t +(** Truncated division [div]. *) + +val (/>): t -> t -> t +(** Ceiling division [cdiv]. *) + +val (/<): t -> t -> t +(** Flooring division [fdiv]. *) + +val (/|): t -> t -> t +(** Exact division [divexact]. *) + +val (mod): t -> t -> t +(** Remainder [rem]. *) + +val (land): t -> t -> t +(** Bit-wise logical and [logand]. *) + +val (lor): t -> t -> t +(** Bit-wise logical inclusive or [logor]. *) + +val (lxor): t -> t -> t +(** Bit-wise logical exclusive or [logxor]. *) + +val (~!): t -> t +(** Bit-wise logical negation [lognot]. *) + +val (lsl): t -> int -> t +(** Bit-wise shift to the left [shift_left]. *) + +val (asr): t -> int -> t +(** Bit-wise shift to the right [shift_right]. *) + +val (~$): int -> t +(** Conversion from [int] [of_int]. *) + +val ( ** ): t -> int -> t +(** Power [pow]. *) + +val (=): t -> t -> bool +(** Same as [equal]. *) + +val (<): t -> t -> bool +(** Same as [lt]. *) + +val (>): t -> t -> bool +(** Same as [gt]. *) + +val (<=): t -> t -> bool +(** Same as [leq]. *) + +val (>=): t -> t -> bool +(** Same as [geq]. *) + +val (<>): t -> t -> bool +(** [a <> b] is equivalent to [not (equal a b)]. *) + + +(** {1 Miscellaneous} *) + +(**/**) + +(** For internal use in module [Q]. *) +val round_to_float: t -> bool -> float + +val firstNonZero: t -> int option diff --git a/drafts/bs-Zarith/src/Natural.ml b/drafts/bs-Zarith/src/Natural.ml new file mode 100644 index 0000000..278cb27 --- /dev/null +++ b/drafts/bs-Zarith/src/Natural.ml @@ -0,0 +1,176 @@ +(* + * Module: Natural + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * + * Support arbitrary precision Natural numbers in OCaml. + *) + +exception Underflow +exception DecodeError + +type t = Natural of Bigint.t + +let zero = Natural Bigint.zero +let one = Natural Bigint.one + +(* of conversion *) + +let ofInt x = + let r = Bigint.of_int x in + if Bigint.lt r Bigint.zero + then None + else Some (Natural r) + +let ofInt32 x = + let r = Bigint.of_int32 x in + if Bigint.lt r Bigint.zero + then None + else Some (Natural r) + +let ofInt64 x = + let r = Bigint.of_int64 x in + if Bigint.lt r Bigint.zero + then None + else Some (Natural r) + +let ofFloat x = + let r = Bigint.of_float x in + if Bigint.lt r Bigint.zero + then None + else Some (Natural r) + +let ofString x = + let r = Bigint.of_string_opt x in + match r with + | None -> None + | Some r -> + if Bigint.lt r Bigint.zero + then None + else Some (Natural r) + +let unsafeOfInt x = + match ofInt x with + | Some x -> x + | None -> raise Underflow + +let unsafeOfInt32 x = + match ofInt32 x with + | Some x -> x + | None -> raise Underflow + +let unsafeOfInt64 x = + match ofInt64 x with + | Some x -> x + | None -> raise Underflow + +let unsafeOfFloat x = + match ofFloat x with + | Some x -> x + | None -> raise Underflow + +let unsafeOfString x = + match ofString x with + | Some x -> x + | None -> raise DecodeError + +(* to conversion *) + +let toInt x = + match x with + | Natural x -> Bigint.to_int x + +let toInt32 x = + match x with + | Natural x -> Bigint.to_int32 x + +let toInt64 x = + match x with + | Natural x -> Bigint.to_int64 x + +let toFloat x = + match x with + | Natural x -> Bigint.to_float x + +let toString x = + match x with + | Natural x -> Bigint.to_string x + +(* Arithmetic *) +let succ x = + match x with + | Natural x -> Natural (Bigint.add x Bigint.one) + +let pred x = + match x with + | Natural x -> + let r = Bigint.sub x Bigint.one in + if Bigint.lt r Bigint.zero + then raise Underflow + else Natural r + +let predSafe x = + match pred x with + | x -> Some x + | exception Underflow -> None + +let add x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.add x y) + +let sub x y = + match (x,y) with + | (Natural x, Natural y) -> + let r = Bigint.sub x y in + if Bigint.lt r Bigint.zero + then raise Underflow + else Natural r + +let subSafe x y = + match sub x y with + | r -> Some r + | exception Underflow -> None + +let mul x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.mul x y) + +let div x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.div x y) + +let rem x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.rem x y) + +let divRem x y = + match (x,y) with + | (Natural x, Natural y) -> + let (r1,r2) = (Bigint.div_rem x y) in + (Natural r1, Natural r2) + +let cdiv x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.cdiv x y) + +let fdiv x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.fdiv x y) + +let edivRem x y = + match (x,y) with + | (Natural x, Natural y) -> + let (r1,r2) = (Bigint.ediv_rem x y) in + (Natural r1, Natural r2) + +let ediv x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.ediv x y) + +let erem x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.erem x y) + +let divexact x y = + match (x,y) with + | (Natural x, Natural y) -> Natural (Bigint.divexact x y) diff --git a/drafts/bs-Zarith/src/Natural.mli b/drafts/bs-Zarith/src/Natural.mli new file mode 100644 index 0000000..52c1249 --- /dev/null +++ b/drafts/bs-Zarith/src/Natural.mli @@ -0,0 +1,152 @@ +(* + * Module: Natural + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * + * Support arbitrary precision Natural numbers in OCaml. + *) + +exception Underflow +(** Raised by conversion and sub functions when the value cannot be represented + as a Natural number. + *) + +exception DecodeError +(** Raised by unsafeToString conversion if the string is not a valid + Natural number *) + +type t = Natural of Bigint.t +(** Type of Natural, a non-negative arbitrary length integer. *) + +val zero: t +(** The number 0. *) + +val one: t +(** The number 1. *) + +(** of conversion *) + +val ofInt: int -> t option +(** Converts from a base integer. *) + +val ofInt32: Int32.t -> t option +(** Converts from a 32-bit integer. *) + +val ofInt64: Int64.t -> t option +(** Converts from a 64-bit integer. *) + +val ofFloat: float -> t option +(** Converts from a float. *) + +val ofString: string -> t option +(** Converts from a string. *) + +val unsafeOfInt: int -> t +(** Unsafely converts from a base integer. *) + +val unsafeOfInt32: Int32.t -> t +(** Unsafely converts from a 32-bit integer. *) + +val unsafeOfInt64: Int64.t -> t +(** Unsafely converts from a 64-bit integer. *) + +val unsafeOfFloat: float -> t +(** Unsafely converts from a float. *) + +val unsafeOfString: string -> t +(** Unsafely converts from a string. *) + +(** to conversion *) + +val toInt: t -> int +(** Converts to a base integer. May raise [Overflow]. *) + +val toInt32: t -> int32 +(** Converts to a 32-bit integer. May raise [Overflow]. *) + +val toInt64: t -> int64 +(** Converts to a 64-bit integer. May raise [Overflow]. *) + +val toFloat: t -> float +(** Converts to a floating-point value. *) + +val toString: t -> string +(** Gives a human-readable, decimal string representation of the argument. *) + +(** arithmetic *) + +val succ: t -> t +(** Returns its argument plus one. *) + +val pred: t -> t +(** Unsafe returns its argument minus one. *) + +val predSafe: t -> t option +(** Safe returns its argument minus one. *) + +val add: t -> t -> t +(** Addition. *) + +val sub: t -> t -> t +(** Unsafe subtraction. *) + +val subSafe: t -> t -> t option +(** Safe subtraction. *) + +val mul: t -> t -> t +(** Multiplication. *) + +val div: t -> t -> t +(** Integer division. The result is truncated towards zero + and obeys the rule of signs. + Raises [Division_by_zero] if the divisor (second argument) is 0. + *) + +val rem: t -> t -> t +(** Integer remainder. Can raise a [Division_by_zero]. + The result of [rem a b] has the sign of [a], and its absolute value is + strictly smaller than the absolute value of [b]. + The result satisfies the equality [a = b * div a b + rem a b]. + *) + +val divRem: t -> t -> (t * t) +(** Computes both the integer quotient and the remainder. + [div_rem a b] is equal to [(div a b, rem a b)]. + Raises [Division_by_zero] if [b = 0]. + *) + +val cdiv: t -> t -> t +(** Integer division with rounding towards +oo (ceiling). + Can raise a [Division_by_zero]. + *) + +val fdiv: t -> t -> t +(** Integer division with rounding towards -oo (floor). + Can raise a [Division_by_zero]. + *) + +val edivRem: t -> t -> (t * t) +(** Euclidean division and remainder. [ediv_rem a b] returns a pair [(q, r)] + such that [a = b * q + r] and [0 <= r < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + +val ediv: t -> t -> t +(** Euclidean division. [ediv a b] is equal to [fst (ediv_rem a b)]. + The result satisfies [0 <= a - b * ediv a b < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + +val erem: t -> t -> t +(** Euclidean remainder. [erem a b] is equal to [snd (ediv_rem a b)]. + The result satisfies [0 <= erem a b < |b|] and + [a = b * ediv a b + erem a b]. Raises [Division_by_zero] if [b = 0]. + *) + +val divexact: t -> t -> t +(** [divexact a b] divides [a] by [b], only producing correct result when the + division is exact, i.e., when [b] evenly divides [a]. + It should be faster than general division. + Can raise a [Division_by_zero]. + *) + diff --git a/drafts/bs-Zarith/src/Q.ml b/drafts/bs-Zarith/src/Q.ml new file mode 100644 index 0000000..559d5b1 --- /dev/null +++ b/drafts/bs-Zarith/src/Q.ml @@ -0,0 +1,5 @@ +(* Expose modules as Q.Int, Q.Int32, Q.Int64, Q.Nativeint, Q.Bigint *) +module Int = Q_Internal.QInt.M +module Int32 = Q_Internal.QInt32.M +module Int64 = Q_Internal.QInt64.M +module Bigint = Q_Internal.QBigint.M diff --git a/drafts/bs-Zarith/src/Q.mli b/drafts/bs-Zarith/src/Q.mli new file mode 100644 index 0000000..559d5b1 --- /dev/null +++ b/drafts/bs-Zarith/src/Q.mli @@ -0,0 +1,5 @@ +(* Expose modules as Q.Int, Q.Int32, Q.Int64, Q.Nativeint, Q.Bigint *) +module Int = Q_Internal.QInt.M +module Int32 = Q_Internal.QInt32.M +module Int64 = Q_Internal.QInt64.M +module Bigint = Q_Internal.QBigint.M diff --git a/drafts/bs-Zarith/src/Q_Internal.ml b/drafts/bs-Zarith/src/Q_Internal.ml new file mode 100644 index 0000000..697b907 --- /dev/null +++ b/drafts/bs-Zarith/src/Q_Internal.ml @@ -0,0 +1,361 @@ +module Q (Z: Z.Z) = struct + type t = { + num: Z.t; (** Numerator. *) + den: Z.t; (** Denominator, >= 0 *) + } + (* Type of rationals. + Invariants: + - den is always >= 0; + - num and den have no common factor; + - if den=0, then num is -1, 0 or 1. + - if num=0, then den is -1, 0 or 1. + *) + + (* creation *) + (* -------- *) + + (* make *) + let mk n d = + { num = n; den = d; } + + (* make and normalize n/d, assuming d > 0 *) + let make_real n d = + if n == Z.zero || d == Z.one then mk n Z.one + else + let g = Z.gcd n d in + if g == Z.one + then mk n d + else mk (Z.divexact n g) (Z.divexact d g) + + (* make and normalize any fraction *) + let make n d = + let sd = Z.sign d in + if sd = 0 then mk (Z.of_int (Z.sign n)) Z.zero else + if sd > 0 then make_real n d else + make_real (Z.neg n) (Z.neg d) + + let eval_of_int n = mk n Z.one + (* n/1 *) + + let of_int n = eval_of_int (Z.of_int n) + + let of_int32 n = eval_of_int (Z.of_int32 n) + + let of_int64 n = eval_of_int (Z.of_int64 n) + + let of_bigint n = eval_of_int (Z.of_bigint n) + + let of_ints n d = make (Z.of_int n) (Z.of_int d) + + let zero = eval_of_int Z.zero + (* 0/1 *) + + let one = eval_of_int Z.one + (* 1/1 *) + + let minus_one = eval_of_int Z.minus_one + (* -1/1 *) + + let inf = mk Z.one Z.zero + (* 1/0 *) + + let minus_inf = mk Z.minus_one Z.zero + (* -1/0 *) + + let undef = mk Z.zero Z.zero + (* 0/0 *) + + let of_float d = + if d = infinity then inf else + if d = neg_infinity then minus_inf else + if classify_float d = FP_nan then undef else + let m,e = frexp d in + (* put into the form m * 2^e, where m is an integer *) + let m,e = Z.of_float (ldexp m 53), e-53 in + if e >= 0 then eval_of_int (Z.shift_left m e) + else make_real m (Z.shift_left Z.one (-e)) + + let of_string s = + try + let i = String.index s '/' in + make + (Z.of_substring s ~pos:0 ~len:i) + (Z.of_substring s ~pos:(i+1) ~len:(String.length s-i-1)) + with Not_found -> + if s = "inf" || s = "+inf" then inf + else if s = "-inf" then minus_inf + else if s = "undef" then undef + else eval_of_int (Z.of_string s) + + + (* queries *) + (* ------- *) + + type kind = + | ZERO (* 0 *) + | INF (* 1/0 *) + | MINF (* -1/0 *) + | UNDEF (* 0/0 *) + | NZERO (* non-special, non-0 *) + + let classify n = + if n.den == Z.zero then + match Z.sign n.num with + | 1 -> INF + | -1 -> MINF + | _ -> UNDEF + else + if n.num == Z.zero + then ZERO + else NZERO + + let is_real n = (n.den != Z.zero) + + let num x = x.num + + let den x = x.den + + let sign x = Z.sign x.num + (* sign undef = 0 + sign inf = 1 + sign -inf = -1 + *) + + let equal x y = + (Z.equal x.num y.num) && (Z.equal x.den y.den) + + let compare x y = + match classify x, classify y with + | UNDEF,UNDEF | INF,INF | MINF,MINF -> 0 + | UNDEF,_ -> -1 + | _,UNDEF -> 1 + | MINF,_ | _,INF -> -1 + | INF,_ | _,MINF -> 1 + | _ -> + if x.den == y.den (* implies equality, + especially if immediate value and not a pointer, + in particular in the case den = 1 *) + then Z.compare x.num y.num + else + Z.compare + (Z.mul x.num y.den) + (Z.mul y.num x.den) + + let min a b = if compare a b <= 0 then a else b + let max a b = if compare a b >= 0 then a else b + + let leq a b = compare a b <= 0 + let geq a b = compare a b >= 0 + let lt a b = compare a b < 0 + let gt a b = compare a b > 0 + + let to_string n = + match classify n with + | UNDEF -> "undef" + | INF -> "+inf" + | MINF -> "-inf" + | ZERO -> "0" + | NZERO -> + if Z.equal n.den Z.one then Z.to_string n.num + else (Z.to_string n.num) ^ "/" ^ (Z.to_string n.den) + + (* raises a Division by zero in case x is undefined or infinity *) + let eval_to_int x = Z.div x.num x.den + + let to_int x = Z.to_int (eval_to_int x) + + let to_int32 x = Z.to_int32 (eval_to_int x) + + let to_int64 x = Z.to_int64 (eval_to_int x) + + let to_bigint x = Z.to_bigint (eval_to_int x) + + let to_float x = + match classify x with + | ZERO -> 0.0 + | INF -> infinity + | MINF -> neg_infinity + | UNDEF -> nan + | NZERO -> + let p = x.num and q = x.den in + let np = Z.numbits p and nq = Z.numbits q in + if np <= 53 && nq <= 53 then + (* p and q convert to floats exactly; use FP division to get the + correctly-rounded result. *) + Int64.to_float (Z.to_int64 p) /. Int64.to_float (Z.to_int64 q) + else begin + (* |p| is in [2^(np-1), 2^np) + q is in [2^(nq-1), 2^nq) + hence |p/q| is in (2^(np-nq-1), 2^(np-nq+1)). + We define n such that |p/q*2^n| is in [2^54, 2^56). + >= 2^54 so that the round to odd technique applies. + < 2^56 so that the integral part is representable as an int64. *) + let n = 55 - (np - nq) in + (* Scaling p/q by 2^n *) + let (p', q') = + if n >= 0 + then (Z.shift_left p n, q) + else (p, Z.shift_left q (-n)) in + (* Euclidean division of p' by q' *) + let (quo, rem) = Z.ediv_rem p' q' in + (* quo is the integral part of p/q*2^n + rem/q' is the fractional part. *) + (* Round quo to float *) + let f = Z.round_to_float quo (Z.sign rem = 0) in + (* Apply exponent *) + ldexp f (-n) + end + + (* operations *) + (* ---------- *) + + let neg x = + mk (Z.neg x.num) x.den + (* neg undef = undef + neg inf = -inf + neg -inf = inf + *) + + let abs x = + mk (Z.abs x.num) x.den + (* abs undef = undef + abs inf = abs -inf = inf + *) + + (* addition or substraction (zaors) of finite numbers *) + let aors zaors x y = + if x.den == y.den then (* implies equality, + especially if immediate value and not a pointer, + in particular in the case den = 1 *) + make_real (zaors x.num y.num) x.den + else + make_real + (zaors + (Z.mul x.num y.den) + (Z.mul y.num x.den)) + (Z.mul x.den y.den) + + let add x y = + if x.den == Z.zero || y.den == Z.zero then match classify x, classify y with + | ZERO,_ -> y + | _,ZERO -> x + | UNDEF,_ | _,UNDEF -> undef + | INF,MINF | MINF,INF -> undef + | INF,_ | _,INF -> inf + | MINF,_ | _,MINF -> minus_inf + | NZERO,NZERO -> failwith "impossible case" + else + aors Z.add x y + (* undef + x = x + undef = undef + inf + -inf = -inf + inf = undef + inf + x = x + inf = inf + -inf + x = x + -inf = -inf + *) + + let sub x y = + if x.den == Z.zero || y.den == Z.zero then match classify x, classify y with + | ZERO,_ -> neg y + | _,ZERO -> x + | UNDEF,_ | _,UNDEF -> undef + | INF,INF | MINF,MINF -> undef + | INF,_ | _,MINF -> inf + | MINF,_ | _,INF -> minus_inf + | NZERO,NZERO -> failwith "impossible case" + else + aors Z.sub x y + (* sub x y = add x (neg y) *) + + let mul x y = + if x.den == Z.zero || y.den == Z.zero then + mk + (Z.of_int ((Z.sign x.num) * (Z.sign y.num))) + Z.zero + else + make_real (Z.mul x.num y.num) (Z.mul x.den y.den) + + (* undef * x = x * undef = undef + 0 * inf = inf * 0 = 0 * -inf = -inf * 0 = undef + inf * x = x * inf = sign x * inf + -inf * x = x * -inf = - sign x * inf + *) + + let inv x = + match Z.sign x.num with + | 1 -> mk x.den x.num + | -1 -> mk (Z.neg x.den) (Z.neg x.num) + | _ -> if x.den == Z.zero then undef else inf + (* 1 / undef = undef + 1 / inf = 1 / -inf = 0 + 1 / 0 = inf + + note that: inv (inv -inf) = inf <> -inf + *) + + let div x y = + if Z.sign y.num >= 0 + then mul x (mk y.den y.num) + else mul x (mk (Z.neg y.den) (Z.neg y.num)) + (* undef / x = x / undef = undef + 0 / 0 = undef + inf / inf = inf / -inf = -inf / inf = -inf / -inf = undef + 0 / inf = 0 / -inf = x / inf = x / -inf = 0 + inf / x = sign x * inf + -inf / x = - sign x * inf + inf / 0 = inf + -inf / 0 = -inf + x / 0 = sign x * inf + + we have div x y = mul x (inv y) + *) + + let mul_2exp x n = + if x.den == Z.zero then x + else make_real (Z.shift_left x.num n) x.den + + let div_2exp x n = + if x.den == Z.zero then x + else make_real x.num (Z.shift_left x.den n) + + (* prefix and infix *) + (* ---------------- *) + + let (~-) = neg + let (~+) x = x + let (+) = add + let (-) = sub + let ( * ) = mul + let (/) = div + let (lsl) = mul_2exp + let (asr) = div_2exp + let (~$) = of_int + let (//) = of_ints + let (~$$) = eval_of_int + let (///) = make + let (=) = equal + let (<) = lt + let (>) = gt + let (<=) = leq + let (>=) = geq + let (<>) a b = not (equal a b) +end + +(* store in separate name spaces to avoid conflict. we want to expose them as Q.Int, Q.Int32, Q.Int64, Q.Bigint *) +module QInt = struct + include Q(Z.Int) + module M = Q(Z.Int) +end + +module QInt32 = struct + include Q(Z.Int32) + module M = Q(Z.Int32) +end + +module QInt64 = struct + include Q(Z.Int64) + module M = Q(Z.Int64) +end + +module QBigint = struct + include Q(Z.Bigint) + module M = Q(Z.Bigint) +end diff --git a/drafts/bs-Zarith/src/Q_Internal.mli b/drafts/bs-Zarith/src/Q_Internal.mli new file mode 100644 index 0000000..130a5be --- /dev/null +++ b/drafts/bs-Zarith/src/Q_Internal.mli @@ -0,0 +1,530 @@ +module Q (Z: Z.Z) : sig + (** {1 Types} *) + + + type t = { + num: Z.t; (** Numerator. *) + den: Z.t; (** Denominator, >= 0 *) + } + (** A rational is represented as a pair numerator/denominator, reduced to + have a non-negative denominator and no common factor. + This form is canonical (enabling polymorphic equality and hashing). + The representation allows three special numbers: [inf] (1/0), [-inf] (-1/0) + and [undef] (0/0). + *) + + (** {1 Construction} *) + + val make: Z.t -> Z.t -> t + (** [make num den] constructs a new rational equal to [num]/[den]. + It takes care of putting the rational in canonical form. + *) + + val zero: t + val one: t + val minus_one:t + (** 0, 1, -1. *) + + val inf: t + (** 1/0. *) + + val minus_inf: t + (** -1/0. *) + + val undef: t + (** 0/0. *) + + val of_bigint: Bigint.t -> t + val of_int: int -> t + val of_int32: int32 -> t + val of_int64: int64 -> t + (** Conversions from various integer types. *) + + val of_ints: int -> int -> t + (** Conversion from an [int] numerator and an [int] denominator. *) + + val of_float: float -> t + (** Conversion from a [float]. + The conversion is exact, and maps NaN to [undef]. + *) + + + val of_string: string -> t + (** Converts a string to a rational. + Plain integers, and [/] separated integer ratios (with optional sign) are + understood. + Additionally, the special [inf], [-inf], and [undef] are recognized + (they can also be typeset respectively as [1/0], [-1/0], [0/0]). + *) + + + (** {1 Inspection} *) + + val num: t -> Z.t + (** Get the numerator. *) + + val den: t -> Z.t + (** Get the denominator. *) + + + (** {1 Testing} *) + + type kind = + | ZERO (** 0 *) + | INF (** infinity, i.e. 1/0 *) + | MINF (** minus infinity, i.e. -1/0 *) + | UNDEF (** undefined, i.e., 0/0 *) + | NZERO (** well-defined, non-infinity, non-zero number *) + (** Rationals can be categorized into different kinds, depending mainly on + whether the numerator and/or denominator is null. + *) + + val classify: t -> kind + (** Determines the kind of a rational. *) + + val is_real: t -> bool + (** Whether the argument is non-infinity and non-undefined. *) + + val sign: t -> int + (** Returns 1 if the argument is positive (including inf), -1 if it is + negative (including -inf), and 0 if it is null or undefined. + *) + + val compare: t -> t -> int + (** [compare x y] compares [x] to [y] and returns 1 if [x] is strictly + greater that [y], -1 if it is strictly smaller, and 0 if they are + equal. + This is a total ordering. + Infinities are ordered in the natural way, while undefined is considered + the smallest of all: undef = undef < -inf <= -inf < x < inf <= inf. + This is consistent with OCaml's handling of floating-point infinities + and NaN. + + OCaml's polymorphic comparison will NOT return a result consistent with + the ordering of rationals. + *) + + val equal: t -> t -> bool + (** Equality testing. + This is consistent with [compare]; in particular, [undef]=[undef]. + *) + + val min: t -> t -> t + (** Returns the smallest of its arguments. *) + + val max: t -> t -> t + (** Returns the largest of its arguments. *) + + val leq: t -> t -> bool + (** Less than or equal. *) + + val geq: t -> t -> bool + (** Greater than or equal. *) + + val lt: t -> t -> bool + (** Less than (not equal). *) + + val gt: t -> t -> bool + (** Greater than (not equal). *) + + + (** {1 Conversions} *) + + val to_bigint: t -> Bigint.t + val to_int: t -> int + val to_int32: t -> int32 + val to_int64: t -> int64 + (** Convert to integer by truncation. + Raises a [Divide_by_zero] if the argument is an infinity or undefined. + Raises a [Z.Overflow] if the result does not fit in the destination + type. + *) + + val to_string: t -> string + (** Converts to human-readable, base-10, [/]-separated rational. *) + + val to_float: t -> float + (** Converts to a floating-point number, using the current + floating-point rounding mode. With the default rounding mode, + the result is the floating-point number closest to the given + rational; ties break to even mantissa. *) + + (** {1 Arithmetic operations} *) + + (** + In all operations, the result is [undef] if one argument is [undef]. + Other operations can return [undef]: such as [inf]-[inf], [inf]*0, 0/0. + *) + + val neg: t -> t + (** Negation. *) + + val abs: t -> t + (** Absolute value. *) + + val add: t -> t -> t + (** Addition. *) + + val sub: t -> t -> t + (** Subtraction. We have [sub x y] = [add x (neg y)]. *) + + val mul: t -> t -> t + (** Multiplication. *) + + val inv: t -> t + (** Inverse. + Note that [inv 0] is defined, and equals [inf]. + *) + + val div: t -> t -> t + (** Division. + We have [div x y] = [mul x (inv y)], and [inv x] = [div one x]. + *) + + val mul_2exp: t -> int -> t + (** [mul_2exp x n] multiplies [x] by 2 to the power of [n]. *) + + val div_2exp: t -> int -> t + (** [div_2exp x n] divides [x] by 2 to the power of [n]. *) + + (** {1 Prefix and infix operators} *) + + (** + Classic prefix and infix [int] operators are redefined on [t]. + *) + + val (~-): t -> t + (** Negation [neg]. *) + + val (~+): t -> t + (** Identity. *) + + val (+): t -> t -> t + (** Addition [add]. *) + + val (-): t -> t -> t + (** Subtraction [sub]. *) + + val ( * ): t -> t -> t + (** Multiplication [mul]. *) + + val (/): t -> t -> t + (** Division [div]. *) + + val (lsl): t -> int -> t + (** Multiplication by a power of two [mul_2exp]. *) + + val (asr): t -> int -> t + (** Division by a power of two [shift_right]. *) + + val (~$): int -> t + (** Conversion from [int]. *) + + val (//): int -> int -> t + (** Creates a rational from two [int]s. *) + + val (~$$): Z.t -> t + (** Conversion from [Z.t]. *) + + val (///): Z.t -> Z.t -> t + (** Creates a rational from two [Z.t]. *) + + val (=): t -> t -> bool + (** Same as [equal]. *) + + val (<): t -> t -> bool + (** Same as [lt]. *) + + val (>): t -> t -> bool + (** Same as [gt]. *) + + val (<=): t -> t -> bool + (** Same as [leq]. *) + + val (>=): t -> t -> bool + (** Same as [geq]. *) + + val (<>): t -> t -> bool + (** [a <> b] is equivalent to [not (equal a b)]. *) +end + +module QInt : sig + module M : sig + type t = Q(Z.Int).t = { num : Z.Int.t; den : Z.Int.t; } + val mk : Z.Int.t -> Z.Int.t -> t + val make_real : Z.Int.t -> Z.Int.t -> t + val make : Z.Int.t -> Z.Int.t -> t + val of_bigint : Bigint.t -> t + val of_int : int -> t + val of_int32 : Int32.t -> t + val of_int64 : Int64.t -> t + val of_ints : int -> int -> t + val zero : t + val one : t + val minus_one : t + val inf : t + val minus_inf : t + val undef : t + val of_float : float -> t + val of_string : string -> t + type kind = Q(Z.Int).kind = ZERO | INF | MINF | UNDEF | NZERO + val classify : t -> kind + val is_real : t -> bool + val num : t -> Z.Int.t + val den : t -> Z.Int.t + val sign : t -> int + val equal : t -> t -> bool + val compare : t -> t -> int + val min : t -> t -> t + val max : t -> t -> t + val leq : t -> t -> bool + val geq : t -> t -> bool + val lt : t -> t -> bool + val gt : t -> t -> bool + val to_string : t -> string + val to_bigint: t -> Bigint.t + val to_int : t -> int + val to_int32 : t -> int32 + val to_int64 : t -> int64 + val to_float : t -> float + val neg : t -> t + val abs : t -> t + val aors : (Z.Int.t -> Z.Int.t -> Z.Int.t) -> t -> t -> t + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val inv : t -> t + val div : t -> t -> t + val mul_2exp : t -> int -> t + val div_2exp : t -> int -> t + val ( ~- ) : t -> t + val ( ~+ ) : 'a -> 'a + val ( + ) : t -> t -> t + val ( - ) : t -> t -> t + val ( * ) : t -> t -> t + val ( / ) : t -> t -> t + val ( lsl ) : t -> int -> t + val ( asr ) : t -> int -> t + val ( ~$ ) : int -> t + val ( // ) : int -> int -> t + val ( ~$$ ) : Z.Int.t -> t + val ( /// ) : Z.Int.t -> Z.Int.t -> t + val ( = ) : t -> t -> bool + val ( < ) : t -> t -> bool + val ( > ) : t -> t -> bool + val ( <= ) : t -> t -> bool + val ( >= ) : t -> t -> bool + val ( <> ) : t -> t -> bool + end +end +module QInt32 : sig + module M : sig + type t = Q(Z.Int32).t = { num : Z.Int32.t; den : Z.Int32.t; } + val mk : Z.Int32.t -> Z.Int32.t -> t + val make_real : Z.Int32.t -> Z.Int32.t -> t + val make : Z.Int32.t -> Z.Int32.t -> t + val of_bigint : Bigint.t -> t + val of_int : int -> t + val of_int32 : Int32.t -> t + val of_int64 : Int64.t -> t + val of_ints : int -> int -> t + val zero : t + val one : t + val minus_one : t + val inf : t + val minus_inf : t + val undef : t + val of_float : float -> t + val of_string : string -> t + type kind = Q(Z.Int32).kind = ZERO | INF | MINF | UNDEF | NZERO + val classify : t -> kind + val is_real : t -> bool + val num : t -> Z.Int32.t + val den : t -> Z.Int32.t + val sign : t -> int + val equal : t -> t -> bool + val compare : t -> t -> int + val min : t -> t -> t + val max : t -> t -> t + val leq : t -> t -> bool + val geq : t -> t -> bool + val lt : t -> t -> bool + val gt : t -> t -> bool + val to_string : t -> string + val to_bigint: t -> Bigint.t + val to_int : t -> int + val to_int32 : t -> int32 + val to_int64 : t -> int64 + val to_float : t -> float + val neg : t -> t + val abs : t -> t + val aors : (Z.Int32.t -> Z.Int32.t -> Z.Int32.t) -> t -> t -> t + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val inv : t -> t + val div : t -> t -> t + val mul_2exp : t -> int -> t + val div_2exp : t -> int -> t + val ( ~- ) : t -> t + val ( ~+ ) : 'a -> 'a + val ( + ) : t -> t -> t + val ( - ) : t -> t -> t + val ( * ) : t -> t -> t + val ( / ) : t -> t -> t + val ( lsl ) : t -> int -> t + val ( asr ) : t -> int -> t + val ( ~$ ) : int -> t + val ( // ) : int -> int -> t + val ( ~$$ ) : Z.Int32.t -> t + val ( /// ) : Z.Int32.t -> Z.Int32.t -> t + val ( = ) : t -> t -> bool + val ( < ) : t -> t -> bool + val ( > ) : t -> t -> bool + val ( <= ) : t -> t -> bool + val ( >= ) : t -> t -> bool + val ( <> ) : t -> t -> bool + end +end +module QInt64 : sig + module M : sig + type t = Q(Z.Int64).t = { num : Z.Int64.t; den : Z.Int64.t; } + val mk : Z.Int64.t -> Z.Int64.t -> t + val make_real : Z.Int64.t -> Z.Int64.t -> t + val make : Z.Int64.t -> Z.Int64.t -> t + val of_bigint : Bigint.t -> t + val of_int : int -> t + val of_int32 : Int32.t -> t + val of_int64 : Int64.t -> t + val of_ints : int -> int -> t + val zero : t + val one : t + val minus_one : t + val inf : t + val minus_inf : t + val undef : t + val of_float : float -> t + val of_string : string -> t + type kind = Q(Z.Int64).kind = ZERO | INF | MINF | UNDEF | NZERO + val classify : t -> kind + val is_real : t -> bool + val num : t -> Z.Int64.t + val den : t -> Z.Int64.t + val sign : t -> int + val equal : t -> t -> bool + val compare : t -> t -> int + val min : t -> t -> t + val max : t -> t -> t + val leq : t -> t -> bool + val geq : t -> t -> bool + val lt : t -> t -> bool + val gt : t -> t -> bool + val to_string : t -> string + val to_bigint: t -> Bigint.t + val to_int : t -> int + val to_int32 : t -> int32 + val to_int64 : t -> int64 + val to_float : t -> float + val neg : t -> t + val abs : t -> t + val aors : (Z.Int64.t -> Z.Int64.t -> Z.Int64.t) -> t -> t -> t + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val inv : t -> t + val div : t -> t -> t + val mul_2exp : t -> int -> t + val div_2exp : t -> int -> t + val ( ~- ) : t -> t + val ( ~+ ) : 'a -> 'a + val ( + ) : t -> t -> t + val ( - ) : t -> t -> t + val ( * ) : t -> t -> t + val ( / ) : t -> t -> t + val ( lsl ) : t -> int -> t + val ( asr ) : t -> int -> t + val ( ~$ ) : int -> t + val ( // ) : int -> int -> t + val ( ~$$ ) : Z.Int64.t -> t + val ( /// ) : Z.Int64.t -> Z.Int64.t -> t + val ( = ) : t -> t -> bool + val ( < ) : t -> t -> bool + val ( > ) : t -> t -> bool + val ( <= ) : t -> t -> bool + val ( >= ) : t -> t -> bool + val ( <> ) : t -> t -> bool + end +end +module QBigint : sig + module M : sig + type t = + Q(Z.Bigint).t = { + num : Z.Bigint.t; + den : Z.Bigint.t; + } + val mk : Z.Bigint.t -> Z.Bigint.t -> t + val make_real : Z.Bigint.t -> Z.Bigint.t -> t + val make : Z.Bigint.t -> Z.Bigint.t -> t + val of_bigint : Bigint.t -> t + val of_int : int -> t + val of_int32 : Int32.t -> t + val of_int64 : Int64.t -> t + val of_ints : int -> int -> t + val zero : t + val one : t + val minus_one : t + val inf : t + val minus_inf : t + val undef : t + val of_float : float -> t + val of_string : string -> t + type kind = Q(Z.Bigint).kind = ZERO | INF | MINF | UNDEF | NZERO + val classify : t -> kind + val is_real : t -> bool + val num : t -> Z.Bigint.t + val den : t -> Z.Bigint.t + val sign : t -> int + val equal : t -> t -> bool + val compare : t -> t -> int + val min : t -> t -> t + val max : t -> t -> t + val leq : t -> t -> bool + val geq : t -> t -> bool + val lt : t -> t -> bool + val gt : t -> t -> bool + val to_string : t -> string + val to_bigint: t -> Bigint.t + val to_int : t -> int + val to_int32 : t -> int32 + val to_int64 : t -> int64 + val to_float : t -> float + val neg : t -> t + val abs : t -> t + val aors : (Z.Bigint.t -> Z.Bigint.t -> Z.Bigint.t) -> t -> t -> t + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val inv : t -> t + val div : t -> t -> t + val mul_2exp : t -> int -> t + val div_2exp : t -> int -> t + val ( ~- ) : t -> t + val ( ~+ ) : 'a -> 'a + val ( + ) : t -> t -> t + val ( - ) : t -> t -> t + val ( * ) : t -> t -> t + val ( / ) : t -> t -> t + val ( lsl ) : t -> int -> t + val ( asr ) : t -> int -> t + val ( ~$ ) : int -> t + val ( // ) : int -> int -> t + val ( ~$$ ) : Z.Bigint.t -> t + val ( /// ) : Z.Bigint.t -> Z.Bigint.t -> t + val ( = ) : t -> t -> bool + val ( < ) : t -> t -> bool + val ( > ) : t -> t -> bool + val ( <= ) : t -> t -> bool + val ( >= ) : t -> t -> bool + val ( <> ) : t -> t -> bool + end +end diff --git a/drafts/bs-Zarith/src/U.ml b/drafts/bs-Zarith/src/U.ml new file mode 100644 index 0000000..468e176 --- /dev/null +++ b/drafts/bs-Zarith/src/U.ml @@ -0,0 +1,239 @@ +(* + * Module: U + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * + * Support unsigned integers in OCaml. + *) + +module type Basics = sig + type t + + val add : t -> t -> t + val sub : t -> t -> t + val mul : t -> t -> t + val div : t -> t -> t + val rem : t -> t -> t + val maxInt : t + val logand : t -> t -> t + val logor : t -> t -> t + val logxor : t -> t -> t + val shiftLeft : t -> int -> t + val shiftRight : t -> int -> t + val ofInt : int -> t + val toInt : t -> int + val ofInt64 : int64 -> t + val toInt64 : t -> int64 + val ofString : string -> t option + val toString : t -> string +end + + +module type Extras = sig + type t + + val zero : t + val one : t + val lognot : t -> t + val succ : t -> t + val pred : t -> t + val compare : t -> t -> int + val equal : t -> t -> bool + val max : t -> t -> t + val min : t -> t -> t +end + + +module type Infix = sig + type t + val (+) : t -> t -> t + val (-) : t -> t -> t + val ( * ) : t -> t -> t + val (/) : t -> t -> t + val (mod) : t -> t -> t + val (land) : t -> t -> t + val (lor) : t -> t -> t + val (lxor) : t -> t -> t + val (lsl) : t -> int -> t + val (lsr) : t -> int -> t +end + + +module type S = sig + include Basics + include Extras with type t := t + + module Infix : Infix with type t := t +end + + +module MakeInfix (B : Basics) = +struct + open B + let (+) = add + let (-) = sub + let ( * ) = mul + let (/) = div + let (mod) = rem + let (land) = logand + let (lor) = logor + let (lxor) = logxor + let (lsl) = shiftLeft + let (lsr) = shiftRight +end + + +module Extras(Basics : Basics) : Extras with type t := Basics.t = +struct + open Basics + let zero = ofInt 0 + let one = ofInt 1 + let succ n = add n one + let pred n = sub n one + let lognot n = logxor n maxInt + let compare (x : t) (y : t) = Pervasives.compare x y + let equal (x : t) (y : t) = Pervasives.(=) x y + let max (x : t) (y : t) = Pervasives.max x y + let min (x : t) (y : t) = Pervasives.min x y +end + + +module UInt8 : S with type t = private int = +struct + module B = + struct + type t = int + let maxInt = 255 + let add : t -> t -> t = fun x y -> (x + y) land maxInt + let sub : t -> t -> t = fun x y -> (x - y) land maxInt + let mul : t -> t -> t = fun x y -> (x * y) land maxInt + let div : t -> t -> t = (/) + let rem : t -> t -> t = (mod) + let logand: t -> t -> t = (land) + let logor: t -> t -> t = (lor) + let logxor : t -> t -> t = (lxor) + let shiftLeft : t -> int -> t = fun x y -> (x lsl y) land maxInt + let shiftRight : t -> int -> t = (lsr) + let ofInt (x: int): t = x land maxInt + let toInt : t -> int = fun x -> x + let ofInt64 : int64 -> t = fun x -> ofInt (Int64.to_int x) + let toInt64 : t -> int64 = fun x -> Int64.of_int (toInt x) + let ofString : string -> t option = fun x -> + match Belt.Int.fromString x with + | Some x -> Some (ofInt x) + | None -> None + + let toString : t -> string = string_of_int + end + include B + include Extras(B) + module Infix = MakeInfix(B) +end + + +module UInt16 : S with type t = private int = +struct + module B = + struct + type t = int + let maxInt = 65535 + let add : t -> t -> t = fun x y -> (x + y) land maxInt + let sub : t -> t -> t = fun x y -> (x - y) land maxInt + let mul : t -> t -> t = fun x y -> (x * y) land maxInt + let div : t -> t -> t = (/) + let rem : t -> t -> t = (mod) + let logand: t -> t -> t = (land) + let logor: t -> t -> t = (lor) + let logxor : t -> t -> t = (lxor) + let shiftLeft : t -> int -> t = fun x y -> (x lsl y) land maxInt + let shiftRight : t -> int -> t = (lsr) + let ofInt (x: int): t = x land maxInt + let toInt : t -> int = fun x -> x + let ofInt64 : int64 -> t = fun x -> Int64.to_int x |> ofInt + let toInt64 : t -> int64 = fun x -> toInt x |> Int64.of_int + let ofString : string -> t option = fun x -> + match Belt.Int.fromString x with + | Some x -> Some (ofInt x) + | None -> None + let toString : t -> string = string_of_int + end + include B + include Extras(B) + module Infix = MakeInfix(B) +end + +module UInt32 : S with type t = Int64.t = +struct + module B = + struct + type t = Int64.t + let maxInt = Int64.of_string("4294967295") + let logand: t -> t -> t = (Int64.logand) + let add : t -> t -> t = fun x y -> logand (Int64.add x y) maxInt + let sub : t -> t -> t = fun x y -> logand (Int64.sub x y) maxInt + let mul : t -> t -> t = fun x y -> logand (Int64.mul x y) maxInt + let div : t -> t -> t = fun x y -> logand (Int64.div x y) maxInt + let rem : t -> t -> t = fun x y -> Int64.sub x (Int64.mul y (Int64.div x y)) + let logor: t -> t -> t = (Int64.logor) + let logxor : t -> t -> t = (Int64.logxor) + let shiftLeft = Int64.shift_left + let shiftRight = Int64.shift_right + let ofInt (x: int): t = logand (Int64.of_int x) maxInt + let toInt : t -> int = fun x -> Int64.to_int x + let ofInt64 : int64 -> t = fun x -> Int64.to_int x |> ofInt + let toInt64 : t -> int64 = fun x -> toInt x |> Int64.of_int + let ofString : string -> t option = fun x -> + match Belt.Int.fromString x with + | Some x -> Some (ofInt x) + | None -> None + let toString : t -> string = Int64.to_string + end + include B + include Extras(B) + module Infix = MakeInfix(B) +end + +module UInt64 : S with type t = Bigint.t = +struct + module B = + struct + type t = Bigint.t + let maxInt = Bigint.of_string("18446744073709551616") + let rem : t -> t -> t = fun x y -> Bigint.sub x (Bigint.mul y (Bigint.div x y)) + let reduce : t -> t = fun x -> + if Bigint.lt x Bigint.zero + then + ( let r = Bigint.rem x maxInt in + Bigint.add maxInt (Bigint.add r Bigint.one) + ) + else if Bigint.gt x maxInt + then + ( + Bigint.sub (Bigint.rem x maxInt) Bigint.one + ) + else x + + let logand: t -> t -> t = (Bigint.logand) + let add : t -> t -> t = fun x y -> reduce (Bigint.add x y) + let sub : t -> t -> t = fun x y -> reduce (Bigint.sub x y) + let mul : t -> t -> t = fun x y -> reduce (Bigint.mul x y) + let div : t -> t -> t = fun x y -> reduce (Bigint.div x y) + + let logor: t -> t -> t = (Bigint.logor) + let logxor : t -> t -> t = (Bigint.logxor) + let shiftLeft = Bigint.shift_left + let shiftRight = Bigint.shift_right + let ofInt (x: int): t = reduce (Bigint.of_int x) + let toInt : t -> int = fun x -> Bigint.to_int x + let ofInt64 : int64 -> t = fun x -> Int64.to_int x |> ofInt + let toInt64 : t -> int64 = fun x -> toInt x |> Int64.of_int + let ofString : string -> t option = fun x -> + match Belt.Int.fromString x with + | Some _x -> Some (reduce (Bigint.of_string x)) + | None -> None + let toString : t -> string = Bigint.to_string + end + include B + include Extras(B) + module Infix = MakeInfix(B) +end diff --git a/drafts/bs-Zarith/src/U.mli b/drafts/bs-Zarith/src/U.mli new file mode 100644 index 0000000..26a38ba --- /dev/null +++ b/drafts/bs-Zarith/src/U.mli @@ -0,0 +1,145 @@ +(* + * Module: U + * Copyright: Plow Technologies, 2020 + * Maintainer: james.haver@plowtech.net + * + * Support unsigned integers in OCaml. + *) + +(** Types and operations for unsigned integers. *) + +module type Infix = sig + type t + + val (+) : t -> t -> t + (** Addition. See {!add}. *) + + val (-) : t -> t -> t + (** Subtraction. See {!sub}.*) + + val ( * ) : t -> t -> t + (** Multiplication. See {!mul}.*) + + val (/) : t -> t -> t + (** Division. See {!div}.*) + + val (mod) : t -> t -> t + (** Integer remainder. See {!rem}. *) + + val (land) : t -> t -> t + (** Bitwise logical and. See {!logand}. *) + + val (lor) : t -> t -> t + (** Bitwise logical or. See {!logor}. *) + + val (lxor) : t -> t -> t + (** Bitwise logical exclusive or. See {!logxor}. *) + + val (lsl) : t -> int -> t + (** [x lsl y] shifts [x] to the left by [y] bits. See {!shiftLeft}. *) + + val (lsr) : t -> int -> t + (** [x lsr y] shifts [x] to the right by [y] bits. See {!shiftRight}. *) +end +(** Infix names for the unsigned integer operations. *) + + +module type S = sig + type t + + val add : t -> t -> t + (** Addition. *) + + val sub : t -> t -> t + (** Subtraction. *) + + val mul : t -> t -> t + (** Multiplication. *) + + val div : t -> t -> t + (** Division. Raise {!Division_by_zero} if the second argument is zero. *) + + val rem : t -> t -> t + (** Integer remainder. Raise {!Division_by_zero} if the second argument is + zero. *) + + val maxInt : t + (** The greatest representable integer. *) + + val logand : t -> t -> t + (** Bitwise logical and. *) + + val logor : t -> t -> t + (** Bitwise logical or. *) + + val logxor : t -> t -> t + (** Bitwise logical exclusive or. *) + + val shiftLeft : t -> int -> t + (** {!shiftLeft} [x] [y] shifts [x] to the left by [y] bits. *) + + val shiftRight : t -> int -> t + (** {!shiftRight} [x] [y] shifts [x] to the right by [y] bits. *) + + val ofInt : int -> t + (** Convert the given int value to an unsigned integer. *) + + val toInt : t -> int + (** Convert the given unsigned integer value to an int. *) + + val ofInt64 : int64 -> t + (** Convert the given int64 value to an unsigned integer. *) + + val toInt64 : t -> int64 + (** Convert the given unsigned integer value to an int64. *) + + val ofString : string -> t option + (** Convert the given string to an unsigned integer. Raise {!Failure} + ["int_ofString"] if the given string is not a valid representation of + an unsigned integer. *) + + val toString : t -> string + (** Return the string representation of its argument. *) + + val zero : t + (** The integer 0. *) + + val one : t + (** The integer 1. *) + + val lognot : t -> t + (** Bitwise logical negation. *) + + val succ : t -> t + (** Successor. *) + + val pred : t -> t + (** Predecessor. *) + + val compare : t -> t -> int + (** The comparison function for unsigned integers, with the same + specification as {!Pervasives.compare}. *) + + val equal : t -> t -> bool + (** Tests for equality, with the same specification as {!Pervasives.(=)}. *) + + val max : t -> t -> t + (** [max x y] is the greater of [x] and [y] *) + + val min : t -> t -> t + (** [min x y] is the lesser of [x] and [y] *) + + module Infix : Infix with type t := t +end + +module UInt8 : S with type t = private int +(** Unsigned 8-bit integer type and operations. *) + +module UInt16 : S with type t = private int +(** Unsigned 16-bit integer type and operations. *) + +module UInt32 : S with type t = Int64.t +(** Unsigned 32-bit integer type and operations. *) + +module UInt64 : S with type t = Bigint.t +(** Unsigned 64-bit integer type and operations. *) diff --git a/drafts/bs-Zarith/src/Z.ml b/drafts/bs-Zarith/src/Z.ml new file mode 100644 index 0000000..5a889a8 --- /dev/null +++ b/drafts/bs-Zarith/src/Z.ml @@ -0,0 +1,983 @@ +module type Z = sig + exception Overflow + (** Raised by conversion functions when the value cannot be represented in + the destination type. + *) + + type t + (** Type of Bigint, arbitrary length integer. *) + + (** {1 Construction} *) + + val zero: t + (** The number 0. *) + + val one: t + (** The number 1. *) + + val minus_one: t + (** The number -1. *) + + val of_int: int -> t + (** Converts from a base integer. *) + + val of_int32: Int32.t -> t + (** Converts from a 32-bit integer. *) + + val of_int64: Int64.t -> t + (** Converts from a 64-bit integer. *) + + val of_bigint: Bigint.t -> t + (** Converts from an arbitrary length integer. *) + + val of_float: float -> t + (** Converts a float to an integer. *) + + val of_string: string -> t + (** Converts a string to an integer. + An optional [-] prefix indicates a negative number. + *) + + val of_substring : string -> pos:int -> len:int -> t + (** + + *) + + (** {1 Basic arithmetic operations} *) + + val succ: t -> t + (** Returns its argument plus one. *) + + val pred: t -> t + (** Returns its argument minus one. *) + + val abs: t -> t + (** Absolute value. *) + + val neg: t -> t + (** Unary negation. *) + + val add: t -> t -> t + (** Addition. *) + + val sub: t -> t -> t + (** Subtraction. *) + + val mul: t -> t -> t + (** Multiplication. *) + + val div: t -> t -> t + (** Integer division. The result is truncated towards zero + and obeys the rule of signs. + Raises [Division_by_zero] if the divisor (second argument) is 0. + *) + + val rem: t -> t -> t + (** Integer remainder. Can raise a [Division_by_zero]. + The result of [rem a b] has the sign of [a], and its absolute value is + strictly smaller than the absolute value of [b]. + The result satisfies the equality [a = b * div a b + rem a b]. + *) + + val div_rem: t -> t -> (t * t) + (** Computes both the integer quotient and the remainder. + [div_rem a b] is equal to [(div a b, rem a b)]. + Raises [Division_by_zero] if [b = 0]. + *) + + val cdiv: t -> t -> t + (** Integer division with rounding towards +oo (ceiling). + Can raise a [Division_by_zero]. + *) + + val fdiv: t -> t -> t + (** Integer division with rounding towards -oo (floor). + Can raise a [Division_by_zero]. + *) + + val ediv_rem: t -> t -> (t * t) + (** Euclidean division and remainder. [ediv_rem a b] returns a pair [(q, r)] + such that [a = b * q + r] and [0 <= r < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + + val ediv: t -> t -> t + (** Euclidean division. [ediv a b] is equal to [fst (ediv_rem a b)]. + The result satisfies [0 <= a - b * ediv a b < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + + val erem: t -> t -> t + (** Euclidean remainder. [erem a b] is equal to [snd (ediv_rem a b)]. + The result satisfies [0 <= erem a b < |b|] and + [a = b * ediv a b + erem a b]. Raises [Division_by_zero] if [b = 0]. + *) + + val divexact: t -> t -> t + (** [divexact a b] divides [a] by [b], only producing correct result when the + division is exact, i.e., when [b] evenly divides [a]. + It should be faster than general division. + Can raise a [Division_by_zero]. + *) + + + (** {1 Bit-level operations} *) + + (** For all bit-level operations, negative numbers are considered in 2's + complement representation, starting with a virtual infinite number of + 1s. + *) + + val logand: t -> t -> t + (** Bitwise logical and. *) + + val logor: t -> t -> t + (** Bitwise logical or. *) + + val logxor: t -> t -> t + (** Bitwise logical exclusive or. *) + + val lognot: t -> t + (** Bitwise logical negation. + The identity [lognot a]=[-a-1] always hold. + *) + + val shift_left : t -> int -> t + (** Shifts to the left. + Equivalent to a multiplication by a power of 2. + The second argument must be non-negative. + *) + + val shift_right : t -> int -> t + (** Shifts to the right. + This is an arithmetic shift, + equivalent to a division by a power of 2 with rounding towards -oo. + The second argument must be non-negative. + *) + + (* val shift_right_trunc: t -> int -> t *) + (** Shifts to the right, rounding towards 0. + This is equivalent to a division by a power of 2, with truncation. + The second argument must be non-negative. + *) + + val numbits : t -> int + (** Returns the number of significant bits in the given number. + If [x] is zero, [numbits x] returns 0. Otherwise, + [numbits x] returns a positive integer [n] such that + [2^{n-1} <= |x| < 2^n]. Note that [numbits] is defined + for negative arguments, and that [numbits (-x) = numbits x]. *) + + (** {1 Conversions} *) + + (** Note that, when converting to an integer type that cannot represent the + converted value, an [Overflow] exception is raised. + *) + + val to_int: t -> int + (** Converts to a base integer. May raise [Overflow]. *) + + val to_int32: t -> int32 + (** Converts to a 32-bit integer. May raise [Overflow]. *) + + val to_int64: t -> int64 + (** Converts to a 64-bit integer. May raise [Overflow]. *) + + val to_bigint: t -> Bigint.t + (** Converts to an arbitrary length integer. May raise [Overflow]. *) + + val to_float: t -> float + (** Converts to a floating-point value. + This function rounds the given integer according to the current + rounding mode of the processor. In default mode, it returns + the floating-point number nearest to the given integer, + breaking ties by rounding to even. *) + + val round_to_float: t -> bool -> float + + val to_string: t -> string + (** Gives a human-readable, decimal string representation of the argument. *) + + (** {1 Ordering} *) + + val compare : t -> t -> int + (** Comparison. [compare x y] returns 0 if [x] equals [y], + -1 if [x] is smaller than [y], and 1 if [x] is greater than [y]. + + Note that Pervasive.compare can be used to compare reliably two integers + only on OCaml 3.12.1 and later versions. + *) + + val equal: t -> t -> bool + (** Equality test. *) + + val leq: t -> t -> bool + (** Less than or equal. *) + + val geq: t -> t -> bool + (** Greater than or equal. *) + + val lt: t -> t -> bool + (** Less than (and not equal). *) + + val gt: t -> t -> bool + (** Greater than (and not equal). *) + + val sign: t -> int + (** Returns -1, 0, or 1 when the argument is respectively negative, null, or + positive. + *) + + val min: t -> t -> t + (** Returns the minimum of its arguments. *) + + val max: t -> t -> t + (** Returns the maximum of its arguments. *) + + val is_even: t -> bool + (** Returns true if the argument is even (divisible by 2), false if odd. *) + + val is_odd: t -> bool + (** Returns true if the argument is odd, false if even. *) + + (* val hash: t -> int *) + (** Hashes a number. + This functions gives the same result as OCaml's polymorphic hashing + function. + The result is consistent with equality: if [a] = [b], then [hash a] = + [hash b]. + *) + + (** {1 Elementary number theory} *) + + val gcd: t -> t -> t + (** Greatest common divisor. + The result is always positive. + Raises a [Division_by_zero] is either argument is null. + *) + + (** {1 Powers} *) + + val pow: t -> int -> t + (** [pow base exp] raises [base] to the [exp] power. + [exp] must be non-negative. + Note that only exponents fitting in a machine integer are supported, as + larger exponents would surely make the result's size overflow the + address space. + Raises an [Invalid_argument] on negative [exp]. + *) + + (** {1 Prefix and infix operators} *) + + (** + Classic (and less classic) prefix and infix [int] operators are + redefined on [t]. + + This makes it easy to typeset expressions. + Using OCaml 3.12's local open, you can simply write + [Z.(~$2 + ~$5 * ~$10)]. + *) + + val (~-): t -> t + (** Negation [neg]. *) + + val (~+): t -> t + (** Identity. *) + + val (+): t -> t -> t + (** Addition [add]. *) + + val (-): t -> t -> t + (** Subtraction [sub]. *) + + val ( * ): t -> t -> t + (** Multiplication [mul]. *) + + val (/): t -> t -> t + (** Truncated division [div]. *) + + val (/>): t -> t -> t + (** Ceiling division [cdiv]. *) + + val (/<): t -> t -> t + (** Flooring division [fdiv]. *) + + val (/|): t -> t -> t + (** Exact division [divexact]. *) + + val (mod): t -> t -> t + (** Remainder [rem]. *) + + val (land): t -> t -> t + (** Bit-wise logical and [logand]. *) + + val (lor): t -> t -> t + (** Bit-wise logical inclusive or [logor]. *) + + val (lxor): t -> t -> t + (** Bit-wise logical exclusive or [logxor]. *) + + val (~!): t -> t + (** Bit-wise logical negation [lognot]. *) + + val (lsl): t -> int -> t + (** Bit-wise shift to the left [shift_left]. *) + + val (asr): t -> int -> t + (** Bit-wise shift to the right [shift_right]. *) + + val (~$): int -> t + (** Conversion from [int] [of_int]. *) + + val ( ** ): t -> int -> t + (** Power [pow]. *) + + val (=): t -> t -> bool + (** Same as [equal]. *) + + val (<): t -> t -> bool + (** Same as [lt]. *) + + val (>): t -> t -> bool + (** Same as [gt]. *) + + val (<=): t -> t -> bool + (** Same as [leq]. *) + + val (>=): t -> t -> bool + (** Same as [geq]. *) + + val (<>): t -> t -> bool + (** [a <> b] is equivalent to [not (equal a b)]. *) +end + + +module ZInt : Z = struct + exception Overflow + type t = int + + (** Construction *) + let zero = 0 + let one = 1 + let minus_one = -1 + + let of_int x = x + let of_int32 = Int32.to_int + let of_int64 = Int64.to_int + let of_bigint = Bigint.to_int + let of_float = int_of_float + let of_string = int_of_string + let of_substring s ~pos ~len = int_of_string (String.sub s pos len) + + (** Basic arithmetic operations *) + let succ x = x + 1 + let pred x = x - 1 + + let abs = abs + let neg = (~-) + let add x y = x + y + let sub x y = x - y + let mul x y = x * y + + let div x y = x / y + let rem x y = x mod y + let div_rem a b = (a / b, rem a b) + + let sign n = + if n == 0 + then 0 + else + if n < 0 + then -1 + else 1 + + let rec ediv_rem' a b cum = + let a = abs a in + let b = abs b in + let r = sub a b in + if (compare a b) = 1 + then ediv_rem' r b (succ cum) + else (succ cum, r) + + let ediv_rem a b = + if a > -1 + then div_rem a b + else + let q,r = ediv_rem' a b zero in + (neg q, abs r) + + let ediv a b = + let quotient, _ = ediv_rem a b + in quotient + + let erem a b = + let _, remainder = ediv_rem a b + in remainder + + let divexact = div + + (** Bit-level operations *) + let logand x y = x land y + let logor x y = x lor y + let logxor x y = x lxor y + let lognot x = lnot x + let shift_left = (lsl) + let shift_right = (asr) + + let numbits n = + let nref = ref n in + let count = ref 0 in + while (!nref > !count) do + if (!nref land !count == 1) + then (count := !count + 1) + else (nref := !nref lsr 1) + done; + !count + + (** Conversions *) + let to_int x = x + let to_int32 = Int32.of_int + let to_int64 = Int64.of_int + let to_bigint = Bigint.of_int + let to_float = float_of_int + let round_to_float x exact = + let m = to_int64 x in + (* Unless the fractional part is exactly 0, round m to an odd integer *) + let m = if exact then m else Int64.logor m 1L in + (* Then convert m to float, with the current rounding mode. *) + Int64.to_float m + let to_string = string_of_int + + (** Ordering *) + let compare = compare + let equal x y = x = y + let leq x y = x <= y + let geq x y = x >= y + let lt x y = x < y + let gt x y = x > y + let sign = sign + + let cdiv a b = + let quotient, remainder = div_rem a b in + if gt remainder zero then (add quotient one) else quotient + + let fdiv a b = + let quotient, remainder = div_rem a b in + if lt remainder zero then (sub quotient one) else quotient + + let min = min + let max = max + let is_even i = (i mod 2) = 0 + let is_odd i = (i mod 2) <> 0 + (* val hash: t -> int *) + + let rec gcd' a b = + let c = erem a b + in if c = zero + then b + else gcd' b c + + let gcd x y = gcd' x y + + (** Powers *) + let rec pow' base exp acc = + if exp <= 0 + then acc + else (pow' base (exp - 1) (mul acc base)) + + let pow base exp = + if exp < 0 + then raise (Invalid_argument "The exponent must be greater zero or greater.") + else if exp = 0 + then one + else if exp = 1 + then base + else pow' base exp one + + (** Prefix and infix operators *) + let (~-) = neg + let (~+) x = x + let (+) = add + let (-) = sub + let ( * ) = mul + let (/) = div + let (/>) = cdiv + let (/<) = fdiv + let (/|) = div + let (mod) = (rem) + let (land) = (land) + let (lor) = (lor) + let (lxor) = (lxor) + let (~!) x = lnot x + let (lsl) = (lsl) + let (asr) = (asr) + let (~$) = of_int + let ( ** ) a b = pow a b + let (=) = equal + let (<) = (<) + let (>) = (>) + let (<=) = (<=) + let (>=) = (>=) + let (<>) a b = not (equal a b) +end + +module ZInt32 : Z = struct + exception Overflow + type t = Int32.t + + (** Construction *) + let zero = Int32.zero + let one = Int32.one + let two = Int32.of_int 2 + let minus_one = Int32.minus_one + + let of_int = Int32.of_int + let of_int32 x = x + let of_int64 = Int64.to_int32 + let of_bigint = Bigint.to_int32 + let of_float = Int32.of_float + let of_string = Int32.of_string + let of_substring s ~pos ~len = Int32.of_string (String.sub s pos len) + + (** Basic arithmetic operations *) + let succ x = Int32.add x one + let pred x = Int32.sub x one + + let abs = Int32.abs + let neg = Int32.neg + let add = Int32.add + let sub = Int32.sub + let mul = Int32.mul + + let (mod) a n = Int32.sub a (Int32.mul n (Int32.div a n)) + let div = Int32.div + let rem x y = x mod y + let div_rem a b = (div a b, rem a b) + + let sign n = + if n == (Int32.of_int 0) + then 0 + else + if (Int32.compare n (Int32.of_int 0)) < 0 + then -1 + else 1 + + let rec ediv_rem' a b cum = + let a = abs a in + let b = abs b in + let r = sub a b in + if (compare a b) = 1 + then ediv_rem' r b (succ cum) + else (succ cum, r) + + let gt x y = (Int32.compare x y) > 0 + + let ediv_rem a b = + if (gt a minus_one) + then div_rem a b + else + let q,r = ediv_rem' a b zero in + (neg q, abs r) + + let ediv a b = + let quotient, _ = ediv_rem a b + in quotient + + let erem a b = + let _, remainder = ediv_rem a b + in remainder + + let divexact = div + + (** Bit-level operations *) + let logand = Int32.logand + let logor = Int32.logor + let logxor = Int32.logxor + let lognot = Int32.lognot + let shift_left = Int32.shift_left + let shift_right = Int32.shift_right + + let numbits n = + let nref = ref n in + let count = ref zero in + while (!nref > !count) do + if (Int32.logand !nref !count == one) + then (count := Int32.add !count one) + else (nref := Int32.shift_right_logical !nref 1) + done; + Int32.to_int !count + + (** Conversions *) + let to_int = Int32.to_int + let to_int32 x = x + let to_int64 = Int64.of_int32 + let to_bigint = Bigint.of_int32 + let to_float x = Int64.to_float (Int64.of_int32 x) (* there is strange parameter required with Int32.to_float that doesn't seem to match the offical OCaml API, so this is an easy work around *) + let round_to_float x exact = + let m = to_int64 x in + (* Unless the fractional part is exactly 0, round m to an odd integer *) + let m = if exact then m else Int64.logor m 1L in + (* Then convert m to float, with the current rounding mode. *) + Int64.to_float m + let to_string = Int32.to_string + + (** Ordering *) + let compare = Int32.compare + let equal x y = x == y + let leq x y = (compare x y) < 1 + let geq x y = (compare x y) > -1 + let lt x y = (compare x y) < 0 + + let sign = sign + + let min x y = + if leq x y then x else y + + let max x y = + if geq x y then x else y + + let cdiv a b = + let quotient, remainder = div_rem a b in + if gt remainder zero then (add quotient one) else quotient + + let fdiv a b = + let quotient, remainder = div_rem a b in + if lt remainder zero then (sub quotient one) else quotient + + let is_even i = (i mod two) = zero + let is_odd i = (i mod two) <> zero + + let rec gcd' a b = + let c = erem a b + in if c = zero + then b + else gcd' b c + + let gcd x y = gcd' x y + + (** Powers *) + let rec pow' base exp acc = + if exp <= 0 + then acc + else (pow' base (exp - 1) (mul acc base)) + + let pow base exp = + if exp < 0 + then raise (Invalid_argument "The exponent must be greater zero or greater.") + else if exp = 0 + then one + else if exp = 1 + then base + else pow' base exp one + + (** Prefix and infix operators *) + let (~-) = neg + let (~+) x = x + let (+) = add + let (-) = sub + let ( * ) = mul + let (/) = div + let (/>) = cdiv + let (/<) = fdiv + let (/|) = div + (* (mod): t -> t -> t *) + let (land) = logand + let (lor) = logor + let (lxor) = logxor + let (~!) = lognot + let (lsl) = (shift_left) + let (asr) = (shift_right) + let (~$) = of_int + let ( ** ) a b = pow a b + let (=) = equal + let (<) = (<) + let (>) = (>) + let (<=) = (<=) + let (>=) = (>=) + let (<>) a b = not (equal a b) +end + +module ZInt64 : Z = struct + exception Overflow + type t = Int64.t + + (** Construction *) + let zero = Int64.zero + let one = Int64.one + let two = Int64.of_int 2 + let minus_one = Int64.minus_one + + let of_int = Int64.of_int + let of_int32 = Int64.of_int32 + let of_int64 x = x + let of_bigint = Bigint.to_int64 + let of_float = Int64.of_float + let of_string = Int64.of_string + let of_substring s ~pos ~len = Int64.of_string (String.sub s pos len) + + (** Basic arithmetic operations *) + let succ x = Int64.add x one + let pred x = Int64.sub x one + + let abs = Int64.abs + let neg = Int64.neg + let add = Int64.add + let sub = Int64.sub + let mul = Int64.mul + + let (mod) a n = Int64.sub a (Int64.mul n (Int64.div a n)) + let div = Int64.div + let rem x y = x mod y + let div_rem a b = (div a b, rem a b) + + let sign n = + if n == (Int64.of_int 0) + then 0 + else + if (Int64.compare n (Int64.of_int 0)) < 0 + then -1 + else 1 + + let rec ediv_rem' a b cum = + let a = abs a in + let b = abs b in + let r = sub a b in + if (compare a b) = 1 + then ediv_rem' r b (succ cum) + else (succ cum, r) + + let gt x y = (Int64.compare x y) > 0 + + let ediv_rem a b = + if (gt a minus_one) + then div_rem a b + else + let q,r = ediv_rem' a b zero in + (neg q, abs r) + + let ediv a b = + let quotient, _ = ediv_rem a b + in quotient + + let erem a b = + let _, remainder = ediv_rem a b + in remainder + + let divexact = div + + (** Bit-level operations *) + let logand = Int64.logand + let logor = Int64.logor + let logxor = Int64.logxor + let lognot = Int64.lognot + let shift_left = Int64.shift_left + let shift_right = Int64.shift_right + + let numbits n = + let nref = ref n in + let count = ref zero in + while (!nref > !count) do + if (Int64.logand !nref !count == one) + then (count := Int64.add !count one) + else (nref := Int64.shift_right_logical !nref 1) + done; + Int64.to_int !count + + (** Conversions *) + let to_int = Int64.to_int + let to_int32 = Int64.to_int32 + let to_int64 x = x + let to_bigint = Bigint.of_int64 + let to_float = Int64.to_float + let round_to_float x exact = + (* Unless the fractional part is exactly 0, round m to an odd integer *) + let m = if exact then x else Int64.logor x 1L in + (* Then convert m to float, with the current rounding mode. *) + Int64.to_float m + let to_string = Int64.to_string + + (** Ordering *) + let compare = Int64.compare + let equal x y = x == y + let leq x y = (compare x y) < 1 + let geq x y = (compare x y) > -1 + let lt x y = (compare x y) < 0 + (* let gt x y = (Int64.compare x y) > 0 *) + let sign = sign + let min x y = + if leq x y then x else y + + let max x y = + if geq x y then x else y + + let cdiv a b = + let quotient, remainder = div_rem a b in + if gt remainder zero then (add quotient one) else quotient + + let fdiv a b = + let quotient, remainder = div_rem a b in + if lt remainder zero then (sub quotient one) else quotient + + let is_even i = (i mod two) = zero + let is_odd i = (i mod two) <> zero + + let rec gcd' a b = + let c = erem a b + in if c = zero + then b + else gcd' b c + + let gcd x y = gcd' x y + + (** Powers *) + let rec pow' base exp acc = + if exp <= 0 + then acc + else (pow' base (exp - 1) (mul acc base)) + + let pow base exp = + if exp < 0 + then raise (Invalid_argument "The exponent must be greater zero or greater.") + else if exp = 0 + then one + else if exp = 1 + then base + else pow' base exp one + + (** Prefix and infix operators *) + let (~-) = neg + let (~+) x = x + let (+) = add + let (-) = sub + let ( * ) = mul + let (/) = div + let (/>) = cdiv + let (/<) = fdiv + let (/|) = div + let (land) = logand + let (lor) = logor + let (lxor) = logxor + let (~!) = lognot + let (lsl) = (shift_left) + let (asr) = (shift_right) + let (~$) = of_int + let ( ** ) a b = pow a b + let (=) = equal + let (<) = (<) + let (>) = (>) + let (<=) = (<=) + let (>=) = (>=) + let (<>) a b = not (equal a b) +end + +module ZBigint : Z = struct + exception Overflow + type t = Bigint.t + + (** Construction *) + let zero = Bigint.zero + let one = Bigint.one + let minus_one = Bigint.minus_one + + let of_int = Bigint.of_int + let of_int32 = Bigint.of_int32 + let of_int64 = Bigint.of_int64 + let of_bigint x = x + let of_float = Bigint.of_float + let of_string = Bigint.of_string + let of_substring = Bigint.of_substring + + (** Basic arithmetic operations *) + let succ = Bigint.succ + let pred = Bigint.pred + + let abs = Bigint.abs + let neg = Bigint.neg + let add = Bigint.add + let sub = Bigint.sub + let mul = Bigint.mul + + let div = Bigint.div + let rem = Bigint.rem + let div_rem = Bigint.div_rem + + let ediv_rem = Bigint.ediv_rem + + let ediv = Bigint.ediv + + let erem = Bigint.erem + + let cdiv = Bigint.cdiv + let fdiv = Bigint.fdiv + + let divexact = div + + (** Bit-level operations *) + let logand = Bigint.logand + let logor = Bigint.logor + let logxor = Bigint.logxor + let lognot = Bigint.lognot + let shift_left = Bigint.shift_left + let shift_right = Bigint.shift_right + + let numbits = Bigint.numbits + + (** Conversions *) + let to_int = Bigint.to_int + let to_int32 = Bigint.to_int32 + let to_int64 = Bigint.to_int64 + let to_bigint x = x + let to_float = Bigint.to_float + let round_to_float = Bigint.round_to_float + let to_string = Bigint.to_string + + (** Ordering *) + let compare = Bigint.compare + let equal = Bigint.equal + let leq = Bigint.leq + let geq = Bigint.geq + let lt = Bigint.lt + let gt = Bigint.gt + let sign = Bigint.sign + let min = Bigint.min + let max = Bigint.max + + let is_even = Bigint.is_even + let is_odd = Bigint.is_odd + + let gcd = Bigint.gcd + + (** Powers *) + let pow = Bigint.pow + + (** Prefix and infix operators *) + let (~-) = neg + let (~+) x = x + let (+) = add + let (-) = sub + let ( * ) = mul + let (/) = div + let (/>) = cdiv + let (/<) = fdiv + let (/|) = div + let (mod) = (rem) + let (land) = logand + let (lor) = logor + let (lxor) = logxor + let (~!) = (lognot) + let (lsl) = (shift_left) + let (asr) = (shift_right) + let (~$) = of_int + let ( ** ) a b = pow a b + let (=) = equal + let (<) = (<) + let (>) = (>) + let (<=) = (<=) + let (>=) = (>=) + let (<>) a b = not (equal a b) +end + +module Int = ZInt +module Int32 = ZInt32 +module Int64 = ZInt64 +module Bigint = ZBigint diff --git a/drafts/bs-Zarith/src/Z.mli b/drafts/bs-Zarith/src/Z.mli new file mode 100644 index 0000000..5e8b4ce --- /dev/null +++ b/drafts/bs-Zarith/src/Z.mli @@ -0,0 +1,434 @@ +module type Z = sig + exception Overflow + (** Raised by conversion functions when the value cannot be represented in + the destination type. + *) + + type t + (** Type of Bigint, arbitrary length integer. *) + + (** {1 Construction} *) + + val zero: t + (** The number 0. *) + + val one: t + (** The number 1. *) + + val minus_one: t + (** The number -1. *) + + val of_int: int -> t + (** Converts from a base integer. *) + + val of_int32: Int32.t -> t + (** Converts from a 32-bit integer. *) + + val of_int64: Int64.t -> t + (** Converts from a 64-bit integer. *) + + val of_bigint: Bigint.t -> t + (** Converts from an arbitrary length integer. *) + + val of_float: float -> t + (** Converts a float to an integer. *) + + val of_string: string -> t + (** Converts a string to an integer. + An optional [-] prefix indicates a negative number. + *) + + val of_substring : string -> pos:int -> len:int -> t + (** + + *) + + (** {1 Basic arithmetic operations} *) + + val succ: t -> t + (** Returns its argument plus one. *) + + val pred: t -> t + (** Returns its argument minus one. *) + + val abs: t -> t + (** Absolute value. *) + + val neg: t -> t + (** Unary negation. *) + + val add: t -> t -> t + (** Addition. *) + + val sub: t -> t -> t + (** Subtraction. *) + + val mul: t -> t -> t + (** Multiplication. *) + + val div: t -> t -> t + (** Integer division. The result is truncated towards zero + and obeys the rule of signs. + Raises [Division_by_zero] if the divisor (second argument) is 0. + *) + + val rem: t -> t -> t + (** Integer remainder. Can raise a [Division_by_zero]. + The result of [rem a b] has the sign of [a], and its absolute value is + strictly smaller than the absolute value of [b]. + The result satisfies the equality [a = b * div a b + rem a b]. + *) + + val div_rem: t -> t -> (t * t) + (** Computes both the integer quotient and the remainder. + [div_rem a b] is equal to [(div a b, rem a b)]. + Raises [Division_by_zero] if [b = 0]. + *) + + val cdiv: t -> t -> t + (** Integer division with rounding towards +oo (ceiling). + Can raise a [Division_by_zero]. + *) + + val fdiv: t -> t -> t + (** Integer division with rounding towards -oo (floor). + Can raise a [Division_by_zero]. + *) + + val ediv_rem: t -> t -> (t * t) + (** Euclidean division and remainder. [ediv_rem a b] returns a pair [(q, r)] + such that [a = b * q + r] and [0 <= r < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + + val ediv: t -> t -> t + (** Euclidean division. [ediv a b] is equal to [fst (ediv_rem a b)]. + The result satisfies [0 <= a - b * ediv a b < |b|]. + Raises [Division_by_zero] if [b = 0]. + *) + + val erem: t -> t -> t + (** Euclidean remainder. [erem a b] is equal to [snd (ediv_rem a b)]. + The result satisfies [0 <= erem a b < |b|] and + [a = b * ediv a b + erem a b]. Raises [Division_by_zero] if [b = 0]. + *) + + val divexact: t -> t -> t + (** [divexact a b] divides [a] by [b], only producing correct result when the + division is exact, i.e., when [b] evenly divides [a]. + It should be faster than general division. + Can raise a [Division_by_zero]. + *) + + + (** {1 Bit-level operations} *) + + (** For all bit-level operations, negative numbers are considered in 2's + complement representation, starting with a virtual infinite number of + 1s. + *) + + val logand: t -> t -> t + (** Bitwise logical and. *) + + val logor: t -> t -> t + (** Bitwise logical or. *) + + val logxor: t -> t -> t + (** Bitwise logical exclusive or. *) + + val lognot: t -> t + (** Bitwise logical negation. + The identity [lognot a]=[-a-1] always hold. + *) + + val shift_left : t -> int -> t + (** Shifts to the left. + Equivalent to a multiplication by a power of 2. + The second argument must be non-negative. + *) + + val shift_right : t -> int -> t + (** Shifts to the right. + This is an arithmetic shift, + equivalent to a division by a power of 2 with rounding towards -oo. + The second argument must be non-negative. + *) + + (* val shift_right_trunc: t -> int -> t *) + (** Shifts to the right, rounding towards 0. + This is equivalent to a division by a power of 2, with truncation. + The second argument must be non-negative. + *) + + val numbits : t -> int + (** Returns the number of significant bits in the given number. + If [x] is zero, [numbits x] returns 0. Otherwise, + [numbits x] returns a positive integer [n] such that + [2^{n-1} <= |x| < 2^n]. Note that [numbits] is defined + for negative arguments, and that [numbits (-x) = numbits x]. *) + + (* val trailing_zeros: t -> int *) + (** Returns the number of trailing 0 bits in the given number. + If [x] is zero, [trailing_zeros x] returns [max_int]. + Otherwise, [trailing_zeros x] returns a nonnegative integer [n] + which is the largest [n] such that [2^n] divides [x] evenly. + Note that [trailing_zeros] is defined for negative arguments, + and that [trailing_zeros (-x) = trailing_zeros x]. *) + + (* val testbit: t -> int -> bool *) + (** [testbit x n] return the value of bit number [n] in [x]: + [true] if the bit is 1, [false] if the bit is 0. + Bits are numbered from 0. Raise [Invalid_argument] if [n] + is negative. *) + + (* val popcount: t -> int *) + (** Counts the number of bits set. + Raises [Overflow] for negative arguments, as those have an infinite + number of bits set. + *) + + (* val hamdist: t -> t -> int *) + (** Counts the number of different bits. + Raises [Overflow] if the arguments have different signs + (in which case the distance is infinite). + *) + + (** {1 Conversions} *) + + (** Note that, when converting to an integer type that cannot represent the + converted value, an [Overflow] exception is raised. + *) + + val to_int: t -> int + (** Converts to a base integer. May raise [Overflow]. *) + + val to_int32: t -> int32 + (** Converts to a 32-bit integer. May raise [Overflow]. *) + + val to_int64: t -> int64 + (** Converts to a 64-bit integer. May raise [Overflow]. *) + + val to_bigint: t -> Bigint.t + (** Converts to an arbitrary length integer. May raise [Overflow]. *) + + val to_float: t -> float + (** Converts to a floating-point value. + This function rounds the given integer according to the current + rounding mode of the processor. In default mode, it returns + the floating-point number nearest to the given integer, + breaking ties by rounding to even. *) + + val round_to_float: t -> bool -> float + + val to_string: t -> string + (** Gives a human-readable, decimal string representation of the argument. *) + + (** {1 Ordering} *) + + val compare : t -> t -> int + (** Comparison. [compare x y] returns 0 if [x] equals [y], + -1 if [x] is smaller than [y], and 1 if [x] is greater than [y]. + + Note that Pervasive.compare can be used to compare reliably two integers + only on OCaml 3.12.1 and later versions. + *) + + val equal: t -> t -> bool + (** Equality test. *) + + val leq: t -> t -> bool + (** Less than or equal. *) + + val geq: t -> t -> bool + (** Greater than or equal. *) + + val lt: t -> t -> bool + (** Less than (and not equal). *) + + val gt: t -> t -> bool + (** Greater than (and not equal). *) + + val sign: t -> int + (** Returns -1, 0, or 1 when the argument is respectively negative, null, or + positive. + *) + + val min: t -> t -> t + (** Returns the minimum of its arguments. *) + + val max: t -> t -> t + (** Returns the maximum of its arguments. *) + + val is_even: t -> bool + (** Returns true if the argument is even (divisible by 2), false if odd. *) + + val is_odd: t -> bool + (** Returns true if the argument is odd, false if even. *) + + (* val hash: t -> int *) + (** Hashes a number. + This functions gives the same result as OCaml's polymorphic hashing + function. + The result is consistent with equality: if [a] = [b], then [hash a] = + [hash b]. + *) + + (** {1 Elementary number theory} *) + + val gcd: t -> t -> t + (** Greatest common divisor. + The result is always positive. + Raises a [Division_by_zero] is either argument is null. + *) + + (* val gcdext: t -> t -> (t * t * t) *) + (** [gcdext u v] returns [(g,s,t)] where [g] is the greatest common divisor + and [g=us+vt]. + [g] is always positive. + Raises a [Division_by_zero] is either argument is null. + + Note: the function is based on the GMP [mpn_gcdext] function. The exact choice of [s] and [t] such that [g=us+vt] is not specified, as it may vary from a version of GMP to another (it has changed notably in GMP 4.3.0 and 4.3.1). + *) + + (* val lcm: t -> t -> t *) + (** + Least common multiple. + The result is always positive. + Raises a [Division_by_zero] is either argument is null. + *) + + (* val powm: t -> t -> t -> t *) + (** [powm base exp mod] computes [base]^[exp] modulo [mod]. + Negative [exp] are supported, in which case ([base]^-1)^(-[exp]) modulo + [mod] is computed. + However, if [exp] is negative but [base] has no inverse modulo [mod], then + a [Division_by_zero] is raised. + *) + + (* val powm_sec: t -> t -> t -> t *) + (** [powm_sec base exp mod] computes [base]^[exp] modulo [mod]. + Unlike [Z.powm], this function is designed to take the same time + and have the same cache access patterns for any two same-size + arguments. Used in cryptographic applications, it provides better + resistance to side-channel attacks than [Z.powm]. + The exponent [exp] must be positive, and the modulus [mod] + must be odd. Otherwise, [Invalid_arg] is raised. *) + + (* val invert: t -> t -> t *) + (** [invert base mod] returns the inverse of [base] modulo [mod]. + Raises a [Division_by_zero] if [base] is not invertible modulo [mod]. + *) + + (* val probab_prime: t -> int -> int *) + (** [probab_prime x r] returns 0 if [x] is definitely composite, + 1 if [x] is probably prime, and 2 if [x] is definitely prime. + The [r] argument controls how many Miller-Rabin probabilistic + primality tests are performed (5 to 10 is a reasonable value). + *) + + (* val nextprime: t -> t *) + (** Returns the next prime greater than the argument. + The result is only prime with very high probability. + *) + + + (** {1 Powers} *) + + val pow: t -> int -> t + (** [pow base exp] raises [base] to the [exp] power. + [exp] must be non-negative. + Note that only exponents fitting in a machine integer are supported, as + larger exponents would surely make the result's size overflow the + address space. + Raises an [Invalid_argument] on negative [exp]. + *) + + (** {1 Prefix and infix operators} *) + + (** + Classic (and less classic) prefix and infix [int] operators are + redefined on [t]. + + This makes it easy to typeset expressions. + Using OCaml 3.12's local open, you can simply write + [Z.(~$2 + ~$5 * ~$10)]. + *) + + val (~-): t -> t + (** Negation [neg]. *) + + val (~+): t -> t + (** Identity. *) + + val (+): t -> t -> t + (** Addition [add]. *) + + val (-): t -> t -> t + (** Subtraction [sub]. *) + + val ( * ): t -> t -> t + (** Multiplication [mul]. *) + + val (/): t -> t -> t + (** Truncated division [div]. *) + + val (/>): t -> t -> t + (** Ceiling division [cdiv]. *) + + val (/<): t -> t -> t + (** Flooring division [fdiv]. *) + + val (/|): t -> t -> t + (** Exact division [divexact]. *) + + val (mod): t -> t -> t + (** Remainder [rem]. *) + + val (land): t -> t -> t + (** Bit-wise logical and [logand]. *) + + val (lor): t -> t -> t + (** Bit-wise logical inclusive or [logor]. *) + + val (lxor): t -> t -> t + (** Bit-wise logical exclusive or [logxor]. *) + + val (~!): t -> t + (** Bit-wise logical negation [lognot]. *) + + val (lsl): t -> int -> t + (** Bit-wise shift to the left [shift_left]. *) + + val (asr): t -> int -> t + (** Bit-wise shift to the right [shift_right]. *) + + val (~$): int -> t + (** Conversion from [int] [of_int]. *) + + val ( ** ): t -> int -> t + (** Power [pow]. *) + + val (=): t -> t -> bool + (** Same as [equal]. *) + + val (<): t -> t -> bool + (** Same as [lt]. *) + + val (>): t -> t -> bool + (** Same as [gt]. *) + + val (<=): t -> t -> bool + (** Same as [leq]. *) + + val (>=): t -> t -> bool + (** Same as [geq]. *) + + val (<>): t -> t -> bool + (** [a <> b] is equivalent to [not (equal a b)]. *) +end + +module Int : Z +module Int32 : Z +module Int64 : Z +module Bigint : Z diff --git a/drafts/bs-abort-controller/LICENSE b/drafts/bs-abort-controller/LICENSE new file mode 100644 index 0000000..21fed16 --- /dev/null +++ b/drafts/bs-abort-controller/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Alexis Munsayac + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-abort-controller/README.md b/drafts/bs-abort-controller/README.md new file mode 100644 index 0000000..8961eeb --- /dev/null +++ b/drafts/bs-abort-controller/README.md @@ -0,0 +1,63 @@ +# bs-abort-controller +> ReasonML bindings for Abort Controller + +[![NPM](https://img.shields.io/npm/v/bs-abort-controller-2.svg)](https://www.npmjs.com/package/bs-abort-controller-2) + +## Install + +npm +```bash +npm i --save bs-abort-controller-2 +``` + +yarn +```bash +yarn add bs-abort-controller-2 +``` + +After installing, add it to the dependencies + +bsconfig.json +```json +{ + "bs-dependencies": [ + "bs-abort-controller", + ], +} +``` + +## Usage + +```reason +open BsAbortController; + +/** + * Create an AbortController + */ +let controller = AbortController.make(); + +/** + * Get the AbortSignal from the controller + */ +let signal = AbortController.signal(controller); + +/** + * Register a listener to the AbortSignal + */ +signal->AbortSignal.addEventListener("abort", () => { + Js.log("Aborted"); +}); + +signal->AbortSignal.addEventListener("abort", () => { + Js.log("Aborted as well"); +}); + +/** + * Abort the controller + */ +AbortController.abort(controller); +``` + +## License + +MIT © [lxsmnsyc](https://github.com/lxsmnsyc) \ No newline at end of file diff --git a/drafts/bs-abort-controller/package.json b/drafts/bs-abort-controller/package.json new file mode 100644 index 0000000..0ba3f3f --- /dev/null +++ b/drafts/bs-abort-controller/package.json @@ -0,0 +1,32 @@ +{ + "name": "bs-abort-controller-2", + "version": "0.1.3", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "ReasonML", + "abort-controller", + "abort-signal", + "abort" + ], + "author": "Alexis Munsayac ", + "license": "MIT", + "devDependencies": { + "bs-platform": "^7.0.1" + }, + "dependencies": { + "abort-controller": "^3.0.0" + }, + "description": "ReasonML for WHATWG's Abort Controller (with polyfill)", + "main": "index.js", + "repository": "https://github.com/LXSMNSYC/bs-abort-controller.git", + "homepage": "https://github.com/LXSMNSYC/bs-abort-controller", + "bugs": { + "url": "https://github.com/LXSMNSYC/bs-abort-controller/issues" + }, + "private": false +} diff --git a/drafts/bs-abort-controller/src/AbortController.re b/drafts/bs-abort-controller/src/AbortController.re new file mode 100644 index 0000000..54d87fc --- /dev/null +++ b/drafts/bs-abort-controller/src/AbortController.re @@ -0,0 +1,43 @@ +/** + * @license + * MIT License + * + * Copyright (c) 2020 Alexis Munsayac + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * + * @author Alexis Munsayac + * @copyright Alexis Munsayac 2020 + */ +type t; + +[@bs.module "./abort-controller.js"] +[@bs.val] +external t: t = "AbortController"; + +[@bs.module "./abort-controller.js"] +[@bs.new] +external make: unit => t = "AbortController" + +[@bs.get] +external signal: t => AbortSignal.t = "signal"; + +[@bs.send] +external abort: t => unit = "abort"; + diff --git a/drafts/bs-abort-controller/src/AbortSignal.re b/drafts/bs-abort-controller/src/AbortSignal.re new file mode 100644 index 0000000..f8fcc78 --- /dev/null +++ b/drafts/bs-abort-controller/src/AbortSignal.re @@ -0,0 +1,42 @@ +/** + * @license + * MIT License + * + * Copyright (c) 2020 Alexis Munsayac + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * + * @author Alexis Munsayac + * @copyright Alexis Munsayac 2020 + */ +type t; + +[@bs.module "./abort-controller.js"] +[@bs.val] +external t: t = "AbortSignal"; + +[@bs.get] +external aborted: t => bool = "aborted"; + +[@bs.send] +external addEventListener: (t, string, 'a => 'b) => unit = "addEventListener"; + +[@bs.send] +external removeEventListener: (t, string, 'a => 'b) => unit = "removeEventListener"; + diff --git a/drafts/bs-abort-controller/src/Test.re b/drafts/bs-abort-controller/src/Test.re new file mode 100644 index 0000000..ecc3622 --- /dev/null +++ b/drafts/bs-abort-controller/src/Test.re @@ -0,0 +1,30 @@ +/** + * Create an AbortController + */ +let controller = AbortController.make(); + +/** + * Get the AbortSignal from the controller + */ +let signal = AbortController.signal(controller); + +/** + * Register a listener to the AbortSignal + */ +signal->AbortSignal.addEventListener("abort", () => { + Js.log("Aborted"); +}); + +signal->AbortSignal.addEventListener("abort", () => { + Js.log("Aborted as well"); +}); + + +Js.log(AbortSignal.aborted(signal)); + +/** + * Abort the controller + */ +AbortController.abort(controller); + +Js.log(AbortSignal.aborted(signal)); \ No newline at end of file diff --git a/drafts/bs-abort-controller/src/abort-controller.js b/drafts/bs-abort-controller/src/abort-controller.js new file mode 100644 index 0000000..f9fd730 --- /dev/null +++ b/drafts/bs-abort-controller/src/abort-controller.js @@ -0,0 +1,4 @@ +require('abort-controller/polyfill'); + +exports.AbortController = AbortController; +exports.AbortSignal = AbortSignal; \ No newline at end of file diff --git a/drafts/bs-ant-design/.gitignore b/drafts/bs-ant-design/.gitignore new file mode 100644 index 0000000..98aa914 --- /dev/null +++ b/drafts/bs-ant-design/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +.merlin +.bsb.lock +npm-debug.log +/lib/ +/node_modules/ +/dist/ +/src/*.js \ No newline at end of file diff --git a/drafts/bs-ant-design/CHANGELOG.md b/drafts/bs-ant-design/CHANGELOG.md new file mode 100644 index 0000000..00ec9f2 --- /dev/null +++ b/drafts/bs-ant-design/CHANGELOG.md @@ -0,0 +1,50 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). + +## [v1.4.1](https://github.com/thangngoc89/bs-ant-design/compare/v1.4.0...v1.4.1) - 2018-03-07 +### Commits +- Upgrade to bs-platform@^2.2.2 [`0d29b16`](https://github.com/thangngoc89/bs-ant-design/commit/0d29b16114579d8eb7fb84aee2a1a8dd4b196df2) +- chore(README): Add less setup [`268cd84`](https://github.com/thangngoc89/bs-ant-design/commit/268cd84f66d6a19fe3e55e64dc906daf1a5e5de9) + +## [v1.4.0](https://github.com/thangngoc89/bs-ant-design/compare/v1.3.0...v1.4.0) - 2018-02-25 +### Commits +- Radio + Spin: Added [`645aea1`](https://github.com/thangngoc89/bs-ant-design/commit/645aea1d07130d0c4276a92309e05cdfc438d3d6) +- chore: Added Radio and Spin to README [`242f53d`](https://github.com/thangngoc89/bs-ant-design/commit/242f53d2bb714c86fd69e81dbd1f0e0096e2855b) + +## [v1.3.0](https://github.com/thangngoc89/bs-ant-design/compare/v1.2.0...v1.3.0) - 2018-02-25 +### Merged +- Grid: Added (Col and Row) [`#4`](https://github.com/thangngoc89/bs-ant-design/pull/4) + +### Commits +- chore: Added example in README [`6636ca8`](https://github.com/thangngoc89/bs-ant-design/commit/6636ca8f61f07ec8327bcd207ca0cc6853e7d74d) +- chore: Consistent format for README [`94ad7bb`](https://github.com/thangngoc89/bs-ant-design/commit/94ad7bbbf752b74430a870bef228f49d08e5725d) + +## [v1.2.0](https://github.com/thangngoc89/bs-ant-design/compare/v1.1.1...v1.2.0) - 2018-02-25 +### Merged +- added boolean conversions to disabled props for Menu.Item and Menu.Su… [`#1`](https://github.com/thangngoc89/bs-ant-design/pull/1) + +### Commits +- Avatar: Added [`7a1af2f`](https://github.com/thangngoc89/bs-ant-design/commit/7a1af2f3eef368f3ce38d9f1c4ec9da996554edd) +- added boolean conversions to disabled props for Menu.Item and Menu.SubMenu [`37eb4af`](https://github.com/thangngoc89/bs-ant-design/commit/37eb4afccd32e2cdd6c5dac2ec5288042415264f) + +## [v1.1.1](https://github.com/thangngoc89/bs-ant-design/compare/v1.1.0...v1.1.1) - 2018-02-20 +### Commits +- chore: README add installation guide [`6c19d38`](https://github.com/thangngoc89/bs-ant-design/commit/6c19d38436fde9b9acc7fa2a38824b72744c421a) + +## [v1.1.0](https://github.com/thangngoc89/bs-ant-design/compare/v1.0.1...v1.1.0) - 2018-02-20 +### Commits +- chore: Upgrade dependencies [`f150b1b`](https://github.com/thangngoc89/bs-ant-design/commit/f150b1b09110528235eed593f26997f0fbf0bb0b) +- chore: Update Readme [`1c1f8dd`](https://github.com/thangngoc89/bs-ant-design/commit/1c1f8dd3fa237c17e06b884358386bac45ec4ba0) +- Divider: Added [`694224a`](https://github.com/thangngoc89/bs-ant-design/commit/694224ad60add84c94906ddeb9c725fcb34534f4) + +## v1.0.1 - 2018-01-02 +### Commits +- fix(Menu): Fix not implemented error [`1d4f71d`](https://github.com/thangngoc89/bs-ant-design/commit/1d4f71d47e71ad3dce67903578fb70eced188904) +- Update README.md to render the checklist [`a9b35a4`](https://github.com/thangngoc89/bs-ant-design/commit/a9b35a4b1de0b418135f0f3a12023a38574ce577) +- Initial commit [`183b1f8`](https://github.com/thangngoc89/bs-ant-design/commit/183b1f83aaca7e7d8d6c20f7213e6aa203d32932) + diff --git a/drafts/bs-ant-design/README.md b/drafts/bs-ant-design/README.md new file mode 100644 index 0000000..0c43b34 --- /dev/null +++ b/drafts/bs-ant-design/README.md @@ -0,0 +1,151 @@ +# bs-ant-design + +## Introduction + +Bucklescript + ReasonReact binding for [Ant Design](https://ant.design) components. I write bindings when I needed them in my projects. If you find a component is missing, it's because I don't need it (yet). + +Difference from [bs-antd](https://github.com/tiensonqin/bs-antd) : It uses the official recommended way for writing bindings and it doesn't work for me. I explained this in this [blog post](https://khoanguyen.me/writing-reason-react-bindings-the-right-way/) + +I also attempted to rewrite the components when possible for a better integration. + +## Installation + +* With npm: + +``` +npm install --save bs-ant-design +``` + +* With yarn: + +``` +yarn add bs-ant-design +``` + +* Add `bs-ant-design` to `bs-dependencies` in `bsconfig.json`. +* You also need to set up your bundler to handle less files (This is a requirement from ant-design) + +For webpack, you can do this: + +``` +npm install --save-dev less@^2.7.3 less-loader css-loader style-loader +``` + +(`less@^2.7.3` is the important bit) + +Now add this to your webpack config: + +```js +// webpack.config.js +module.exports = { + ... + module: { + rules: [{ + test: /\.less$/, + use: ["style-loader", "css-loader", "less-loader"] + }] +} +}; +``` + +## Usage + +Please check [ant design's documentation for each component](https://ant.design/docs/react/introduce). + +I tried to keep the API as close to the original JS API as possible. + +Some common patterns I used: + +* string enums -> polymorphic variants +* function argument accepts different types: GDATs or `%identity` hack. + +## Components + +### Note: + +* 🔗: a binding +* ✍️: rewrite in ReasonML +* 🆕: new helpers + +### Implemented components + +#### 🔗 AutoComplete + +#### 🔗 Avatar + +#### 🔗 Breadcrumb + +#### 🔗 Button + +#### 🔗 Divider + +#### 🔗 Form + +#### 🔗 Grid + +#### 🔗 Input + +#### 🔗 Select + +#### 🔗 Steps + +Usage: + +* Single gutter size in pixels: + +```reason +open Antd.Grid; + + + + (ReasonReact.stringToElement("A")) + + + (ReasonReact.stringToElement("B")) + + +``` + +* Responsive gutter: + +```reason +open Antd.Grid; + + + + (ReasonReact.stringToElement("A")) + + + (ReasonReact.stringToElement("B")) + + + (ReasonReact.stringToElement("C")) + + +``` + +#### ✍️ Icon + +This uses IconName + +#### ️🆕 IconName + +Typesafe way (only way) to access icon's name + +#### 🔗 Layout + +#### 🔗 Menu + +#### 🔗 Radio + +#### 🔗 Spin + +--- + +## Contributions + +All contributions are welcomed. + +## LICENSE + +MIT diff --git a/drafts/bs-ant-design/bsconfig.json b/drafts/bs-ant-design/bsconfig.json new file mode 100644 index 0000000..e86f1d2 --- /dev/null +++ b/drafts/bs-ant-design/bsconfig.json @@ -0,0 +1,15 @@ +{ + "name": "bs-ant-design", + "reason": { "react-jsx": 2 }, + "sources": ["src"], + "package-specs": [ + { + "module": "es6", + "in-source": true + } + ], + "suffix": ".js", + "namespace": false, + "bs-dependencies": ["reason-react", "re-classnames"], + "refmt": 3 +} diff --git a/drafts/bs-ant-design/code-generator/Antd_IconName.re.template b/drafts/bs-ant-design/code-generator/Antd_IconName.re.template new file mode 100644 index 0000000..24489c6 --- /dev/null +++ b/drafts/bs-ant-design/code-generator/Antd_IconName.re.template @@ -0,0 +1,17 @@ +/* + DO NOT EDIT + This is an generated file. Regenerate by executing `node ./code-generator/IconName.js` +*/ +type t = string; + +let toString = t => t; + +let fromString = t => t; + +let compare = (t1, t2) => t1 == t2; + +<% + _.forEach(icons, function(icon) { + %>let <%- icon[1] %> = "<%- icon[0] %>"; + +<% }); %> diff --git a/drafts/bs-ant-design/code-generator/Antd_IconName.rei.template b/drafts/bs-ant-design/code-generator/Antd_IconName.rei.template new file mode 100644 index 0000000..2df5efa --- /dev/null +++ b/drafts/bs-ant-design/code-generator/Antd_IconName.rei.template @@ -0,0 +1,17 @@ +/* + DO NOT EDIT + This is an generated file. Regenerate by executing `node ./code-generator/IconName.js` +*/ +type t; + +let toString: t => string; + +let fromString: string => t; + +let compare: ('a, 'a) => bool; + +<% + _.forEach(icons, function(icon) { + %>let <%- icon[1] %>: t; + +<% }); %> diff --git a/drafts/bs-ant-design/code-generator/IconName.js b/drafts/bs-ant-design/code-generator/IconName.js new file mode 100644 index 0000000..1dd4913 --- /dev/null +++ b/drafts/bs-ant-design/code-generator/IconName.js @@ -0,0 +1,47 @@ +/* TODO: Write this in ReasonML you lazy */ +const { resolve } = require("path"); +const { readFileSync, writeFileSync } = require("fs"); +const got = require("got"); +const cheerio = require("cheerio"); +const _ = require("lodash"); + +(async () => { + try { + const response = await got("https://ant.design/components/icon/"); + const $ = cheerio.load(response.body); + + const icons = []; + $(".anticon-class > .ant-badge").each(function(i, elem) { + icons.push($(this).text()); + }); + let reFile = _.template( + readFileSync(resolve(__dirname, "./Antd_IconName.re.template")).toString() + ); + let reiFile = _.template( + readFileSync( + resolve(__dirname, "./Antd_IconName.rei.template") + ).toString() + ); + + const resultIcons = icons.map(icon => { + const varName = _.camelCase(icon); + return [icon, varName === "exception" ? "exception_" : varName]; + }); + writeFileSync( + resolve(__dirname, "../src/Antd_IconName.re"), + reFile({ + icons: resultIcons, + }) + ); + writeFileSync( + resolve(__dirname, "../src/Antd_IconName.rei"), + reiFile({ + icons: resultIcons, + }) + ); + + console.log("Done !"); + } catch (error) { + console.error(error); + } +})(); diff --git a/drafts/bs-ant-design/package.json b/drafts/bs-ant-design/package.json new file mode 100644 index 0000000..4308975 --- /dev/null +++ b/drafts/bs-ant-design/package.json @@ -0,0 +1,28 @@ +{ + "name": "bs-ant-design", + "version": "2.1.0", + "description": "Bucklescript bindings for Ant Design", + "repository": { + "type": "git", + "url": "https://github.com/thangngoc89/bs-ant-design" + }, + "scripts": { + "changelog": "auto-changelog --template keepachangelog" + }, + "main": "index.js", + "license": "MIT", + "devDependencies": { + "bs-platform": "^4.0.7", + "cheerio": "^1.0.0-rc.2", + "got": "^8.0.1", + "lodash": "^4.17.4", + "reason-react": ">=0.5.3" + }, + "peerDependencies": { + "reason-react": ">=0.5.3" + }, + "dependencies": { + "antd": "^3.8.2", + "re-classnames": "^3.0.0" + } +} diff --git a/drafts/bs-ant-design/src/Antd.re b/drafts/bs-ant-design/src/Antd.re new file mode 100644 index 0000000..e2d191e --- /dev/null +++ b/drafts/bs-ant-design/src/Antd.re @@ -0,0 +1,33 @@ +module Avatar = Antd_Avatar; + +module Breadcrumb = Antd_Breadcrumb; + +module Button = Antd_Button; + +module Divider = Antd_Divider; + +module Grid = Antd_Grid; + +module Icon = Antd_Icon; + +module IconName = Antd_IconName; + +module Layout = Antd_Layout; + +module Menu = Antd_Menu; + +module Radio = Antd_Radio; + +module Spin = Antd_Spin; + +module Steps = Antd_Steps; + +module Input = Antd_Input; + +module Select = Antd_Select; + +module AutoComplete = Antd_AutoComplete; + +module Form = Antd_Form; + +module Tabs = Antd_Tabs; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_AutoComplete.re b/drafts/bs-ant-design/src/Antd_AutoComplete.re new file mode 100644 index 0000000..4c8fe8a --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_AutoComplete.re @@ -0,0 +1,78 @@ +[@bs.module] +external autoComplete: ReasonReact.reactClass = "antd/lib/auto-complete"; + +[%bs.raw {|require("antd/lib/auto-complete/style")|}]; + +[@bs.obj] +external makeProps: + ( + ~dataSource: array(string)=?, + ~value: string=?, + ~defaultValue: string=?, + ~onChange: ReactEvent.Form.t => unit=?, + ~onPressEnter: ReactEvent.Keyboard.t => unit=?, + ~onBlur: ReactEvent.Focus.t => unit=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + +let make = + ( + ~dataSource=?, + ~value=?, + ~defaultValue=?, + ~onChange=?, + ~onPressEnter=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=autoComplete, + ~props= + makeProps( + ~dataSource?, + ~value?, + ~defaultValue?, + ~onChange?, + ~onPressEnter?, + ~className?, + ~style?, + (), + ), + children, + ); + +module TextArea = { + [@bs.module "antd/lib/input"] + external reactClass: ReasonReact.reactClass = "TextArea"; + let make = + ( + ~value=?, + ~defaultValue=?, + ~onChange=?, + ~onPressEnter=?, + ~onBlur=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~value?, + ~defaultValue?, + ~onChange?, + ~onPressEnter?, + ~onBlur?, + ~className?, + ~style?, + (), + ), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Avatar.re b/drafts/bs-ant-design/src/Antd_Avatar.re new file mode 100644 index 0000000..86a6a41 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Avatar.re @@ -0,0 +1,56 @@ +module IconName = Antd_IconName; + +[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/avatar"; + +[%bs.raw {|require("antd/lib/avatar/style")|}]; + +[@bs.deriving jsConverter] +type avatarShape = [ | `circle | `square]; + +[@bs.deriving jsConverter] +type avatarSize = [ | `small | `default | `large]; + +[@bs.obj] +external makeProps: + ( + ~shape: string=?, + ~size: string=?, + ~src: string=?, + ~icon: IconName.t=?, + ~prefixCls: string=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + +let make = + ( + ~shape=?, + ~size=?, + ~src=?, + ~icon=?, + ~prefixCls=?, + ~id=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~shape=?Js.Option.map((. b) => avatarShapeToJs(b), shape), + ~size=?Js.Option.map((. b) => avatarSizeToJs(b), size), + ~src?, + ~icon?, + ~prefixCls?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Badge.re b/drafts/bs-ant-design/src/Antd_Badge.re new file mode 100644 index 0000000..9dd313a --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Badge.re @@ -0,0 +1,64 @@ +[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/badge"; + +[%bs.raw {|require("antd/lib/badge/style")|}]; + +[@bs.deriving jsConverter] +type status = [ | `success | `processing | `default | `error | `warning]; + +[@bs.obj] +external makeProps: + + ( + ~count: int=?, + ~showZero: bool=?, + ~overflowCount: int=?, + ~dot: bool=?, + ~style: ReactDOMRe.Style.t=?, + ~prefixCls: string=?, + ~className: string=?, + ~status: string=?, + ~text: string=?, + ~title: string=?, + ~scrollNumberPrefixCls: string=?, + ~offset: array(int)=?, + unit + ) => + _ = + ""; + +let make = + ( + ~count=?, + ~showZero=?, + ~overflowCount=?, + ~dot=?, + ~style=?, + ~prefixCls=?, + ~className=?, + ~status=?, + ~text=?, + ~title=?, + ~scrollNumberPrefixCls=?, + ~offset=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~count?, + ~status=?Js.Option.map((. b) => statusToJs(b), status), + ~showZero?, + ~overflowCount?, + ~dot?, + ~style?, + ~prefixCls?, + ~className?, + ~text?, + ~title?, + ~scrollNumberPrefixCls?, + ~offset?, + (), + ), + children, + ); diff --git a/drafts/bs-ant-design/src/Antd_Breadcrumb.re b/drafts/bs-ant-design/src/Antd_Breadcrumb.re new file mode 100644 index 0000000..cc5afe3 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Breadcrumb.re @@ -0,0 +1,51 @@ +[@bs.module] +external breadcrumb: ReasonReact.reactClass = "antd/lib/breadcrumb"; + +[%bs.raw {|require("antd/lib/breadcrumb/style")|}]; + +let make = + ( + ~routes=?, + ~params=?, + ~separator=?, + ~itemRender=?, + ~id=?, + ~className=?, + ~style=?, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=breadcrumb, + ~props= + Js.Nullable.{ + "routes": fromOption(routes), + "params": fromOption(params), + "separator": fromOption(separator), + "itemRender": fromOption(itemRender), + "id": fromOption(id), + "className": fromOption(className), + "style": fromOption(style), + }, + ); + +module Item = { + [@bs.module "antd/lib/breadcrumb"] + external item: ReasonReact.reactClass = "Item"; + [@bs.obj] + external makeProps: + ( + ~separator: string=?, + ~href: string=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = (~separator=?, ~href=?, ~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=item, + ~props=makeProps(~separator?, ~href?, ~id?, ~className?, ~style?, ()), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Button.re b/drafts/bs-ant-design/src/Antd_Button.re new file mode 100644 index 0000000..a222780 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Button.re @@ -0,0 +1,103 @@ +module IconName = Antd_IconName; + +[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/button"; + +[%bs.raw {|require("antd/lib/button/style")|}]; + +[@bs.deriving jsConverter] +type buttonType = [ | `primary | `ghost | `dashed | `danger]; + +[@bs.deriving jsConverter] +type buttonShape = [ | `circle' | [@bs.as "circle-outline"] `circleOutline]; + +[@bs.deriving jsConverter] +type buttonSize = [ | `small | `default | `large]; + +module LoadingProps = { + type delay = {. "delay": int}; + type t = + | Bool(bool) + | Delay(delay); + type js; + external ofBool: bool => js = "%identity"; + external ofDelay: delay => js = "%identity"; + let toJs: t => js = + fun + | Bool(a) => a |> ofBool + | Delay(a) => a |> ofDelay; +}; + +[@bs.obj] +external makeProps: + ( + ~_type: string=?, + ~htmlType: string=?, + ~icon: IconName.t=?, + ~shape: string=?, + ~size: string=?, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~onMouseUp: ReactEvent.Mouse.t => unit=?, + ~onMouseDown: ReactEvent.Mouse.t => unit=?, + ~tabIndex: int=?, + ~loading: LoadingProps.js=?, + ~disabled: bool=?, + ~ghost: bool=?, + ~target: string=?, + ~href: string=?, + ~download: string=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + +let make = + ( + ~_type=?, + ~htmlType=?, + ~icon=?, + ~shape=?, + ~size=?, + ~onClick=?, + ~onMouseUp=?, + ~onMouseDown=?, + ~tabIndex=?, + ~loading: option(LoadingProps.t)=?, + ~disabled=?, + ~ghost=?, + ~target=?, + ~href=?, + ~download=?, + ~id=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~_type=?Js.Option.map((. b) => buttonTypeToJs(b), _type), + ~htmlType?, + ~icon?, + ~shape=?Js.Option.map((. b) => buttonShapeToJs(b), shape), + ~size=?Js.Option.map((. b) => buttonSizeToJs(b), size), + ~onClick?, + ~onMouseUp?, + ~onMouseDown?, + ~tabIndex?, + ~loading=?Js.Option.map((. b) => LoadingProps.toJs(b), loading), + ~disabled?, + ~ghost?, + ~target?, + ~href?, + ~download?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Divider.re b/drafts/bs-ant-design/src/Antd_Divider.re new file mode 100644 index 0000000..ac10620 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Divider.re @@ -0,0 +1,34 @@ +[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/divider"; + +[%bs.raw {|require("antd/lib/divider/style")|}]; + +[@bs.deriving jsConverter] +type dividerType = [ | `horizontal | `vertical]; + +[@bs.obj] +external makeProps: + ( + ~_type: string=?, + ~dash: bool=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + +let make = (~_type=?, ~dash=?, ~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~_type=?Js.Option.map((. b) => dividerTypeToJs(b), _type), + ~dash?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Form.re b/drafts/bs-ant-design/src/Antd_Form.re new file mode 100644 index 0000000..47d64f0 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Form.re @@ -0,0 +1,83 @@ +[@bs.module] external form : ReasonReact.reactClass = "antd/lib/form"; + +[%bs.raw {|require("antd/lib/form/style")|}]; + +[@bs.obj] +external makeProps: + ( + ~onSubmit: ReactEvent.Form.t => unit=?, + ~hideRequiredMark: bool=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + ~colon: bool=?, + ~validateStatus: string=?, + ~extra: string=?, + ~required: bool=?, + ~label: string=?, + ~help: string=?, + ~hasFeedback: bool=?, + unit + ) => + _ = + ""; + +let make = + ( + ~onSubmit=?, + ~hideRequiredMark=?, + ~id=?, + ~className=?, + ~style=?, + children, + ) => +ReasonReact.wrapJsForReason( + ~reactClass=form, + ~props= + makeProps( + ~onSubmit?, + ~hideRequiredMark?, + ~id?, + ~className?, + ~style?, + (), + ), + children, +); + +module Item = { + [@bs.module "antd/lib/form"] + external item : ReasonReact.reactClass = "Item"; + let make = + ( + ~colon=?, + ~validateStatus=?, + ~extra=?, + ~className=?, + ~required=?, + ~style=?, + ~label=?, + ~id=?, + ~help=?, + ~hasFeedback=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=item, + ~props= + makeProps( + ~colon?, + ~validateStatus?, + ~extra?, + ~className?, + ~required?, + ~style?, + ~label?, + ~id?, + ~help?, + ~hasFeedback?, + (), + ), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Grid.re b/drafts/bs-ant-design/src/Antd_Grid.re new file mode 100644 index 0000000..8c0a0c2 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Grid.re @@ -0,0 +1,182 @@ +[%bs.raw {|require("antd/lib/grid/style")|}]; + +module Row = { + [@bs.module] + external reactClass: ReasonReact.reactClass = "antd/lib/grid/row"; + [@bs.deriving jsConverter] + type rowType = [ | `flex]; + [@bs.deriving jsConverter] + type rowAlign = [ | `top | `middle | `bottom]; + [@bs.deriving jsConverter] + type rowJustify = [ + | `start + | [@bs.as "end"] `end_ + | `center + | `spaceAround + | `spaceBetween + ]; + type gutterBreakpoints; + [@bs.obj] + external makeStringGutterConfig: + ( + ~xs: string=?, + ~sm: string=?, + ~md: string=?, + ~lg: string=?, + ~xl: string=?, + ~xxl: string=?, + unit + ) => + gutterBreakpoints = + ""; + let makeGutterBreakpoints = (~xs=?, ~sm=?, ~md=?, ~lg=?, ~xl=?, ~xxl=?, ()) => + /* ant design uses strings here even though it makes more sense to be number */ + makeStringGutterConfig( + ~xs=?xs |> Js.Option.map((. b) => string_of_int(b)), + ~sm=?sm |> Js.Option.map((. b) => string_of_int(b)), + ~md=?md |> Js.Option.map((. b) => string_of_int(b)), + ~lg=?lg |> Js.Option.map((. b) => string_of_int(b)), + ~xl=?xl |> Js.Option.map((. b) => string_of_int(b)), + ~xxl=?xxl |> Js.Option.map((. b) => string_of_int(b)), + (), + ); + type gutter(_) = + | SingleGutterInPx(int): gutter(int) + | ResponsiveBreakpoints(gutterBreakpoints): gutter(gutterBreakpoints); + let gutterToProp = (type a, gutter: gutter(a)): a => + switch (gutter) { + | SingleGutterInPx(int) => int + | ResponsiveBreakpoints(complexGutter) => complexGutter + }; + [@bs.obj] + external makeProps: + ( + ~className: string=?, + ~_type: string=?, + ~align: string=?, + ~justify: string=?, + ~gutter: 'a=?, + ~style: ReactDOMRe.Style.t=?, + ~prefixCls: string=?, + unit + ) => + _ = + ""; + let make = + ( + ~className=?, + ~gutter=?, + ~_type=?, + ~align=?, + ~justify=?, + ~style=?, + ~prefixCls=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~className?, + ~_type=?Js.Option.map((. b) => rowTypeToJs(b), _type), + ~align=?Js.Option.map((. b) => rowAlignToJs(b), align), + ~justify=?Js.Option.map((. b) => rowJustifyToJs(b), justify), + ~gutter=?Js.Option.map((. b) => gutterToProp(b), gutter), + ~style?, + ~prefixCls?, + (), + ), + children, + ); +}; + +module Col = { + [@bs.module] + external reactClass: ReasonReact.reactClass = "antd/lib/grid/col"; + type fullColSize; + [@bs.obj] + external makeColSize: + ( + ~span: int=?, + ~order: int=?, + ~offset: int=?, + ~push: int=?, + ~pull: int=?, + unit + ) => + fullColSize = + ""; + type colSize(_) = + | SingleColSize(int): colSize(int) + | FullColSize(fullColSize): colSize(fullColSize); + let colSizeToProp = (type a, colSize: colSize(a)): a => + switch (colSize) { + | SingleColSize(int) => int + | FullColSize(fullColSize) => fullColSize + }; + [@bs.obj] + external makeProps: + ( + ~className: string=?, + ~span: int=?, + ~order: int=?, + ~offset: int=?, + ~push: int=?, + ~pull: int=?, + ~xs: 'a=?, + ~sm: 'b=?, + ~md: 'c=?, + ~lg: 'd=?, + ~xl: 'e=?, + ~xxl: 'f=?, + ~prefixCls: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = + ( + ~className=?, + ~span=?, + ~order=?, + ~offset=?, + ~push=?, + ~pull=?, + ~xs=?, + ~sm=?, + ~md=?, + ~lg=?, + ~xl=?, + ~xxl=?, + ~prefixCls=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~className?, + ~span?, + ~order?, + ~offset?, + ~push?, + ~pull?, + ~xs=?Js.Option.map((. b) => colSizeToProp(b), xs), + ~sm=?Js.Option.map((. b) => colSizeToProp(b), sm), + ~md=?Js.Option.map((. b) => colSizeToProp(b), md), + ~lg=?Js.Option.map((. b) => colSizeToProp(b), lg), + ~xl=?Js.Option.map((. b) => colSizeToProp(b), xl), + ~xxl=?Js.Option.map((. b) => colSizeToProp(b), xxl), + ~prefixCls?, + ~style?, + (), + ), + children, + ); +}; + +let makeGutterBreakpoints = Row.makeGutterBreakpoints; + +let makeColSize = Col.makeColSize; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Helpers.re b/drafts/bs-ant-design/src/Antd_Helpers.re new file mode 100644 index 0000000..a90e78d --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Helpers.re @@ -0,0 +1,9 @@ +[@bs.deriving jsConverter] +type breakpoint = [ + | [@bs.as "xs"] `Xs + | [@bs.as "sm"] `Sm + | [@bs.as "md"] `Md + | [@bs.as "lg"] `Lg + | [@bs.as "xl"] `Xxl + | [@bs.as "xxl"] `Xxl +]; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Icon.re b/drafts/bs-ant-design/src/Antd_Icon.re new file mode 100644 index 0000000..4f8fd49 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Icon.re @@ -0,0 +1,32 @@ +let component = ReasonReact.statelessComponent("Icon"); + +let make = + ( + ~type_: Antd_IconName.t, + ~className=?, + ~title=?, + ~onClick=?, + ~spin=?, + ~style=?, + _children, + ) => { + ...component, + render: _ => { + let spin = + switch (spin) { + | Some(spin) => spin + | None => false + }; + let classString = + Cn.make([ + "anticon", + className->Cn.unpack, + "anticon-" ++ Antd_IconName.toString(type_), + "anticon-spin" + ->Cn.ifTrue( + spin || Antd_IconName.compare(Antd_IconName.loading, type_), + ), + ]); + ; + }, +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_IconName.re b/drafts/bs-ant-design/src/Antd_IconName.re new file mode 100644 index 0000000..34d89d5 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_IconName.re @@ -0,0 +1,587 @@ +/* + DO NOT EDIT + This is an generated file. Regenerate by executing `node ./code-generator/IconName.js` +*/ +type t = string; + +let toString = t => t; + +let fromString = t => t; + +let compare = (t1, t2) => t1 == t2; + +let stepBackward = "step-backward"; + +let stepForward = "step-forward"; + +let fastBackward = "fast-backward"; + +let fastForward = "fast-forward"; + +let shrink = "shrink"; + +let arrowsAlt = "arrows-alt"; + +let down = "down"; + +let up = "up"; + +let left = "left"; + +let right = "right"; + +let caretUp = "caret-up"; + +let caretDown = "caret-down"; + +let caretLeft = "caret-left"; + +let caretRight = "caret-right"; + +let upCircle = "up-circle"; + +let downCircle = "down-circle"; + +let leftCircle = "left-circle"; + +let rightCircle = "right-circle"; + +let upCircleO = "up-circle-o"; + +let downCircleO = "down-circle-o"; + +let rightCircleO = "right-circle-o"; + +let leftCircleO = "left-circle-o"; + +let doubleRight = "double-right"; + +let doubleLeft = "double-left"; + +let verticleLeft = "verticle-left"; + +let verticleRight = "verticle-right"; + +let forward = "forward"; + +let backward = "backward"; + +let rollback = "rollback"; + +let enter = "enter"; + +let retweet = "retweet"; + +let swap = "swap"; + +let swapLeft = "swap-left"; + +let swapRight = "swap-right"; + +let arrowUp = "arrow-up"; + +let arrowDown = "arrow-down"; + +let arrowLeft = "arrow-left"; + +let arrowRight = "arrow-right"; + +let playCircle = "play-circle"; + +let playCircleO = "play-circle-o"; + +let upSquare = "up-square"; + +let downSquare = "down-square"; + +let leftSquare = "left-square"; + +let rightSquare = "right-square"; + +let upSquareO = "up-square-o"; + +let downSquareO = "down-square-o"; + +let leftSquareO = "left-square-o"; + +let rightSquareO = "right-square-o"; + +let login = "login"; + +let logout = "logout"; + +let menuFold = "menu-fold"; + +let menuUnfold = "menu-unfold"; + +let question = "question"; + +let questionCircleO = "question-circle-o"; + +let questionCircle = "question-circle"; + +let plus = "plus"; + +let plusCircleO = "plus-circle-o"; + +let plusCircle = "plus-circle"; + +let pause = "pause"; + +let pauseCircleO = "pause-circle-o"; + +let pauseCircle = "pause-circle"; + +let minus = "minus"; + +let minusCircleO = "minus-circle-o"; + +let minusCircle = "minus-circle"; + +let plusSquare = "plus-square"; + +let plusSquareO = "plus-square-o"; + +let minusSquare = "minus-square"; + +let minusSquareO = "minus-square-o"; + +let info = "info"; + +let infoCircleO = "info-circle-o"; + +let infoCircle = "info-circle"; + +let exclamation = "exclamation"; + +let exclamationCircleO = "exclamation-circle-o"; + +let exclamationCircle = "exclamation-circle"; + +let close = "close"; + +let closeCircle = "close-circle"; + +let closeCircleO = "close-circle-o"; + +let closeSquare = "close-square"; + +let closeSquareO = "close-square-o"; + +let check = "check"; + +let checkCircle = "check-circle"; + +let checkCircleO = "check-circle-o"; + +let checkSquare = "check-square"; + +let checkSquareO = "check-square-o"; + +let clockCircleO = "clock-circle-o"; + +let clockCircle = "clock-circle"; + +let warning = "warning"; + +let lock = "lock"; + +let unlock = "unlock"; + +let areaChart = "area-chart"; + +let pieChart = "pie-chart"; + +let barChart = "bar-chart"; + +let dotChart = "dot-chart"; + +let bars = "bars"; + +let book = "book"; + +let calendar = "calendar"; + +let cloud = "cloud"; + +let cloudDownload = "cloud-download"; + +let code = "code"; + +let codeO = "code-o"; + +let copy = "copy"; + +let creditCard = "credit-card"; + +let delete = "delete"; + +let desktop = "desktop"; + +let download = "download"; + +let edit = "edit"; + +let ellipsis = "ellipsis"; + +let file = "file"; + +let fileText = "file-text"; + +let fileUnknown = "file-unknown"; + +let filePdf = "file-pdf"; + +let fileWord = "file-word"; + +let fileExcel = "file-excel"; + +let fileJpg = "file-jpg"; + +let filePpt = "file-ppt"; + +let fileMarkdown = "file-markdown"; + +let fileAdd = "file-add"; + +let folder = "folder"; + +let folderOpen = "folder-open"; + +let folderAdd = "folder-add"; + +let hdd = "hdd"; + +let frown = "frown"; + +let frownO = "frown-o"; + +let meh = "meh"; + +let mehO = "meh-o"; + +let smile = "smile"; + +let smileO = "smile-o"; + +let inbox = "inbox"; + +let laptop = "laptop"; + +let appstoreO = "appstore-o"; + +let appstore = "appstore"; + +let lineChart = "line-chart"; + +let link = "link"; + +let mail = "mail"; + +let mobile = "mobile"; + +let notification = "notification"; + +let paperClip = "paper-clip"; + +let picture = "picture"; + +let poweroff = "poweroff"; + +let reload = "reload"; + +let search = "search"; + +let setting = "setting"; + +let shareAlt = "share-alt"; + +let shoppingCart = "shopping-cart"; + +let tablet = "tablet"; + +let tag = "tag"; + +let tagO = "tag-o"; + +let tags = "tags"; + +let tagsO = "tags-o"; + +let toTop = "to-top"; + +let upload = "upload"; + +let user = "user"; + +let videoCamera = "video-camera"; + +let home = "home"; + +let loading = "loading"; + +let loading3Quarters = "loading-3-quarters"; + +let cloudUploadO = "cloud-upload-o"; + +let cloudDownloadO = "cloud-download-o"; + +let cloudUpload = "cloud-upload"; + +let cloudO = "cloud-o"; + +let starO = "star-o"; + +let star = "star"; + +let heartO = "heart-o"; + +let heart = "heart"; + +let environment = "environment"; + +let environmentO = "environment-o"; + +let eye = "eye"; + +let eyeO = "eye-o"; + +let camera = "camera"; + +let cameraO = "camera-o"; + +let save = "save"; + +let team = "team"; + +let solution = "solution"; + +let phone = "phone"; + +let filter = "filter"; + +let exception_ = "exception"; + +let export = "export"; + +let customerService = "customer-service"; + +let qrcode = "qrcode"; + +let scan = "scan"; + +let like = "like"; + +let likeO = "like-o"; + +let dislike = "dislike"; + +let dislikeO = "dislike-o"; + +let message = "message"; + +let payCircle = "pay-circle"; + +let payCircleO = "pay-circle-o"; + +let calculator = "calculator"; + +let pushpin = "pushpin"; + +let pushpinO = "pushpin-o"; + +let bulb = "bulb"; + +let select = "select"; + +let switcher = "switcher"; + +let rocket = "rocket"; + +let bell = "bell"; + +let disconnect = "disconnect"; + +let database = "database"; + +let compass = "compass"; + +let barcode = "barcode"; + +let hourglass = "hourglass"; + +let key = "key"; + +let flag = "flag"; + +let layout = "layout"; + +let printer = "printer"; + +let sound = "sound"; + +let usb = "usb"; + +let skin = "skin"; + +let tool = "tool"; + +let sync = "sync"; + +let wifi = "wifi"; + +let car = "car"; + +let schedule = "schedule"; + +let userAdd = "user-add"; + +let userDelete = "user-delete"; + +let usergroupAdd = "usergroup-add"; + +let usergroupDelete = "usergroup-delete"; + +let man = "man"; + +let woman = "woman"; + +let shop = "shop"; + +let gift = "gift"; + +let idcard = "idcard"; + +let medicineBox = "medicine-box"; + +let redEnvelope = "red-envelope"; + +let coffee = "coffee"; + +let copyright = "copyright"; + +let trademark = "trademark"; + +let safety = "safety"; + +let wallet = "wallet"; + +let bank = "bank"; + +let trophy = "trophy"; + +let contacts = "contacts"; + +let global = "global"; + +let shake = "shake"; + +let api = "api"; + +let fork = "fork"; + +let dashboard = "dashboard"; + +let form = "form"; + +let table = "table"; + +let profile = "profile"; + +let android = "android"; + +let androidO = "android-o"; + +let apple = "apple"; + +let appleO = "apple-o"; + +let windows = "windows"; + +let windowsO = "windows-o"; + +let ie = "ie"; + +let chrome = "chrome"; + +let github = "github"; + +let aliwangwang = "aliwangwang"; + +let aliwangwangO = "aliwangwang-o"; + +let dingding = "dingding"; + +let dingdingO = "dingding-o"; + +let weiboSquare = "weibo-square"; + +let weiboCircle = "weibo-circle"; + +let taobaoCircle = "taobao-circle"; + +let html5 = "html5"; + +let weibo = "weibo"; + +let twitter = "twitter"; + +let wechat = "wechat"; + +let youtube = "youtube"; + +let alipayCircle = "alipay-circle"; + +let taobao = "taobao"; + +let skype = "skype"; + +let qq = "qq"; + +let mediumWorkmark = "medium-workmark"; + +let gitlab = "gitlab"; + +let medium = "medium"; + +let linkedin = "linkedin"; + +let googlePlus = "google-plus"; + +let dropbox = "dropbox"; + +let facebook = "facebook"; + +let codepen = "codepen"; + +let amazon = "amazon"; + +let google = "google"; + +let codepenCircle = "codepen-circle"; + +let alipay = "alipay"; + +let antDesign = "ant-design"; + +let aliyun = "aliyun"; + +let zhihu = "zhihu"; + +let slack = "slack"; + +let slackSquare = "slack-square"; + +let behance = "behance"; + +let behanceSquare = "behance-square"; + +let dribbble = "dribbble"; + +let dribbbleSquare = "dribbble-square"; + +let instagram = "instagram"; + +let yuque = "yuque"; + + diff --git a/drafts/bs-ant-design/src/Antd_IconName.rei b/drafts/bs-ant-design/src/Antd_IconName.rei new file mode 100644 index 0000000..ba7e07e --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_IconName.rei @@ -0,0 +1,587 @@ +/* + DO NOT EDIT + This is an generated file. Regenerate by executing `node ./code-generator/IconName.js` +*/ +type t; + +let toString: t => string; + +let fromString: string => t; + +let compare: ('a, 'a) => bool; + +let stepBackward: t; + +let stepForward: t; + +let fastBackward: t; + +let fastForward: t; + +let shrink: t; + +let arrowsAlt: t; + +let down: t; + +let up: t; + +let left: t; + +let right: t; + +let caretUp: t; + +let caretDown: t; + +let caretLeft: t; + +let caretRight: t; + +let upCircle: t; + +let downCircle: t; + +let leftCircle: t; + +let rightCircle: t; + +let upCircleO: t; + +let downCircleO: t; + +let rightCircleO: t; + +let leftCircleO: t; + +let doubleRight: t; + +let doubleLeft: t; + +let verticleLeft: t; + +let verticleRight: t; + +let forward: t; + +let backward: t; + +let rollback: t; + +let enter: t; + +let retweet: t; + +let swap: t; + +let swapLeft: t; + +let swapRight: t; + +let arrowUp: t; + +let arrowDown: t; + +let arrowLeft: t; + +let arrowRight: t; + +let playCircle: t; + +let playCircleO: t; + +let upSquare: t; + +let downSquare: t; + +let leftSquare: t; + +let rightSquare: t; + +let upSquareO: t; + +let downSquareO: t; + +let leftSquareO: t; + +let rightSquareO: t; + +let login: t; + +let logout: t; + +let menuFold: t; + +let menuUnfold: t; + +let question: t; + +let questionCircleO: t; + +let questionCircle: t; + +let plus: t; + +let plusCircleO: t; + +let plusCircle: t; + +let pause: t; + +let pauseCircleO: t; + +let pauseCircle: t; + +let minus: t; + +let minusCircleO: t; + +let minusCircle: t; + +let plusSquare: t; + +let plusSquareO: t; + +let minusSquare: t; + +let minusSquareO: t; + +let info: t; + +let infoCircleO: t; + +let infoCircle: t; + +let exclamation: t; + +let exclamationCircleO: t; + +let exclamationCircle: t; + +let close: t; + +let closeCircle: t; + +let closeCircleO: t; + +let closeSquare: t; + +let closeSquareO: t; + +let check: t; + +let checkCircle: t; + +let checkCircleO: t; + +let checkSquare: t; + +let checkSquareO: t; + +let clockCircleO: t; + +let clockCircle: t; + +let warning: t; + +let lock: t; + +let unlock: t; + +let areaChart: t; + +let pieChart: t; + +let barChart: t; + +let dotChart: t; + +let bars: t; + +let book: t; + +let calendar: t; + +let cloud: t; + +let cloudDownload: t; + +let code: t; + +let codeO: t; + +let copy: t; + +let creditCard: t; + +let delete: t; + +let desktop: t; + +let download: t; + +let edit: t; + +let ellipsis: t; + +let file: t; + +let fileText: t; + +let fileUnknown: t; + +let filePdf: t; + +let fileWord: t; + +let fileExcel: t; + +let fileJpg: t; + +let filePpt: t; + +let fileMarkdown: t; + +let fileAdd: t; + +let folder: t; + +let folderOpen: t; + +let folderAdd: t; + +let hdd: t; + +let frown: t; + +let frownO: t; + +let meh: t; + +let mehO: t; + +let smile: t; + +let smileO: t; + +let inbox: t; + +let laptop: t; + +let appstoreO: t; + +let appstore: t; + +let lineChart: t; + +let link: t; + +let mail: t; + +let mobile: t; + +let notification: t; + +let paperClip: t; + +let picture: t; + +let poweroff: t; + +let reload: t; + +let search: t; + +let setting: t; + +let shareAlt: t; + +let shoppingCart: t; + +let tablet: t; + +let tag: t; + +let tagO: t; + +let tags: t; + +let tagsO: t; + +let toTop: t; + +let upload: t; + +let user: t; + +let videoCamera: t; + +let home: t; + +let loading: t; + +let loading3Quarters: t; + +let cloudUploadO: t; + +let cloudDownloadO: t; + +let cloudUpload: t; + +let cloudO: t; + +let starO: t; + +let star: t; + +let heartO: t; + +let heart: t; + +let environment: t; + +let environmentO: t; + +let eye: t; + +let eyeO: t; + +let camera: t; + +let cameraO: t; + +let save: t; + +let team: t; + +let solution: t; + +let phone: t; + +let filter: t; + +let exception_: t; + +let export: t; + +let customerService: t; + +let qrcode: t; + +let scan: t; + +let like: t; + +let likeO: t; + +let dislike: t; + +let dislikeO: t; + +let message: t; + +let payCircle: t; + +let payCircleO: t; + +let calculator: t; + +let pushpin: t; + +let pushpinO: t; + +let bulb: t; + +let select: t; + +let switcher: t; + +let rocket: t; + +let bell: t; + +let disconnect: t; + +let database: t; + +let compass: t; + +let barcode: t; + +let hourglass: t; + +let key: t; + +let flag: t; + +let layout: t; + +let printer: t; + +let sound: t; + +let usb: t; + +let skin: t; + +let tool: t; + +let sync: t; + +let wifi: t; + +let car: t; + +let schedule: t; + +let userAdd: t; + +let userDelete: t; + +let usergroupAdd: t; + +let usergroupDelete: t; + +let man: t; + +let woman: t; + +let shop: t; + +let gift: t; + +let idcard: t; + +let medicineBox: t; + +let redEnvelope: t; + +let coffee: t; + +let copyright: t; + +let trademark: t; + +let safety: t; + +let wallet: t; + +let bank: t; + +let trophy: t; + +let contacts: t; + +let global: t; + +let shake: t; + +let api: t; + +let fork: t; + +let dashboard: t; + +let form: t; + +let table: t; + +let profile: t; + +let android: t; + +let androidO: t; + +let apple: t; + +let appleO: t; + +let windows: t; + +let windowsO: t; + +let ie: t; + +let chrome: t; + +let github: t; + +let aliwangwang: t; + +let aliwangwangO: t; + +let dingding: t; + +let dingdingO: t; + +let weiboSquare: t; + +let weiboCircle: t; + +let taobaoCircle: t; + +let html5: t; + +let weibo: t; + +let twitter: t; + +let wechat: t; + +let youtube: t; + +let alipayCircle: t; + +let taobao: t; + +let skype: t; + +let qq: t; + +let mediumWorkmark: t; + +let gitlab: t; + +let medium: t; + +let linkedin: t; + +let googlePlus: t; + +let dropbox: t; + +let facebook: t; + +let codepen: t; + +let amazon: t; + +let google: t; + +let codepenCircle: t; + +let alipay: t; + +let antDesign: t; + +let aliyun: t; + +let zhihu: t; + +let slack: t; + +let slackSquare: t; + +let behance: t; + +let behanceSquare: t; + +let dribbble: t; + +let dribbbleSquare: t; + +let instagram: t; + +let yuque: t; + + diff --git a/drafts/bs-ant-design/src/Antd_Input.re b/drafts/bs-ant-design/src/Antd_Input.re new file mode 100644 index 0000000..66b45d8 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Input.re @@ -0,0 +1,87 @@ +[@bs.module] external input: ReasonReact.reactClass = "antd/lib/input"; + +[%bs.raw {|require("antd/lib/input/style")|}]; + +[@bs.deriving abstract] +type jsProps = { + [@bs.optional] [@bs.as "type"] htmlType: string, + [@bs.optional] name: string, + [@bs.optional] value: string, + [@bs.optional] defaultValue: string, + [@bs.optional] onChange: ReactEvent.Form.t => unit, + [@bs.optional] onPressEnter: ReactEvent.Keyboard.t => unit, + [@bs.optional] onBlur: ReactEvent.Focus.t => unit, + [@bs.optional] className: string, + [@bs.optional] style: ReactDOMRe.Style.t, + [@bs.optional] placeholder: string, +}; + +let make = + ( + ~htmlType=?, + ~name=?, + ~value=?, + ~defaultValue=?, + ~onChange=?, + ~onPressEnter=?, + ~onBlur=?, + ~className=?, + ~style=?, + ~placeholder=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=input, + ~props= + jsProps( + ~htmlType?, + ~name?, + ~value?, + ~defaultValue?, + ~onChange?, + ~onPressEnter?, + ~onBlur?, + ~className?, + ~style?, + ~placeholder?, + (), + ), + children, + ); + +module TextArea = { + [@bs.module "antd/lib/input"] + external reactClass: ReasonReact.reactClass = "TextArea"; + let make = + ( + ~htmlType=?, + ~name=?, + ~value=?, + ~defaultValue=?, + ~onChange=?, + ~onPressEnter=?, + ~onBlur=?, + ~className=?, + ~style=?, + ~placeholder=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + jsProps( + ~htmlType?, + ~name?, + ~value?, + ~defaultValue?, + ~onChange?, + ~onPressEnter?, + ~onBlur?, + ~className?, + ~style?, + ~placeholder?, + (), + ), + children, + ); +}; diff --git a/drafts/bs-ant-design/src/Antd_Layout.re b/drafts/bs-ant-design/src/Antd_Layout.re new file mode 100644 index 0000000..8af1a1a --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Layout.re @@ -0,0 +1,122 @@ +open Antd_Helpers; + +[@bs.module] external layout: ReasonReact.reactClass = "antd/lib/layout"; + +[%bs.raw {|require("antd/lib/layout/style")|}]; + +[@bs.obj] +external makeProps: + (~id: string=?, ~className: string=?, ~style: ReactDOMRe.Style.t=?, unit) => + _ = + ""; + +let make = (~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=layout, + ~props=makeProps(~id?, ~className?, ~style?, ()), + children, + ); + +module Header = { + [@bs.module "antd/lib/layout"] + external header: ReasonReact.reactClass = "Header"; + let make = (~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=header, + ~props=makeProps(~id?, ~className?, ~style?, ()), + children, + ); +}; + +module Footer = { + [@bs.module "antd/lib/layout"] + external footer: ReasonReact.reactClass = "Footer"; + let make = (~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=footer, + ~props=makeProps(~id?, ~className?, ~style?, ()), + children, + ); +}; + +module Content = { + [@bs.module "antd/lib/layout"] + external content: ReasonReact.reactClass = "Content"; + let make = (~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=content, + ~props=makeProps(~id?, ~className?, ~style?, ()), + children, + ); +}; + +module Sider = { + [@bs.module "antd/lib/layout"] + external sider: ReasonReact.reactClass = "Sider"; + [@bs.deriving {jsConverter: newType}] + type collapseType = [ | `clickTrigger | `responsive]; + [@bs.obj] + external makeProps: + ( + ~style: ReactDOMRe.Style.t=?, + ~prefixCls: string=?, + ~className: string=?, + ~collapsible: bool=?, + ~collapsed: bool=?, + ~defaultCollapsed: bool=?, + ~reverseArrow: bool=?, + ~onCollapse: (bool, abs_collapseType) => unit=?, + ~trigger: ReasonReact.reactElement=?, + ~width: int=?, + ~collapsedWidth: int=?, + ~breakpoint: string=?, + unit + ) => + _ = + ""; + let make = + ( + ~style=?, + ~prefixCls=?, + ~className=?, + ~collapsible=?, + ~collapsed=?, + ~defaultCollapsed=?, + ~reverseArrow=?, + ~onCollapse=?, + ~trigger=?, + ~width=?, + ~collapsedWidth=?, + ~breakpoint=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=sider, + ~props= + makeProps( + ~style?, + ~prefixCls?, + ~className?, + ~collapsible?, + ~collapsed?, + ~defaultCollapsed?, + ~reverseArrow?, + ~onCollapse=? + Js.Option.map( + (. fn) => { + /* TODO: Is there any perf cost of defining the function here */ + let reF = (fn, a, b) => fn(a, collapseTypeFromJs(b)); + reF(fn); + }, + onCollapse, + ), + ~trigger?, + ~width?, + ~collapsedWidth?, + ~breakpoint=? + Js.Option.map((. b) => breakpointToJs(b), breakpoint), + (), + ), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Menu.re b/drafts/bs-ant-design/src/Antd_Menu.re new file mode 100644 index 0000000..5ef00bb --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Menu.re @@ -0,0 +1,214 @@ +[@bs.module] external menu: ReasonReact.reactClass = "antd/lib/menu"; + +[%bs.raw {|require("antd/lib/menu/style")|}]; + +[@bs.deriving jsConverter] +type theme = [ | [@bs.as "light"] `Light | [@bs.as "dark"] `Dark]; + +[@bs.deriving jsConverter] +type mode = [ + | [@bs.as "horizontal"] `Horizontal + | [@bs.as "vertical"] `Vertical + | [@bs.as "vertical-left"] `VerticalLeft + | [@bs.as "vertical-right"] `VerticalRight + | [@bs.as "inline"] `Inline +]; + +type clickParams = { + . + "key": string, + "path": array(string), + "domEvent": ReactEvent.Mouse.t, +}; + +[@bs.obj] +external makeProps: + ( + ~id: string=?, + ~theme: string=?, + ~mode: string=?, + ~selectable: bool=?, + ~selectedKeys: array(string)=?, + ~defaultSelectedKeys: array(string)=?, + ~openKeys: array(string)=?, + ~defaultOpenKeys: array(string)=?, + ~onOpenChange: array(string) => unit=?, + ~onClick: clickParams => unit=?, + ~onSelect: clickParams => unit=?, + ~onDeselect: clickParams => unit=?, + ~style: ReactDOMRe.Style.t=?, + ~openTransitionName: string=?, + ~openAnimation: string=?, + ~className: string=?, + ~prefixCls: string=?, + ~multiple: bool=?, + ~inlineIndent: int=?, + ~inlineCollapsed: bool=?, + unit + ) => + _ = + ""; + +let make = + ( + ~theme=?, + ~mode=?, + ~selectable=?, + ~selectedKeys=?, + ~defaultSelectedKeys=?, + ~openKeys=?, + ~defaultOpenKeys=?, + ~onOpenChange=?, + ~onSelect=?, + ~onDeselect=?, + ~onClick=?, + ~openTransitionName=?, + ~openAnimation=?, + ~className=?, + ~prefixCls=?, + ~multiple=?, + ~inlineIndent=?, + ~inlineCollapsed=?, + ~id=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=menu, + ~props= + makeProps( + ~theme=?Js.Option.map((. b) => themeToJs(b), theme), + ~mode=?Js.Option.map((. b) => modeToJs(b), mode), + ~selectable?, + ~selectedKeys?, + ~defaultSelectedKeys?, + ~openKeys?, + ~defaultOpenKeys?, + ~onOpenChange?, + ~onSelect?, + ~onDeselect?, + ~onClick?, + ~openTransitionName?, + ~openAnimation?, + ~prefixCls?, + ~multiple?, + ~inlineIndent?, + ~inlineCollapsed?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); + +module Item = { + [@bs.module "antd/lib/menu"] external item: ReasonReact.reactClass = "Item"; + [@bs.obj] + external makeProps: + ( + ~key: string=?, + ~disabled: bool=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = (~disabled=?, ~key_=?, ~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=item, + ~props= + makeProps(~key=?key_, ~disabled?, ~id?, ~className?, ~style?, ()), + children, + ); +}; + +module SubMenu = { + [@bs.module "antd/lib/menu"] + external subMenu: ReasonReact.reactClass = "SubMenu"; + [@bs.obj] + external makeProps: + ( + ~disabled: bool=?, + ~key: string=?, + ~title: ReasonReact.reactElement=?, + ~onTitleClick: ReactEvent.Mouse.t=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = + ( + ~disabled=?, + ~key_=?, + ~title=?, + ~onTitleClick=?, + ~id=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=subMenu, + ~props= + makeProps( + ~disabled?, + ~key=?key_, + ~title?, + ~onTitleClick?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); +}; + +module ItemGroup = { + [@bs.module "antd/lib/menu"] + external itemGroup: ReasonReact.reactClass = "ItemGroup"; + [@bs.obj] + external makeProps: + ( + ~title: ReasonReact.reactElement=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = (~id=?, ~className=?, ~style=?, ~title=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=itemGroup, + ~props=makeProps(~title?, ~id?, ~className?, ~style?, ()), + children, + ); +}; + +module Divider = { + [@bs.module "antd/lib/menu"] + external divider: ReasonReact.reactClass = "Divider"; + [@bs.obj] + external makeProps: + ( + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = (~id=?, ~className=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=divider, + ~props=makeProps(~id?, ~className?, ~style?, ()), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Radio.re b/drafts/bs-ant-design/src/Antd_Radio.re new file mode 100644 index 0000000..3f58a6b --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Radio.re @@ -0,0 +1,106 @@ +[@bs.module "antd/lib/radio"] +external reactClass: ReasonReact.reactClass = "default"; + +[%bs.raw {|require("antd/lib/radio/style")|}]; + +[@bs.obj] +external makeProps: + ( + ~autoFocus: bool=?, + ~checked: bool=?, + ~defaultChecked: bool=?, + ~disabled: bool=?, + ~value: string=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + +let make = + ( + ~autoFocus=?, + ~checked=?, + ~defaultChecked=?, + ~disabled=?, + ~value=?, + ~id=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~autoFocus?, + ~checked?, + ~defaultChecked?, + ~disabled?, + ~value?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); + +module Group = { + [@bs.module "antd/lib/radio"] + external reactClass: ReasonReact.reactClass = "Group"; + [@bs.deriving jsConverter] + type size = [ | `default | `small | `large]; + [@bs.obj] + external makeProps: + ( + ~defaultValue: string, + ~disabled: bool=?, + ~name: string=?, + /* @todo: type me */ + ~options: 'a=?, + ~size: string=?, + ~value: string, + ~onChange: ReactEvent.Form.t => unit, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + let make = + ( + ~defaultValue, + ~disabled=?, + ~name=?, + ~options=?, + ~size=?, + ~value, + ~onChange, + ~id=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~defaultValue, + ~disabled?, + ~name?, + ~options?, + ~size=?Js.Option.map((. b) => sizeToJs(b), size), + ~value, + ~onChange, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Select.re b/drafts/bs-ant-design/src/Antd_Select.re new file mode 100644 index 0000000..1b20bd0 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Select.re @@ -0,0 +1,34 @@ +[@bs.module] external select: ReasonReact.reactClass = "antd/lib/select"; + +[%bs.raw {|require("antd/lib/select/style")|}]; + +[@bs.obj] +external makeProps: + ( + ~value: string=?, + ~defaultValue: string=?, + ~onChange: string => unit=?, + ~className: string=?, + unit + ) => + _ = + ""; +let make = (~value=?, ~defaultValue=?, ~onChange=?, ~className=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass=select, + ~props=makeProps(~value?, ~defaultValue?, ~onChange?, ~className?, ()), + children, + ); + +module Option = { + [@bs.module "antd/lib/select"] + external reactClass: ReasonReact.reactClass = "Option"; + + [@bs.obj] external makeProps: (~value: string, ~title: string=?) => _ = ""; + + let make = (~value, ~title=?) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props=makeProps(~value, ~title?), + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Spin.re b/drafts/bs-ant-design/src/Antd_Spin.re new file mode 100644 index 0000000..96accbb --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Spin.re @@ -0,0 +1,51 @@ +[@bs.module] external spin: ReasonReact.reactClass = "antd/lib/spin"; + +[%bs.raw {|require("antd/lib/spin/style")|}]; + +[@bs.deriving jsConverter] +type size = [ | `default | `small | `large]; + +[@bs.obj] +external makeProps: + ( + ~size: string=?, + ~spinning: bool=?, + ~tip: string=?, + ~delay: int=?, + ~wrapperClassName: string=?, + ~id: string=?, + ~className: string=?, + ~style: ReactDOMRe.Style.t=?, + unit + ) => + _ = + ""; + +let make = + ( + ~size=?, + ~spinning=?, + ~tip=?, + ~delay=?, + ~wrapperClassName=?, + ~id=?, + ~className=?, + ~style=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=spin, + ~props= + makeProps( + ~size?, + ~spinning?, + ~tip?, + ~delay?, + ~wrapperClassName?, + ~id?, + ~className?, + ~style?, + (), + ), + children, + ); \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Steps.re b/drafts/bs-ant-design/src/Antd_Steps.re new file mode 100644 index 0000000..b392b55 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Steps.re @@ -0,0 +1,38 @@ +[@bs.module] external reactClass: ReasonReact.reactClass = "antd/lib/steps"; + +[%bs.raw {|require("antd/lib/steps/style")|}]; + +[@bs.deriving jsConverter] +type status = [ | `wait | `process | `finish | `error]; + +[@bs.obj] +external makeProps: + (~status: string=?, ~current: int=?, ~style: ReactDOMRe.Style.t=?, unit) => _ = + ""; + +let make = (~status=?, ~current=?, ~style=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props= + makeProps( + ~status=?Js.Option.map((. b) => statusToJs(b), status), + ~current?, + ~style?, + (), + ), + children, + ); + +module Step = { + [@bs.module "antd/lib/steps"] + external reactClass: ReasonReact.reactClass = "Step"; + + [@bs.obj] + external makeProps: (~title: string, ~description: string=?, unit) => _ = ""; + let make = (~title, ~description=?, children) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props=makeProps(~title, ~description?, ()), + children, + ); +}; \ No newline at end of file diff --git a/drafts/bs-ant-design/src/Antd_Tabs.re b/drafts/bs-ant-design/src/Antd_Tabs.re new file mode 100644 index 0000000..390ae08 --- /dev/null +++ b/drafts/bs-ant-design/src/Antd_Tabs.re @@ -0,0 +1,127 @@ +[@bs.module] external tabs: ReasonReact.reactClass = "antd/lib/tabs"; + +[%bs.raw {|require("antd/lib/tabs/style")|}]; + +[@bs.deriving jsConverter] +type tabsType = [ | `line | `card | [@bs.as "editable-card"] `editableCard ]; +[@bs.deriving jsConverter] +type tabsPosition = [ | `top | `right | `bottom | `left ]; +[@bs.deriving jsConverter] +type tabSize = [ | `large | `default | `small ]; + +[@bs.deriving abstract] +type jsProps = { + [@bs.optional] activeKey: string, + [@bs.optional] defaultActiveKey: string, + [@bs.optional] hideAdd: bool, + [@bs.optional] onChange: string => unit, + [@bs.optional] onTabClick: ReactEvent.Mouse.t => unit, + [@bs.optional] onPrevClick: ReactEvent.Mouse.t => unit, + [@bs.optional] onNextClick: ReactEvent.Mouse.t => unit, + [@bs.optional] tabBarExtraContent: ReasonReact.reactElement, + [@bs.optional] tabBarStyle: ReactDOMRe.Style.t, + [@bs.optional] [@bs.as "type"] _type: string, /* tabsType, */ + [@bs.optional] tabPosition: string, /* tabsPosition, */ + /* TODO */ + /* [@bs.optional] onEdit: (~targetKey: string | React.MouseEvent, action: any) => void, */ + [@bs.optional] size: string, /* tabSize, */ + [@bs.optional] style: ReactDOMRe.Style.t, + [@bs.optional] prefixCls: string, + [@bs.optional] className: string, + /* TODO */ + /* [@bs.optional] animated: boolean | { inkBar: boolean; tabPane: boolean; }, */ + [@bs.optional] tabBarGutter: float, + /* TODO */ + /* [@bs.optional] renderTabBar: (props: TabsProps, DefaultTabBar: React.ReactNode) => React.ReactElement, */ +}; + +let make = + ( + ~activeKey=?, + ~defaultActiveKey=?, + ~hideAdd=?, + ~onChange=?, + ~onTabClick=?, + ~onPrevClick=?, + ~onNextClick=?, + ~tabBarExtraContent=?, + ~tabBarStyle=?, + ~_type=?, + ~tabPosition=?, + ~size=?, + ~style=?, + ~prefixCls=?, + ~className=?, + ~tabBarGutter=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=tabs, + ~props= + jsProps( + ~activeKey?, + ~defaultActiveKey?, + ~hideAdd?, + ~onChange?, + ~onTabClick?, + ~onPrevClick?, + ~onNextClick?, + ~tabBarExtraContent?, + ~tabBarStyle?, + ~_type=?Js.Option.map((. b) => tabsTypeToJs(b), _type), + ~tabPosition=?Js.Option.map((. b) => tabsPositionToJs(b), tabPosition), + ~size=?Js.Option.map((. b) => tabSizeToJs(b), size), + ~style?, + ~prefixCls?, + ~className?, + ~tabBarGutter?, + (), + ), + children, + ); + +type tabArg = + | Node(ReasonReact.reactElement) + | Str(string); + +module TabPane { + [@bs.val] external tabpane:ReasonReact.reactClass = "Tabs.TabPane"; + [@bs.deriving abstract] + type jsProps = { + [@bs.optional] tab: string, /* TODO union type tabArg */ + [@bs.optional] style: ReactDOMRe.Style.t, + [@bs.optional] closable: bool, + [@bs.optional] className: string, + [@bs.optional] disabled: bool, + [@bs.optional] forceRender: bool, + [@bs.optional] key: string, + } + + let make = + ( + ~tab=?, + ~style=?, + ~closable=?, + ~className=?, + ~disabled=?, + ~forceRender=?, + ~key=?, + children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass=tabpane, + ~props= + jsProps( + ~tab?, + ~style?, + ~closable?, + ~className?, + ~disabled?, + ~forceRender?, + ~key?, + (), + ), + children, + ); + +} diff --git a/drafts/bs-axios/.github/main.workflow b/drafts/bs-axios/.github/main.workflow new file mode 100644 index 0000000..e292dfd --- /dev/null +++ b/drafts/bs-axios/.github/main.workflow @@ -0,0 +1,15 @@ +workflow "Build and Publish" { + on = "push" + resolves = ["GitHub Action for npm"] +} + +action "Install" { + uses = "actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680" + args = "install" +} + +action "GitHub Action for npm" { + uses = "actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680" + needs = ["Install"] + args = "build" +} diff --git a/drafts/bs-axios/.gitignore b/drafts/bs-axios/.gitignore new file mode 100644 index 0000000..5e96161 --- /dev/null +++ b/drafts/bs-axios/.gitignore @@ -0,0 +1,39 @@ +lib +node_modules +.merlin +.bsb.lock +.vscode +*test.re +*backup +*.log + +# Created by https://www.gitignore.io/api/macos + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# End of https://www.gitignore.io/api/macos diff --git a/drafts/bs-axios/README.md b/drafts/bs-axios/README.md new file mode 100644 index 0000000..e6311dc --- /dev/null +++ b/drafts/bs-axios/README.md @@ -0,0 +1,131 @@ +# bs-axios [![npm version](https://img.shields.io/npm/v/bs-axios.svg?style=flat-square)](https://www.npmjs.com/package/bs-axios) + +[Axios](https://github.com/axios/axios) bindings for Bucklescript. + +## Installation + +1. Install bs-axios + +```bash +$ yarn add bs-axios +``` + +or + +```bash +$ npm install --save bs-axios +``` + +2. Add "bs-axios" to "bs-dependencies" section of `bsconfig.json` + +## Examples + +See usage examples in examples folder: + +- [Request examples](./examples/request_examples.re) (GET, POST) +- [Instance example](./examples/instance_example.re) + +### Simple request + +```reason +Js.Promise.( + Axios.get("/user?ID=12345") + |> then_((response) => resolve(Js.log(response##data))) + |> catch((error) => resolve(Js.log(error))) +); +``` + +### Post requests + +```reason +Js.Promise.( + Axios.post("/user") + |> then_((response) => resolve(Js.log(response##data))) + |> catch((error) => resolve(Js.log(error))) +); +``` + +```reason +let user = { + "username": "michel", + "password": "12345678" +}; + +Js.Promise.( + Axios.postData("/auth", {user}) + |> then_((response) => resolve(Js.log(response##data))) + |> catch((error) => resolve(Js.log(error))) +); +``` + +### Concurrency + +```reason +Js.Promise.( + Axios.all2((Axios.get("/users/1"), Axios.get("/users/1/friends"))) + |> then_(((user, friends)) => resolve(Js.log2(user##data, friends##data))) + |> catch((error) => resolve(Js.log(error))) +); +``` + +### Creating an instance + +You can create a new instance of axios with a custom config. + +```reason +open Axios; + +let inst = Instance.create(makeConfig(~baseURL="https://example.com", ())); +Js.Promise.(Instance.get(inst, "/") |> then_((resp) => resolve(Js.log(resp##data)))); +``` + +### Error handling + +```reason +external promiseErrorToJsObj : Js.Promise.error => Js.t('a) = "%identity"; + +Js.Promise.( + Instance.get(inst, "/") + |> then_(resp => resolve(Belt.Result.Ok(resp))) + |> catch(error => { + let error = error |> promiseErrorToJsObj; + Js.log(error##response##status); + resolve(Belt.Result.Error(error)); + }) +); +``` + +### Headers + +```reason +let headers = Axios.Headers.fromObj({"Content-type": "application/json"}); +Axios.getc("https://example.com", Axios.makeConfig(~headers, ())); + +let headersDict = + Js.Dict.( + { + let dict = empty(); + dict->set("Content-type", "application/json"); + dict; + } + ); +let headers = Axios.Headers.fromDict(headersDict); +Axios.getc("https://example.com", Axios.makeConfig(~headers, ())); +``` + +### Node.js HTTP/HTTPS Agent + +Providing custom Node.js [`HTTP Agent`](https://nodejs.org/api/http.html#http_class_http_agent) +allows for configuring connection persistence and reuse. For secure connections, +[`HTTPS Agent`](https://nodejs.org/api/https.html#https_class_https_agent) allows security related +configuration to be provided. + +```reason +let httpsAgent = + Axios.Agent.Https.(config(~rejectUnauthorized=false, ()) |> create); + +Axios.getc( + "https://insecure-example.com", + Axios.makeConfig(~httpsAgent, ()), +); +``` diff --git a/drafts/bs-axios/bsconfig.json b/drafts/bs-axios/bsconfig.json new file mode 100644 index 0000000..45ccc3c --- /dev/null +++ b/drafts/bs-axios/bsconfig.json @@ -0,0 +1,14 @@ +{ + "name": "bs-axios", + "refmt": 3, + "sources": [ + { + "dir": "src", + "public": "all" + }, + { + "dir": "examples", + "type": "dev" + } + ] +} diff --git a/drafts/bs-axios/examples/instance_example.re b/drafts/bs-axios/examples/instance_example.re new file mode 100644 index 0000000..ae29e16 --- /dev/null +++ b/drafts/bs-axios/examples/instance_example.re @@ -0,0 +1,7 @@ +/* Creating an instance */ +open Axios; + +let inst = Instance.create(makeConfig(~baseURL="https://example.com", ())); +Js.Promise.( + Instance.get(inst, "/") |> then_(resp => resolve(Js.log(resp##data))) +); \ No newline at end of file diff --git a/drafts/bs-axios/examples/request_examples.re b/drafts/bs-axios/examples/request_examples.re new file mode 100644 index 0000000..65ed98b --- /dev/null +++ b/drafts/bs-axios/examples/request_examples.re @@ -0,0 +1,59 @@ +/* Simple request */ +Js.Promise.( + Axios.get("/user?ID=12345") + |> then_(response => resolve(Js.log(response##data))) + |> catch(error => resolve(Js.log(error))) +); + +/* Post requests */ +Js.Promise.( + Axios.post("/user") + |> then_(response => resolve(Js.log(response##data))) + |> catch(error => resolve(Js.log(error))) +); + +let user = {"username": "michel", "password": "12345678"}; + +Js.Promise.( + Axios.postData( + "/auth", + { + user; + }, + ) + |> then_(response => resolve(Js.log(response##data))) + |> catch(error => resolve(Js.log(error))) +); + +/* Concurrency */ +Js.Promise.( + Axios.all2((Axios.get("/users/1"), Axios.get("/users/1/friends"))) + |> then_(((user, friends)) => + resolve(Js.log2(user##data, friends##data)) + ) + |> catch(error => resolve(Js.log(error))) +); + +/* Headers */ +let headers = Axios.Headers.fromObj({"Content-type": "application/json"}); +Axios.getc("https://example.com", Axios.makeConfig(~headers, ())); + +let headersDict = + Js.Dict.( + { + let dict = empty(); + dict->set("Content-type", "application/json"); + dict; + } + ); +let headers = Axios.Headers.fromDict(headersDict); +Axios.getc("https://example.com", Axios.makeConfig(~headers, ())); + +/* Node.js Agent */ +let httpsAgent = + Axios.Agent.Https.(config(~rejectUnauthorized=false, ()) |> create); + +Axios.getc( + "https://insecure-example.com", + Axios.makeConfig(~httpsAgent, ()), +); \ No newline at end of file diff --git a/drafts/bs-axios/package-lock.json b/drafts/bs-axios/package-lock.json new file mode 100644 index 0000000..54f8b9f --- /dev/null +++ b/drafts/bs-axios/package-lock.json @@ -0,0 +1,106 @@ +{ + "name": "bs-axios", + "version": "0.0.43", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "bs-axios", + "version": "0.0.43", + "license": "MIT", + "devDependencies": { + "axios": ">= 0.21.1 <= 0.22.0", + "bs-platform": "^7.1.0", + "prettier": "^2.0.4" + }, + "peerDependencies": { + "axios": ">= 0.21.1 <= 0.22.0", + "bs-platform": "^7.1.0" + } + }, + "node_modules/axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.10.0" + } + }, + "node_modules/bs-platform": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-7.3.1.tgz", + "integrity": "sha512-RlQexm6i2gMKsfuHL8IcOHN0R/SQgxiurP96fo2nj71QgQQRh332ahOwIl0p0yNl9DH2Tg7ZV2pjG6MMMkaU6w==", + "deprecated": "use 7.3.2 instead", + "dev": true, + "hasInstallScript": true, + "bin": { + "bsb": "bsb", + "bsc": "bsc", + "bsrefmt": "bsrefmt", + "bstracing": "lib/bstracing" + } + }, + "node_modules/follow-redirects": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/prettier": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", + "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + } + }, + "dependencies": { + "axios": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "dev": true, + "requires": { + "follow-redirects": "^1.10.0" + } + }, + "bs-platform": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-7.3.1.tgz", + "integrity": "sha512-RlQexm6i2gMKsfuHL8IcOHN0R/SQgxiurP96fo2nj71QgQQRh332ahOwIl0p0yNl9DH2Tg7ZV2pjG6MMMkaU6w==", + "dev": true + }, + "follow-redirects": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==", + "dev": true + }, + "prettier": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", + "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", + "dev": true + } + } +} diff --git a/drafts/bs-axios/package.json b/drafts/bs-axios/package.json new file mode 100644 index 0000000..c7d8f8a --- /dev/null +++ b/drafts/bs-axios/package.json @@ -0,0 +1,38 @@ +{ + "name": "bs-axios", + "version": "0.0.43", + "description": "Axios bindings for Bucklescript", + "repository": "https://github.com/meafmira/bs-axios", + "author": "meafmira", + "license": "MIT", + "keywords": [ + "axios", + "bucklescript", + "bsb", + "reason", + "reasonml", + "ocaml", + "bs-axios", + "bs-platform" + ], + "scripts": { + "build": "bsb -clean-world -make-world", + "watch": "bsb -clean-world -make-world -w", + "fmt": "prettier --write README.md", + "preversion": "npm run build", + "postversion": "npm publish" + }, + "peerDependencies": { + "axios": ">= 0.21.1 <= 0.22.0", + "bs-platform": "^7.1.0" + }, + "bugs": { + "url": "https://github.com/meafmira/bs-axios/issues" + }, + "homepage": "https://github.com/meafmira/bs-axios#readme", + "devDependencies": { + "axios": ">= 0.21.1 <= 0.22.0", + "bs-platform": "^7.1.0", + "prettier": "^2.0.4" + } +} diff --git a/drafts/bs-axios/src/axios.re b/drafts/bs-axios/src/axios.re new file mode 100644 index 0000000..29a92b3 --- /dev/null +++ b/drafts/bs-axios/src/axios.re @@ -0,0 +1,461 @@ +open Axios_types; + +module Headers = { + type t; + + external fromObj: Js.t({..}) => t = "%identity"; + external fromDict: Js.Dict.t(string) => t = "%identity"; +}; + +external makeResponseTransformer1: + array('data => 'resultData) => responseTransformer('data, 'resultData) = + "%identity"; + +let makeResponseTransformer1 = f => makeResponseTransformer1([|f|]); + +external makeResponseTransformer2: + (('data => 'data0, 'data0 => 'resultData)) => + responseTransformer('data, 'resultData) = + "%identity"; + +let makeResponseTransformer2 = (f0, f1) => + makeResponseTransformer2((f0, f1)); + +external makeResponseTransformer3: + (('data => 'data0, 'data0 => 'data1, 'data1 => 'resultData)) => + responseTransformer('data, 'resultData) = + "%identity"; + +let makeResponseTransformer3 = (f0, f1, f2) => + makeResponseTransformer3((f0, f1, f2)); + +external makeResponseTransformer4: + ( + ( + 'data => 'data0, + 'data0 => 'data1, + 'data1 => 'data2, + 'data2 => 'resultData, + ) + ) => + responseTransformer('data, 'resultData) = + "%identity"; + +let makeResponseTransformer4 = (f0, f1, f2, f3) => + makeResponseTransformer4((f0, f1, f2, f3)); + +external makeResponseTransformer5: + ( + ( + 'data => 'data0, + 'data0 => 'data1, + 'data1 => 'data2, + 'data2 => 'data3, + 'data3 => 'resultData, + ) + ) => + responseTransformer('data, 'resultData) = + "%identity"; + +let makeResponseTransformer5 = (f0, f1, f2, f3, f4) => + makeResponseTransformer5((f0, f1, f2, f3, f4)); + +external makeRequestTransformer1: + array(('data, Headers.t) => 'resultData) => + requestTransformer('data, Headers.t, 'resultData) = + "%identity"; + +let makeRequestTransformer1 = f => makeRequestTransformer1([|f|]); + +external makeRequestTransformer2: + ((('data, Headers.t) => 'data0, ('data0, Headers.t) => 'resultData)) => + requestTransformer('data, Headers.t, 'resultData) = + "%identity"; + +let makeRequestTransformer2 = (f0, f1) => makeRequestTransformer2((f0, f1)); + +external makeRequestTransformer3: + ( + ( + ('data, Headers.t) => 'data0, + ('data0, Headers.t) => 'data1, + ('data1, Headers.t) => 'resultData, + ) + ) => + requestTransformer('data, Headers.t, 'resultData) = + "%identity"; + +let makeRequestTransformer3 = (f0, f1, f2) => + makeRequestTransformer3((f0, f1, f2)); + +external makeRequestTransformer4: + ( + ( + ('data, Headers.t) => 'data0, + ('data0, Headers.t) => 'data1, + ('data1, Headers.t) => 'data2, + ('data2, Headers.t) => 'resultData, + ) + ) => + requestTransformer('data, Headers.t, 'resultData) = + "%identity"; + +let makeRequestTransformer4 = (f0, f1, f2, f3) => + makeRequestTransformer4((f0, f1, f2, f3)); + +external makeRequestTransformer5: + ( + ( + ('data, Headers.t) => 'data0, + ('data0, Headers.t) => 'data1, + ('data1, Headers.t) => 'data2, + ('data2, Headers.t) => 'data3, + ('data3, Headers.t) => 'resultData, + ) + ) => + requestTransformer('data, Headers.t, 'resultData) = + "%identity"; + +let makeRequestTransformer5 = (f0, f1, f2, f3, f5) => + makeRequestTransformer5((f0, f1, f2, f3, f5)); + +[@bs.obj] +external makeConfig: + ( + ~url: string=?, + ~_method: string=?, + ~baseURL: string=?, + ~transformRequest: requestTransformer( + 'postData, + Headers.t, + 'resultPostData, + ) + =?, + ~transformResponse: responseTransformer('data, 'resultData)=?, + ~headers: Headers.t=?, + ~params: Js.t('params)=?, + ~paramsSerializer: paramsSerializer('params)=?, + ~data: Js.t('postData)=?, + ~timeout: int=?, + ~withCredentials: bool=?, + ~adapter: adapter('a, 'b)=?, + ~auth: auth=?, + ~responseType: string=?, + ~xsrfCookieName: string=?, + ~xsrfHeaderName: string=?, + ~onUploadProgress: onProgress('uploadProgress)=?, + ~onDownloadProgress: onProgress('downloadProgress)=?, + ~maxContentLength: int=?, + ~validateStatus: validateStatus=?, + ~maxRedirects: int=?, + ~socketPath: string=?, + ~proxy: proxy=?, + ~httpAgent: Axios_agent.Http.t=?, + ~httpsAgent: Axios_agent.Https.t=?, + unit + ) => + config = + ""; + +[@bs.obj] +external makeConfigWithUrl: + ( + ~url: string, + ~_method: string=?, + ~baseURL: string=?, + ~transformRequest: requestTransformer( + 'postData, + Headers.t, + 'resultPostData, + ) + =?, + ~transformResponse: responseTransformer('data, 'resultData)=?, + ~headers: Headers.t=?, + ~params: Js.t('params)=?, + ~paramsSerializer: paramsSerializer('params)=?, + ~data: Js.t('postData)=?, + ~timeout: int=?, + ~withCredentials: bool=?, + ~adapter: adapter('a, 'b)=?, + ~auth: auth=?, + ~responseType: string=?, + ~xsrfCookieName: string=?, + ~xsrfHeaderName: string=?, + ~onUploadProgress: onProgress('uploadProgress)=?, + ~onDownloadProgress: onProgress('downloadProgress)=?, + ~maxContentLength: int=?, + ~validateStatus: validateStatus=?, + ~maxRedirects: int=?, + ~socketPath: string=?, + ~proxy: proxy=?, + ~httpAgent: Axios_agent.Http.t=?, + ~httpsAgent: Axios_agent.Https.t=?, + unit + ) => + configWithUrl = + ""; + +[@bs.module "axios"] +external all: + array(Js.Promise.t(response(_, _))) => + Js.Promise.t(array(response(_, _))) = + ""; + +[@bs.module "axios"] +external all2: + ( + (Js.Promise.t(response('a0, 'b0)), Js.Promise.t(response('a1, 'b1))) + ) => + Js.Promise.t((response('a0, 'b0), response('a1, 'b1))) = + "all"; + +[@bs.module "axios"] +external all3: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + ) + ) => + Js.Promise.t( + (response('a0, 'b0), response('a1, 'b1), response('a2, 'b2)), + ) = + "all"; + +[@bs.module "axios"] +external all4: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + ), + ) = + "all"; + +[@bs.module "axios"] +external all5: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + ), + ) = + "all"; + +[@bs.module "axios"] +external all6: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + ), + ) = + "all"; + +[@bs.module "axios"] +external all7: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + ), + ) = + "all"; + +[@bs.module "axios"] +external all8: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + ), + ) = + "all"; + +[@bs.module "axios"] +external all9: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + Js.Promise.t(response('a8, 'b8)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + response('a8, 'b8), + ), + ) = + "all"; + +[@bs.module "axios"] +external all10: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + Js.Promise.t(response('a8, 'b8)), + Js.Promise.t(response('a9, 'b9)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + response('a8, 'b8), + response('a9, 'b9), + ), + ) = + "all"; + +[@bs.module "axios"] +external request: configWithUrl => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external get: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external getc: (string, config) => Js.Promise.t(response('a, 'b)) = "get"; + +[@bs.module "axios"] +external delete: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external deletec: (string, config) => Js.Promise.t(response('a, 'b)) = + "delete"; + +[@bs.module "axios"] +external post: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external postData: (string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "post"; + +[@bs.module "axios"] +external postDatac: + (string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "post"; + +[@bs.module "axios"] +external put: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external putData: (string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "put"; + +[@bs.module "axios"] +external putDatac: + (string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "put"; + +[@bs.module "axios"] +external patch: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external patchData: (string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "patch"; + +[@bs.module "axios"] +external patchDatac: + (string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "patch"; + +module Instance = Axios_instance; +module Agent = Axios_agent; \ No newline at end of file diff --git a/drafts/bs-axios/src/axios.rei b/drafts/bs-axios/src/axios.rei new file mode 100644 index 0000000..0d53343 --- /dev/null +++ b/drafts/bs-axios/src/axios.rei @@ -0,0 +1,414 @@ +open Axios_types; + +module Headers: { + type t; + + let fromObj: Js.t({..}) => t; + let fromDict: Js.Dict.t(string) => t; +}; + +let makeResponseTransformer1: + ('data => 'resultData) => responseTransformer('data, 'resultData); + +let makeResponseTransformer2: + ('data => 'data0, 'data0 => 'resultData) => + responseTransformer('data, 'resultData); + +let makeResponseTransformer3: + ('data => 'data0, 'data0 => 'data1, 'data1 => 'resultData) => + responseTransformer('data, 'resultData); + +let makeResponseTransformer4: + ( + 'data => 'data0, + 'data0 => 'data1, + 'data1 => 'data2, + 'data2 => 'resultData + ) => + responseTransformer('data, 'resultData); + +let makeResponseTransformer5: + ( + 'data => 'data0, + 'data0 => 'data1, + 'data1 => 'data2, + 'data2 => 'data3, + 'data3 => 'resultData + ) => + responseTransformer('data, 'resultData); + +let makeRequestTransformer1: + (('data, Headers.t) => 'resultData) => + requestTransformer('data, Headers.t, 'resultData); + +let makeRequestTransformer2: + (('data, Headers.t) => 'data0, ('data0, Headers.t) => 'resultData) => + requestTransformer('data, Headers.t, 'resultData); + +let makeRequestTransformer3: + ( + ('data, Headers.t) => 'data0, + ('data0, Headers.t) => 'data1, + ('data1, Headers.t) => 'resultData + ) => + requestTransformer('data, Headers.t, 'resultData); + +let makeRequestTransformer4: + ( + ('data, Headers.t) => 'data0, + ('data0, Headers.t) => 'data1, + ('data1, Headers.t) => 'data2, + ('data2, Headers.t) => 'resultData + ) => + requestTransformer('data, Headers.t, 'resultData); + +let makeRequestTransformer5: + ( + ('data, Headers.t) => 'data0, + ('data0, Headers.t) => 'data1, + ('data1, Headers.t) => 'data2, + ('data2, Headers.t) => 'data3, + ('data3, Headers.t) => 'resultData + ) => + requestTransformer('data, Headers.t, 'resultData); + +[@bs.obj] +external makeConfig: + ( + ~url: string=?, + ~_method: string=?, + ~baseURL: string=?, + ~transformRequest: requestTransformer( + 'postData, + Headers.t, + 'resultPostData, + ) + =?, + ~transformResponse: responseTransformer('data, 'resultData)=?, + ~headers: Headers.t=?, + ~params: Js.t('params)=?, + ~paramsSerializer: paramsSerializer('params)=?, + ~data: Js.t('postData)=?, + ~timeout: int=?, + ~withCredentials: bool=?, + ~adapter: adapter('a, 'b)=?, + ~auth: auth=?, + ~responseType: string=?, + ~xsrfCookieName: string=?, + ~xsrfHeaderName: string=?, + ~onUploadProgress: onProgress('uploadProgress)=?, + ~onDownloadProgress: onProgress('downloadProgress)=?, + ~maxContentLength: int=?, + ~validateStatus: validateStatus=?, + ~maxRedirects: int=?, + ~socketPath: string=?, + ~proxy: proxy=?, + ~httpAgent: Axios_agent.Http.t=?, + ~httpsAgent: Axios_agent.Https.t=?, + unit + ) => + config = + ""; + +[@bs.obj] +external makeConfigWithUrl: + ( + ~url: string, + ~_method: string=?, + ~baseURL: string=?, + ~transformRequest: requestTransformer( + 'postData, + Headers.t, + 'resultPostData, + ) + =?, + ~transformResponse: responseTransformer('data, 'resultData)=?, + ~headers: Headers.t=?, + ~params: Js.t('params)=?, + ~paramsSerializer: paramsSerializer('params)=?, + ~data: Js.t('postData)=?, + ~timeout: int=?, + ~withCredentials: bool=?, + ~adapter: adapter('a, 'b)=?, + ~auth: auth=?, + ~responseType: string=?, + ~xsrfCookieName: string=?, + ~xsrfHeaderName: string=?, + ~onUploadProgress: onProgress('uploadProgress)=?, + ~onDownloadProgress: onProgress('downloadProgress)=?, + ~maxContentLength: int=?, + ~validateStatus: validateStatus=?, + ~maxRedirects: int=?, + ~socketPath: string=?, + ~proxy: proxy=?, + ~httpAgent: Axios_agent.Http.t=?, + ~httpsAgent: Axios_agent.Https.t=?, + unit + ) => + configWithUrl = + ""; + +[@bs.module "axios"] +external all: + array(Js.Promise.t(response(_, _))) => + Js.Promise.t(array(response(_, _))) = + ""; + +[@bs.module "axios"] +external all2: + ( + (Js.Promise.t(response('a0, 'b0)), Js.Promise.t(response('a1, 'b1))) + ) => + Js.Promise.t((response('a0, 'b0), response('a1, 'b1))) = + "all"; + +[@bs.module "axios"] +external all3: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + ) + ) => + Js.Promise.t( + (response('a0, 'b0), response('a1, 'b1), response('a2, 'b2)), + ) = + "all"; + +[@bs.module "axios"] +external all4: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + ), + ) = + "all"; + +[@bs.module "axios"] +external all5: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + ), + ) = + "all"; + +[@bs.module "axios"] +external all6: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + ), + ) = + "all"; + +[@bs.module "axios"] +external all7: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + ), + ) = + "all"; + +[@bs.module "axios"] +external all8: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + ), + ) = + "all"; + +[@bs.module "axios"] +external all9: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + Js.Promise.t(response('a8, 'b8)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + response('a8, 'b8), + ), + ) = + "all"; + +[@bs.module "axios"] +external all10: + ( + ( + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + Js.Promise.t(response('a8, 'b8)), + Js.Promise.t(response('a9, 'b9)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + response('a8, 'b8), + response('a9, 'b9), + ), + ) = + "all"; + +[@bs.module "axios"] +external request: configWithUrl => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external get: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external getc: (string, config) => Js.Promise.t(response('a, 'b)) = "get"; + +[@bs.module "axios"] +external delete: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external deletec: (string, config) => Js.Promise.t(response('a, 'b)) = + "delete"; + +[@bs.module "axios"] +external post: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external postData: (string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "post"; + +[@bs.module "axios"] +external postDatac: + (string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "post"; + +[@bs.module "axios"] +external put: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external putData: (string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "put"; + +[@bs.module "axios"] +external putDatac: + (string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "put"; + +[@bs.module "axios"] +external patch: string => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.module "axios"] +external patchData: (string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "patch"; + +[@bs.module "axios"] +external patchDatac: + (string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "patch"; + +module Instance = Axios_instance; +module Agent = Axios_agent; \ No newline at end of file diff --git a/drafts/bs-axios/src/axios_agent.re b/drafts/bs-axios/src/axios_agent.re new file mode 100644 index 0000000..8c19ffd --- /dev/null +++ b/drafts/bs-axios/src/axios_agent.re @@ -0,0 +1,75 @@ +// https://nodejs.org/api/http.html#http_class_http_agent +module Http = { + type t; + + [@bs.deriving abstract] + type config = { + [@bs.optional] + keepAlive: bool, + [@bs.optional] + keepAliveMsecs: int, + [@bs.optional] + maxSockets: int, + [@bs.optional] + maxFreeSockets: int, + [@bs.optional] + timeout: int, + }; + + [@bs.module "http"] [@bs.new] external create: config => t = "Agent"; +}; + +// https://nodejs.org/api/https.html#https_class_https_agent +module Https = { + type t; + + [@bs.deriving abstract] + type config = { + [@bs.optional] + ca: string, + [@bs.optional] + cert: string, + [@bs.optional] + ciphers: string, + [@bs.optional] + clientCertEngine: string, + [@bs.optional] + crl: string, + [@bs.optional] + dhparam: string, + [@bs.optional] + ecdhCurve: string, + [@bs.optional] + honorCipherOrder: bool, + [@bs.optional] + key: string, + [@bs.optional] + keepAlive: bool, + [@bs.optional] + keepAliveMsecs: int, + [@bs.optional] + maxSockets: int, + [@bs.optional] + maxFreeSockets: int, + [@bs.optional] + maxCachedSessions: int, + [@bs.optional] + passphrase: string, + [@bs.optional] + pfx: string, + [@bs.optional] + rejectUnauthorized: bool, + [@bs.optional] + secureOptions: int, + [@bs.optional] + secureProtocol: string, + [@bs.optional] + servername: string, + [@bs.optional] + sessionIdContext: string, + [@bs.optional] + timeout: int, + }; + + [@bs.module "https"] [@bs.new] external create: config => t = "Agent"; +}; diff --git a/drafts/bs-axios/src/axios_instance.re b/drafts/bs-axios/src/axios_instance.re new file mode 100644 index 0000000..bb47efe --- /dev/null +++ b/drafts/bs-axios/src/axios_instance.re @@ -0,0 +1,272 @@ +open Axios_types; + +type t; + +[@bs.module "axios"] external create: config => t = ""; + +[@bs.send] +external all: + (t, array(Js.Promise.t(response(_, _)))) => + Js.Promise.t(array(response(_, _))) = + ""; + +[@bs.send] +external all2: + ( + t, + (Js.Promise.t(response('a0, 'b0)), Js.Promise.t(response('a1, 'b1))) + ) => + Js.Promise.t((response('a0, 'b0), response('a1, 'b1))) = + "all"; + +[@bs.send] +external all3: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + ) + ) => + Js.Promise.t( + (response('a0, 'b0), response('a1, 'b1), response('a2, 'b2)), + ) = + "all"; + +[@bs.send] +external all4: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + ), + ) = + "all"; + +[@bs.send] +external all5: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + ), + ) = + "all"; + +[@bs.send] +external all6: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + ), + ) = + "all"; + +[@bs.send] +external all7: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + ), + ) = + "all"; + +[@bs.send] +external all8: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + ), + ) = + "all"; + +[@bs.send] +external all9: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + Js.Promise.t(response('a8, 'b8)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + response('a8, 'b8), + ), + ) = + "all"; + +[@bs.send] +external all10: + ( + ( + t, + Js.Promise.t(response('a0, 'b0)), + Js.Promise.t(response('a1, 'b1)), + Js.Promise.t(response('a2, 'b2)), + Js.Promise.t(response('a3, 'b3)), + Js.Promise.t(response('a4, 'b4)), + Js.Promise.t(response('a5, 'b5)), + Js.Promise.t(response('a6, 'b6)), + Js.Promise.t(response('a7, 'b7)), + Js.Promise.t(response('a8, 'b8)), + Js.Promise.t(response('a9, 'b9)), + ) + ) => + Js.Promise.t( + ( + response('a0, 'b0), + response('a1, 'b1), + response('a2, 'b2), + response('a3, 'b3), + response('a4, 'b4), + response('a5, 'b5), + response('a6, 'b6), + response('a7, 'b7), + response('a8, 'b8), + response('a9, 'b9), + ), + ) = + "all"; + +[@bs.send] external request: t => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.send] external get: (t, string) => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.send] +external getc: (t, string, config) => Js.Promise.t(response('a, 'b)) = "get"; + +[@bs.send] +external delete: (t, string) => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.send] +external deletec: (t, string, config) => Js.Promise.t(response('a, 'b)) = + "delete"; + +[@bs.send] external post: (t, string) => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.send] +external postData: (t, string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "post"; + +[@bs.send] +external postDatac: + (t, string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "post"; + +[@bs.send] external put: (t, string) => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.send] +external putData: (t, string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "put"; + +[@bs.send] +external putDatac: + (t, string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "put"; + +[@bs.send] +external patch: (t, string) => Js.Promise.t(response('a, 'b)) = ""; + +[@bs.send] +external patchData: (t, string, Js.t('a)) => Js.Promise.t(response('b, 'c)) = + "patch"; + +[@bs.send] +external patchDatac: + (t, string, Js.t('a), config) => Js.Promise.t(response('b, 'c)) = + "patch"; \ No newline at end of file diff --git a/drafts/bs-axios/src/axios_types.re b/drafts/bs-axios/src/axios_types.re new file mode 100644 index 0000000..47dc005 --- /dev/null +++ b/drafts/bs-axios/src/axios_types.re @@ -0,0 +1,37 @@ +type configWithUrl = {. "url": string}; + +type config = Js.t({.}); + +type requestTransformer('data, 'headers, 'resultData); + +type responseTransformer('data, 'resultData); + +type paramsSerializer('a) = Js.t('a) => string; + +type response('data, 'header) = { + . + "data": 'data, + "status": int, + "statusText": string, + "headers": Js.t('header), + "config": config, +}; + +type adapter('a, 'b) = config => Js.Promise.t(response('a, 'b)); + +type auth = { + . + "username": string, + "password": string, +}; + +type proxy = { + . + "host": int, + "port": int, + "auth": auth, +}; + +type onProgress('a) = Js.t('a) => unit; + +type validateStatus = int => bool; diff --git a/drafts/bs-axios/src/axios_types.rei b/drafts/bs-axios/src/axios_types.rei new file mode 100644 index 0000000..977cc60 --- /dev/null +++ b/drafts/bs-axios/src/axios_types.rei @@ -0,0 +1,37 @@ +type configWithUrl; + +type config; + +type requestTransformer('data, 'headers, 'resultData); + +type responseTransformer('data, 'resultData); + +type paramsSerializer('a) = Js.t('a) => string; + +type response('a, 'b) = { + . + "data": 'a, + "status": int, + "statusText": string, + "headers": Js.t('b), + "config": config, +}; + +type adapter('a, 'b) = config => Js.Promise.t(response('a, 'b)); + +type auth = { + . + "username": string, + "password": string, +}; + +type proxy = { + . + "host": int, + "port": int, + "auth": auth, +}; + +type onProgress('a) = Js.t('a) => unit; + +type validateStatus = int => bool; \ No newline at end of file diff --git a/drafts/bs-barcode/.gitignore b/drafts/bs-barcode/.gitignore new file mode 100644 index 0000000..2417f2a --- /dev/null +++ b/drafts/bs-barcode/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.merlin +.bsb.lock +*.bs.js +npm-debug.log +/lib/bs/ +/node_modules/ diff --git a/drafts/bs-barcode/LICENSE.md b/drafts/bs-barcode/LICENSE.md new file mode 100644 index 0000000..80dd20e --- /dev/null +++ b/drafts/bs-barcode/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Andrés Rodríguez + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-barcode/README.md b/drafts/bs-barcode/README.md new file mode 100644 index 0000000..c16bcd4 --- /dev/null +++ b/drafts/bs-barcode/README.md @@ -0,0 +1,24 @@ +# ║█║▌║█║▌│║▌║▌█║ bs-barcode ║█║▌║█║▌│║▌║▌█║ + +BuckleScript bindings for [JsBarcode](https://github.com/lindell/JsBarcode). + +# Installation +``` + npm install bs-canvas bs-barcode +``` + +# :hammer: Build + +``` +npm run build +``` + +# :eyeglasses: Build + Watch + +``` +npm run start +``` + +# :pencil2: Editor + +If you use `vscode`, Press `Windows + Shift + B` it will build automatically diff --git a/drafts/bs-barcode/bsconfig.json b/drafts/bs-barcode/bsconfig.json new file mode 100644 index 0000000..8cc1a9d --- /dev/null +++ b/drafts/bs-barcode/bsconfig.json @@ -0,0 +1,19 @@ +{ + "name": "bs-barcode", + "version": "0.1.0", + "sources": { + "dir": "src", + "subdirs": true + }, + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "bs-dependencies": ["bs-canvas"], + "suffix": ".bs.js", + "warnings": { + "error": "+101" + }, + "namespace": false, + "refmt": 3 +} diff --git a/drafts/bs-barcode/package-lock.json b/drafts/bs-barcode/package-lock.json new file mode 100644 index 0000000..84421e3 --- /dev/null +++ b/drafts/bs-barcode/package-lock.json @@ -0,0 +1,42 @@ +{ + "name": "bs-barcode", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "bs-canvas": { + "version": "github:andresrgz/bs-canvas#4061ec3534b979c90bcb8a70f90253eec57755a5", + "from": "github:andresrgz/bs-canvas", + "dev": true, + "requires": { + "canvas": "^1.6.11" + } + }, + "bs-platform": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-4.0.5.tgz", + "integrity": "sha512-wK+yUx/5ojlrxgk/EB3Hla7+9NEnE8PxtGb71e4IsKnWPXrRAaVtdTuoWWClv8z77xntOFg8qTgYfYyh9xLMWA==", + "dev": true + }, + "canvas": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-1.6.11.tgz", + "integrity": "sha512-ElVw5Uk8PReGpzXfDg6PDa+wntnZLGWWfdSHI0Pc8GyXiFbW13drSTzWU6C4E5QylHe+FnLqI7ngMRlp3eGZIQ==", + "dev": true, + "requires": { + "nan": "^2.10.0" + } + }, + "jsbarcode": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/jsbarcode/-/jsbarcode-3.9.0.tgz", + "integrity": "sha512-FWuQ+XJTvtF8urAjJCYxb14cA1QzItGj8Cw8Wnwii6KluWuPmmRbeP5G5Utbn7gy6yA+4vaaUg7GLii/dzXTBA==" + }, + "nan": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", + "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "dev": true + } + } +} diff --git a/drafts/bs-barcode/package.json b/drafts/bs-barcode/package.json new file mode 100644 index 0000000..e31b4c2 --- /dev/null +++ b/drafts/bs-barcode/package.json @@ -0,0 +1,29 @@ +{ + "name": "bs-barcode", + "repository": { + "type": "git", + "url": "https://github.com/andresrgz/bs-barcode.git" + }, + "version": "0.1.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "JsBarcode" + ], + "author": "andresrgz", + "license": "MIT", + "devDependencies": { + "bs-canvas": "github:andresrgz/bs-canvas", + "bs-platform": "^4.0.5" + }, + "peerDependencies": { + "bs-canvas": "github:andresrgz/bs-canvas" + }, + "dependencies": { + "jsbarcode": "^3.9.0" + } +} \ No newline at end of file diff --git a/drafts/bs-barcode/src/Barcode.re b/drafts/bs-barcode/src/Barcode.re new file mode 100644 index 0000000..8f4b1bc --- /dev/null +++ b/drafts/bs-barcode/src/Barcode.re @@ -0,0 +1,45 @@ +[@bs.deriving abstract] +type options = { + [@bs.optional] + format: string, + [@bs.optional] + width: float, + [@bs.optional] + height: float, + [@bs.optional] + displayValue: bool, + [@bs.optional] + text: string, + [@bs.optional] + fontOptions: string, + [@bs.optional] + font: string, + [@bs.optional] + textAlign: string, + [@bs.optional] + textPosition: string, + [@bs.optional] + textMargin: float, + [@bs.optional] + fontSize: float, + [@bs.optional] + background: string, + [@bs.optional] + lineColor: string, + [@bs.optional] + margin: float, + [@bs.optional] + marginTop: float, + [@bs.optional] + marginBottom: string, + [@bs.optional] + marginLeft: string, + [@bs.optional] + marginRight: string, + [@bs.optional] + valid: bool => bool, +}; + +[@bs.module] +external createBarcode: (Canvas.t, string, ~options: options=?, unit) => unit = + "jsbarcode"; \ No newline at end of file diff --git a/drafts/bs-big/LICENSE b/drafts/bs-big/LICENSE new file mode 100644 index 0000000..8c88344 --- /dev/null +++ b/drafts/bs-big/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Alexander P Chang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-big/README.md b/drafts/bs-big/README.md new file mode 100644 index 0000000..fcfc99f --- /dev/null +++ b/drafts/bs-big/README.md @@ -0,0 +1,47 @@ +# bs-big.js +Bucklescript bindings to [big.js](https://github.com/MikeMcl/big.js/), a library for arbitrary-precision decimal arithmetic. All methods are supported. + +## Installation +1. Make sure big.js is installed: `npm install big.js` +2. Install the bindings: `npm install bs-big.js` +3. Add the bindings to bs-config.json: +``` +{ + "bs-dependencies": [ + "bs-big.js" + ] +} +``` + +## Usage +Big numbers of type `Big.t` can be created using `Big.fromInt`, `Big.fromString` or `Big.fromFloat`. Arithmetic can +then be done using the pipe-first `|.` syntax. For example: + +```Reason +Big.setDP(10); //set decimal places +Big.setRM(1); //set rounding mode +let x = Big.fromInt(2); +let y = Big.fromInt(3); +let z = x |. Big.div(y); +let _ = z |. Big.toString // "0.6666666667" +let _ = z |. Big.sqrt |. Big.toString // "0.8164965809" +let _ = z |. Big.pow(-3) |. Big.toString // "3.3749999995" +let _ = z |. Big.times(z) |. Big.toString // "0.44444444448888888889" +let _ = z |. Big.times(z) |. Big.round(~dp=10, ()) |. Big.toString // "0.4444444445" +``` + + +## Documentation +See [Big.mli](https://github.com/alexchang8/bs-big.js/blob/master/src/Big.mli) and the [big.js documentation](http://mikemcl.github.io/big.js/) + + +## Testing +Very extensive testing was done by porting most of the tests from big.js. To run the tests: +``` +npm test +``` +## Things to note + + - The method`Big.mod_` has an underscore because `mod` is a reserved keyword in OCaml/Reason + - The last parameter of all methods with optional parameters is `unit`. This is because the last parameter would be optional, [which don't work properly in OCaml](https://ocaml.org/learn/tutorials/labels.html#quot-Warning-This-optional-argument-cannot-be-erased-quot). Keeping the parameter order allows consistent use of the pipe-first syntax `|.`, so it is better to end with `unit` than swap order. + - OCaml does not have `-0` but Javascript does diff --git a/drafts/bs-big/__tests__/abs_test.ml b/drafts/bs-big/__tests__/abs_test.ml new file mode 100644 index 0000000..96c8ef7 --- /dev/null +++ b/drafts/bs-big/__tests__/abs_test.ml @@ -0,0 +1,533 @@ +open Jest + + +let () = + describe "Expect" (fun () -> + let open Expect in + let abs_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + let v' = v |> Big.abs |> Big.toString in + test ("abs_test" ^ string_of_int !count) (fun () -> expect v' |> toBe exp ) in + + Big.setDP 20; + Big.setRM 1; + + abs_test "1" (Big.fromInt 1); + abs_test "1" (Big.fromInt (-1)); + abs_test "0.5" (Big.fromFloat 0.5); + abs_test "0.5" (Big.fromFloat (-0.5)); + abs_test "0.1" (Big.fromFloat (0.1)); + abs_test "0.1" (Big.fromFloat (-0.1)); + abs_test "1.1" (Big.fromFloat (1.1)); + abs_test "1.1" (Big.fromFloat (-1.1)); + abs_test "1.5" (Big.fromFloat (1.5)); + abs_test "1.5" (Big.fromFloat (-1.5)); + + abs_test "0.00001" (Big.fromString "-1e-5"); + abs_test "9000000000" (Big.fromString "-9e9"); + abs_test "123456.7891011" (Big.fromFloat (-123456.7891011)); + abs_test "999.999" (Big.fromString "-999.999"); + abs_test "99" (Big.fromInt 99); + abs_test "1" (Big.fromString "-1"); + abs_test "0.001" (Big.fromString "0.001"); + abs_test "0.001" (Big.fromString "-0.001"); + abs_test "0" (Big.fromInt 0); + abs_test "0" (Big.fromString "-0"); + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("abs_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + bool_test true (Big.fromString "-0" |> is_minus_zero); + bool_test false (-0 |> Big.fromInt |> is_minus_zero); + bool_test false (Big.fromString "-0" |> Big.abs |> is_minus_zero); + bool_test true (Big.fromString "-0" |> Big.abs |> is_minus_zero |> not); + + (*Test OCaml min/max floats*) + abs_test (min_float |> Js.Float.toString) (min_float |> Big.fromFloat); + abs_test (min_float |> Js.Float.toString) (-.min_float |> Big.fromFloat); + abs_test (max_float |> Js.Float.toString) (max_float |> Big.fromFloat); + abs_test (max_float |> Js.Float.toString) (-.max_float |> Big.fromFloat); + + (*Test javascript min/max floats*) + let js_min_float = 5e-324 in + (*this is actually the same as OCaml's but keeping for now*) + let js_max_float = 1.7976931348623157e+308 in + + abs_test (js_min_float |> Js.Float.toString) (js_min_float |> Big.fromFloat); + abs_test (js_min_float |> Js.Float.toString) (-.js_min_float |> Big.fromFloat); + abs_test (js_max_float |> Js.Float.toString) (js_max_float |> Big.fromFloat); + abs_test (js_max_float |> Js.Float.toString) (-.js_max_float |> Big.fromFloat); + + (*Makes it much easier to copy tests*) + let tup_test_int (exp,v) = abs_test (string_of_int exp) (Big.fromInt v) in + let two_30 = 1073741824 in + + tup_test_int (two_30, two_30); + tup_test_int (two_30, -two_30); + + tup_test_int (two_30 + 1, two_30 + 1); + tup_test_int (two_30 + 1, -two_30 - 1); + + tup_test_int (two_30 - 1, two_30 - 1); + tup_test_int (two_30 - 1, -two_30 + 1); + + (*These will fail because of integer representation differences*) + (*tup_test_int (two_31 + 1, two_31 + 1); + tup_test_int (two_31 + 1, -two_31 - 1); + tup_test_int (two_31 - 1, two_31 - 1); + tup_test_int (two_31 - 1, -two_31 + 1);*) + + let tup_test_string (exp, v) = abs_test exp (Big.fromString v) in + + tup_test_string ("0", "0"); + tup_test_string ("1", "-1"); + tup_test_string ("11.121", "11.121"); + tup_test_string ("0.023842", "-0.023842"); + tup_test_string ("1.19", "-1.19"); + tup_test_string ("9.622e-11", "-0.00000000009622"); + tup_test_string ("5.09e-10", "-0.000000000509"); + tup_test_string ("3838.2", "3838.2"); + tup_test_string ("127", "127.0"); + tup_test_string ("4.23073", "4.23073"); + tup_test_string ("2.5469", "-2.5469"); + tup_test_string ("29949", "-29949"); + tup_test_string ("277.1", "-277.10"); + tup_test_string ("4.97898e-15", "-0.00000000000000497898"); + tup_test_string ("53.456", "53.456"); + tup_test_string ("100564", "-100564"); + tup_test_string ("12431.9", "-12431.9"); + tup_test_string ("97633.7", "-97633.7"); + tup_test_string ("220", "220"); + tup_test_string ("188.67", "-188.67"); + tup_test_string ("35", "-35"); + tup_test_string ("2.6", "-2.6"); + tup_test_string ("2.2e-19", "-0.000000000000000000220"); + tup_test_string ("1.469", "-1.469"); + tup_test_string ("150.7", "-150.7"); + tup_test_string ("74", "-74"); + tup_test_string ("3.52e-9", "-0.00000000352"); + tup_test_string ("2221.7", "-2221.7"); + tup_test_string ("0.000004211", "-0.000004211"); + tup_test_string ("1", "-1"); + tup_test_string ("5.886", "-5.886"); + tup_test_string ("16", "16"); + tup_test_string ("4.4493e-9", "0.0000000044493"); + tup_test_string ("47.6", "47.6"); + tup_test_string ("1.6", "-1.60"); + tup_test_string ("1", "-1"); + tup_test_string ("1.5", "-1.5"); + tup_test_string ("5", "-5"); + tup_test_string ("1", "-1"); + tup_test_string ("8027", "8027"); + tup_test_string ("6.36e-16", "-0.000000000000000636"); + tup_test_string ("3.87766", "3.87766"); + tup_test_string ("7.4", "-7.4"); + tup_test_string ("4.449", "-4.449"); + tup_test_string ("5.2218e-19", "-0.000000000000000000522180"); + tup_test_string ("1.3769e-11", "-0.000000000013769"); + tup_test_string ("7.898e-13", "-0.0000000000007898"); + tup_test_string ("522.9", "-522.9"); + tup_test_string ("16.1", "-16.1"); + tup_test_string ("2.15", "2.15"); + tup_test_string ("4.3", "4.3"); + tup_test_string ("3", "-3"); + tup_test_string ("2.8", "-2.8"); + tup_test_string ("1", "-1"); + tup_test_string ("0.0000128696", "-0.0000128696"); + tup_test_string ("13.33", "-13.33"); + tup_test_string ("0.00000132177", "-0.00000132177"); + tup_test_string ("1.41516", "-1.41516"); + tup_test_string ("180.4", "-180.4"); + tup_test_string ("115079", "-115079"); + tup_test_string ("959", "959"); + tup_test_string ("714.4", "714.4"); + tup_test_string ("1.4544", "1.4544"); + tup_test_string ("53.691", "53.691"); + tup_test_string ("2.03832e-12", "-0.00000000000203832"); + tup_test_string ("1", "-1"); + tup_test_string ("10.8", "10.8"); + tup_test_string ("6189.2", "-6189.2"); + tup_test_string ("6.30866", "6.30866"); + tup_test_string ("62306", "62306"); + tup_test_string ("4", "-4.0"); + tup_test_string ("997.1", "-997.1"); + tup_test_string ("27.4", "-27.40"); + tup_test_string ("9242", "9242"); + tup_test_string ("31.1", "-31.1"); + tup_test_string ("23.4", "23.4"); + tup_test_string ("451818", "-451818"); + tup_test_string ("7", "-7"); + tup_test_string ("1.9", "-1.9"); + tup_test_string ("2", "-2"); + tup_test_string ("112.983", "-112.983"); + tup_test_string ("9.36e-8", "-0.0000000936"); + tup_test_string ("12.8515", "12.8515"); + tup_test_string ("73.1", "-73.1"); + tup_test_string ("18.15", "18.150"); + tup_test_string ("11997.8", "11997.8"); + tup_test_string ("23.1", "-23.1"); + tup_test_string ("82.022", "-82.022"); + tup_test_string ("3.916e-20", "-0.00000000000000000003916"); + tup_test_string ("3.3", "-3.3"); + tup_test_string ("892.1", "-892.1"); + tup_test_string ("24.4", "24.4"); + tup_test_string ("72", "72.0"); + tup_test_string ("0.0013346", "0.0013346"); + tup_test_string ("10.4", "-10.4"); + tup_test_string ("367.5", "367.5"); + tup_test_string ("7", "-7"); + tup_test_string ("127.195", "127.195"); + tup_test_string ("7.89e-13", "-0.000000000000789"); + tup_test_string ("63", "-63"); + tup_test_string ("85821.2", "-85821.2"); + tup_test_string ("95.6", "95.6"); + tup_test_string ("8.9e-14", "-0.000000000000089"); + tup_test_string ("112.1", "-112.1"); + tup_test_string ("3.68", "-3.68"); + tup_test_string ("9", "-9"); + tup_test_string ("0.0000975", "-0.0000975"); + tup_test_string ("393.6", "-393.6"); + tup_test_string ("7.4", "-7.4"); + tup_test_string ("69.62", "-69.62"); + tup_test_string ("5201.3", "5201.3"); + tup_test_string ("163", "163"); + tup_test_string ("4.30732", "4.30732"); + tup_test_string ("224.49", "-224.49"); + tup_test_string ("319.8", "-319.8"); + tup_test_string ("88.1", "-88.1"); + tup_test_string ("2.7762e-8", "0.000000027762"); + tup_test_string ("2.043e-7", "-0.0000002043"); + tup_test_string ("75459.3", "-75459.3"); + tup_test_string ("0.178", "0.178"); + tup_test_string ("0.00001633", "0.00001633"); + tup_test_string ("955", "955"); + tup_test_string ("373898", "-373898"); + tup_test_string ("9780.1", "9780.1"); + tup_test_string ("503.47", "503.47"); + tup_test_string ("3.44562", "-3.44562"); + tup_test_string ("1.6", "-1.6"); + tup_test_string ("1.22442", "-1.22442"); + tup_test_string ("1.4", "1.4"); + tup_test_string ("1219.1", "-1219.1"); + tup_test_string ("2.7", "-2.7"); + tup_test_string ("1057", "-1057"); + tup_test_string ("1938", "1938"); + tup_test_string ("1.1983", "1.1983"); + tup_test_string ("0.0012", "-0.0012"); + tup_test_string ("95.713", "-95.713"); + tup_test_string ("2", "-2"); + tup_test_string ("17.24", "-17.24"); + tup_test_string ("10.3", "-10.3"); + tup_test_string ("1", "-1"); + tup_test_string ("65.8", "-65.8"); + tup_test_string ("2.9", "2.9"); + tup_test_string ("54149", "54149"); + tup_test_string ("8", "-8"); + tup_test_string ("1", "1.0"); + tup_test_string ("4", "-4"); + tup_test_string ("6.3", "-6.3"); + tup_test_string ("5.25e-9", "0.00000000525"); + tup_test_string ("52.3", "-52.3"); + tup_test_string ("75290", "-75290"); + tup_test_string ("5.9", "-5.9"); + tup_test_string ("13.7", "13.7"); + tup_test_string ("2.3982e-9", "0.0000000023982"); + tup_test_string ("91.5", "-91.50"); + tup_test_string ("2072.39", "2072.39"); + tup_test_string ("385.6", "385.6"); + tup_test_string ("4.77", "4.77"); + tup_test_string ("18.72", "18.720"); + tup_test_string ("2817", "-2817"); + tup_test_string ("44535", "-44535"); + tup_test_string ("655", "655"); + tup_test_string ("2e-15", "-0.0000000000000020"); + tup_test_string ("0.625", "0.6250"); + tup_test_string ("2", "-2"); + tup_test_string ("5.315", "5.315"); + tup_test_string ("70.9", "70.90"); + tup_test_string ("6.4", "6.4"); + tup_test_string ("1824", "1824"); + tup_test_string ("52.595", "52.595"); + tup_test_string ("3662", "3662.0"); + tup_test_string ("3.1", "3.1"); + tup_test_string ("1.05032e-7", "0.000000105032"); + tup_test_string ("997.063", "-997.063"); + tup_test_string ("41746", "-41746"); + tup_test_string ("24.0402", "24.0402"); + tup_test_string ("0.009135", "0.009135"); + tup_test_string ("2.34e-9", "-0.00000000234"); + tup_test_string ("13.1", "13.1"); + tup_test_string ("228.8", "228.8"); + tup_test_string ("565.85", "565.85"); + tup_test_string ("4e-20", "0.000000000000000000040"); + tup_test_string ("1.73", "1.73"); + tup_test_string ("38.9", "38.9"); + tup_test_string ("1.02e-14", "-0.0000000000000102"); + tup_test_string ("302.8", "-302.8"); + tup_test_string ("7", "-7"); + tup_test_string ("1", "-1"); + tup_test_string ("0.00247", "0.00247"); + tup_test_string ("2", "-2"); + tup_test_string ("3.26", "-3.26"); + tup_test_string ("8.8", "8.8"); + tup_test_string ("90.6", "90.6"); + tup_test_string ("8.3053e-17", "-0.000000000000000083053"); + tup_test_string ("2.5", "-2.5"); + tup_test_string ("376.2", "-376.2"); + tup_test_string ("1.29", "1.29"); + tup_test_string ("1.379", "-1.379"); + tup_test_string ("40921.5", "-40921.5"); + tup_test_string ("1", "-1"); + tup_test_string ("12.5", "12.5"); + tup_test_string ("10.1", "10.1"); + tup_test_string ("1", "-1"); + tup_test_string ("226636", "226636"); + tup_test_string ("1", "-1"); + tup_test_string ("1.7", "-1.7"); + tup_test_string ("31.31", "31.31"); + tup_test_string ("79.9", "-79.9"); + tup_test_string ("4.027e-13", "0.0000000000004027"); + tup_test_string ("43.838", "43.838"); + tup_test_string ("6.47", "-6.47"); + tup_test_string ("5.292e-19", "0.0000000000000000005292"); + tup_test_string ("4.6", "-4.6"); + tup_test_string ("15918", "-15918.0"); + tup_test_string ("239.45", "239.45"); + tup_test_string ("1.02", "-1.02"); + tup_test_string ("14101", "-14101"); + tup_test_string ("7", "-7"); + tup_test_string ("367.34", "367.34"); + tup_test_string ("5", "-5"); + tup_test_string ("19.9", "-19.9"); + tup_test_string ("269.45", "-269.45"); + tup_test_string ("10.34", "-10.34"); + tup_test_string ("3.32882e-12", "-0.00000000000332882"); + tup_test_string ("5.9", "5.9"); + tup_test_string ("9", "-9.0"); + tup_test_string ("1.3597", "-1.3597"); + tup_test_string ("8", "8.0"); + tup_test_string ("1", "1.0"); + tup_test_string ("312.5", "312.5"); + tup_test_string ("1.554", "-1.554"); + tup_test_string ("210.985", "-210.985"); + tup_test_string ("1", "-1"); + tup_test_string ("1.24", "-1.24"); + tup_test_string ("513865", "-513865"); + tup_test_string ("6748", "-6748"); + tup_test_string ("591.51", "-591.51"); + tup_test_string ("2.2", "-2.2"); + tup_test_string ("19.5495", "19.5495"); + tup_test_string ("3.3", "3.3"); + tup_test_string ("30", "-30"); + tup_test_string ("94", "-94"); + tup_test_string ("217.55", "217.55"); + tup_test_string ("2", "-2"); + tup_test_string ("99", "99"); + tup_test_string ("4.067", "-4.067"); + tup_test_string ("702.57", "702.57"); + tup_test_string ("3.7", "-3.70"); + tup_test_string ("4", "4.0"); + tup_test_string ("192944", "192944"); + tup_test_string ("0.000022", "0.000022"); + tup_test_string ("47.6", "47.60"); + tup_test_string ("0.391", "0.3910"); + tup_test_string ("35", "-35"); + tup_test_string ("100", "-100"); + tup_test_string ("3.3", "-3.3"); + tup_test_string ("32.432", "32.432"); + tup_test_string ("1.07849e-18", "0.00000000000000000107849"); + tup_test_string ("2", "-2.0"); + tup_test_string ("23.27", "23.27"); + tup_test_string ("4.054e-15", "-0.000000000000004054"); + tup_test_string ("7.6", "-7.6"); + tup_test_string ("1305", "1305"); + tup_test_string ("1.501", "-1.501"); + tup_test_string ("3.4", "3.4"); + tup_test_string ("22.5", "-22.5"); + tup_test_string ("1.0916", "1.0916"); + tup_test_string ("2", "-2"); + tup_test_string ("58.271", "58.271"); + tup_test_string ("1.73e-12", "0.00000000000173"); + tup_test_string ("1.3458e-15", "0.0000000000000013458"); + tup_test_string ("309.87", "-309.87"); + tup_test_string ("5.318", "-5.318"); + tup_test_string ("1.5302e-8", "0.000000015302"); + tup_test_string ("596765", "596765"); + tup_test_string ("54.42", "-54.42"); + tup_test_string ("6.549e-20", "0.00000000000000000006549"); + tup_test_string ("29", "29"); + tup_test_string ("46.025", "46.025"); + tup_test_string ("2556.78", "-2556.78"); + tup_test_string ("0.00287721", "0.00287721"); + tup_test_string ("1.63", "-1.63"); + tup_test_string ("0.00041", "0.00041"); + tup_test_string ("698", "698"); + tup_test_string ("134.4", "134.4"); + tup_test_string ("2.1", "2.1"); + tup_test_string ("2.07", "-2.07"); + tup_test_string ("122.869", "122.869"); + tup_test_string ("0.00017", "-0.00017"); + tup_test_string ("18.6", "18.6"); + tup_test_string ("7", "-7"); + tup_test_string ("0.0180557", "0.0180557"); + tup_test_string ("5", "-5"); + tup_test_string ("6.2", "-6.2"); + tup_test_string ("8", "-8"); + tup_test_string ("450.96", "-450.96"); + tup_test_string ("20.2", "-20.2"); + tup_test_string ("176.52", "176.52"); + tup_test_string ("0.00017", "-0.000170"); + tup_test_string ("5", "-5"); + tup_test_string ("1", "-1"); + tup_test_string ("1.37856e-14", "0.0000000000000137856"); + tup_test_string ("76.3048", "76.3048"); + tup_test_string ("1803.7", "-1803.7"); + tup_test_string ("74", "74"); + tup_test_string ("1.7e-12", "0.0000000000017"); + tup_test_string ("48.7", "-48.7"); + tup_test_string ("4.48", "-4.48"); + tup_test_string ("1.4", "-1.4"); + tup_test_string ("7.69", "-7.69"); + tup_test_string ("23.5987", "23.5987"); + tup_test_string ("3074", "3074.0"); + tup_test_string ("8.06e-15", "-0.00000000000000806"); + tup_test_string ("21.3757", "-21.3757"); + tup_test_string ("35", "35"); + tup_test_string ("11.056", "11.0560"); + tup_test_string ("3.36e-14", "-0.0000000000000336"); + tup_test_string ("49139.4", "-49139.4"); + tup_test_string ("32.654", "-32.654"); + tup_test_string ("34035.4", "34035.4"); + tup_test_string ("15.22", "15.22"); + tup_test_string ("62", "62.0"); + tup_test_string ("8.89156", "-8.89156"); + tup_test_string ("14", "14"); + tup_test_string ("0.006", "-0.0060"); + tup_test_string ("1.5", "1.5"); + tup_test_string ("7", "-7"); + tup_test_string ("1.6e-11", "0.000000000016"); + tup_test_string ("26.6427", "26.6427"); + tup_test_string ("1.5e-18", "-0.0000000000000000015"); + tup_test_string ("1.52838e-15", "0.00000000000000152838"); + tup_test_string ("119.1", "119.1"); + tup_test_string ("0.004283", "0.004283"); + tup_test_string ("818", "-818"); + tup_test_string ("194", "194"); + tup_test_string ("104.788", "-104.788"); + tup_test_string ("3.74e-11", "0.0000000000374"); + tup_test_string ("6.162", "-6.162"); + tup_test_string ("5.19214e-18", "-0.00000000000000000519214"); + tup_test_string ("1.4", "-1.4"); + tup_test_string ("1.27", "-1.27"); + tup_test_string ("7.83822e-12", "-0.00000000000783822"); + tup_test_string ("1", "-1"); + tup_test_string ("4.4", "4.4"); + tup_test_string ("7.37382e-12", "0.00000000000737382"); + tup_test_string ("13.618", "13.618"); + tup_test_string ("1.03", "-1.03"); + tup_test_string ("3.7457e-13", "0.00000000000037457"); + tup_test_string ("5.2", "-5.2"); + tup_test_string ("3.5", "3.5"); + tup_test_string ("364", "-364"); + tup_test_string ("7.336", "7.336"); + tup_test_string ("1.1447e-16", "-0.00000000000000011447"); + tup_test_string ("510.63", "-510.63"); + tup_test_string ("5.8", "5.8"); + tup_test_string ("7.8", "7.8"); + tup_test_string ("2.96", "-2.96"); + tup_test_string ("15.64", "-15.64"); + tup_test_string ("187863", "-187863"); + tup_test_string ("2.73", "-2.73"); + tup_test_string ("2.671", "-2.671"); + tup_test_string ("18.179", "-18.179"); + tup_test_string ("855885", "855885"); + tup_test_string ("4.16", "4.16"); + tup_test_string ("5.722e-18", "0.000000000000000005722"); + tup_test_string ("67.62", "67.62"); + tup_test_string ("813.31", "813.31"); + tup_test_string ("40.2", "40.20"); + tup_test_string ("0.00002515", "0.00002515"); + tup_test_string ("0.0196", "0.01960"); + tup_test_string ("13.165", "13.165"); + tup_test_string ("6.743", "-6.743"); + tup_test_string ("1", "-1"); + tup_test_string ("200.56", "-200.56"); + tup_test_string ("1.932", "1.932"); + tup_test_string ("92.9", "92.90"); + tup_test_string ("16.74", "16.74"); + tup_test_string ("4.5554e-7", "-0.00000045554"); + tup_test_string ("2.1296e-15", "-0.0000000000000021296"); + tup_test_string ("2.088", "2.088"); + tup_test_string ("2577", "2577"); + tup_test_string ("45.4", "-45.4"); + tup_test_string ("41.3", "-41.3"); + tup_test_string ("3.63", "-3.63"); + tup_test_string ("1.09", "-1.09"); + tup_test_string ("1", "-1"); + tup_test_string ("3.7", "-3.7"); + tup_test_string ("204.54", "204.54"); + tup_test_string ("235.6", "235.6"); + tup_test_string ("384", "-384"); + tup_test_string ("0.0207", "0.02070"); + tup_test_string ("680", "680"); + tup_test_string ("1.09", "1.09"); + tup_test_string ("109.2", "109.2"); + tup_test_string ("0.00010117", "0.00010117"); + tup_test_string ("13.81", "13.81"); + tup_test_string ("192.3", "192.3"); + tup_test_string ("1", "-1"); + tup_test_string ("1.2", "1.2"); + tup_test_string ("4.1", "-4.1"); + tup_test_string ("2.5", "2.5"); + tup_test_string ("8.4076", "-8.4076"); + tup_test_string ("0.0517", "0.0517"); + tup_test_string ("6.3923", "-6.3923"); + tup_test_string ("506.179", "-506.179"); + tup_test_string ("375886", "375886"); + tup_test_string ("618858", "-618858"); + tup_test_string ("8.5e-11", "0.000000000085"); + tup_test_string ("6", "-6.0"); + tup_test_string ("2.4", "2.40"); + tup_test_string ("0.0000013", "-0.0000013"); + tup_test_string ("1.064", "-1.064"); + tup_test_string ("1", "-1"); + tup_test_string ("4", "-4"); + tup_test_string ("4.5", "-4.5"); + tup_test_string ("93.6206", "93.6206"); + tup_test_string ("3.07e-18", "0.00000000000000000307"); + + tup_test_string ("52.452468128", "-5.2452468128e+1"); + tup_test_string ("14152590525718936.5008396", "1.41525905257189365008396e+16"); + tup_test_string ("274306808392.8", "2.743068083928e+11"); + tup_test_string ("1.52993064722314247378724599e+26", "-1.52993064722314247378724599e+26"); + tup_test_string ("37205576746", "3.7205576746e+10"); + tup_test_string ("868099644460934347.2665", "8.680996444609343472665e+17"); + tup_test_string ("1254.549", "1.254549e+3"); + tup_test_string ("6.23417196172381875892300762819e-18", "6.23417196172381875892300762819e-18"); + tup_test_string ("13117994082191928443.1", "1.31179940821919284431e+19"); + tup_test_string ("97697726.168", "9.7697726168e+7"); + tup_test_string ("2.663e-10", "-2.663e-10"); + tup_test_string ("1052", "1.052e+3"); + tup_test_string ("3.815873266712e-20", "-3.815873266712e-20"); + tup_test_string ("18", "1.8e+1"); + tup_test_string ("1.033525906631680944018544811261e-13", "1.033525906631680944018544811261e-13"); + tup_test_string ("3.805493087068952925e-11", "-3.805493087068952925e-11"); + tup_test_string ("0.0173948", "1.73948e-2"); + tup_test_string ("5.784e-15", "5.784e-15"); + tup_test_string ("4.448338479762497e-8", "4.448338479762497e-8"); + tup_test_string ("390080230.52", "3.9008023052e+8"); + tup_test_string ("3", "3e+0"); + tup_test_string ("8.61435e-9", "8.61435e-9"); + tup_test_string ("43.7", "-4.37e+1"); + tup_test_string ("8.4034159379836e-18", "-8.4034159379836e-18"); + tup_test_string ("20028573.55721079885824481", "2.002857355721079885824481e+7"); + tup_test_string ("7000871.862", "-7.000871862e+6"); + ) diff --git a/drafts/bs-big/__tests__/cmp_test.ml b/drafts/bs-big/__tests__/cmp_test.ml new file mode 100644 index 0000000..bdbed0d --- /dev/null +++ b/drafts/bs-big/__tests__/cmp_test.ml @@ -0,0 +1,4120 @@ +open Jest + + +let () = + describe "Expect" (fun () -> + let open Expect in + let eq_tup_test = + let count = ref 0 in + fun (exp, v) -> + count := !count + 1; + test ("cmp_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp ) in + + Big.setDP 20; + Big.setRM 1; + + let n = Big.fromInt 1 in + eq_tup_test (true, n |. Big.eq n); + eq_tup_test (true, n |. Big.eq (Big.fromInt 1)); + eq_tup_test (true, n |. Big.eq (Big.fromString "1.0")); + eq_tup_test (true, n |. Big.eq (Big.fromString "1.000000")); + eq_tup_test (true, n |. Big.gt (Big.fromFloat 0.99999)); + eq_tup_test (false, n |. Big.gte (Big.fromFloat 1.1)); + eq_tup_test (true, n |. Big.lt (Big.fromFloat 1.001)); + eq_tup_test (true, n |. Big.lte (Big.fromInt 2)); + + let n = Big.fromString "-0.1" in + eq_tup_test (false, n |. Big.eq (Big.fromFloat (0.1))); + eq_tup_test (false, n |. Big.gt (Big.fromFloat (-0.1))); + eq_tup_test (true, n |. Big.gte (Big.fromInt (-1))); + eq_tup_test (true, n |. Big.lt (Big.fromFloat (-0.01))); + eq_tup_test (false, n |. Big.lte (Big.fromInt (-1))); + + let n = Big.fromString ("0.0000000") in + eq_tup_test (true, n |. Big.eq (Big.fromInt (-0))); + eq_tup_test (true, n |. Big.gt (Big.fromFloat (-.0.000001))); + eq_tup_test (false, n |. Big.gte (Big.fromFloat (0.1))); + eq_tup_test (true, n |. Big.lt (Big.fromFloat (0.0001))); + eq_tup_test (true, n |. Big.lte (Big.fromInt (-0))); + + + let n = Big.fromInt (-0) in + eq_tup_test (true, n |. Big.eq (Big.fromString ("0.000"))); + eq_tup_test (true, n |. Big.gt (Big.fromInt (-1))); + eq_tup_test (false, n |. Big.gte (Big.fromFloat (0.1))); + eq_tup_test (false, n |. Big.lt (Big.fromInt (0))); + eq_tup_test (true, n |. Big.lt (Big.fromFloat (0.1))); + eq_tup_test (true, n |. Big.lte (Big.fromInt (0))); + + let n = Big.fromString ("-1.234e+2") in + eq_tup_test (true, n |. Big.eq (Big.fromFloat (-123.4))); + eq_tup_test (true, n |. Big.gte (Big.fromString ("-1.234e+3"))); + eq_tup_test (true, n |. Big.lt (Big.fromFloat (-123.39999))); + eq_tup_test (true, n |. Big.lte (Big.fromString ("-123.4e+0"))); + + let n = Big.fromString("5e-200") in + eq_tup_test (true, n |. Big.eq (Big.fromFloat (5e-200))); + eq_tup_test (true, n |. Big.gt (Big.fromFloat (5e-201))); + eq_tup_test (false, n |. Big.gte (Big.fromInt (1))); + eq_tup_test (true, n |. Big.lt (Big.fromFloat (6e-200))); + eq_tup_test (true, n |. Big.lte (Big.fromFloat (5.1e-200))); + + let n = Big.fromString ("1") in + eq_tup_test (true, n |. Big.eq n); + eq_tup_test (true, n |. Big.eq (n |> Big.toString |> Big.fromString)); + eq_tup_test (true, n |. Big.eq (Big.fromString (n |. Big.valueOf))); + eq_tup_test (true, n |. Big.eq (Big.fromString (n |. Big.toFixed ()))); + eq_tup_test (true, n |. Big.eq (Big.fromInt (1))); + eq_tup_test (true, n |. Big.eq (Big.fromString ("1e+0"))); + eq_tup_test (false, n |. Big.eq (Big.fromInt (-1))); + eq_tup_test (false, n |. Big.eq (Big.fromFloat (0.1))); + + eq_tup_test (false, Big.fromFloat (0.1) |. Big.eq (Big.fromInt 0)); + eq_tup_test (false, Big.fromFloat (1e9 +. 1.) |. Big.eq (Big.fromFloat 1e9)); + eq_tup_test (false, Big.fromFloat (1e9 -. 1.) |. Big.eq (Big.fromFloat (1e9))); + eq_tup_test (true, Big.fromFloat (1e9 +. 1.) |. Big.eq (Big.fromFloat (1e9 +. 1.))); + eq_tup_test (true, Big.fromInt (1) |. Big.eq (Big.fromInt (1))); + eq_tup_test (false, Big.fromInt (1) |. Big.eq (Big.fromInt (-1))); + + eq_tup_test (false, Big.fromFloat (1.23001e-2) |. Big.lt (Big.fromFloat (1.23e-2))); + eq_tup_test (true, Big.fromFloat (1.23e-2) |. Big.lt (Big.fromFloat (1.23001e-2))); + eq_tup_test (false, Big.fromFloat (1e-2) |. Big.lt (Big.fromFloat (9.999999e-3))); + eq_tup_test (true, Big.fromFloat (9.999999e-3) |. Big.lt (Big.fromFloat (1e-2))); + eq_tup_test (false, Big.fromFloat (1.23001e+2) |. Big.lt (Big.fromFloat (1.23e+2))); + eq_tup_test (true, Big.fromFloat (1.23e+2) |. Big.lt (Big.fromFloat (1.23001e+2))); + eq_tup_test (true, Big.fromFloat (9.999999e+2) |. Big.lt (Big.fromFloat (1e+3))); + eq_tup_test (false, Big.fromFloat (1e+3) |. Big.lt (Big.fromFloat (9.9999999e+2))); + + eq_tup_test (false, Big.fromFloat (1.23001e-2) |. Big.lte (Big.fromFloat (1.23e-2))); + eq_tup_test (true, Big.fromFloat (1.23e-2) |. Big.lte (Big.fromFloat (1.23001e-2))); + eq_tup_test (false, Big.fromFloat (1e-2) |. Big.lte (Big.fromFloat (9.999999e-3))); + eq_tup_test (true, Big.fromFloat (9.999999e-3) |. Big.lte (Big.fromFloat (1e-2))); + + eq_tup_test (false, Big.fromFloat (1.23001e+2) |. Big.lte (Big.fromFloat (1.23e+2))); + eq_tup_test (true, Big.fromFloat (1.23e+2) |. Big.lte (Big.fromFloat (1.23001e+2))); + eq_tup_test (true, Big.fromFloat (9.999999e+2) |. Big.lte (Big.fromFloat (1e+3))); + eq_tup_test (false, Big.fromFloat (1e+3) |. Big.lte (Big.fromFloat (9.9999999e+2))); + + eq_tup_test (true, Big.fromFloat (1.23001e-2) |. Big.gt (Big.fromFloat (1.23e-2))); + eq_tup_test (false, Big.fromFloat (1.23e-2) |. Big.gt (Big.fromFloat (1.23001e-2))); + eq_tup_test (true, Big.fromFloat (1e-2) |. Big.gt (Big.fromFloat (9.999999e-3))); + eq_tup_test (false, Big.fromFloat (9.999999e-3) |. Big.gt (Big.fromFloat (1e-2))); + + eq_tup_test (true, Big.fromFloat (1.23001e+2) |. Big.gt (Big.fromFloat (1.23e+2))); + eq_tup_test (false, Big.fromFloat (1.23e+2) |. Big.gt (Big.fromFloat (1.23001e+2))); + eq_tup_test (false, Big.fromFloat (9.999999e+2) |. Big.gt (Big.fromFloat (1e+3))); + eq_tup_test (true, Big.fromFloat (1e+3) |. Big.gt (Big.fromFloat (9.9999999e+2))); + + eq_tup_test (true, Big.fromFloat (1.23001e-2) |. Big.gte (Big.fromFloat (1.23e-2))); + eq_tup_test (false, Big.fromFloat (1.23e-2) |. Big.gte (Big.fromFloat (1.23001e-2))); + eq_tup_test (true, Big.fromFloat (1e-2) |. Big.gte (Big.fromFloat (9.999999e-3))); + eq_tup_test (false, Big.fromFloat (9.999999e-3) |. Big.gte (Big.fromFloat (1e-2))); + + eq_tup_test (true, Big.fromFloat (1.23001e+2) |. Big.gte (Big.fromFloat (1.23e+2))); + eq_tup_test (false, Big.fromFloat (1.23e+2) |. Big.gte (Big.fromFloat (1.23001e+2))); + eq_tup_test (false, Big.fromFloat (9.999999e+2) |. Big.gte (Big.fromFloat (1e+3))); + eq_tup_test (true, Big.fromFloat (1e+3) |. Big.gte (Big.fromFloat (9.9999999e+2))); + + let cmp_test = + let count = ref 0 in + fun f (a, b, exp) -> + count:= !count + 1; + let name = ("cmp_test" ^ string_of_int !count) in + test name (fun () -> expect (f a b) |> toBe exp); + in + let bool_test = + let count = ref 0 in + fun f (a, b, exp) -> + count:= !count + 1; + let name = ("cmp_test_aux" ^ string_of_int !count) in + test name (fun () -> expect (f a b) |> toBe exp); + in + let all_test (a, b, exp) = + let a,b = Big.fromString a, Big.fromString b in + cmp_test Big.cmp (a, b, exp); + match exp with + | 1 -> begin + bool_test Big.gt (a, b, true); + bool_test Big.gte (a, b, true); + bool_test Big.eq (a, b, false); + bool_test Big.lt (a, b, false); + bool_test Big.lte (a, b, false); + end + | -1 -> begin + bool_test Big.gt (a, b, false); + bool_test Big.gte (a, b, false); + bool_test Big.eq (a, b, false); + bool_test Big.lt (a, b, true); + bool_test Big.lte (a, b, true); + end + | 0 -> begin + bool_test Big.gt (a, b, false); + bool_test Big.gte (a, b, true); + bool_test Big.eq (a, b, true); + bool_test Big.lt (a, b, false); + bool_test Big.lte (a, b, true); + end + | _ -> () + in + all_test ("1", "0", 1); + all_test ("1", "-0", 1); + all_test ("-1", "0", -1); + all_test ("-1", "-0", -1); + all_test ("0", "1", -1); + all_test ("0", "-1", 1); + all_test ("-0", "1", -1); + all_test ("-0", "-1", 1); + all_test ("0", "0.1", -1); + all_test ("0", "-0.1", 1); + all_test ("-0", "0.1", -1); + all_test ("-0", "-0.1", 1); + all_test ("0.1", "0", 1); + all_test ("0.1", "-0", 1); + all_test ("-0.1", "0", -1); + all_test ("-0.1", "-0", -1); + all_test ("0", "0.000000009", -1); + all_test ("0", "-0.000000009", 1); + all_test ("-0", "0.000000009", -1); + all_test ("-0", "-0.000000009", 1); + all_test ("0.000000009", "0", 1); + all_test ("0.000000009", "-0", 1); + all_test ("-0.000000009", "0", -1); + all_test ("-0.000000009", "-0", -1); + all_test ("0", "5.5", -1); + all_test ("0", "-5.5", 1); + all_test ("-0", "5.5", -1); + all_test ("-0", "-5.5", 1); + all_test ("5.5", "0", 1); + all_test ("5.5", "-0", 1); + all_test ("-5.5", "0", -1); + all_test ("-5.5", "-0", -1); + all_test ("1", "0", 1); + all_test ("1", "1", 0); + all_test ("1", "-45", 1); + all_test ("1", "22", -1); + all_test ("1", "0144", -1); + all_test ("1", "0144", -1); + all_test ("1", "6.1915", -1); + all_test ("1", "-1.02", 1); + all_test ("1", "0.09", 1); + all_test ("1", "-0.0001", 1); + all_test ("1", "8e5", -1); + all_test ("1", "9E12", -1); + all_test ("1", "1e-14", 1); + all_test ("1", "3.345E-9", 1); + all_test ("1", "-345.43e+4", 1); + all_test ("1", "-94.12E+0", 1); + all_test ("0", "0", 0); + all_test ("0", "0", 0); + all_test ("3", "-0", 1); + all_test ("9.654", "0", 1); + all_test ("0", "111.1111111110000", -1); + all_test ("-1", "1", -1); + all_test ("-0.01", "0.01", -1); + all_test ("54", "-54", 1); + all_test ("9.99", "-9.99", 1); + all_test ("0.0000023432495704937", "-0.0000023432495704937", 1); + all_test ("100", "100", 0); + all_test ("-999.99", "0.01", -1); + all_test ("10", "4", 1); + all_test ("03.333", "-4", 1); + all_test ("-1", "-0.1", -1); + all_test ("43534.5435", "0.054645", 1); + all_test ("99999", "1", 1); + all_test ("3e0", "4", -1); + + all_test ("0.04", "0.079393068", -1); + all_test ("0.023", "0.04840192819", -1); + all_test ("0.021879", "0.02", 1); + + all_test ("0", "-7502", 1); + all_test ("-1", "-0.000000000000000000295176", -1); + all_test ("2.9", "3.23360", -1); + all_test ("1.14", "4289", -1); + all_test ("-3", "0", -1); + all_test ("0.00000000000000551", "-3958.43", 1); + all_test ("-13", "0", -1); + all_test ("-23.382", "-16.1", -1); + all_test ("-176.85", "0", -1); + all_test ("1.38497", "-0.0000000561", 1); + all_test ("3.90", "18.124", -1); + all_test ("-239.52", "-0.00000000000066862", -1); + all_test ("5.7", "2248.28", -1); + all_test ("-0.00000000012", "0", -1); + all_test ("29", "-5", 1); + all_test ("0", "-54", 1); + all_test ("3", "-1.1", 1); + all_test ("-461.9", "-13803", 1); + all_test ("-1", "0.00054428", -1); + all_test ("-0.000000000000000683", "7", -1); + all_test ("2", "1", 1); + all_test ("118.608", "-4.8", 1); + all_test ("3", "0", 1); + all_test ("83.5", "44.9", 1); + all_test ("-3", "-2.86", -1); + all_test ("1138.06", "47.08", 1); + all_test ("-2.3", "3", -1); + all_test ("-848", "0", -1); + all_test ("5", "2", 1); + all_test ("11.3", "-176.3", 1); + all_test ("-302142", "3.8", -1); + all_test ("-9", "-38", 1); + all_test ("0", "-1", 1); + all_test ("6161", "-3", 1); + all_test ("8", "0", 1); + all_test ("-1334", "-14", -1); + all_test ("3.593", "0.000000000000059975", 1); + all_test ("0.0000000000000000847", "-1186.11", 1); + all_test ("4.62", "14.47", -1); + all_test ("0", "-319", 1); + all_test ("23168", "8.3485", 1); + all_test ("-16", "-1.6", -1); + all_test ("64.3", "2108.4", -1); + all_test ("4", "-1", 1); + all_test ("-0.50346", "-319.6", 1); + all_test ("10910.0", "-0.00000000000000000314208", 1); + all_test ("1", "0", 1); + all_test ("-0.0000000000000552", "0.00000000015", -1); + all_test ("0", "16", -1); + all_test ("38.4", "35.83", 1); + all_test ("-1.1", "-0.000002850", -1); + all_test ("0.000000000000011", "1.2", -1); + all_test ("-50.66", "2.2", -1); + all_test ("-1187", "5", -1); + all_test ("174", "-1.8175", 1); + all_test ("651.1", "-11.332", 1); + all_test ("-1", "-0.000000000000000011", -1); + all_test ("7156", "4.84", 1); + all_test ("1", "3", -1); + all_test ("0", "77487", -1); + all_test ("51.7181", "17", 1); + all_test ("13.132", "0.000000000000029446", 1); + all_test ("5.4", "0.000000000000000006325", 1); + all_test ("4.1", "-2.42", 1); + all_test ("-5.2", "-44.1", 1); + all_test ("-6", "15.018", -1); + all_test ("-27.949", "-1170.9", 1); + all_test ("0", "0.0000000000000000120", -1); + all_test ("-3.7", "-52.1", 1); + all_test ("-17.43", "0", -1); + all_test ("-1.4", "-11737", 1); + all_test ("-7.17", "615.40", -1); + all_test ("-1", "-0.000000000000000389", -1); + all_test ("0", "-11.7", 1); + all_test ("0", "-0.0000039894", 1); + all_test ("-14.15", "-0.0000011139", -1); + all_test ("-16260", "-3.97", -1); + all_test ("-0.00000066", "-1.3", 1); + all_test ("-818", "0", -1); + all_test ("-3", "-30020.5", 1); + all_test ("-3.328", "-28.16", 1); + all_test ("-74", "2", -1); + all_test ("-30332", "-1.61", -1); + all_test ("-0.00000000000000494", "0", -1); + all_test ("-2.1", "11.6037", -1); + all_test ("-0.0000000000000013762", "-5273", 1); + all_test ("-0.00000000000000000002353", "1188", -1); + all_test ("-0.00000000000000033619", "-4", 1); + all_test ("3.2", "-597.81", 1); + all_test ("14265", "0", 1); + all_test ("-18.8703", "1", -1); + all_test ("-4.5", "-146.5", 1); + all_test ("-259.7", "0", -1); + all_test ("-72.57", "4.3", -1); + all_test ("0.0000015", "9.06", -1); + all_test ("490815", "0.0000000000000000000385", 1); + all_test ("0.614", "-0.000000000000000001154", 1); + all_test ("1.2", "0", 1); + all_test ("-1.8", "-436269", 1); + all_test ("0", "-7", 1); + all_test ("-3.18290", "-453.85", 1); + all_test ("5.645", "1", 1); + all_test ("8.426", "1.0", 1); + all_test ("-6702", "-0.000003053", -1); + all_test ("0", "-0.0000000472", 1); + all_test ("-13.789", "0.12167", -1); + all_test ("0", "-22472", 1); + all_test ("769.0", "0.00000019970", 1); + all_test ("0", "-145.1", 1); + all_test ("-307", "-1", -1); + all_test ("1", "-0.000015", 1); + all_test ("3", "-4", 1); + all_test ("7", "3.791", 1); + all_test ("-0.0000000000000021", "0.00000414", -1); + all_test ("203.0", "-14124", 1); + all_test ("-1", "8.4", -1); + all_test ("-0.000301", "-3665.9", 1); + all_test ("2212", "120841", -1); + all_test ("-10.4", "1.90210", -1); + all_test ("-4.709", "-3.2", -1); + all_test ("-0.00000000000062", "-2.20513", 1); + all_test ("3", "-41230", 1); + all_test ("-0.00000000931", "-348.5", 1); + all_test ("4.50", "0", 1); + all_test ("0", "104894", -1); + all_test ("0.00000072", "0", 1); + all_test ("-1", "-73.214", 1); + all_test ("9", "-1.898", 1); + all_test ("1", "-1", 1); + all_test ("0", "3.99", -1); + all_test ("-2", "0.0486", -1); + all_test ("-4", "-0.00268", -1); + all_test ("0.0000000000791", "-4.97", 1); + all_test ("-13795", "3", -1); + all_test ("-13.197", "0", -1); + all_test ("0", "-4.7", 1); + all_test ("0", "0", 0); + all_test ("3.7", "0", 1); + all_test ("10.3925", "7.312", 1); + all_test ("2.263", "7.388", -1); + all_test ("-6.0", "-2", -1); + all_test ("1", "-1", 1); + all_test ("1.987", "32454", -1); + all_test ("-0.361", "-200.6", 1); + all_test ("5.0", "-7", 1); + all_test ("-6.2", "-0.0056", -1); + all_test ("-3.8", "1", -1); + all_test ("-9.3", "-7.64", -1); + all_test ("38364", "-127.311", 1); + all_test ("-1.6", "-3.06", 1); + all_test ("1", "-2", 1); + all_test ("3.952", "5", -1); + all_test ("566", "125.359", 1); + all_test ("1078.97", "496", 1); + all_test ("0.000000000097586", "-0.000000000000000000027457", 1); + all_test ("-37.5", "-28572", 1); + all_test ("412", "-0.0000000000000001572", 1); + all_test ("0.00000024221", "-35.8881", 1); + all_test ("25.8", "0.0000000000000000000242", 1); + all_test ("0.30", "0", 1); + all_test ("-26.440", "-3.64", -1); + all_test ("1.15", "-3229", 1); + all_test ("-137.1", "2", -1); + all_test ("0.00000000077", "53558", -1); + all_test ("0", "2.6", -1); + all_test ("-3", "-6", 1); + all_test ("-0.0000000000000000139", "-0.0005289", 1); + all_test ("-0.00000000000000000697", "-1.309", 1); + all_test ("-0.0000045", "-8.3", 1); + all_test ("-2", "-1.3", -1); + all_test ("-1.42209", "-1.74", 1); + all_test ("-608.88", "25.3", -1); + all_test ("0", "-1", 1); + all_test ("5.6", "-4", 1); + all_test ("7.17", "-4", 1); + all_test ("56.6", "8218.4", -1); + all_test ("68.33", "0", 1); + all_test ("5.0", "1", 1); + all_test ("32.734", "-9", 1); + all_test ("0", "20837.0", -1); + all_test ("-0.0000000000000000013950", "-3364.72", 1); + all_test ("3.66", "-0.0000000000000000536", 1); + all_test ("-1471.14", "6", -1); + all_test ("0", "-0.0000013", 1); + all_test ("1", "-5", 1); + all_test ("-10449.8", "-58.424", -1); + all_test ("0", "0.0000000000000000017122", -1); + all_test ("0.000000000000026585", "4.1", -1); + all_test ("-7", "0.00000000000000000920", -1); + all_test ("0.00000000489", "0.00000000000000000036325", 1); + all_test ("0", "104674", -1); + all_test ("-1.30063", "0.000000004051", -1); + all_test ("0", "2", -1); + all_test ("-3", "0.00150", -1); + all_test ("-407.95", "495.290", -1); + all_test ("24533.8", "-2539", 1); + all_test ("1", "0", 1); + all_test ("-43.4", "0", -1); + all_test ("-1399", "16.89", -1); + all_test ("-232480", "0", -1); + all_test ("3", "-1", 1); + all_test ("6.2", "12.2", -1); + all_test ("-23.38", "0.0853", -1); + all_test ("-18.2", "1", -1); + all_test ("0.002118", "-16.9821", 1); + all_test ("8819.2", "28.744", 1); + all_test ("-2", "-5", 1); + all_test ("-2.10", "9.2620", -1); + all_test ("0", "-5", 1); + all_test ("23963.9", "0", 1); + all_test ("-0.00000045", "0", -1); + all_test ("2", "2", 0); + all_test ("-3.444", "3", -1); + all_test ("0.0000016140", "1.5132", -1); + all_test ("0", "-1", 1); + all_test ("-1", "-7", 1); + all_test ("1", "-869.7", 1); + all_test ("0.000000000000016", "-1609.8", 1); + all_test ("651.3", "2.923", 1); + all_test ("270.901", "5.2", 1); + all_test ("0", "-2.6", 1); + all_test ("0.000000000020617", "0.0000000096018", -1); + all_test ("4.32", "-7", 1); + all_test ("-1.5", "-23.7", 1); + all_test ("1.2497", "-58.42", 1); + all_test ("-6.4", "2.24", -1); + all_test ("0", "1002.3", -1); + all_test ("265.64", "26.7", 1); + all_test ("387.4", "757.85", -1); + all_test ("0", "6.525", -1); + all_test ("1120.24", "-0.000000000000000000232098", 1); + all_test ("67.22", "0", 1); + all_test ("67", "-3.1", 1); + all_test ("0", "0", 0); + all_test ("-1.01", "0.00059917", -1); + all_test ("-0.000000000000091884", "2.7", -1); + all_test ("171", "4", 1); + all_test ("0", "-367347", 1); + all_test ("95.1", "-0.000000114267", 1); + all_test ("0", "0", 0); + all_test ("62.4", "-5", 1); + all_test ("11627.8", "9.844", 1); + all_test ("-1", "2.33", -1); + all_test ("-14", "0", -1); + all_test ("-55", "7", -1); + all_test ("-22.460", "872.15", -1); + all_test ("-0.00000000027029", "2.05", -1); + all_test ("-0.0000000000000004846", "17.73", -1); + all_test ("3.6", "0", 1); + all_test ("-3.233", "0", -1); + all_test ("-3.878", "-383", 1); + all_test ("-0.0000000000174", "20.7", -1); + all_test ("0.0000000000000000000126", "-2.229", 1); + all_test ("-2.307", "14.8000", -1); + all_test ("-563.79", "0.000000000000000069934", -1); + all_test ("-315.71", "-0.00832", -1); + all_test ("7", "0", 1); + all_test ("188.9", "-2.883", 1); + all_test ("0", "14.5720", -1); + all_test ("2", "5389.3", -1); + all_test ("-2413.1", "-28", -1); + all_test ("0", "0", 0); + all_test ("0", "-98.587", 1); + all_test ("3", "0", 1); + all_test ("17930.7", "1880.31", 1); + all_test ("-1", "-0.00000000000000000272", -1); + all_test ("0.00000000000000000002288", "51.0841", -1); + all_test ("-1.004", "-14799", 1); + all_test ("-0.0024973", "-6", 1); + all_test ("-0.00000000000054", "6", -1); + all_test ("0.0009288", "-5.2", 1); + all_test ("-45.4", "-0.000042102", -1); + all_test ("-56.1", "1793.86", -1); + all_test ("-68.425", "0.0000000000000068415", -1); + all_test ("-2.20", "0", -1); + all_test ("136.51", "0", 1); + all_test ("-5.9773", "45", -1); + all_test ("-6996", "60.60", -1); + all_test ("0.00000000773", "-2.6", 1); + all_test ("-3827", "-42.150", -1); + all_test ("-4", "3277", -1); + all_test ("0.0000000000000201", "-0.00000000000000094", 1); + all_test ("7497.2", "-45738", 1); + all_test ("5.20", "2", 1); + all_test ("139673", "0.000013", 1); + all_test ("258285", "0.00000000000338", 1); + all_test ("20.6", "0", 1); + all_test ("5", "45.3", -1); + all_test ("0", "0.00000000000000000010937", -1); + all_test ("2", "-392.465", 1); + all_test ("0", "5.7", -1); + all_test ("-4.3", "-128.0", 1); + all_test ("-9.94", "10.6", -1); + all_test ("10.524", "-4.1", 1); + all_test ("4.3713", "-5.6", 1); + all_test ("-4.1", "6.2", -1); + all_test ("-95", "-0.0000000000000000000622", -1); + all_test ("-2113", "1253.8", -1); + all_test ("406.95", "-2548", 1); + all_test ("978", "771", 1); + all_test ("-4776.4", "-911.1", -1); + all_test ("1.039", "0", 1); + all_test ("-4", "0", -1); + all_test ("-1.06798", "0", -1); + all_test ("-5.2", "-1.0827", -1); + all_test ("1", "2", -1); + all_test ("0.5638", "0.0000000000000000000866", 1); + all_test ("7.3", "-9.5", 1); + all_test ("-2", "61406", -1); + all_test ("1.4", "6.60", -1); + all_test ("-3", "-1.4", -1); + all_test ("0", "9.825", -1); + all_test ("-0.000000000335941", "2912.92", -1); + all_test ("-557.81", "-64.4", -1); + all_test ("3", "0.000013480", 1); + all_test ("-25.4", "-163.15", 1); + all_test ("-151.0", "7", -1); + all_test ("-219.2", "272", -1); + all_test ("0", "-0.00000000000000000020763", 1); + all_test ("-1363.0", "294.3", -1); + all_test ("0.00000000000000000003537", "-3.62", 1); + all_test ("-0.00000017", "436.44", -1); + all_test ("1.6079", "-9.56", 1); + all_test ("76.1", "0.000067", 1); + all_test ("-1.68", "0.0000024", -1); + all_test ("0.0000000000000031", "-2.9629", 1); + all_test ("-1603", "228.1", -1); + all_test ("-51.66", "2.6", -1); + all_test ("0.0000000000000208093", "1", -1); + all_test ("-11215", "23.963", -1); + all_test ("29.34", "-39.5", 1); + all_test ("7", "0.00000000000000718", 1); + all_test ("-44.309", "4", -1); + all_test ("-11871.9", "-6.11", -1); + all_test ("8", "-5.3", 1); + all_test ("-1", "-0.0002202", -1); + all_test ("3416.2", "0", 1); + all_test ("-245.2", "-1.15", -1); + all_test ("-1.70169", "-4.73", 1); + all_test ("0", "1.1", -1); + all_test ("7715.4", "468500", -1); + all_test ("-0.00044", "2", -1); + all_test ("-1.8", "1.1", -1); + all_test ("-13.575", "-2.58", -1); + all_test ("-6", "-0.000000000000000044077", -1); + all_test ("35.2", "2", 1); + all_test ("0", "-5.43", 1); + all_test ("-2", "-629.9", 1); + all_test ("260.5", "-2394.9", 1); + all_test ("-110.50", "0", -1); + all_test ("-97.17", "2.6", -1); + all_test ("4.0764", "-71.47", 1); + all_test ("-0.000000000000016", "0.000000000000000000785", -1); + all_test ("1.5348", "0.018", 1); + all_test ("-2.2", "5229.1", -1); + all_test ("0.000000129738", "60", -1); + all_test ("14550.4", "-5092.49", 1); + all_test ("-134380", "3.51", -1); + all_test ("1.390", "1", 1); + all_test ("-0.000000044", "17.1", -1); + all_test ("34.398", "1", 1); + all_test ("-177.5", "0", -1); + all_test ("-5.3", "3.326", -1); + all_test ("-1.75", "-1938.43", 1); + all_test ("1", "-32.9851", 1); + all_test ("0.01082", "0.0000000000000000001008", 1); + all_test ("197.469", "-143177", 1); + all_test ("-61.5", "-11.6803", -1); + all_test ("7", "0", 1); + all_test ("43.44", "3", 1); + all_test ("-6.8", "-0.0000000000000000015", -1); + all_test ("0.0000005371", "0.000000000002723", 1); + all_test ("943", "49.02", 1); + all_test ("1", "-45.09", 1); + all_test ("0", "-55.76", 1); + all_test ("-760.2", "0.000000103078", -1); + all_test ("1", "-1861", 1); + all_test ("-2531.7", "-185.95", -1); + all_test ("1.2", "0", 1); + all_test ("6.4", "3", 1); + all_test ("0", "9", -1); + all_test ("-122", "43.423", -1); + all_test ("-3.91", "1", -1); + all_test ("1.4", "-1", 1); + all_test ("-8.51", "-3", -1); + all_test ("360.56", "56.278", 1); + all_test ("0", "0", 0); + all_test ("-2", "-0.000000000000007301", -1); + all_test ("-1.4", "6", -1); + all_test ("479.1", "-838", 1); + all_test ("-32.6", "3.8", -1); + all_test ("-0.0086188", "-4.6", 1); + all_test ("-8.2", "-0.0000414", -1); + all_test ("-5", "-0.1236", -1); + all_test ("-107", "-0.000000000000220", -1); + all_test ("-0.000000000000168", "-0.000000000000000089", -1); + all_test ("2", "1", 1); + all_test ("-0.0000000050600", "7", -1); + all_test ("1959.3", "5.1", 1); + all_test ("0.00008180", "16.364", -1); + all_test ("0", "1392.91", -1); + all_test ("-4.6", "1", -1); + all_test ("30.4", "-0.000000000000007179", 1); + all_test ("6.0", "8.90", -1); + all_test ("5", "0", 1); + all_test ("9", "9.05", -1); + all_test ("-0.00000029", "4846", -1); + all_test ("72", "-0.00000001422", 1); + all_test ("1.1613", "7", -1); + all_test ("-0.000000000000000409872", "35.6", -1); + all_test ("0.00000000000444", "-101.737", 1); + all_test ("0", "-2", 1); + all_test ("2.0", "1", 1); + all_test ("-1050", "-0.000000000323", -1); + all_test ("0", "20.06", -1); + all_test ("7.774", "-6.5", 1); + all_test ("71.84", "-6", 1); + all_test ("0.003160", "-1.42658", 1); + all_test ("0", "599.4", -1); + all_test ("-8.9", "127.37", -1); + all_test ("-5", "-16.295", 1); + all_test ("2.76521", "1.28", 1); + all_test ("-31601", "-1", -1); + all_test ("0", "1.69958", -1); + all_test ("76.4", "-0.00000000000000000011", 1); + all_test ("-228.0", "0", -1); + all_test ("4.39", "0.000015545", 1); + all_test ("0.391", "-164.55", 1); + all_test ("4.93", "41.50", -1); + all_test ("572.3", "431.86", 1); + all_test ("-1.21162", "-143876", 1); + all_test ("-0.0000000000002463", "-2", 1); + all_test ("-5", "84.4", -1); + all_test ("-1.3", "-5.06492", 1); + all_test ("-0.0000000000002969", "-1", 1); + all_test ("479.758", "0", 1); + all_test ("39.80", "0.003823", 1); + all_test ("1", "3", -1); + all_test ("0.000000000000670", "0", 1); + all_test ("-16", "-10963", 1); + all_test ("3", "-102.5", 1); + all_test ("-0.0000000000000000033174", "15.945", -1); + all_test ("18.14", "-1829.06", 1); + all_test ("10038", "0", 1); + all_test ("0", "-0.000000000000000000125", 1); + all_test ("353", "0.00000000000000017781", 1); + all_test ("-4.43154", "1165.4", -1); + all_test ("-501.963", "-83511", 1); + all_test ("0", "-7.0", 1); + all_test ("58578", "0.00000000000000000027", 1); + all_test ("135.2", "1", 1); + all_test ("-6.3", "10988", -1); + all_test ("2.6", "6.3", -1); + all_test ("-74", "67.08", -1); + all_test ("1", "-2.59572", 1); + all_test ("30.7", "17.0", 1); + all_test ("5", "-3262.2", 1); + all_test ("1", "-8.5", 1); + all_test ("-1", "-0.000000000000030694", -1); + all_test ("1", "-311", 1); + all_test ("1", "5.76", -1); + all_test ("1.9", "-15.55", 1); + all_test ("-2.5", "102.1", -1); + all_test ("-1", "-290.43", 1); + all_test ("-1.4", "0.00001613", -1); + all_test ("-0.00000114224", "44.99", -1); + all_test ("0.000000000000414", "7.3", -1); + all_test ("0.00000000000000079824", "0", 1); + all_test ("-856", "16.3", -1); + all_test ("0.000000003556", "1", -1); + all_test ("-1267", "-0.0024", -1); + all_test ("-3.30", "-6187", 1); + all_test ("-0.000000000000007860", "4", -1); + all_test ("0.000136", "-1.5", 1); + all_test ("-5", "0.00000035346", -1); + all_test ("0.0000025", "-3", 1); + all_test ("0.00000000000054261", "-12.2", 1); + all_test ("-0.00000039", "5", -1); + all_test ("-0.0000000000000248948", "2.22", -1); + all_test ("-12", "3.199", -1); + all_test ("-1424", "-14", -1); + all_test ("-30.99", "-2", -1); + all_test ("0", "2511", -1); + all_test ("0", "129.1", -1); + all_test ("-2", "-566.76", 1); + all_test ("2.51917", "-54", 1); + all_test ("-3100.0", "-6.4", -1); + all_test ("1358.86", "55.919", 1); + all_test ("0.54071", "4.66", -1); + all_test ("-14298.8", "3.4", -1); + all_test ("0.000000015", "40.9", -1); + all_test ("-1.781", "-580.96", 1); + all_test ("1", "296", -1); + all_test ("20.7", "-68.13", 1); + all_test ("915.0", "3", 1); + all_test ("-4794.2", "-1.5", -1); + all_test ("-2.9", "19401", -1); + all_test ("-1805", "-8.1", -1); + all_test ("0", "2608", -1); + all_test ("9.93", "1908.1", -1); + + all_test ("0", "0", 0); + all_test ("-0.00000000000004475220262613", "390046.9220288808", -1); + all_test ("-52", "-7", -1); + all_test ("-7137400653786386", "-1220454", -1); + all_test ("19.76074721670306", "39433637.5", -1); + all_test ("495810.901671347", "-201199464.42718987", 1); + all_test ("2180987378927.828", "28150984.022786039", 1); + all_test ("364.263", "1334", -1); + all_test ("-4.541827796913", "0.000000000720283699415669", -1); + all_test ("0.000000000000533031300116917190", "-733584.206", 1); + all_test ("-0.0000000000000019761199", "-6724.9979821490", 1); + all_test ("0.00000000012335234299864", "56.021423640836509", -1); + all_test ("17752.992435030", "513735.52129558557", -1); + all_test ("-341665592090.67519", "895755.23903", -1); + all_test ("-0.01174948256069749", "38841.427732372", -1); + all_test ("2067269955.10633", "-215483633", 1); + all_test ("58373", "-0.000000000000000208432238083784077", 1); + all_test ("2821.0921360930698", "-0.0019370832810573843", 1); + all_test ("-1", "-6987341307332550", 1); + all_test ("-0.000000000000000135940520450", "-7", 1); + all_test ("368879186519841.03", "3.86407044811851", 1); + all_test ("54.8552188726690", "-17618.8325331", 1); + all_test ("0.00000000719285162", "3.0", -1); + all_test ("-24541949382.5", "12000388993272705.7", -1); + all_test ("-0.00000000000000016019271145", "-5010014644.83398", 1); + all_test ("0.00000342615147619", "38.8937553143", -1); + all_test ("0.000000000000030", "698637", -1); + all_test ("-940562183996", "-9538.76857523965", -1); + all_test ("0.7992283723", "-301.642", 1); + all_test ("-943394092028892", "0.00000000000249028944", -1); + all_test ("0.0000000065", "19.8", -1); + all_test ("-0.00000024892", "1.081095088", -1); + all_test ("4693767.27", "0", 1); + all_test ("241.51552", "-0.000000000029998424146", 1); + all_test ("4.70", "-3889836.808618", 1); + all_test ("-31", "22.1677904", -1); + all_test ("-8", "0.0000000000000018564862859", -1); + all_test ("-2.82", "-0.1308117625", -1); + all_test ("-0.000000000000000490813322", "9628302045.4", -1); + all_test ("14", "-1", 1); + all_test ("-21665490839.0", "-308.104922674", -1); + all_test ("-5", "-6.6", 1); + all_test ("20.356245251", "-2629.4181", 1); + all_test ("-1.39", "24102492360.03791", -1); + all_test ("26.56", "-81.84491435616642", 1); + all_test ("12733804882", "3.16734", 1); + all_test ("0.0000000000001331522614064615", "-62.298429591", 1); + all_test ("4.5417", "-0.0000000000000000000906964635852953", 1); + all_test ("5.0", "3.99206", 1); + all_test ("28282932454425", "20112043684.32", 1); + all_test ("-119.144720881", "-129.74436439545", 1); + all_test ("740279.3975", "18685368847070828", -1); + all_test ("-194303.7", "0.000000000000006199756267389375", -1); + all_test ("0.000000000000000002405090", "-0.00000000979604845", 1); + all_test ("-0.0001603124275271", "0.000000006060544102736781", -1); + all_test ("-179.52", "-76.6", -1); + all_test ("9736.4996007851800", "99.6", 1); + all_test ("-0.0000000000000000000126060214789203821", "6748323899.81", -1); + all_test ("-0.0000076569074016550", "0.000000000525779058", -1); + all_test ("0.0000000000000000047090003506832525", "0.00000000000000011759", -1); + all_test ("-286334697213252", "8557782748357", -1); + all_test ("-0.000000025274118612780187", "-127000540", 1); + all_test ("0.00000000610055019436568", "-87.3", 1); + all_test ("-1560822.78", "360857.435", -1); + all_test ("243209397988565176", "-2171.0", 1); + all_test ("1089364.8", "-7", 1); + all_test ("5", "-195.43311519499808", 1); + all_test ("0", "-12.6", 1); + all_test ("-8917436.7369", "-2412090", -1); + all_test ("0.0000000000258", "-0.000000000000000001137187844109", 1); + all_test ("65611", "-0.00000000000527362056737", 1); + all_test ("0.0000000000000000000113412508151534071", "-4.9964", 1); + all_test ("20156417.0", "0.0000000000000253800552009", 1); + all_test ("32.967316", "-176195213.7000883", 1); + all_test ("-542212737079077800", "-593.88569405080", -1); + all_test ("-0.000000000000000004199278271388794", "57186245414.80793", -1); + all_test ("0.00000004507194567013278", "1.0", -1); + all_test ("43551631176247", "-2195", 1); + all_test ("-4.6", "0.00008016", -1); + all_test ("-0.000013384535", "3437784.58", -1); + all_test ("0.00000000000000002007911523", "-1.34", 1); + all_test ("2.5", "-39.06", 1); + all_test ("0.0000000000000000051", "2", -1); + all_test ("0.00012813936789257785", "1021.0303931", -1); + all_test ("0.00000000000000000132229", "47.1", -1); + all_test ("-0.00002120044", "0.0000000000000000064902789323", -1); + all_test ("9", "379472788024622.729", -1); + all_test ("20.510820935587124", "0.0000000000028179781", 1); + all_test ("-0.0000000000000000000336381763977", "1.17539", -1); + all_test ("0", "-335.0", 1); + all_test ("2.4", "-0.00000000000023", 1); + all_test ("379.690496326", "-0.000000000000000003740124432080006", 1); + all_test ("9612.15057327", "7", 1); + all_test ("64.55819568", "103", -1); + all_test ("306554.22", "-21168.82471", 1); + all_test ("0", "0.00000000000000378671778", -1); + all_test ("-4869994212.02", "-82.3249644", -1); + all_test ("-28281314", "0.00023", -1); + all_test ("-272266413010184382", "-21443895.1", -1); + all_test ("0", "256.5", -1); + all_test ("-0.0000000000000000059504", "-393", 1); + all_test ("-85483356.741520", "-0.135106007572", -1); + all_test ("1256398743581", "-0.00000000000000113", 1); + all_test ("9265.8054085790753", "1101.60", 1); + all_test ("21755297.7418484298", "-1961304", 1); + all_test ("-4.24", "-20364.5241763", 1); + all_test ("-0.00000163743621", "-15716423.93", 1); + all_test ("0.0000000020933557160", "-8448055.64162653", 1); + all_test ("193", "1919.381696195", -1); + all_test ("-39007.0872890", "58659197064.3566", -1); + all_test ("1.224", "-82293358.63", 1); + all_test ("0.0000000000000001573421585953", "0.00000000159648", -1); + all_test ("0", "-91.479627934421", 1); + all_test ("-186.247902631", "-0.00000000000000008879", -1); + all_test ("34342532998345", "0.000000000000000001681734691290559", 1); + all_test ("-4020.8878086173", "1.08", -1); + all_test ("-0.1630447778870097", "8176.334", -1); + all_test ("-0.0000000000000000582491728505043", "0.00000000000000808314", -1); + all_test ("-0.00000031", "3137213.71057", -1); + all_test ("-28.21073575152", "8530334210.39291", -1); + all_test ("-0.00000041292", "-66921.7723433", 1); + all_test ("-261247.289569419", "-0.0000022547224", -1); + all_test ("-4.07", "-6.1", 1); + all_test ("688.144527235", "45986414948", -1); + all_test ("-1", "-0.0231932902995", -1); + all_test ("0.0000000000000016241364087636498", "3", -1); + all_test ("64634.877977", "-39803483", 1); + all_test ("93.85", "-27.012", 1); + all_test ("-1804.8479", "-2720034", 1); + all_test ("-31207.70845", "-0.05392720639355", -1); + all_test ("-7479301046098815", "37.3", -1); + all_test ("50515.653686861597", "-0.00000000000000204399360", 1); + all_test ("-0.0000000000000000055012280316826870", "149.91618262", -1); + all_test ("2216863.9954067", "0.000000000000000775121457372458", 1); + all_test ("-3.1", "2", -1); + all_test ("-4.67", "0.000000018732162086", -1); + all_test ("-0.00002189591", "-0.000000000255830068339", -1); + all_test ("410611332258005.0", "-2840.2819", 1); + all_test ("-7397921366979", "-0.00000000000053", -1); + all_test ("-0.12413104038561", "-0.00000000000255343979", -1); + all_test ("10521370.1", "-55871447.8", 1); + all_test ("129500.264553199", "-3811409369958.95", 1); + all_test ("0.00000240712277094094", "1354108422.5", -1); + all_test ("-0.000000000000000005719028368733990", "540474.19019760", -1); + all_test ("977162.7422", "-0.000000000001402550", 1); + all_test ("1.54339295432", "-0.000001596789", 1); + all_test ("53798507.25", "-0.00129745384800", 1); + all_test ("-0.00418268966509248", "0.0000324984627", -1); + all_test ("118092.9308827", "-0.0000000000091", 1); + all_test ("0", "-93.6", 1); + all_test ("0", "152.55335", -1); + all_test ("-3405109.0892217", "0", -1); + all_test ("445424.679402140", "85.3554", 1); + all_test ("5036.98", "22371.6657", -1); + all_test ("-1.9", "0.000000102345283335839", -1); + all_test ("-42.2659", "3.721", -1); + all_test ("0.0000016709189598", "6.170585", -1); + all_test ("-3", "0", -1); + all_test ("-0.0000000061", "5497334338493.62", -1); + all_test ("-124932073873228", "0.000000000370", -1); + all_test ("-0.007149648796120", "-0.00000001269559959", -1); + all_test ("1675530.7719", "-1065461.6469931248", 1); + all_test ("1053.3", "10097922.4048112434", -1); + all_test ("-92523142643508", "-4", -1); + all_test ("200.8", "-36.675816237421759", 1); + all_test ("2.0", "34282969.24101", -1); + all_test ("-0.120192312259366", "-99423384.4155", 1); + all_test ("0.00000000000000000746964", "-4.50907217", 1); + all_test ("2521.848164", "-16771705.710", 1); + all_test ("0.00002756245400", "0.0032449553261", -1); + all_test ("-0.00000001332527923", "574.55219962424", -1); + all_test ("-0.000000000000000179221403668", "57235.797", -1); + all_test ("0.000000057866988749115", "0.00000000014", 1); + all_test ("3", "1.2", 1); + all_test ("56.30058910190568", "-1680170716816089", 1); + all_test ("-2", "-24381767.5", 1); + all_test ("11799.81119", "-0.0000092161582", 1); + all_test ("1.13", "-1", 1); + all_test ("1", "-802.5013810814", 1); + all_test ("54624549209148.7", "-0.000002846161", 1); + all_test ("138301402", "-0.00011", 1); + all_test ("5", "-2.4", 1); + all_test ("-4604424", "1.28478944", -1); + all_test ("-146100841048.0", "92.57", -1); + all_test ("-0.0000000000000000020786339367465", "0.0000000517784775175150122", -1); + all_test ("94366206024220.8", "-147.3818299", 1); + all_test ("-3.30342757", "-2.8", -1); + all_test ("1458645603.7314952", "-0.00000000000000071", 1); + all_test ("-22352269.3857581", "1.133", -1); + all_test ("0.00000000000203016463277398240", "11.54042", -1); + all_test ("119.31", "0.0000000000005419744970291", 1); + all_test ("-479.458846", "-61007894", 1); + all_test ("-12.748", "-42.6", 1); + all_test ("-4", "-2102161", 1); + all_test ("-0.0000892951", "-0.00000000700082036664", -1); + all_test ("1440.2349309228", "2068244137965", -1); + all_test ("4.122", "3", 1); + all_test ("0.00000000006657906", "-5.9", 1); + all_test ("-0.817940036224482", "-3055637.756294", 1); + all_test ("-30364497819", "0.000000386", -1); + all_test ("-10441.7700601833655", "1.62504166598260", -1); + all_test ("0.000000000000000000013559973223809", "-0.0000000000000873509044373", 1); + all_test ("-46163.26048", "869724.9", -1); + all_test ("-0.0000000912", "0.0215663057542177284", -1); + all_test ("-7983637956", "1777.3345419909", -1); + all_test ("9901852112330", "0", 1); + all_test ("5", "-0.132564740", 1); + all_test ("-0.000000000001296", "-3398418.84", 1); + all_test ("2479240525029.33616", "-56491017716", 1); + all_test ("0.0000000000000000000125250462975224734", "3113453368428781", -1); + all_test ("18553.70674887", "-2036370511701.586", 1); + all_test ("1987104769376.1", "-3.2", 1); + all_test ("-15.9", "-0.0000000113232545789641887", -1); + all_test ("224.9148", "-18.1", 1); + all_test ("37574545.7", "-6.2", 1); + all_test ("8", "99053.70", -1); + all_test ("-359.3860", "-31.8", -1); + all_test ("1.85", "-41.0", 1); + all_test ("-2450069962976026", "0.000000061710947", -1); + all_test ("-724091.9920619242", "-3301857", 1); + all_test ("-59.1", "-7", -1); + all_test ("-11075495.60081", "8.5630713", -1); + all_test ("-58.7", "-0.00000000015983986", -1); + all_test ("0.00000000040731658521", "18001880087", -1); + all_test ("162453.79", "6668407464.1", -1); + all_test ("-0.00000472188389576600677", "14115", -1); + all_test ("126502", "10.69459", 1); + all_test ("1715058", "94.8763148", 1); + all_test ("-1", "2.2612173", -1); + all_test ("0.5133073103", "-11.97191154", 1); + all_test ("1.74", "-0.1674805636", 1); + all_test ("-7290144.463920", "2527.03", -1); + all_test ("-3", "-4.9427", 1); + all_test ("-926566116.423411", "26.01271418645", -1); + all_test ("-449.272959041948", "68532785212291439", -1); + all_test ("138258577757.4", "-1003304148227.7", 1); + all_test ("-0.000000000000000000010128915955897709", "-3304146563351", 1); + all_test ("-0.0000000051706766331953970", "6", -1); + all_test ("-0.0000000000000000007641943051494263", "-545257.46", 1); + all_test ("-113562.957375112", "-21965305.642892", 1); + all_test ("-11448.06", "210.2157232900", -1); + all_test ("-141.1", "161.66", -1); + all_test ("-29036932102", "37", -1); + all_test ("8", "868324216.74", -1); + all_test ("0.00000000000000472435319983650895", "-154.252", 1); + all_test ("46.1", "2.16", 1); + all_test ("1", "-28907.803", 1); + all_test ("88570165763.081", "3003599203227764", -1); + all_test ("-0.0000000000000000001073793607923634", "49309.7", -1); + all_test ("-1.6", "2392146.237692", -1); + all_test ("-2139.959367", "-0.000010270379848989", -1); + all_test ("-954.845", "21359245.6438920", -1); + all_test ("-0.0765243310465", "3.569", -1); + all_test ("35244", "6.818525", 1); + all_test ("1.0", "0.000000000000002694", 1); + all_test ("0", "0", 0); + all_test ("-16.37618647", "-0.000000000000255699967320", -1); + all_test ("4", "38.09", -1); + all_test ("-512214740.316205024", "0.00000000000000000048545", -1); + all_test ("-0.0000356092", "872.5", -1); + all_test ("0", "266836883083", -1); + all_test ("0.0000030666714898272657", "-5746982.6567787", 1); + all_test ("0.000115493195", "13.9259", -1); + all_test ("-9766.284811588", "-0.00441218036285053563", -1); + all_test ("251093071416.33", "-59740.56", 1); + all_test ("-0.0000000000139253216444", "-0.0000000000000097199551454897", -1); + all_test ("0.000000000000000005459644785124686", "398147250730851493", -1); + all_test ("38.0", "-8781", 1); + all_test ("-827469", "-9", -1); + all_test ("-172850535.5", "-74.381839485246", -1); + all_test ("-404166", "0.000000000000020", -1); + all_test ("-8325567260571.80", "-1308443.50003", -1); + all_test ("0.0000000000000001096141", "-329056750.0", 1); + all_test ("542.65133", "-0.00000000088698", 1); + all_test ("0.000000000000000000133704", "-651984.8", 1); + all_test ("0.000000825879483325", "-381653.3", 1); + all_test ("0", "-22991738843.86", 1); + all_test ("2", "-36.5624759", 1); + all_test ("-1690423000.05", "3376665391", -1); + all_test ("-1695.58", "0", -1); + all_test ("-47561102.1021", "0", -1); + all_test ("201.1", "1716645951967.8", -1); + all_test ("1935050", "0", 1); + all_test ("-5.4755", "157.79589", -1); + all_test ("-4.3", "-7", 1); + all_test ("25090265240.04625", "-607.8", 1); + all_test ("-2926462.61", "154865050635", -1); + all_test ("1503606.9361", "0.000000001129607342663", 1); + all_test ("-0.000000000000000000618066504819", "0.00005276", -1); + all_test ("-95112", "2.67584319409253", -1); + all_test ("45561", "0.00000000344217291134", 1); + all_test ("92088411.754", "-81.226353161780981", 1); + all_test ("107.0", "-0.0000000656279606187", 1); + all_test ("47.9", "-23853019975.85895", 1); + all_test ("-52.6663139391784", "16270104.474", -1); + all_test ("-0.000000000000198761", "-6696522145", 1); + all_test ("-3.7840523387703", "2470.12717031561720", -1); + all_test ("-0.00000000000000022920", "-145705.5690558090", 1); + all_test ("-1.0", "0.00000000000000527026187525810", -1); + all_test ("3.59714", "-2725.47934324", 1); + all_test ("151538195108874.210", "-76712263823045", 1); + all_test ("4673409.1540083779", "71941922241245290", -1); + all_test ("-0.00005452", "4996813423", -1); + all_test ("45.37478482310", "-9.9", 1); + all_test ("0.00000000004284806937", "-805754809.47164", 1); + all_test ("-65142.3", "32395696858721", -1); + all_test ("0", "-8105471469018314", 1); + all_test ("140547537", "1.390913", 1); + all_test ("-4", "-1", -1); + all_test ("-1.7", "-28584565633401.94", 1); + all_test ("-14414.40", "-0.0000000000000000065362929973320", -1); + all_test ("2668644862897", "-65.93", 1); + all_test ("187.5651870279", "0.00000000000004537", 1); + all_test ("-166316028", "304548094.9", -1); + all_test ("21.1", "-3.7459045000441289", 1); + all_test ("83796717308913", "392191976.2", 1); + all_test ("-245830.74", "-0.6276780", -1); + all_test ("0.00000024230706949", "102871132", -1); + all_test ("567804266.88", "0", 1); + all_test ("-127491067191278", "-54422.33919641", -1); + all_test ("-1336839.5677", "4.68601", -1); + all_test ("-32772435.641", "0.0000000000346", -1); + all_test ("0.00000000000000100", "-0.00000000000000000035706589", 1); + all_test ("514103.488", "-3.2441", 1); + all_test ("-80.073950", "128750504.46", -1); + all_test ("-230652915.7", "-3.03863", -1); + all_test ("-18888.4009", "7344873616474480", -1); + all_test ("7", "-8961195435475.363", 1); + all_test ("0.0000000089922", "-274867588598", 1); + all_test ("-556.4765", "-3", -1); + all_test ("1298.69", "2188624222909.504", -1); + all_test ("326246955888254", "0", 1); + all_test ("9924973.51090", "10.913818", 1); + all_test ("-64922057.22328", "0", -1); + all_test ("-0.000015121244906956671", "-13641070311", 1); + all_test ("-0.02954", "-1.951973916", 1); + all_test ("1083.674582984972", "1098", -1); + all_test ("-558.42815252", "-61.1907444466", -1); + all_test ("0.00000000025639686430", "577986", -1); + all_test ("-7035.93", "-0.00027214889", -1); + all_test ("3", "-90736572249838", 1); + all_test ("7.63915", "1232667.0", -1); + all_test ("-0.000135502278681995", "0.0000000000000244953080777", -1); + all_test ("0.00000000000799030040007", "1.68", -1); + all_test ("481721839972013.764", "-47070151004241360", 1); + all_test ("-24.978", "206335.932853155857", -1); + all_test ("-616.2698", "0.0314914227", -1); + all_test ("1207176666.0", "-1301439870", 1); + all_test ("-0.00000000016429476", "9.9", -1); + all_test ("-0.00505710206398253462", "0.0000001380667547928", -1); + all_test ("-1.165016965486953", "-138379.4231296172", 1); + all_test ("-79.6633131", "165.14223157", -1); + all_test ("-73825158.59", "-61", -1); + all_test ("0.000000000934", "-3.82200519751368", 1); + all_test ("0.000000964717", "-0.000000000000005927687371823458", 1); + all_test ("27.727966", "-25.61", 1); + all_test ("2", "-23910", 1); + all_test ("-12", "3883816315.70155728", -1); + all_test ("8.206177344", "153.790", -1); + all_test ("4.9785", "218608289854278.794", -1); + all_test ("21.262085653354", "-0.0000063961966310", 1); + all_test ("0.000000032951144241042674", "14189577.516", -1); + all_test ("7610.88052", "-1307222", 1); + all_test ("0.00000000000000000004157294626", "86", -1); + all_test ("-28.12923", "-177547.975", 1); + all_test ("309.88", "-816", 1); + all_test ("-2278580099.10", "6.352", -1); + all_test ("-19.72742783115382", "-1101.0", 1); + all_test ("-263181.91904236906", "-9.5", -1); + all_test ("31.3", "0.00000001853884573", 1); + all_test ("-167415.77", "-0.0000000000000067", -1); + all_test ("-4.4", "-8608589026778.48", 1); + all_test ("-0.000000000000000100148808054135", "-478.23174", 1); + all_test ("567.51927458", "63184.6562350967", -1); + all_test ("0.0000000000000000031", "0.000000000000000007929", -1); + all_test ("-2", "-28934796077245.37", 1); + all_test ("-49505821", "-1.7522", -1); + all_test ("26.41137", "0.00001060660706229", 1); + all_test ("-0.0000014187070", "2894.13734", -1); + all_test ("0.0000000000000000079", "-23597579.1", 1); + all_test ("-7.595684", "-3303819607.9377", 1); + all_test ("0", "-3.0774669892765", 1); + all_test ("0", "3", -1); + all_test ("-1108203.892", "774.9", -1); + all_test ("0", "213043362334", -1); + all_test ("13304398.0371608", "-42671595698923", 1); + all_test ("-59.334", "-14797425210.4", 1); + all_test ("-1580.918446457", "597.1509", -1); + all_test ("-1954585", "43.7", -1); + all_test ("8", "-0.0000000000031877466746", 1); + all_test ("15.24", "0.0000095965900328103", 1); + all_test ("108.38", "-1", 1); + all_test ("-1333901185", "-327.940", -1); + all_test ("0.0000000000000003002264302838337", "-0.0000000000020925378", 1); + all_test ("0.0026377197741282", "28815020.633", -1); + all_test ("749760.615164", "-216.05", 1); + all_test ("-160307.9", "12.94", -1); + all_test ("-106313763", "309.6", -1); + all_test ("362759", "1.1", 1); + all_test ("3661.3030316", "-16218702.35428", 1); + all_test ("-29.385677982085526", "211.7", -1); + all_test ("-0.0000000000000000023842", "-449178776092589", 1); + all_test ("-6.9471389224004", "-9.14525417", 1); + all_test ("-533061078.7187", "0.0000000000000000010672", -1); + all_test ("-0.0000000000000000000549612286887", "2489771", -1); + all_test ("-0.00000000000000219220742135136", "-438551392682022", 1); + all_test ("-7.39965327", "-11.7759", 1); + all_test ("0.0000000000000003275", "0", 1); + all_test ("3.5", "516.37962208", -1); + all_test ("46.4537129", "75.28061", -1); + all_test ("0.00061329308410045020", "-1895948346907524", 1); + all_test ("211758460425", "2", 1); + all_test ("51956.6527986101", "2568.075045980510", 1); + all_test ("-0.0000027761040", "0", -1); + all_test ("0.00000000000000007928801", "-225.8724", 1); + all_test ("-0.7498337810439", "81437603983.269", -1); + all_test ("-2917265829.6754396", "-40551534", -1); + all_test ("705475472886", "-94431.289335", 1); + all_test ("-0.000000000001041719221", "6.9032947055", -1); + all_test ("-141.60", "4893.455", -1); + all_test ("-0.00000000000000000276", "-2348", 1); + all_test ("-451846573.05392", "994.237", -1); + all_test ("58980583273.66404", "3", 1); + all_test ("3.0", "-24256.552994526", 1); + all_test ("0.000001359135157304725", "-74511.22739626557", 1); + all_test ("-1", "-7.56575", 1); + all_test ("129.886304994", "0.0000024937420", 1); + all_test ("-340542455", "0", -1); + all_test ("50949.95", "116146.9629904", -1); + all_test ("-621306274358.78773", "-460701161", -1); + all_test ("-0.0000000000001649894694", "0", -1); + all_test ("-123393904497", "8243467175", -1); + all_test ("-58.45", "0.0000000000000118", -1); + all_test ("1125.372", "-188514556292761", 1); + all_test ("0.00000000000000087318067062", "-3112845454279", 1); + all_test ("-1357676334012628.9", "0", -1); + all_test ("-0.00000000015751050088824", "-2741149.60746", 1); + all_test ("-1.832", "396956274241425.09", -1); + all_test ("547876802.49698993", "0.00000000000000203534", 1); + all_test ("-0.00000000000000138873470272124956", "2.7", -1); + all_test ("-2122998911772.16", "0", -1); + all_test ("0.00000000000028992", "26193061.4", -1); + all_test ("729909.717271101", "213.5069400843", 1); + all_test ("0.000000000000000831795441", "-3149.30209", 1); + all_test ("871.23", "-39.9", 1); + all_test ("-266.516025843669", "-3", -1); + all_test ("-0.0003377513144795643", "0", -1); + all_test ("5429444.983", "-8.04", 1); + all_test ("-16.86241", "0", -1); + all_test ("-3.81", "397.2", -1); + all_test ("-0.00000102639", "0.00000000003224208", -1); + all_test ("70237963596.634", "-5857585.97", 1); + all_test ("-0.00000000000000003645298330", "-27572.252", 1); + all_test ("-1340.246701091", "1643.0", -1); + all_test ("-0.0000000000000044091801675", "0.000000000000000028992762079", -1); + all_test ("7460313.2", "-16167.854578244", 1); + all_test ("-252.4", "218.3", -1); + all_test ("-1", "-174474956852", 1); + all_test ("2.68344", "-0.0000000000031997142239077", 1); + all_test ("0", "1973.7414", -1); + all_test ("1481958817.6", "53372066", 1); + all_test ("-0.456", "27047501201", -1); + all_test ("0.00008716", "-8953628973228.470", 1); + all_test ("0.00000000000000110677110109", "1022800068.0", -1); + all_test ("-58.061691", "7.580", -1); + all_test ("0.000000000000000000011890", "2.32355850059843026", -1); + all_test ("-0.000002164702426516", "163.9", -1); + all_test ("223.1", "299.35", -1); + all_test ("-129700523752699516", "-0.00000017", -1); + all_test ("-5.27", "-1820.169295", 1); + all_test ("83587.473", "-0.000000015648996536587", 1); + all_test ("-0.0000000000000050132780", "-0.0028014658786123", 1); + all_test ("-1", "169130711.41216", -1); + all_test ("-1097575518.9328", "-10.1053377424", -1); + all_test ("-0.01551135221651", "4", -1); + all_test ("1.06932", "42.19", -1); + all_test ("0", "1.4", -1); + all_test ("-67852.2727000", "-3.311704582173664", -1); + all_test ("-7.042326758390", "-0.0000000019748141455575", -1); + all_test ("-1.003281", "317.6026", -1); + all_test ("-782.20436144498144", "168447196048515", -1); + all_test ("-243917419.22", "-193.49", -1); + all_test ("201.75620", "-199.9", 1); + all_test ("-0.0000000005419064219935", "227564", -1); + all_test ("0", "-208129799136442.8", 1); + all_test ("849606586946.33", "-12.5", 1); + all_test ("32237710821138565", "-6", 1); + all_test ("0.0003909263003590", "-0.00168080", 1); + all_test ("-72141391104", "24.823064699", -1); + all_test ("17.70", "154171341", -1); + all_test ("-0.0000058731658540754", "-28607161539382", 1); + all_test ("0.0000000000778024752", "-1.5315774605115", 1); + all_test ("-0.0264455", "0.00000000000013642701952", -1); + all_test ("-44.04616", "5.10", -1); + all_test ("76789965", "0.000000002292", 1); + all_test ("-0.0001367934293", "0", -1); + all_test ("-9689.56490", "93.264005", -1); + all_test ("-78.8991377137", "20605.8864902063172", -1); + all_test ("0.000000000000000026641956701225", "-2.4", 1); + all_test ("-99702426", "31234686409", -1); + + all_test ("-78249536473266824330849.66777355094653206196949807187125", "-0.0000000000000003657205364898565", -1); + all_test ("-794146002335392753453.706827563775514677616", "-0.000000000000002003697772718678199294529887857336117611280517515976", -1); + all_test ("-415", "392495171560354735.54", -1); + all_test ("-0.00000000003641527559883410541221", "118893973463454526683808886319100407749", -1); + all_test ("-246230199620.751986", "-60621558.218545419613692429476293547415222080017643997", -1); + all_test ("1135.2381823", "-7025657983677893287919132587754823076851573889.74685", 1); + all_test ("-1225393854304.583672953386", "3712805076014395323562.4542406246", -1); + all_test ("0.0000000000002805023524281798", "-1195739.55713460927706968721363067", 1); + all_test ("386896730804748668115534580.29201499", "737595739534741234.44386299", 1); + all_test ("-160941276095561769012497288743700757276588036", "194.232174807028239974132449968549146279604", -1); + all_test ("0.0000000000000009760", "-112424977227983.369213445871607530779963339", 1); + all_test ("-120493.3535480159461699138868088193226718499846079", "-963938726344338862591656029356573.2356831292145", 1); + all_test ("1.731842697869349182975403693663977472678249978539", "-0.0000000000018342058226450839410208095980857226", 1); + all_test ("0.000000000000000000186044372917454007190404393463337172211654339256226", "38603.328332936580263680889352090136846643070031691", -1); + all_test ("2.24833678840107152900324", "-0.000000000000535013632333188", 1); + all_test ("-0.000000000001014445297159531", "-182225871.4", 1); + all_test ("-110739", "39245367522721683497924493692756130948391370303714834", -1); + all_test ("0.000000000000000000011109996302235", "0.00000021747567330836261997878389805423396667433455", -1); + all_test ("913805.7272137617667300113969454560", "12015557861856523.82185", -1); + all_test ("4.44", "17327761911331833939511.3229350", -1); + all_test ("3343815205898708797845323710139050310101815211790183", "0.000002944097410246031171887416698431193651848888", 1); + all_test ("32760398270494573303330410.50750229445655494486793110334706", "-9510914125.45789497493920290055", 1); + all_test ("0.00000031352646", "2982438266661362962075700689156408.44636939397", -1); + all_test ("77053023622996.111620117040477945", "-594", 1); + all_test ("28.651584435", "0.0000000000000517018230", 1); + all_test ("69454425323857571.298955", "0.00000003183", 1); + all_test ("8.585707061691", "27579495297994019790817050261359", -1); + all_test ("0.0000245072088767920273", "597422085664.8946200175189947965015981804000953540032149", -1); + all_test ("6395952035600311.145296483306709937475", "-7839682836938441873082358214760503680131094656590381429", 1); + all_test ("-878403860673101771781740794629505317750999165.91704111", "23574346417573958371843475532943.5863825875041348813273", -1); + all_test ("0.0000767302828677966418632441811470540764577", "-1276636.42385918072718338162162974143519652320393232805716411", 1); + all_test ("-15930445184474597597265919925606183581356435.4578944", "-0.00000000000114252044623272018125497556095987129012517542089248", -1); + all_test ("-48665285374684448074343674590620067.7", "1", -1); + all_test ("105930.422", "11113072169.652252071060557105162", -1); + all_test ("26564763", "-3", 1); + all_test ("4811244033166.822319661770849918367233504118713435759512811", "4.7", 1); + all_test ("-56.8", "4443507757632459.195553180343008573591954189736210531834", -1); + all_test ("612.72379387256827500110", "-452.196955446440438357", 1); + all_test ("-494127587184494770597966464398", "0.000000000000000505582034979983270144354985077988823279257757358354", -1); + all_test ("151593171537726736029059210", "3280207153334176964", 1); + all_test ("-0.0000000727423791233275798", "-33.983207203823", 1); + all_test ("-0.00000000000000000014088202399161", "967411649025173.3", -1); + all_test ("2.4", "-0.000000000001348198764946041705529604570289570284", 1); + all_test ("-1458694234293.393", "-0.0000000277889669157893917", -1); + all_test ("-1", "0", -1); + all_test ("-295498271141109248639464345535.73829013835409617653972", "-239733948637940687.4210093379196529044279897", -1); + all_test ("-114.668973584958627612325023154590", "0.00000000000000000204", -1); + all_test ("11086296933075691303", "61846609604939708809351700530350279982", -1); + all_test ("-199290.9539286389610", "0", -1); + all_test ("-0.00008470578761402", "77227954881772040530.19249809987494428807714982", -1); + all_test ("1675393978448", "-218061932.345257837058901", 1); + all_test ("-148234164778648.90057404374761057399794220096395194121763477", "-1807153054383052.16291022958635252906429", 1); + all_test ("0.00000107324116068524713963632866732786846249794493141690777", "-8697413954500148992019717571067182408306067052176.48379", 1); + all_test ("-3504475807101437909894549201613284414285", "0.00000180507680656754700593791722943439535831913116826463442277", -1); + all_test ("137188855.912293557682373", "-84390113782876.78301756825303169680317158020741023212586877", 1); + all_test ("-8.04", "48917396714819601257978143.0", -1); + all_test ("19441.23908", "-3621875953293954379164.80898", 1); + all_test ("-488683915776821.54128571136", "-2764.655", -1); + all_test ("-497.39163093", "456272554.910083158313064", -1); + all_test ("3888553456.187038805", "1.79351971", 1); + all_test ("-0.09665505758418475963567867363097339048321797943170880174", "42.26560746275599", -1); + all_test ("18902797728391145440494082949463571569467603044", "-160840513303121014911814965287069764.329850142", 1); + all_test ("-0.00000000000363783296932", "-229510691003150718410894.798513190", 1); + all_test ("-0.019578513996", "-0.0000068012586581839285561", -1); + all_test ("-0.00000000000000003337257672564450192788237207780262977502390656214", "-576.230537914969490642", 1); + all_test ("0.0002071041857705517964418488527910814283948842252102023", "4965", -1); + all_test ("-762578569061554379901567768164.24708334695367", "-2902150555266343625933468.2", -1); + all_test ("366547461068.82113690", "473567955790856323671.7615303868255685632986068926885", -1); + all_test ("2212.60505074", "54.4399284220426917738", 1); + all_test ("24229481820388119475112679.2869744056638142529094915709331146", "-39663594276.8672343304", 1); + all_test ("204581808810007220059753337566285703.0558403249497", "0.14724245060761654341919", 1); + all_test ("186.26481926730311740748275435747257", "3169339033932711835137078410077027045.6405", -1); + all_test ("147438798802.4222641736117", "-30953.68649", 1); + all_test ("0.0000000000000000036665066712498278880448755082419497041867983779348", "49969977335002848872793397", -1); + all_test ("-15", "-1610335165763678418286838402407661955", 1); + all_test ("2689653843679875122027095562540366.2198041476017623", "1680374149507467199865152885259.7294203852546004613867", 1); + all_test ("-0.11", "-0.00000000000000000043896646420939540095966", -1); + all_test ("2080671699743.511238240714127", "-0.000036842318404340179848907", 1); + all_test ("568000304", "-90592884500253731464906623327632577358591186.946837858889", 1); + all_test ("-0.000000000000002107518141285", "-3224876873708851754101647.818256157564", 1); + all_test ("2265098771", "0.00303612511166914586857128974318819782", 1); + all_test ("-5664007822465.98050400197979616740857", "4318641.351415884425470426852575673963981647030782942", -1); + all_test ("-2548615100934958409898695557521334.971165846219072", "-554798.735556810907", -1); + all_test ("-0.000008820826897431443", "-1685288868236928715034057139645.0670918901230", 1); + all_test ("0.2773641914039966806939077833931526594995617517107827", "-155510002669979906258854608426737730.80732922", 1); + all_test ("0.00000028631297293946002594331990323448420", "12.530358985140", -1); + all_test ("65.74", "0.000000180226526307592", 1); + all_test ("35366830254177.323", "-195533735162357391160682221146179916675364691505329.522594", 1); + all_test ("623190599276699090316221455590041049805679995441489316.522", "6153742899048073987312064712008701512451.12942", 1); + all_test ("0.001389654081957090114281716350682554539119289983031175", "0.0000000000000000004172245036048453978505043356031", 1); + all_test ("-0.000000000000065125596165975329468700878377195017853327025922232", "5010.27", -1); + all_test ("99858764586308080.815938383", "6906.98277", 1); + all_test ("-0.0000002120213841110365850583078206489619527666932442761000523841", "1560226.624828", -1); + all_test ("-0.00000011209616970611", "437120468783339721.8270432960", -1); + all_test ("39633522.28696180408828", "404609951713", -1); + all_test ("0.00000439899975727851857364404628011452819", "-295058799.554060774457769229721869795967861", 1); + all_test ("-0.00000000000000042342244818730713908050671583102154", "549754666663906751820116493890514432554613796763091771", -1); + all_test ("271354103.271534143867908347243952035", "-3.4348029165", 1); + all_test ("-18391137696458176.709403414422273535748", "-135526005724.36", -1); + all_test ("-16789648705436253610328466585451657189", "87790015500203097.67217621", -1); + all_test ("-0.1934527980285924234435139814", "0.000000044283070912014290453388249787033315196663317475885890", -1); + all_test ("175727618.7", "-4712524302.9633361502507795469472010873256880899968244213838", 1); + all_test ("86148708.7", "0.000000000043067763982519792325233598208451198", 1); + all_test ("-1676718.814", "-126027512979.7359979901775996", 1); + all_test ("204654162545474.954541730442039127578542771572577634608702", "1278262396819307952614391540746000135708145121661", -1); + all_test ("20599411052765018472280152629960269.784440835643761573", "382871.68", 1); + all_test ("9.1", "-0.000009868296529724402614472149967657", 1); + all_test ("-51.7", "-0.00004138549340599259177969843213431710067044689658507", -1); + all_test ("-0.00000000065519676351299476540767970", "-159950069281804382298.104882147944419487737768", 1); + all_test ("132937997125408.196564521", "0.0000000000000416671095818013123525013575750", 1); + all_test ("-1313393782.747301", "135189314585073603701567044403904503", -1); + all_test ("0.26345218007386345905841", "-0.0000000000000000131698402541203188119609481297941368650", 1); + all_test ("24462716218.22576508876165308669350154", "-175901840085494768716509058673018943.44105360844073496986", 1); + all_test ("-639051.389850068275663978184079330600736417788030565545", "-233130008509087611163354733950079542005785536290.28", 1); + all_test ("-2.5", "0", -1); + all_test ("-48", "-1.30483838443", -1); + all_test ("-0.0000007957592304983915492296920988493287302223429001", "222281838853.55743543126434998666514248954378468481403010", -1); + all_test ("-256924767625.92102529834889997062393414595239208331582", "-138645955.7309701679", -1); + all_test ("5825.6936168480383901079880", "-15454778381.1635817748532891601", 1); + all_test ("322234158068890727047790331925494003913674775559", "0.0000000000000001440104086097707578083604", 1); + all_test ("-0.0000000000284163905693832757026", "735321.796040692391355698638806984647971670552494930079886", -1); + all_test ("13.51354661049663", "60174586.03966439546", -1); + all_test ("-0.0000000563225262474012816830760397217", "-19259915510222671.51018", 1); + all_test ("58260242951538386451799849576838755846723438641458498.45", "81583418293233481447477355060230.5984042555029388", 1); + all_test ("15676086441613294586793.0600578779086373855887", "553785093898805279609967970.6227004730416155843290795860965", -1); + all_test ("-529215908", "0.000000000000001261696290245850445593226", -1); + all_test ("0.2765770305056755810402655395163548457323921993", "2485048778003226295.0487979661044", -1); + all_test ("3.106357", "-196188865060.96789451729283131151802962", 1); + all_test ("-3812721623392532238628.52058836531583261604602809206126", "0.000000000129949612553432181149516674241", -1); + all_test ("-725747.78308445614294711222169380088709733492626141", "0", -1); + all_test ("0.00005978057030838911749503353205688236750513118711", "-2301374753039922.5", 1); + all_test ("-21135.6", "0.0000000000000677319833766662844296", -1); + all_test ("-18592472738146.165033667092366", "-0.245177658870876212432221320582908107465202878031116163978799", -1); + all_test ("2.0853471559342294701189635489971894524307297590789015254659", "1820710163171110437504131672398834715.796647407", -1); + all_test ("3017.7628349701943687591214", "-2123676032175089021.800850462329", 1); + all_test ("2245516696370652079582811421413778879168242699149", "-0.000026865223", 1); + all_test ("396591381033578245290535623.59522101830916124323912171677", "-399632909396.27251691705488670319", 1); + all_test ("25071395481877740931640606160951694567581843991.91250540", "0.000000129577260075209456379795979548520957596680350786352443111", 1); + all_test ("-10071840824462229810456841986062182478", "-0.000000000000036", -1); + all_test ("-378.382656390921442297", "2995.111135910", -1); + all_test ("-0.0000000000000011003920232607040692705", "0.00000000000000002355157685511431284976273511723771203290674587231328782173", -1); + all_test ("894.8158182999506884919347710660910", "-0.00000000000000000096323615121853367670285903274497581", 1); + all_test ("2319037.233322076813874258", "-32416.903557641", 1); + all_test ("23396460119.155847859729080972376305599746464844501598782869", "-23349855891702694333726330.5788991", 1); + all_test ("90907619612776583630058641475331.6", "834081.31401857878701092663973283388246447251015444", 1); + all_test ("-0.0000000000000000081501364451042879423837094013790187022253", "-0.00000001399490096609828204621353982853023593", 1); + all_test ("-420605.932784654921007625945921605929", "-0.001003986559391891122940439549512675", -1); + all_test ("29941819100256.1010903984648918366033290553065670117884535", "-1399273749558314.35414647141708136502314", 1); + all_test ("9.87428322502844153862497406397966790245714773688", "282378323960341447353633555973.60816609111820", -1); + all_test ("0.000000011571", "56.055239680", -1); + all_test ("57847056020509197.81010326363252948483107773", "-1.4444", 1); + all_test ("-51735520880178.3819992386025068250767281052153771374742233700", "-0.000000000000000001995850558903648471134005565207297729809954251013177868", -1); + all_test ("-252689605402394270719155.41734356951305987480624879", "-14.7", -1); + all_test ("-0.00000000001151229725364301025243181548204622943024492441630358", "26395005645801030069538169698242312.433651971508113804", -1); + all_test ("-0.00000000000091483130556462719", "2", -1); + all_test ("208.9827699741542594700570327748394160582183088044349", "-0.00000000000052759011609237039384483268124939035873403", 1); + all_test ("12412.9657547118", "4", 1); + all_test ("-2", "91580728825224739577263849484410121433204621.500780779690", -1); + all_test ("459526644.772925035397599290137226147632521530511862018", "-0.000000005846169451429981275734796656", 1); + all_test ("671926163021026323133951152902929830282.91041796493", "548498210972677.51442460018844632588617668956139310271612", 1); + all_test ("2422.5875291768881507425406922241585652688246", "19145241007530705409.9615104357443736565548963", -1); + all_test ("-0.00000078875216605898054012159", "-3150.0", 1); + all_test ("6244534680058004259589682789034535443037697", "-25351939981079.604012", 1); + all_test ("-180.203958489450", "39025034688578315815199.297787915576434930764", -1); + all_test ("-1361080637840651575481575485233.15286726682268248409468726", "-0.0000000000000039297884367828635174097881955958806085", -1); + all_test ("180278536333055.7355327506162313565598247413", "0.000000000005454620478830996984164588529474180472398020083723230733100", 1); + all_test ("-12521213.94690", "213.36136", -1); + all_test ("-0.0000000000000076966493627693824010017610386791", "-2.378265167488246191074961795033182605013037407884326", 1); + all_test ("-253.6948", "126006206", -1); + all_test ("144872743608071550764695060958473194286850377609005.9406", "-4115782212.903943924240904289", 1); + all_test ("646425925574255155103804057996228876", "-3385724693259876271747963.2083760845385", 1); + all_test ("3238426111230801661501493996824.60026008769586", "-1.3137106232306", 1); + all_test ("36812968817.09002256", "-377119042652372085.8701028046507452160688891148413096706", 1); + all_test ("-1057646134026674642687725155011813064632921643903628746215", "-61.1976960", -1); + all_test ("5932283884028162.993577517", "-262866296151760083503.5144635", 1); + all_test ("0.000001968962077757014929052005163485510124163782133996", "0.000000000000116476163076562297013796305385624375676724881414944662", 1); + all_test ("-344797534756.045056309614536498476108", "255603.7453533447251497046857105152628367804406158228236933", -1); + all_test ("-3426067344177324630963454.412", "15385507340701842778819629282390396905481417.2267114635", -1); + all_test ("-6482829869.2939768229599", "-316205.7593667305356109359299", -1); + all_test ("0.000000457660742", "-70087953797661233.02541392030217222494340078655370619", 1); + all_test ("-0.000000000000039160675421718532243743411756", "0.469130640793", -1); + all_test ("646.780847826", "-18577555.4140223083526099991256121668882164928438251290074", 1); + all_test ("-0.00000048407641016681417846220", "5.986261", -1); + all_test ("211851273349866038766", "603496683164932314765.83959539999713388808548959930160200", -1); + all_test ("1102.13614611471685523260263", "-10896812", 1); + all_test ("-1204978038923128204724255296214417.103288933531778085701527", "1716208377705472866612373037267.9534333794", -1); + all_test ("7.39", "71028207488403138793.76246511590301180890", -1); + all_test ("4434283.709", "63814910740714880857390949.18170", -1); + all_test ("-19123084314467.20872238837396740488879369139405423586", "0.0004154673731839293052318786962694250849938501580037", -1); + all_test ("12118.39981", "-26215", 1); + all_test ("1425476489753.2", "0", 1); + all_test ("6771847.279065", "-176720813115222.66664", 1); + all_test ("-915883195.783206257390", "-1162517435079017677181093168848300277", 1); + all_test ("940255279112483580064474520160.01836316454", "-21256974.01257889791261612212", 1); + all_test ("95730426094247272.25144832146486095143107940354301", "-46035913246450150341614859268398866836154116011239252918", 1); + all_test ("182340191187346850984880518.92122432870860784218323791323", "-45046691441.5894152", 1); + all_test ("-0.112180892367092832302160275033223995396405949810852290641240", "-5048973.374988", 1); + all_test ("12547796757213733598419046692214", "3054356083556184826827825111923516899788365822904", -1); + all_test ("-5.1917", "4788005123362165402614828953522.322744", -1); + all_test ("-172.673385473127", "7906028923470497913119471880236309806492091000269715326656", -1); + all_test ("39.36478", "-0.00000000000000000111733659477153687132091026586982038613149571288390834", 1); + all_test ("0.00280064326461873471", "-96485541594534.1717745476897400616", 1); + all_test ("-53804410326123080293766343804563197457587.358960227469", "0.6042327037044788643429", -1); + all_test ("0.783179986173131431415315377310009758807865743500314352155718", "-10150718377702833509077223188001629199784735482233", 1); + all_test ("320.1580863905990337350358843421238167150407", "78483581833243910660574051689573904282.53796879219263412", -1); + all_test ("0.00000000000000005913773611490029218785743338181834029896", "-16301992210.353", 1); + all_test ("-13791710467720660651705727", "9004174340.018826831004190863", -1); + all_test ("-0.0000000000000000052146576165363099836000375759397050145530205395264820", "-4744954283790", 1); + all_test ("0.000000000000000068266442751433", "-21855039931", 1); + all_test ("116.841", "756981691.979269", -1); + all_test ("-7473997292613406", "227497901856345041678511010728961877", -1); + all_test ("-83496362887321946609436668599.7903028365237141516", "1024015979814432311137570785885497044404075269867866.737", -1); + all_test ("-23818785789.2912426283539742079882608148628", "-245331580042569", 1); + all_test ("-0.000000002349831704133945491130166154185575859959455463468", "-185375716299893112855976.016352", 1); + all_test ("129364225959.09296952466", "108542305819621.75909260", -1); + all_test ("171091046088.5982271234876", "0", 1); + all_test ("2370407657610305710129669557444595465119919578698971423945.97", "-821.3", 1); + all_test ("-0.0000000000000000066502835859829587521962052035084744192744097555813815", "29.6874646919", -1); + all_test ("-170.82", "-30241959962614761470726121490564851402310663.74902149607", 1); + all_test ("-0.00000000000006469138000554640183555511490", "0.00000000461742314618775", -1); + all_test ("-0.00000022716576662893621400646809659283", "-0.0000000000000000097981111184009991288395382994924970037037274346", -1); + all_test ("-0.000000068298738368", "0.000000000001713927973365901946623917833165", -1); + all_test ("-0.0000000000000148999", "0.000000684685591706506458136016541069868975745133391", -1); + all_test ("81817616220.930513909829790979437990669", "0.0037959556025699242990945655226111160507570806789539", 1); + all_test ("187587490328.76177037442867202450382678451459221314035", "12011852709039268724852416629919418328793710229665", -1); + all_test ("-2454260049688515674651405402228.478820", "-142484538009893665821574115250696", 1); + all_test ("-188143100145.00617383871359559450074903986323218040691", "39179506.59", -1); + all_test ("8613", "-448853115.602892393", 1); + all_test ("324475356028412945643959548259053230909249689263109070219", "0.0000000000001203", 1); + all_test ("-8591717.842088230805549679866443799042204", "451637831192239", -1); + all_test ("-6070762221984493.7954950487", "0.0000008266057502127693017207185", -1); + all_test ("-0.000000000000000000021548786264742140151119863195875002281801", "0.00000000304649397231813005172496843293480", -1); + all_test ("-40.087", "6007129887259380790745", -1); + all_test ("-1366148121206.5632778067071941207265023330623", "80874576.1341452071", -1); + all_test ("-423812196741.21772334603760090003720411", "-8489477404172873113334318736868836015.8927", 1); + all_test ("-18748128368612368", "1033760369950876702413539809148.635494241886415", -1); + all_test ("-6156774.639", "2141734773.98", -1); + all_test ("482197977761340226097523001111567130628.3114748", "2405937830.20828", 1); + all_test ("1.500824259421505", "198242033184.774", -1); + all_test ("53413278633421327710558227", "-257151492007801487684343487000253.407786", 1); + all_test ("-1594411348210457.2057201773399545926098672210220093884228", "-5.810400317391331894", -1); + all_test ("-42.524", "80197685.59875442876939670048", -1); + all_test ("-60014077957342698615530961389", "-13.78", -1); + all_test ("-1387665403.2451221994775416780152578", "-50.1", -1); + all_test ("-0.000000000283761964988232221224443682313729383881", "-2822338883009.068928", 1); + all_test ("-28385595875309619596283558.250520032588078", "147387993300214796016282545977170456859842677532644", -1); + all_test ("34686252767892826", "-7397737915931657409753002235117.507122010962757", 1); + all_test ("665935851.03885464136023", "-4.27966623847647", 1); + all_test ("3106722949248488343.5712879936594346", "5207020105979502838849125845982284.134451754294609", -1); + all_test ("-0.00000000000000000001162533600824036331509919011567723975", "-0.0000000000004073637073187", 1); + all_test ("980601.882104", "-4736241802290.1", 1); + all_test ("-1.264380690744", "-0.0032883798709792788300566265810", -1); + all_test ("51319085247942607.3131099", "83544328154437955698662922791047991992", -1); + all_test ("-192623899359040.3945129", "10926.94113484257132806109226984967945807602047", -1); + all_test ("962893591125264662170537112845916056.381612", "368.90671614695431830669034995", 1); + all_test ("-3007190292.596872064173502838572330294928926267448", "331482510656348", -1); + all_test ("4.619", "12807796.2864949", -1); + all_test ("233052.5454017603326230828962755508957", "-32914.3881917757", 1); + all_test ("0.000000000005544400247160205560916422655780463306", "-117580.4643568059993825255748662006333620879934324449976194902", 1); + all_test ("-0.0000002279846534365632207677600216066596305", "2322126554056.4607607287069", -1); + all_test ("-87331990126", "743.4", -1); + all_test ("137842568133527537817773506836473835596.037638095", "23.4281795386520220571331254754387057268591122176624659", 1); + all_test ("-0.00000000000081272882678106791203475757923134527272965969323326949974", "-0.000000000000040624141216710146487026358979015670993522638121783791573", -1); + all_test ("1971.17747372189", "-0.0000000010768131828513761981866874629018005", 1); + all_test ("-10275311905140309547900985557569021235914044", "13182550904924724360875252856492836233318627808046410", -1); + all_test ("-9096.750964541599607962155", "13028.7", -1); + all_test ("-0.000000000000000000202605861249781459466292197187493310550840999997429021337", "58400.404430535722017", -1); + all_test ("-258981", "-0.00000000000000000146942477886148939377531194", -1); + all_test ("25.9", "0.00000000000000118094876087922", 1); + all_test ("162.19622926933", "-68764070962981173.301", 1); + all_test ("87010429441884304752446680474543109139856949178.585391743815", "-33889485558163904190.04059458582735001225610494", 1); + all_test ("-3588694.63698027859953463343148736989", "0.20617368370080438", -1); + all_test ("252827102036303.9936197231087853010909954787", "-13509465854837088717675412627", 1); + all_test ("-6887075662100868367.99298907317434", "1438247217765576380817821853526995547277570394769356704993", -1); + all_test ("-2614836293019955922452927776550298690576039936033493782765", "0.00000000000000052031132538502067428026543", -1); + all_test ("-12663020159532609144497566.74", "-42113540319.2", -1); + all_test ("-1080616543853692231052255789606862766.2316765544745171", "622138464929033724077.5684575767378639873400300078414586", -1); + all_test ("91651523225544121200570967593879", "-278740040380.50511089730555", 1); + all_test ("-8.77451376", "21181531848.7359185246892781251068262178642", -1); + all_test ("-0.00000000107896277359728052", "-0.00000000559014447680213165225303053399586003", 1); + all_test ("-0.0000000000000031412406939689928816768809909569850137504174813806298", "267542612", -1); + all_test ("-0.000294657579", "-26086393286300.330271", 1); + all_test ("-271.74195581137236680782195613069", "952766.7883292538644370363183485", -1); + all_test ("-900.09939007562756381827", "-9918431930401851036841237625432853804072200032740725352258", 1); + all_test ("-0.000000000000030671845618853580", "32357.482434378971190374026634088", -1); + all_test ("-139410983097962987.71179096685291702409075212713", "13047.63499478071424425", -1); + all_test ("-62537522199.9961", "-0.00000000004918255915", -1); + all_test ("-58114807161.758057205498543979965130", "-3584702124152.236114809148315", 1); + all_test ("-5632737338122610476176492162", "824643338386766980921.71811030291008509477931405498", -1); + all_test ("-0.01112514633044857786937097571424050679247016367295", "0.386883742497074382567205105882739261935576163102168809328", -1); + all_test ("-775467985328533.575386347563813", "-2875270027971383845747422189517733489695440299684.26529970", 1); + all_test ("-9206.12", "24465276.6921610401", -1); + all_test ("1054.43", "-0.00000000020318289531837407268676153244871958794890914093632739765787", 1); + all_test ("7300988032552205.76041147839581218453548563753012", "-0.007634", 1); + all_test ("-0.000000734659730075211305671182182069971692776321779245044", "-17392730340424661359.57036985935157689014069028076050", 1); + all_test ("3000.6213158910384652830168161716968199806", "196899.54954822827787", -1); + all_test ("-28853.3", "108559143247879763569410860170094.00407203", -1); + all_test ("-10952790675891711060669", "0.0000000000638895380906681108955511361930418302376174544368019503900677", -1); + all_test ("-7687531139650175", "0.004755312112866962666181173910352323", -1); + all_test ("7565776384737032915661040051027778572949", "-160701353.9737519084310852349548363386945597974151833", 1); + all_test ("-11.7", "822380840969.7330218", -1); + all_test ("245133982.2709135080741155484684942868990", "-593165059759410987863660881778696387234.47816", 1); + all_test ("628.75774650481071", "0.0461101478872120341063967140839333563803204295885288367372735", 1); + all_test ("0.0000000063833770468977856889029286", "-3446116885099565994798245412234997574310.71146429262", 1); + all_test ("-2182184538507532.123419582161659811958985", "-16.178", -1); + all_test ("-19295.5", "-111077.6", 1); + all_test ("-1388412775496356558574776724142668543270374", "0.000000000186737893798664765627225688620011182705421230108657158838", -1); + all_test ("-0.000000000000000000173967868179648", "18152994682673.375193707089884990", -1); + all_test ("0.0000863560035782461361163890887831825663", "-1610362290.97396641996627173340421008496869", 1); + all_test ("-11.483483415298114396405743398201182328386755342848", "1655.482227981052539355004148643429722825", -1); + all_test ("6566771449.687708654", "266171391084042797.33757142850317159949", -1); + all_test ("122068558041101739958985067462542912538", "0.000000000000000000268384176192613299035", 1); + all_test ("-4556.5265780925613192416", "4408701630592873935323494393972993090123128329706084", -1); + all_test ("3515021.1", "81864516617484548687.671", -1); + all_test ("-178949.59390232991893024115", "155518413686675002287489205632826353865420.12725", -1); + all_test ("-180770193582924974272749992870971104340648972754", "-1928.19874477272271032797979599489260880606368041405343", -1); + all_test ("625944002374826741962891505936997879124112785.78254", "2.2", 1); + all_test ("-74000022874026102397", "-124816237747723579623236426033.3292987585226390794593838", 1); + all_test ("-7131583.112143898464453392111748674238953953819160850767017", "84543374363987655628953718.746396432167424125377", -1); + all_test ("57930668326368128477331750490208537947030161601033587.572", "5.500178739041619245327", 1); + all_test ("-1.017", "138555579979990641891100613226981", -1); + all_test ("-143314297738305919766.85676159714631636157649174975230082", "29162684.00496065795882", -1); + all_test ("-0.0000000000002178299609737745152878826159216416", "508720821875640011430584245157711563400384026461605542067644", -1); + all_test ("0.0000000037127521912905404", "-7112417145444577.80607898479236664", 1); + all_test ("1.4535281", "-2755278119711443416368353764068870008385673657351.287327", 1); + all_test ("811983.91569425", "-2547.2614436343839512598907421054076705190588578245014517269", 1); + all_test ("-0.000000066783814084373165177389", "153634640417158153571843303.3824378304880", -1); + all_test ("5559062891501876147096510441935756175635", "842776596383.34976492066280841493046933", 1); + all_test ("-4251086773215699216620141628146909108378011971022709", "-1.07986603344764046828530", -1); + all_test ("-2.38", "19960804157.01707538429700", -1); + all_test ("140859852236163731572799808333907582182", "-483673686696369232470123.2999332082319758158129919566", 1); + all_test ("0.000000000000000000029622654937176905639567324602041176", "6.8015236772403026405177389845218159042412678456034", -1); + all_test ("25606.7", "1212600404583", -1); + all_test ("2.426990264", "-505156.72", 1); + all_test ("-3323.26420573", "-0.000021970500979289375257", -1); + all_test ("-255663089355037.16392040629597512015094", "-0.41027975468456748910575155470378618816162355136333", -1); + all_test ("566035648379804767146020274970786348003404586796", "-2605006926602834802308635359877490813262595", 1); + all_test ("-0.0000000289094988182444091497941385745066427", "1.9399", -1); + all_test ("3409063904163491.67712627300938046053186814787275", "-788683478416.8521908", 1); + all_test ("-552.503", "-2.65992687121", -1); + all_test ("0.0000000000000682450781086750734123964535", "3340023490622963858.05775701", -1); + all_test ("-28.423300541592258577722518374987247", "0.00000000018350659919154", -1); + all_test ("-0.0000000000338682164343183039173515869325510437060743440", "1815582615544197484260137.3218056141775424580", -1); + all_test ("3", "84909.6", -1); + all_test ("912649891343940306774308274", "735.6", 1); + all_test ("-26734270259188991826781396067266586047", "185532822.950201471152934184838760", -1); + all_test ("368826381.7105579623244756846366147277999", "5.5", 1); + all_test ("-22848732.37376986942615233017284932480", "-0.00000000000000000001612001293726629147004663156694479784423162610622655555766", -1); + all_test ("2778176016640.434269090024108", "1048566837961106", -1); + all_test ("-0.00000000005687373876856047135405145423769679122686973713754", "0", -1); + all_test ("-22919522347.89673645577646706445", "2", -1); + all_test ("333548957780868457725754851263954857512", "0.0000000002186930669230787434579292", 1); + all_test ("-4020857112014642672533241638057425567305408226516383316", "-610648130878189409.30664242328454522474430938", -1); + all_test ("-575928405847231664243702964453172201881707803819077958636", "17476059949547258392.9269270331051429", -1); + all_test ("-0.00000000000000236", "0.00000000795", -1); + all_test ("2", "8398410026740057242211865329491307671", -1); + all_test ("705216162396.944649", "1147259473068686282007211288799376369558792447024.1997172818", -1); + all_test ("-0.0000000000000192467050834", "6", -1); + all_test ("-949763984221042841274951349558.10112261647", "3", -1); + all_test ("0.00000000000000002489067290965425526486154888600759799385750417414529209", "0.0000000000823737490521166731893020565223077334833777", -1); + all_test ("-0.00000038", "-2632134659727565258235592973628916007.949", 1); + all_test ("-69592.16495307008", "-463465967056256671637919962390996488321070177494218933.43", 1); + all_test ("-6387758166555649.89131479869", "1002182649863740744720129461114521861386424106.91208215022267", -1); + all_test ("431.5946803602483", "0.000000000000000000816082696768067476521004613496804107266986784152470313", 1); + all_test ("-23812703844655313104347040675308650219032315064", "-71724306.2930848005664925", -1); + all_test ("-0.005366575257566691274487675050792258604517208", "-50270812932100741999189180430.012678", 1); + all_test ("-0.0000000000000000078075590970858480352604836633054432965570", "-27324956076689844461004586831.04188455331803393389628", 1); + all_test ("-24102905908901166081092826266887612015", "-459655866683957.36420", -1); + all_test ("18620863003604271884104610", "0.00000029683459505576831", 1); + all_test ("2.21", "11.74", -1); + all_test ("0.000004553511760142", "-0.0000000000000010330082103", 1); + all_test ("-13676169.2900328430847", "-659552074603595567395834543801367207404186168504233", 1); + all_test ("0.0000000000000001438969718407410316532098007489935388", "0.00000000081225083195136102279920779602035", -1); + all_test ("51597", "-3688953.37331140657540657", 1); + all_test ("5.0", "0.00000000000000000044951103341270485292979388", 1); + all_test ("61725.97", "-318781217745116634885912525386954947113588.846293794020809", 1); + all_test ("-504283888.0252594786037412363612838038962476794771680754", "-1144808847766934618876.2356421", 1); + all_test ("9701728689144729082229.639579", "-0.000000049089013163887977", 1); + all_test ("1734710425425226243190199621025858405083851", "-2022478.07568145447065678665660363516370892531", 1); + all_test ("-0.0203968042130858225550603184916550906", "3561783820164476692531301519095829484664197181.88", -1); + all_test ("57745178282004030498957972.6440468982032662924085898763", "0.0000000000000000005401742140193599", 1); + all_test ("-189888759.413694676", "962721078656113954807517895483569422587.81272690880505144016", -1); + all_test ("0", "1089893620428779572280086", -1); + all_test ("0.00000000000000005263900289846965180622155474", "4964254.08251899455", -1); + all_test ("-2429863004900274258713082377.2", "-5", -1); + all_test ("223562834248418274852", "-454450351567026707172759587", 1); + all_test ("-151149364443914860721418508987736982714845.09", "-32162477518638198637106030", -1); + all_test ("-479815101913558893748354066945159343011138914699444", "-8388616248281.177", -1); + all_test ("-896582450010216483769437258211841611193596983", "2151162154931974.5324307514844193735671829753537", -1); + all_test ("-4049.4959556373785645366161076408324898239699112274", "0.013169159788356096", -1); + all_test ("-0.0000000000000000000316327403661051020290330503045336299615133", "-11700.08420553103941618418917556638908321476907300", 1); + all_test ("-91734721044809355559.14146", "12", -1); + all_test ("3", "-291.2", 1); + all_test ("0.000000000208876005726", "1109144943822082911633590", -1); + all_test ("9144991639852325623127064299724.1037", "9195201.269557786877068732018", 1); + all_test ("78715642607677481.98025", "6700913191777637296013511988358756280.5878553149112009", -1); + all_test ("-42024992208847626581242632149881286185298896514143767366037", "2463231358853.71880752761233", -1); + all_test ("1424455191304023789401770179431438298242.5956172095628134529", "-84101775306.4342739228941346432384510922338362929028798837", 1); + all_test ("-2", "8298028707904306800597805656615422.563428", -1); + all_test ("0", "0.0000000000000000061793103234817538282147379532723959171618", -1); + all_test ("-5487921270.538719897462383104213699510", "-1", -1); + all_test ("268682329996669747137239620985539555535419363", "62924806289369.19580487653689872403580775", 1); + all_test ("-0.000387355252629095867081739966073411968600277129031410", "-20830255873882034860249701068781380943483", 1); + all_test ("-1629370894763750572049675488248", "991789483832341479415077040669482846.446", -1); + all_test ("490412212844.567042", "1193114358067372516507866.7675019818106066492829", -1); + all_test ("955981.687631958504371296000429391844", "0.0000000000000000001766202113828052550367604264198057743528417306", 1); + all_test ("6431932.913640551", "-126629077818549423618884827799639161238817.7318896474195", 1); + all_test ("173236", "3919.931871161121317101046368865876703331", 1); + all_test ("-1128657348139042005269644515367191", "7320475389227053819151783370434503694134148", -1); + all_test ("-0.000001531508743186704496242168865663427", "-41287316832998.086030726461470592703928425646406884861688", 1); + all_test ("9833276470.19", "-1340313090673.9396406089183", 1); + all_test ("-0.000000000000071266085262734127620", "-42269405460346073.44093606359227914216172743976226345709", 1); + all_test ("19273064566.607617709592384430851504568825219", "-0.0004352973090210742250757", 1); + all_test ("-0.005788", "699340993798990426136300929857470.932190", -1); + all_test ("-88.750431269011", "-185105834798384460867482551385762166627884659.971162492245", 1); + all_test ("0.000000000338337748871769299443110098647543052118", "1793651380297444523883109428377964622519697401107621959", -1); + all_test ("-0.000004410675006466359214215854792979430946366025336494150", "212402325929778260730054.72532540928129434351789341863557", -1); + all_test ("0.000000000000000001072224833476632886638952280133590418", "-65485.0633", 1); + all_test ("12502158597739959186.705468775503441", "16.66597304878086673769469360979630746", 1); + all_test ("0.000000000000000009677703", "0.0021843733224756870769", -1); + all_test ("-0.0000000000000041999607963521154604945381536827703934336876453", "93664.27886678243967349370590141313752374055497859", -1); + all_test ("-0.0000000000000000234261821391240556018", "-315.990655680030512945994935758", 1); + all_test ("3195453260014685333492830082716203563522.36872", "0.00009325368310030723757358157836689348934835351190017", 1); + all_test ("-33244315391121.22780712", "-1311031062177.74054460725962379", -1); + all_test ("-1707161.9454", "-12005804839001.54244657079130670097736", 1); + all_test ("68352491818706598.773651301473666770317477098618521912", "-0.0021074281045472626934633424986655940198794278022", 1); + all_test ("26.463440708", "-0.000000000000000000161495480948179406780882857906312583977592728907", 1); + all_test ("0.000743978231293810720", "-163654150785", 1); + all_test ("-10.1", "84118013336354653851057751102778.5255011398946", -1); + all_test ("160481384203.203261436811734467630350", "-0.00000112857893416261", 1); + all_test ("-3309055960935586978293.0524313", "21483182429538345732977842.5731059392", -1); + all_test ("-43958548371515045.020150030047077069164032471", "-69176275532496.255925921038380207105737351", -1); + all_test ("-0.04981670073679086136919289630392557877963", "-398950332875156202401821158696058677232947687447245.417278963", 1); + all_test ("0", "-435528753375555685177004", 1); + all_test ("0.0000032297790227357092301516546825411526485804661", "-723817273826.900", 1); + all_test ("-2702619562405304", "0.000021620337383638552928", -1); + all_test ("-0.000000000454", "1", -1); + all_test ("-3144143431608222864766150912095006063169199318202", "58.53291045364400226122849818452051713592021060811", -1); + all_test ("1115", "17.357031896358227163528", 1); + all_test ("626983028701766087311204001", "-2615488710736467295.69042919296588", 1); + all_test ("40365698821085373.12608667821372228818", "-49815765062.89597274348089400519601", 1); + all_test ("0.00022", "-3607024557794704402629081642923", 1); + all_test ("1364091171276057.97761244863798921737454557501095284", "0.000000000000000177865197456638064216228393652693903199280", 1); + all_test ("-2753914199438393", "1.968442310668164769128495107357994123999170779", -1); + all_test ("-775719502.7731", "-0.0000000000000000048612190810399950650839071400159174695292975458830", -1); + all_test ("-16116938624203335.4", "-0.000000000000000006412977", -1); + all_test ("272612865514273474320712548718.9402594608941366", "-0.0015869340307275449870331257080282841124099817091326", 1); + all_test ("606324260201754.1434994221817869056714199", "28395472736102159748126258009090", -1); + all_test ("-425.804232", "-180233.62994", 1); + all_test ("-0.0000000000000001323505962", "-4818224435323036527507513", 1); + all_test ("-0.00000000004875768812254650206225254505968862675405582488", "-0.00000000000250181", -1); + all_test ("0", "589543599579236108105278188597394.7", -1); + all_test ("6194660387650555532806365.67785490665673624067515", "-5562299925991551211.449094280", 1); + all_test ("21071748634936165958428873502220200671957884564", "-21877247994257440926313.112083", 1); + all_test ("29.6", "-1284653117475257.81055939276439345", 1); + all_test ("-0.000001070241", "9392743602622997628985533350323669657", -1); + all_test ("-770440255222043537495200.6997075447934779176467373", "0.00000000000000002163072792311046458436044183497750", -1); + all_test ("72924117389.35377926", "29103179425746323066349616562734447341721864", -1); + all_test ("-44.7154563464707697425999713876377", "6316419259432079567188243897453099488.27986", -1); + all_test ("231.36754477031773", "10395139401326885805822908081481", -1); + all_test ("-0.00000118333338184521046036822", "-320975156502906817", 1); + all_test ("-168714.6721140026", "30811271631788712886661929275491543882895", -1); + all_test ("658.039394580451534505618643867554797997792535540581487878067", "13102965065445154782", -1); + all_test ("-1765398404359286937871993026008756479663.1249", "-1893.842801467346249656722764607268566624", -1); + all_test ("-271426086204740642209831748805289909458935193844", "0.0000002849584520073597479884182004863626528356168604", -1); + all_test ("-1377816279284.24202090550539206", "-4482020235202103266487160771495221696.9569187528465", 1); + all_test ("-5.153338782077", "111841437759.8516773", -1); + all_test ("1935875317534881538626219754702496578459939396459924407.445", "-2.69502254630160152110", 1); + all_test ("170729241284179053792255", "-4451787575715904462656351072032905153914666075264.15", 1); + all_test ("1889745529039666589.126273", "60497049.8677", 1); + all_test ("-5033600800189.350388143929701198516318", "0.0000000000000000000560155992523696741221395", -1); + all_test ("10.5406982381", "0.000000000000000021", 1); + all_test ("-632940973989610.559", "1453966800.2947369036854268970989152864530", -1); + all_test ("6001088411976.9726351889534473754", "-1", 1); + all_test ("-0.0147896392703218629529334742030182", "446.69797286906823912856467855870955584367815853", -1); + all_test ("3.83283725770115471046394373426687880", "-0.000000048688749586070845947492557870516966863282338273", 1); + all_test ("311.472046824904240126119060726132453603437309216724993936", "141057050127502107523.987453975865", -1); + all_test ("8207155.53", "0.0000000000000000542558038634643663795", 1); + all_test ("-52.153", "4992402747992764459141957946.173249", -1); + all_test ("0.00000000000037087971513311066134109646107", "0.00000000000000011416409371", 1); + all_test ("-1.53294577434854835684", "116405244945444933601158446.489942", -1); + all_test ("-148112201957000169.55322721393", "-21184576168032173628662.173748989258024885915978002126587635", 1); + all_test ("142.834", "-183660432602724204651884604531246", 1); + all_test ("8893.1", "22902411.442310886381060", -1); + all_test ("-0.000000000000000000049301490", "-4268821956373353475835160", 1); + all_test ("-35267430686890946642526643.40527", "9442.78", -1); + all_test ("-388257.7548252", "-22789237273726383", 1); + all_test ("-0.00000000001035915929141861402608660878800813727", "-13364427.71449240284234717270638783796", 1); + all_test ("-657250878405514264850.36740512444031797888135499", "-194007658128943.2702175990", -1); + all_test ("40622.00027155142785667332283724715562664685", "0.00000001135895", 1); + all_test ("761530675604.544", "495276273239198618829474956470.233178493", -1); + all_test ("0.00000000000000012", "73036710782920745627417158215393112044826285848.66", -1); + all_test ("-2759374668072424884167545392056988395284630542193729", "0.000000000000000068039371483156100726644177048338315397952004369910331937248", -1); + all_test ("15.9120", "450286871.1411907943653435378050516223461628482", -1); + all_test ("-463242.889", "732474228336471210605174200838.347164418188057", -1); + all_test ("-37054664518639837.961401170232480179055753", "-0.213597333719034786247662894812723740483671041535079", -1); + all_test ("0.00000000000000000001373037051536737485136263054", "0.000000000000214231995904201121132614658821157329422560178904553441143", -1); + all_test ("50637443782578.4742028134098808129659944726779514644", "-23026666.00721461124457795917", 1); + all_test ("-6.49", "2475361689.75199634250718942163511668171643880656258831085", -1); + all_test ("-1002990.83923290495185295078283", "-88091991857.058", 1); + + all_test ("47343984238976282156612318707707241507", "7014.1380688580943680749895193484951393023851901068954289", 1); + all_test ("-0.0684650131341203263401401552553627094627677222266117828967840329153916004", "75230922521264678531581542609391910658509316112860752792749246167142277738299159084963011895369670394282283243922357698845", -1); + all_test ("-295862313165400124619550237.656069", "-0.05242949757418000580437043689552606133616192399732961267572280016078297875290996591091471487276864075033912589320229097078489273", -1); + all_test ("-0.0000000002314229728313932834817367208574480091285711473641947850686", "0.000001669738346220713984568468088", -1); + all_test ("279047626684188128091435590947041377415469191572169057666439886858786324321493442931662682903818854501531", "1014941974886877047600692.608173634828307821277211443446841120485731400366934581079981241944892978588711090656843039207957131", 1); + all_test ("48308709872782035593925640996821550.5973961768548380479859429302524753667536555613596780627951424760211059088558463346485", "-0.00000078577667662550261964917332375091682757798693072266793892607597426884314985327535125926665884881508153537106316323804", 1); + all_test ("-40215116723353583608457914214243065135175415923039250335730569657501143689052902444197762903775444.171803001", "-0.000747392053570593271109057105058728438851585178963059266112875660536041822237424884", -1); + all_test ("2819145676011742129640869014892511895199224936983927037212297.32661697202141330300178285210", "-0.000075196819438137495966275363285091739887328834587350620047101366951164331460643462218485807470864914189909573221028130571976946299969026068777239788983", 1); + all_test ("0.0000000000000000010446946709023771", "14509.94652999103448344", -1); + all_test ("-169686607281341840589884752740664499041142720600502268735857463345287043", "9240364668978345118.8252917399138216489359074021558811", -1); + all_test ("-0.00648413653267434764253188982546409464526518238337229133733999", "2948.7980089962735491284253586450260337878935566878447899493407398914786100293772145150075", -1); + all_test ("1001973818132969045188552394268298635939543267204272678642391489560726393924", "-2059855354.02655908060090748170485280847537851682099516287881930015016266786206643", 1); + all_test ("3328359199438677474383438883220437819298385482514329045164155052810372940115672255269", "-17822566.777845868041139594", 1); + all_test ("-6542320880710197522834989015966.376007802981186176649420394764512", "-46908061275717031191255178167927.915776432317777604650368349154202614657273310196199200481525517060796473584147643855326183999949752634506182391510540", 1); + all_test ("604836.583993358823509315213191546460434278961276333727065449874496855101461036551875374733492090745310221170534047576583343077626", "-4618.54322501862329794473469782199104028963878464891188614915521", 1); + all_test ("-2986655693343577190483562333.92412719013779269947465010977392088784157099123429955850534813434978228194474081909354332", "-103384861271501400520575481696310128926061538534263361845524022957997389715640479561046089692194108884343449310.3422536845368577965862523217", 1); + all_test ("765724.8058196984567185549755236387342642542128601094827801684110", "-2871511540480306286230716009167755118386587513101483870025917810.88436946780861454715514628104283462503253", 1); + all_test ("24448714061097007787870390934284762281809018607186508400198524858281434628378799796164614395462", "136860921422568786599033843935978450.6", 1); + all_test ("31976050073630733902118874888120198698694428091108060659949876943761489391517922167985154033832205584536458188056791991838367292725618452216501378", "-0.000000000000008724016496", 1); + all_test ("227751527822451319233980036203061200794979589033503610838256022189246563024105758517686476756678884039664356839803154355514768438.25760233796425193", "12930579982912105586374957109272.9584159836524371", 1); + all_test ("1514317730700056941559141895152952074535483501882733867310806012120694202376730571677339176140545799", "-1160800067156081508973855089834407714656861906.51850431230507", 1); + all_test ("-0.000000000000000004528520707580758615957670805419571717242606879228", "3281046363579593520467268296573492611708885559390440995276756319312503600477686071166829762632", -1); + all_test ("-15142766.9262153859827204", "0.0000266963695358775794073681141921441505602549064236507947", -1); + all_test ("-1170502802005482729655202039369546711769196.3826548809416965101170", "-2.7922318280801312629836579611849652427387594471800", -1); + all_test ("915561706486714241282431129.3095438633737782096437500430272652", "0.00000002743295589722432883027847254714940643024630751707638612336", 1); + all_test ("281768416547033993113190996753004903757335724486313955505402513939651088167932178912956960256084911825899718067523864582.316462439983238790646058945", "-149073711831044726451905735929139231365157160963186101095501511510907692030494797397977970495144468856267403314717745696.2972152852646707723456012113066", 1); + all_test ("-0.0000000000019747673020255994583864712477644533161788381792300799696139839", "-31965855724497611653259696447953582263.2864030194503056", 1); + all_test ("-1174060959246006.755952234360360526196000440620268", "10622998243184628451912141.109071876810564703814335906300181", -1); + all_test ("0.000000000033846382113152238688078094044310425164545900148933", "-1111767780033233092141350626922156977507571423642452179209671272723.16734621884468521854782887743133173", 1); + all_test ("-165250590789141636082920277183.08120431640165768", "20582.14148", -1); + all_test ("-468339329.835642768092", "738514159142.27", -1); + all_test ("-0.000088399519151094279453456909123490568956224146530747517787318847682582696828096135575460415155822773423264653037725174685656", "50694235979171725.10284160699574514405961006184943457644973589154", -1); + all_test ("43870463394510215993877357948126367526973038358203", "-9722007431984300534876108771208960300602249500573036985", 1); + all_test ("472964469449264925748432818777986783251555850837785.155421757016608709428994296960752", "-9311662.297602125194", 1); + all_test ("149990356612051183091016.9779087859113196930497144865038810481689032713686587351635927000452", "0.00000058376621752446454994221296235106373116337068588954258416259841704699029370833659808532069056542382277544874169614425448766346261208", 1); + all_test ("-0.0004607678264613885284392068473867065453534101118751415631835372760188817535650199460853741749428132718940014704174405734985617847478329957027082025", "70752058498943698615424955949868075492906532507.0176757020599642777622407991179893486322582944963580901150580300804716044265973436522", -1); + all_test ("76888778535419856741284623506934651449268144461453.4100936081838029065930113909", "-0.00000000000000012226026014905656393255160074154788749706679568415031254318647732324163664724545113944076277226550929098290192398236321899151452", 1); + all_test ("3203156318209811351127849964590315886954164800424606142343745.1683686381578999431682489662239045", "-8269184657749537294840577216855405317480047874381981", 1); + all_test ("20111727365475687172481528350050313287788545571058937993235075289638298425.086714092681300133339985321", "-1.09", 1); + all_test ("8792.394469303535648526", "556845927626235935416153911457755895037951239.9178326008028011116088523904503228", -1); + all_test ("48136562376.5855982", "-4664620002491508667225096233.3353226241084544027216354820339730176405177528341220528660597322792739250720990838180005107732410742208527592663761347", 1); + all_test ("89763855544387950417149466000861904435721204626431782465991561650.90098406420", "-0.00000009765299607531302464539006851217800595264295701520065262877011318715659812090110386884067798529550037236942", 1); + all_test ("-30868393537038718005", "-0.00000307", -1); + all_test ("-5185223470716576655809195163610321.9031646", "-2615549017350666281371362184052090206474489835519628225335567276034298501607305275085823412253", 1); + all_test ("-6570190451631686560241.38001587541890402432848708439444609643933707639935590896259", "324626622468660389631964181439480620661269389440074118784879141638091676591242082.35149172529026676393528466386409586", -1); + all_test ("102286341466180974423299.520959571961131384673275163806585575115835", "2745527309114708070695269441663991101771080484480716171439709632411018440.9471846829949932144642406654855468308", -1); + all_test ("-0.00000000003977653756347008076395413408629675698295885109193277602695303170782568202351152991936286417399933347874102607", "597355470921919715241658157756484780639935506634657853524178238394469802448173406793521622383466470180001778292727.40733108770130813735753", -1); + all_test ("197887959303.601932", "0.000000000000000000103458894529722050736055678304440744297638258502459562179105262236341233794829198584326110727749506382519131830616987451966701", 1); + all_test ("-13307726476516464006118797585863798440642787931380742817511702537361080004023468421495571836042024747.479074717", "0.0000000376335065425310597483666155345223642007352033783310467188460822186122860392955355838387349761629994780", -1); + all_test ("-936013007953467845983397438772135456939667638978675074252173994774974753052079960592.47977338457210574236644512980713", "13576615292952511187779127518363704883999332503672973.3702971759282614976225115585", -1); + all_test ("9.23", "-12798427797276", 1); + all_test ("0.000167142048", "49719109889269472002178986135088991291890225419981596673500350553633201288202635.772926153589574093304933356854028686159563673920076130779451", -1); + all_test ("-41507234.121353293309393741599055024405018684", "-615662226549782365482025752065081146308129562731747780117504154.7257", 1); + all_test ("0.000000000341762255281442429237209572068507698445580331776282387508674913040101434213455495104", "-41949136443982932485075657535585958912363078315441820291608", 1); + all_test ("-265613151330300009209671564.4222473758380149118266958", "877381701435580606449.2823863360946489509927889990897436462984330011", -1); + all_test ("-7775.7801922935180522039801358877017608615817227", "-245677467624819356918999869496669189293253534311463142326275828.8385050566807262539312986315538671411353195745005372884107987569771605", 1); + all_test ("-56671611310047491548245067647344781122049835409812386627.47184833607976624521197067809553483420845430755397", "927756335187625067734782189305518713116277817764247.57605072238432753688349923151908068643686860012798840863564716094325436269552536311256667911776199", -1); + all_test ("740145597581078317830455002008118144162252296932312159216520649062910882", "203.1774262154445", 1); + all_test ("0", "0.0000000000000000009031734111110941301911861337773289644877967835", -1); + all_test ("-109614283766506080410697376197915899265557750362042034638637253839764519329034984", "0.0002771704787349519193621964400949845983482306593453116923699372132126053949806228372333859881841496151153670277673003333721", -1); + all_test ("5539849710.1733866507907276", "-3181810546381672360262045367009456644564406098.706843157492761", 1); + all_test ("7919.8414971201383271371184303738534957144878404477288669", "23.71850", 1); + all_test ("-75173119692055.941978185535165359347403243", "-1777369117489847081.5793755856264212166727373899851099330121210857826856", 1); + all_test ("853843518069945548394273175137114345101444889.9227331700075815923961371745037613601267987181194", "-128714814686121222464195889406689437357524546230.015234400775", 1); + all_test ("-12254994213398422679769049305686.002801989668924092053922987716790500288719964943524816679018713", "-103.138354211842234506715721756147981015254031181706983900640592115628103240710219474933960256729509150933435108751279275932464534793849351884639432456", -1); + all_test ("-59175298043142026219772.6138367", "0.000000000000000000070447947045776431902102876458194", -1); + all_test ("18408853293470113069702150408569784461075475098255264356830984000273938318454913474968562276768901135468209464837", "1547252236967174250.6109363062455217002510723246", 1); + all_test ("0.000109934251781192379417653296979431190196397725358849059626366415903680138562279946229803244271813742725286468939793394672457421", "201592.88634560", -1); + all_test ("4295549848243131726044253553835945417165130579767473284081170673527181.25870512635225264560732576630", "102151540455604787176154202447753962845.44365218", 1); + all_test ("-70018315186783814804204234064836070201850.45111825112808417052739", "328359595989649160.27671859944", -1); + all_test ("-187481575498617809778922382731003340929808335610196169", "191210658629716423428208663327712.22840812936979919141196164775880201034911336765", -1); + all_test ("3935126925246231555928598126054809026090453369989273776664805163851.40944096517984980", "867141118109779658944.2878631198762910032", 1); + all_test ("-3.3112", "70293088157175047259886071558256457067098.48990741414498249210048163949091759610703775633271629309548", -1); + all_test ("-425672404160144333420994274930650792419390010238350069166384976005003337185319653781910705867425126832871403392819177542518702296572117055960061", "839737903411111958962035888468571596712972008129364688.4039", -1); + all_test ("-1112579726844536917102467847.17653", "2663046929443819301686222.8815254170857930", -1); + all_test ("-8252839102489352083135451792859801342710108.002349758", "0.00000000000000000754813631507054088229552535842607509562669628676682863560861982957068071893164866381925307374227108742169408306216812315857923", -1); + all_test ("648977871365662014097820749365461557763157639862997561.9226938534796467778911346445390320354152128870864719689734", "4175599249314851119719173611802268614966549291562107396112171800916368481888650992052892917907331", -1); + all_test ("7.978771111691608901034895922046997520765316732991829020429708671577870", "-141461002304237680013302819529217200685047249677913497940481241136261081366014448461680075.314895392687287547792476133", 1); + all_test ("7645457264770121264.11519238056423560881225944703024802644929136702643335901338244883352676085052049326756123902513", "12248781443620567711948542737349180298557346901690131050556844819693354875119397097.3069688913965372036867997744", -1); + all_test ("-31463526490509734316426714529666961013007041330904474383539907327397930.69855820", "0.000000000000001084414212469851737741900907708478145214018350492547421106994594378", -1); + all_test ("162421846200240075972.621793667847764426048313662775180616649900013446891164416772769820233651942815777530072677881008330637209917194592673406865011676", "1636.3384899943980", 1); + all_test ("-9388.77817056401956890804476948", "46543968580057.279028606835157899512662680123283044326771", -1); + all_test ("0.000000000000000143303812564681790621876402521018890314183355148990", "-7628794548804927.34", 1); + all_test ("-1542550905995342000761716058753926543294062017039230714986137143389838208183333", "-53800959573.4262787634955806006145772222341066088520813", -1); + all_test ("0.000000000000001152730387533585619339997779185607646939273677780916", "81948301807320885956271993225479133739996835479108177281833065098631486001558755667729745414069819258092", -1); + all_test ("0.0000000000000001788799320895331948748150602283438995686077438726117754118635774342676674835559", "0.000000077520063644569438264401511693512958609441535842475827179071085391862921498640290404605863569208836853054800018312203", -1); + all_test ("2562546890284566201144784661620724384611158674150768124964079346239943289319722480037060276111920.222136554767961523266727357926098927614671062311740560", "138605604122306326.2813293437333129599840", 1); + all_test ("0.000000116108838430759441302782521474416259839111834957042904031702308600565811558707520", "-32773081443699450674814232178208000165745.1531323897041933349725844322275", 1); + all_test ("0.00000016962435025541763496758773163192785686185", "-489746511467818443870465628849334514883582042615007726260255295320662714496913671884730698683.29565342494", 1); + all_test ("2595681723.354258055254516439280643724110163289153337969294375601861106415452385", "-115227875945154401241354604360157180225326718208937244144045426579478908666999062245014983584623561102791559344419.3439990067153", 1); + all_test ("13988.2256045374464162730896958695884374", "888586900556332788670112482.37398292826916221274855412326388860996499123880558724209443328949082009286758571156655913796044564457627209", -1); + all_test ("-0.0000000000000470209539970879477", "-864491095896332104056.032991", 1); + all_test ("17234844171529654006262682431556684956259672.501251903404554782171218613148856041151461738989660504903649745731468011585476495243619320849285372", "77.057212", 1); + all_test ("132143152930296638008029506374047631241235811666497989329", "-1574290622065771830275216174898081456821450631640123172766526472178.36621512168173889629852301981351392061034796955081897041667393", 1); + all_test ("0", "-1316574314525845529636399894653083761113210297566939806282601610613495358962733006.0", 1); + all_test ("-109413572345091592273384912644432788116678901530150032030387206946515405272708194880210199360", "0.0000000000000000001151002167821514439222568523527362216245718047502081296141262348073695099576990022126977579292159436086696206194791236098302610981584", -1); + all_test ("1710704295541545612797844331135458249843431195009010270413420412760951540267443630154282121567740496794165882981618621038738605039191086840775989345074", "218797555950100963168190026470661147747154206564462260", 1); + all_test ("-0.01986463638088003519038677632588937621107015695", "-1028.291246864751944153983531204139834559", 1); + all_test ("-6129329794341331550700126780841411.10681976024490695157405556642104977194512590697213", "-102763039780830034728404554703096.812100908361472984162806", -1); + all_test ("-226.626", "0.00000000000000000023420336780091", -1); + all_test ("-0.000000010129241772248087133563483455888815190018826890577292551683993175479005119579601450564910", "-1790565914576279812291386964788431643050956024856703305009441744724322410099442946374063091238355862765866", 1); + all_test ("0.0068398345678559403526205622981764242038537974473365", "-0.000000000001407581522035574500483500", 1); + all_test ("13412104116279855792666084150933562672654470809264824", "-42.260038186873416278616781586145", 1); + all_test ("0.00000000000000001437216", "21380203762019351547345259799258194003013715652251954478030855132881874773077307627834740214867166409662357639227437420816938973889", -1); + all_test ("0.35484739402549358280548938093488455603603260", "114404993135858248063275522978544019274645376783367486741696148.0603461877153775553115699756", -1); + all_test ("-1392486513299304175902425517444632375062450839823901184672697507427515176395766963801250797985239359712769304501547503238", "3454044166627774642387359622402929225788813383864157201212.2114062265086063540445467889326266", -1); + all_test ("0.0000000004235328175528436975135029779349501289306568759092284453523973254966515714043412430621851", "395056597915705386266389285222273.34", -1); + all_test ("-204238872345600290518420", "-7070509208.5", -1); + all_test ("72981605063519176291637366098161261831841026794183175316952260221206391640795191543.8421968648832009685372935897352204397516972141864015416063525745", "-36262462150667.754518420039671271875550396516537776640666003", 1); + all_test ("-1141023.82684352", "3434872367397371325216431040190149263337567687305458524226443036", -1); + all_test ("-40333484548205874986507170870398476011.93898153865902627865880451768925350561994301059418337827757770353", "0.00000000000000049632092624546818538381130693253691731101933347881923687", -1); + all_test ("-230663466750273009979493177203432440.865302323651699785239168668412433309395152855727", "1670998446668363695655787373943065972222.36760305066767262349052811349705705205447571695947815663365442810397158464959419047231577852334892259862", -1); + all_test ("1495920643058959437383621501654941246766508238559437227184395050508514977010891589414393139195", "2", 1); + all_test ("0.000000000000000039324000814212786891918567188197481938283669634275484732259078", "-2299270960425972615800224709593358786239089449465769176018404837987624610630628831153594469455213474024413922975.3876555670185953786804983807034", 1); + all_test ("-8082406101601203880115291043102466270919070095098281953735730788166344088077537197510058.919123451989584674149285735070236244024421371", "-0.02226327405613293121833686639574431245399059620617834149317063960558350928186286512729307426425266342626060275759668774073177785043824298828768556", -1); + all_test ("-1260845046.64883107384", "-0.000000000000000000032951467370811927086119928603400891551133309876860179950981702630344524252699073518428054", -1); + all_test ("-41702237.44707624355", "-403554966566407328040246233531173350056173185174578248744654858876543716393251428956136570123.045148101168981528401974150078770666865217717450803901233", 1); + all_test ("24411533732401288279000256393511093097142208723735552385390279631903938583581112236833308264597448368803308517021849284586376379400244500274869616", "-540499000648432033602513088454810109729675397905099895623746885562670714393437069416769033407782176", 1); + all_test ("-12796310936083799962806258894032181490930481696661675693244680395898.81995123483878975", "-2414014872118737871549315707.978848004363088", -1); + all_test ("-314497255487.428261813176560336175", "-6306491139786796925149337414394236828901640814689977446346353525569212758359614726940791393359277514543960143.6", 1); + all_test ("-651088466302570543016523906430706603794205652090045214990130588847786.8819083644743982693765724621734749239800740209128895951504965", "147959.682405388376182159454226557702317868363038056542259510762433258825701331105581616424866472646181109750953466531685333313177399667105119076833", -1); + all_test ("-6703.994577459788708", "7536793319.4553806370980150922073737014018531259247", -1); + all_test ("0.0370921742946192583396225808399487629915725931871147443686211585371265633482", "0.0000000000000000062212476744078005281537", 1); + all_test ("453699458249145242", "-14728948.0513745626843613222", 1); + all_test ("-1.28905599285812487351350473737291244745697", "-563389218829763133702542103957052040974515855646", 1); + all_test ("-308", "516984036404958828482096090056459410969858910697997243496259251361079985076443709267317847242129290643438742396", -1); + all_test ("179805847183633847438194.99249873787321719770175", "-1044247574021452596915714111909132257910423096527567", 1); + all_test ("123554101588320649544216.106518", "0.00000000000000000004397994853294475245700390814883392112100677236773424756659144675174327699038110126243806258189173504", 1); + all_test ("-312827142310757997835070900727109666586292473761969938151984196401897529.7967077459640049698", "14093333248931096650.70140994553674013659186980319834246516116032507700519477099803787321480988634011220877", -1); + all_test ("9288004658713735991395448766.471082786309347191997997975323232039392966794167278477200470135442690910", "-0.000000000000000000036236", 1); + all_test ("-5003663162392390422998559930744815950712475533778862767546033634736239106865398.34200465736653393272456", "0.005995077716475462", -1); + all_test ("0.016952849058784222777545704550635491760401113492836107817192230098750165112382036526736941511441770759965884476270435716500782779545192104844146397", "-214821059260215160489474.303370805896558958575540934636712555791219049338778586728609565132509837009652696", 1); + all_test ("-29821131523003664342065669422390700671001522069654500533110790", "287183970895010462611112222181497807816953448196337091051099725372640836865215266901010504439100294010735018", -1); + all_test ("-128872.71209378812", "0.053283411554461586465632620143914891566173223703579219869905435200516553382946461331422076259227430115354178", -1); + all_test ("0.08775752449855547001537690223228539966158257927867747229093074060191733122415129411764", "1333896222140748443545958875369018385387665379713651837509817389114355723402401.0775181114677961790564570079869", -1); + all_test ("15629811629486124784855833358618453024981468519010609184558364167.768915691712343011342006201865733766347105695", "-3559856665.9588532621138851367041381438359281318430119518966199303131949113094567635577699151940255", 1); + all_test ("-76654490432007487677111411474359324103728780911984821055308809497501614199876134", "9830309069585260103024961490220561448272871874066193433860218963579073519151392.1834947306646", -1); + all_test ("-31109911419411460374391974256048150041603191.62921550390052930006782191882078004773451449319", "0.00001106636466858", -1); + all_test ("59412.47533", "-39255066756843933387643056770701779729.0077716008957107251561", 1); + all_test ("2662712418298080979.1948976333080", "20186609635162532310360175381112691215793931769846124087001563989679.289555957816471233930494954952811347559621424189186664143132", -1); + all_test ("-3.389322169362240007054202653154909275703397214107362913016717989765940692515391", "-0.000000000000000001020953040526246078334443", -1); + all_test ("-0.00000000000000000007374487372528988414726674382189607121675122700289699190268421814598374167900942667245468200111960006664208395924855208365497808516088", "-0.0000131144124959397624156431920723496903533632256118147633612272158310284", 1); + all_test ("877109316442565059709146872571994508553392", "-108721.3420464648885227659186804342432278945435989574916950", 1); + all_test ("-310820553664742286349911323220568418134747887975679788573390691884700762375565019784272806.28132846056923331782638419840233371336", "-0.000129907852986510765050318657102730436310787353175435003200188740238798817208048019233959261195408801763064829045531860468977152903483168", -1); + all_test ("-0.000000000000000941506813198339645372998762911530208153055218698117008973604076971894165172184740572845955636588", "0.0000000000000000035524983724808596360636883393862678354781", -1); + all_test ("-5.708582962403979536402415075748013664386587264597389537125177279692027025", "-5444494016350641630074.4592669873553751386488228125095493679780365124590363918476034336529", 1); + all_test ("1065934250.01120693", "0.0000000001118603899195807698300785911351272000758786456989627596648367020369673309737349439920244363853300300", 1); + all_test ("-5767260025207073188444945197413274423501738050189735884547730160156", "-330580305165737252114656677623101326542624691273133923639274155802687902056877140616096326912578282576033.707651495772456980156560968135871591663460", 1); + all_test ("-0.00846559920865320709178796883143043054766377718918477778902455012013929978343738333", "-0.00000000000000277568352085571198453362669761349413107250675031694958277194", -1); + all_test ("-6918667114.993", "-46052052220603902657877827218788263055315560133469865149768526595441710407900.57985786910904527268305318771593273453522505547552", 1); + all_test ("802546912863329952116633224748510353570844472458722557014878400044036716183048576512202373334873328024319243274271269741459325940236721", "25.780661731282395351556152740", 1); + all_test ("2184816382096491338787830715753.096367163048963598057691886397682046882303288589909079888897521056426702007482", "172169492388519739357027405423396243714.9004204282430309366098112447812547986135720071346255130203678718947804", -1); + all_test ("0.008529045730082055582061059599446072673840302070786925367152757187979559845183911839396122993813579990676569522462800526002564", "29369561465233302592528037897817257355792654406799947375029638", -1); + all_test ("-0.0000000000109017743105447531682", "263922392004884246723806322057980218525495312.37380641189784114661235018695096998668551216502665339669331921962931477127511", -1); + all_test ("18149660819867833.776611203308917195146919391529441", "722175581734659614727875382644495.420521458331848034289", -1); + all_test ("-0.0632388130646494", "-8022179644458769940432045379644096328530320362627149758199672304055490229348414207285963636896546168", 1); + all_test ("-240884.4266125433562152474546222714299798660415870584341961026", "4565819105565625429351609469953039462154313440532798419344406123", -1); + all_test ("-620288745832328944104633174104780618530.142289821594467", "-0.00000000042763677901729875137065795271947506429102070293254358849747074726025655222531640583579591035602665241003765385226723638432242517705", -1); + all_test ("-0.0005997232813686082699072690646851437237510751191877857078487507971064518280118066752636224982626066803761438054710648081819170217128106038864606666", "448789772975807181453965791618344036709371894261789527483851520640967.564734687953462805464508292237645", -1); + all_test ("-5944.46084192814621653509427362663260065275976732261237211575829369239376100996606356674502186726973297493942586399515155362001241057364039180", "-0.00000000000497735100370463438660391749047107856740436707685228398464338395009618984454240220388539", -1); + all_test ("14161446516382225835.7766", "3542370132472105378163771457970216052165648.7425781268389210107209726519645230419709021897835457608593367579978930689174492450922488019354946229559", -1); + all_test ("-82802195741411961169504411985695677333323242354.11983177229539369704405186974555282", "-0.000000000000002144832189233807282719629172", -1); + all_test ("-0.000006784625484274469162301558877626829276531242437512334202379799727636918702695926121552306634079565967137748099137484258", "7394871143261456851628981304387021212671141137347474914493372160821.849982460588305432064962", -1); + all_test ("-2", "-9577480957257851728668158925285617815497407658006869447421603583582482671861877265553874067890434541077880355621667743910295.7200699525124188760662", 1); + all_test ("-197708341652218617334936385971802975665.2650590102", "53802911630665345933342409174160976109848064320688374526798452717190686158796876613968866779882767043999203016678122719894918187.874065", -1); + all_test ("-38072823817863136627991695274477704.5643520430804929832270354210126212790225020895173826266131214755461222609225019501", "306508739886223696721899282220346649.830346314255", -1); + all_test ("0.000000000316191129355863756434416730315412182337261365809876435613199367647273178078857089451964614692088016490008532807028204058", "-157162422306489095125228614960816215001360390504615263163200492537376167.697035893421723100121710027972326561445029491994146118409598263141950351594406", 1); + all_test ("233976544105397.53972383", "1125648.85", 1); + all_test ("-4130737000.0498428402668398062658352051845468818656034782938669910130276648346395651", "-0.000000000006241094763704769356703784", -1); + all_test ("0.0000000000027889130336186175616581318491830441190499146641708159643961020619163561667", "45180.36604064032026790448358284110671357633387319964786520709792147034725656798271314354746304777783951768808251243116293584625182020126910111", -1); + all_test ("-0.001763577869", "9278.2276", -1); + all_test ("-5950168542955097743177295383964350692.905100936503492816358409770353723347472035487019625013276257808231", "-0.0000000000000000029645447547400994864011386152017637251837470928190914231982054201322347159873722936132649422634877469019375233796913", -1); + all_test ("0.0290875288731746531591535288830511501906464467111328224293851702688888742097645060905370035803256633571014353548442220", "-294026438922793701124734905079413788211.878160013300244423789767770679", 1); + all_test ("-0.0000000014982823513781007328958069947012871143374337994272660148270374805416396160092178212524736096877823992919501659712353985693297357433585031", "-9868101235517540617583414816531196163394846626.691831830894", 1); + all_test ("6182476112765412972256430874006641281681083766558867329491.954829670374057358958585899534", "880396637045385811179717244187902683321740830158884405014171018661178832737243379.99039995084170785275378504376555296739303042003359925", -1); + all_test ("-160751704157218639705860194646066334461390616893.68299259975682214519324547685814966600492784129638821897523841634", "105578911150318367.008309279644258340186264525150749881652252235290292605", -1); + all_test ("-143158723385187700800431662230078385359.73820852144937977467", "0.0000000000000000000124340639699407338232687471046541468558241476495226668073022571684081347728341350550106103160149578245741", -1); + all_test ("28458452063254242139803200671296001714734755842622926787079731950.0992735055675190876673437043110150852937949483", "-35838408218375548738650416610", 1); + all_test ("1405901407.569822238040634590968038695131224115356886126732238", "-157848156800682193772.423092237390517494814302283186221330", 1); + all_test ("1343.2952", "0.000000000000000127921933329444723698800231745313808252600125", 1); + all_test ("28853632715587493558858323118072822236165839078014960997892188442420732661028174535.246119951253066921883027355182179886399617487552776484774687", "58109.968599810577067693043679467231728516554760366582163143608751563852471056960486315505049057948977813649161", 1); + all_test ("3.0", "-5100498997359905798.17245204", 1); + all_test ("-0.004911663588685959180762975105547432899694263", "-195.4862", 1); + all_test ("0.0016800213659346405237529123816285", "8.54847928757376802233", -1); + all_test ("-279764958968647619773787889.6654810407333727462942344", "-32911490485080881220995744901356698586892447851187378752704802609678707535904977.2349682793537012076792399816515725811842024374", 1); + all_test ("-5785273759.646965191309783081376893326464784097386953277756864344482261946184327330852", "-7829585551142601892881228597972545207045593119", 1); + all_test ("1749468477458267264460735919943750511749548119353526653455735024376363076831020428466683780580.382746467817800979", "117808811280451.15173068945839587501615962470947002537366415063962231776", 1); + all_test ("0.000000000020999785770461916630781325078925976998406955207235955893836098174359617198083615378801786560", "0.000000016082556089324398313999563719442315635940079534503288230557353323864912025891052353", -1); + all_test ("480604730995226700516.8211623950807854777785418843", "5121637414014031413488780740025020869010447826688359.63388", -1); + all_test ("0.0000000000000000000414327897716676413497790718766565633611669986458582853310823990011501385441729741967983", "317915031341372776103058145461905010362702388394603209158188747796318349497254.0341816356079223623851060840433597178761519084935102204279867720861768", -1); + all_test ("-0.000000000000000412840046822276949148", "-8495.635054982676808368418113257375475710111078926720024154221406272685887058370083", 1); + all_test ("-2197955143857705392850268630353264994616393635646.698149405979940304022731", "-709379519152508448101054642505472310149794092278935824702792668825161997157315768209798490103622850132151927880856147597945372566812892535", 1); + all_test ("-0.00000000261844554473808606144849883800858347445837640490072295304861523742613457798612213017468212453275", "-4257455569092781990677425261987768564734341578600573323744310843721093.038484343063938561039832375679139", 1); + all_test ("0.001067310532886835735948587831914288689553303108", "0.000000000031462310921375409599725025289890661282700997505119039922194159851961328187903443704235399598322794989000459030891087074757277073644206020955", 1); + all_test ("-4063265657389255020751373462844579518406276172065432701779826406527190899149755.03517774122841922794975102464204365891", "-177420797464172487220237833839895154679.55011483488839278508767009813747588375752975369464460567647899844", -1); + all_test ("-0.000000000000000001869682149225241953308274214537693115192334192086388308300459785925708765364103340884259103064347330742062108169", "-26575432925732543046433777343805635906835756.77068203591990998282191321647366170089253841793502621205827556969126543988080649772889793884", 1); + all_test ("0.000000000033068235057345162857793510724468755088654739039376687590493852515005413160754215391838260423538076895754633488993574", "0.017513325024275361448809543357388556724448571616284966015444430", -1); + all_test ("-2026236793445834948507161660525890822744664756812527.8835718009664526661197600010011007494858846013632636703661400114", "-0.000000000000000002859595745866245904331020489118494794587721260255748716684271140711216699026430746445835646820788772706657822185638176542620892759210718", -1); + all_test ("277022415667279674349.93159166888354112279521767856918625662786507898346558797736030", "-735938929386893441493788058350316673108625777978459161969923997224585208026818400417362773709666810793480", 1); + all_test ("74232319.567499431", "-56621962153013901078899971001172502878975414000348449901.28271290391851422", 1); + all_test ("-3941963925114761115410393553297553624.53962931133021347646967837208017011194854908672954262275111689570", "0.0000000000000008697032", -1); + all_test ("884371959410985393786970216012521351503422236180303629436107407710398002848795.2898794903243646", "279245072377995673569.57825740047951807305399484447809098617257475260300", 1); + all_test ("100631006795618153033034251352672.397743863352629831700458457767", "44099488689948413571101738537602860137703950300410932440087945678445341219014875737401922780.17252689064335904983389027581416", -1); + all_test ("-1", "26868582.3096831844134023012215433466422117521756773917584228132667216484693295101611945772014129671", -1); + all_test ("-502223330837595.44379400944709999644635357228899069929988", "-244003493276454121687882461126734836.07592128039798251908581902930717022441921782407196457234418354328582", 1); + all_test ("33870893120776524224787.26155584027957777911183884255850768", "7332984218265663155549396746597908086330161269696624389865650149280363963921535236843118406711207250294131459763.292451119914782794", -1); + all_test ("-0.0002696984347940490398828397266594740044041722095889055402876873310427883943924936554247676452751022", "-0.0000000000198505049352941803865970937898774479162157842482374962457965176036173890229130068136812989525256546479161037", -1); + all_test ("11790148948260649482767435943377652438601227088883805365070340866280933972152574199547632878971", "233346516936414547946433708151846303258806202438283735709824656199864024559", 1); + all_test ("38681768069179772995891498403722822330048951280500540942361519429848268851021582215739737468318", "2282982623239", 1); + all_test ("-8718.002", "-2162383841139137785874392020678.222654167998464572757082745022919124895302054425608160992223227660036361141753054047144372425", 1); + all_test ("-488786545287184792041400596.429764766800072062963773425995630557595146308866924025002119736839163", "150349397895989857.625350343999955836341802520548691205621597531311186198090511440272682715306143508070716574615641968162130759726933914", -1); + all_test ("-931924244656227219809405990301731461381455026788834465108077474984655183700894292742532304542719883873737017900061725370877671670134030687081330954", "-22590847661040395922870788012795560463738.6042785284312011175278095893489415781880229608749971180", -1); + all_test ("150034078673021523537829708913856916052846430.677559", "2166077460871.389181941661", 1); + all_test ("-15221173714267229029000823.870941799216310763467302217336309", "-1673674035036687535894", -1); + all_test ("28462245616076323814547543516628503117353984931675274738003002529627.050280772564006057379343", "1684755069944063046468856794520.544285696374626", 1); + all_test ("0.000000000000000002149636302695318031277254419779385264", "294828031937806482188347305646408178392144292715768037206520083084", -1); + all_test ("-496433201256500626575612612181413775390243576650772463544387954585218643129869625320303924670", "-442160689638185654.4551347636803891464498055343558799035256967658204045507964302065922246141137529665782679", -1); + all_test ("-129579775113494026315929537570278930664181731133208782701.45426943069540180187934763841772148976875003178126761049589822456645625031071378426", "-50960835972632028101013868729008914820797471866095853076604833015003479026669241141140168832519272084406271817729840163461909", 1); + all_test ("-16747439551932269968419783516292565073527286.5978912153712873353897", "-188574355884266969.5316894208093252428", -1); + all_test ("-0.000000010491592994513761160780", "-1050932951471917437885324587810501317003548260421160.74485123595296963899543431", 1); + all_test ("1010839134920617276236285760745178410456.2249870989035696035968471032980500261", "-120594328581364716298488828.9424349293373529319017263005601621047414886", 1); + all_test ("-6745237811374494493983732995517490423110771468604331647114513524140869041111924.07143145225484722086621945039491878138053819409423194", "-78096848334747442570326820068097176668363000702119878505808158486202624573888559517499059469543996762065.34515372475365048555320336061286656", 1); + all_test ("31641216104195523119323298187454596691469623", "-0.000000000000000000258260225806808436156489946400669652403071801164964794360836676150308291521494089553214811075584197298817277602", 1); + all_test ("0.000136955496160497638501494207878559539838907773928113609973212720681874384188247121736519967860967190729707", "1131456362979085.096849571030916258593458603291865925658158837160864", -1); + all_test ("0.032374350209810222548593899", "983665612534486391903069992076771767376905372098300464420498293252673383701.36", -1); + all_test ("0.00000000000000697749637212917655601734843952168313079723929644561400713832738344957256670570318423980784737919478703314324358395035811505647250409924651706", "-502882856311579316783157003.0536395389", 1); + all_test ("-651635600158790804410143491638919845677600042415920405606770304907492557295578675862061924691925913075254252734942878", "-60351457742518762435343004631135543741539510674840042991014451995652190.6417249701705696670", -1); + all_test ("345509817388294075020401571707985302468577790452097230.67244674898512863573831730550161447995018107519203024", "0.0000000000000001056679949312910174815404770839634025694", 1); + all_test ("-0.0000005133332646768106615086635756288330738260842203558000626286730150325018694693726708199958605568678693224332247500950661171742", "422219598091.2132010626485059381682644362524778822675322", -1); + all_test ("6209045587577773276464516075468480344927865681108539547852034571272194268785056443405885354613045847441750653814344012192541949", "15400142567569326379407593600878161357.3158267836117765", 1); + all_test ("-0.0000000000005128844809243836111542045", "49208450703085595317554090353487521994302.58448330950634435909161638725929613848207952792171018392294484488157376401528860", -1); + all_test ("956820321617083079596327657581942071127140318928050899898356414048159721950191.8612258", "17278138380102047215838955529410627.32350998142532", 1); + all_test ("8582364", "774.20922956184858799", 1); + all_test ("23221742968467826352973222392797444267945245449112426217441284967014691005809044233558034646290606716623338692881049684653084513", "-716575979020985.279557138936348127028057421241051031841307264455042608637743866536141586489408312326413837112549345", 1); + all_test ("-64239880442", "-0.0005757706836762797690172810781616112054771449962376286638181876626306753967493356164897064584864421775", -1); + all_test ("99890913975286305568325542267993806860755562436873534002883032609372302026293419920260643846174424961790", "398563986970697552164623501292881320978723925743958528075037214399734729923685025233165645512491551109", 1); + all_test ("13099934563976711709606830808259471671138463230508665866920870667879022883291570961467719262054", "-109826842662920.8298299283611", 1); + all_test ("47185659575228280475715212180191382741276156908324186745372219490089540417870210622287493079401094749070195008965690189496257.6344290361", "-191311112886267605129186105214676155987804385676502850167374976.81421158641221691", 1); + all_test ("-97492338884677999782.8", "46090.6038891563729837049651434308627371886782595339529134134103138942512716921751", -1); + all_test ("7375598828163292955262802188069890697127023128.355980866541558240712761760425090656158086966127126201418096188025050710292147394218656199519", "-33736162847546417083662199915.96497427321380545945697607572725317230293032258054213443", 1); + all_test ("-218160598947993698294987185974447249912.89115498", "0.0000050015875427779244596032970734068655494267635032", -1); + all_test ("-0.0000000000000000020", "0.00000000000000000001471670935923077384861565636336852413366332241046663589863103491999420020658770322413837060604", -1); + all_test ("33129180170998410129893543070459417633301197982910425.64606409078111879170213981476306214296822988445339041520791973076369873", "948494610332137187926756645888688419826755038831255074436327001443802251577207818445858623129.161046", -1); + all_test ("-225952021109392177218450439017431752400942775732240194661463892287355070596511103556052608754481002242937280547960.167872771176417481374193116703938", "0.0000000062277239670560908419969666371220135218008079705746207056768105428331985213283124653402345973621907360434147807551859292787803296246381222933824613", -1); + all_test ("-183573578911405697023556086514609883893306795215626297396579687619875304342323017839805206126604229488822003279.59233204484561014983371", "2633566858032007647133550571239916327299194373140075907964398383480304297038434790716388124909149725536956762553458755051740197984938091354917", -1); + all_test ("0.0000004460397545970448393886895088191903634042039815", "-0.0000000000000000095347818761825827527731028387911543955632717901933911587359863970181690577102483822386465350730573340050175224061", 1); + all_test ("76836306086273960905931260788344443215614886.50168135779713336", "337185798150132901588999178764118776.92309780859993696138620", 1); + all_test ("-0.0000000000000006793099207949304687582058497331137904457143594", "289472321951375436507478434341358.5306354511464450479041413522186381", -1); + all_test ("511444049261329873.821317987544416845423877441515588846906090911", "9490010.05", 1); + all_test ("591713007334383637715463717.1291808137387981846811658128330485888980625856216328030564698865533394807126005192249912613", "4823684942063255528803421209.107961034983048341611839235146", -1); + all_test ("296954671497441320436.6897774425834586892939399251192320626790853969384028690679126272812703387657033030897290641153152475784706776362266597698", "13766678990.5234817", 1); + all_test ("-133060567480374920488783510341269926348673610429669534346754755488082205036746.875386348007223776953779852911928", "5927", -1); + all_test ("73932844006251372722325798853706639310834528653981099571578123750133433908285265618.76202624654621129232002", "-0.00000000000000186827495500328964616880687615273132151323886740951058615687142482475027687476", 1); + all_test ("-146141982259082027635792785584353187175763401213207391", "102024036100851932865259629376529498649159346459236183997.282137015883624412337321294996984015309550913896592804940099660111659498774210", -1); + all_test ("0.0000002414815", "-0.000029758446843941651956375917491305831593454765385140091979237320013919577077698799164529328687158159830988324", 1); + all_test ("-210151030793502383014434760169391310.18854098497872", "-43132900782065", -1); + all_test ("0.000000001881697195168801041002308195919736876762525914212692483270", "37220503866578932861716463156502243937410265932050985593845402005265927199299255.98344413682304736845548607869635917563352646023138638403944588", -1); + all_test ("31521072328186955772400060885593.59297383310829219344810143967971187389", "8299359200986653935603999653552082057380926282505088802016107969552627375549163347904875168992450289735997709999832779519890573966176799923577873", -1); + all_test ("-12805934102.27948320410636171184694060430874642071534941054923893481501134168009876861420438715119150275015992454925505523986465864594", "180018001880206592982896205731793655606255072617295111549612026292885879170444460136951078426.390401726986399145583973049833043477421044648", -1); + all_test ("0.0000000002936016400407713831598517736778340369883558829401128461721111534068980221676584362479994606", "-238280848623349322403710808897808837396452119.946711492325936626002256793789239512952", 1); + all_test ("-46459704414418529966558677894175211345197518419628.95858240822563998829696554747145974856949749820184367731693913940235039725731", "0.00000000047722733462292648206074425", -1); + all_test ("-541280.2703925225439019884062953901365125819982181630864435007257550343992637766901456996336131019366630269083091648294919635719143947548766", "-228034281", 1); + all_test ("-11760472974851709104383782.662777303052700", "-8856003943296025750571072176230995254098814451714178705187395377177217251293203.902574261722648560357498315885671879950820620988638695483994173", 1); + all_test ("0", "-23189877550335243259085364.53351434706336084256915879121464887999578773388400557820325828544547283691169421254622757350946740952577282739", 1); + all_test ("10223905995799236594685978417380096525435726347166557843.918727523", "-0.00000020607225637494236034677211524295904660928630761211510648083699692056857979868128566729857282938350504504013801371138876743028895", 1); + all_test ("-144846563553578036105235976816", "0.0000011270723657297532847257698465013496541743158648293535010828229786356244296523407610311043996299040", -1); + all_test ("113032464106654125041288367328368585073827742426563069634695010033138913322259705750701638755775233614410737200187834799536563007432367297372", "-144536245354049112745081024.13189635154492291842667978940", 1); + all_test ("7986309849142964591151981507150767", "3715212599762263522511060701411.354291876313760173927039871847384807384499566193464909380", 1); + all_test ("-0.262033701867790308", "1000", -1); + all_test ("0", "-1298585670825508993270154522126013719917570633453070690396116462598092540996979333.640039196743651565307879856426743091916875212069013890994736009036", 1); + all_test ("-58083440833403163271255364703914434694411113794265074103509.6210028470686978950076079624502733808613037706942237117077742320080970570", "26461831023083173643510121917518549069675457904421183614.08670353705231338613403357536480", -1); + all_test ("-87806.0709005423990183741480799", "187889864.61083754173871187582049463612826040389116069100443073768518896580280063099139409857625583395994", -1); + all_test ("4275109636212975292229007218589106.56555396510879605313848016743912486618038576223178889446864", "3214123466827664829603412.20512221377304305308306990229", 1); + all_test ("-288739473055433343953882.44471863361121224088386588796752", "459693332791964431347.9722370509420311935824189749201056454335904860013482391961613262946036613056710507279548844104287", -1); + all_test ("-0.01654798720757644256839268748011987903667764384686077", "100.2947610454173899008060779309430287884089908", -1); + all_test ("-0.000000077812076712634332162149408492721454465", "0.15399229905779332095662380969505220763061741414245660138302708596471155210747491437383447979118915119014137110102148592", -1); + all_test ("-0.00061444759912181780360634369163380074336309374788470888402669388105603516553991054356526066819440108624500372932833891457915", "-2586282129839.81183", 1); + all_test ("1498895191248177551510700.45606050", "74541212431266542382401488034545718935193952273089972827104963785323484723329", -1); + all_test ("-0.000000000150375415489340749507967", "-74471913380513166596942427426446874506626967565471102018090995766517502.392226389302441356759681527055387117306583255386245975", 1); + all_test ("4379864196478185231971341731472.903266369426998276391", "42212498773976611477583491576270132689125437393337911684067430376578.9984194168847407989", -1); + all_test ("0.000000000188630716195256390543790417086046414407832502506161382231731603289140796649753995735957193705662041873992884429720334656191370246778667100", "4277485611862341", -1); + all_test ("-46750737.49359475454665387075362911038", "-0.00000000000002083952762905039971040265943804257794973540394987926928714383260058014", -1); + all_test ("0.002544681009249525059932074042166748733358476604959321449600882225721113427484661673735862906019211485741647391857669673771533945502723", "-5", 1); + all_test ("-39295905377158687425.03568106089356864942579967692030891846534", "3835978607575268175581954653485493945307702695323573026257952124899312857138636697340444576247772132369597023211", -1); + all_test ("151889800427285114033292898375825876633959450.898086899995", "9713506827047238971234405766285157635347795138873922.72495033960", -1); + all_test ("355429208933168784293936130635740185914092143011019726030386568363136704968340935328170476421910883336592097125452.6140400243618816", "760.68473869704185430726326613766", 1); + all_test ("4349545620740369674416209302329779414513372709527226", "-512153241030873003118738632455693535388671982041905647243253860149370383998111505079497094180417460533664786733236996564989680995504.330957321847087", 1); + all_test ("-0.0012688202113", "0.0048010468030358831203945427786584092648853082093217561611591674776303185468226054026588077464821415670427004307009969250474179998", -1); + all_test ("0.00000000000000000002201374424729105772", "-0.000000000000000107033257309977239769384301947", 1); + all_test ("-668028580968216191486131.21", "-154531512790783399365338471682080.44013066134495453500823018524005204200450971051972740809812246188229676956238", 1); + all_test ("192599466.2", "-20366857500742765296701334.6", 1); + all_test ("58248290.75313561203877075178536778204022054792568075594303791595851558245836135032032800460252186270586976386928888004344135939", "-99168518734510294278378406838157005789369254297707094", 1); + all_test ("59335044381412481489178159118129258391790720120452482882085288454894585878242302678696", "-85648601004388619627800968402621796697943181866275450369784227.575017140", 1); + all_test ("827495050694857970699868331857360105273936056958", "-1304049.1408", 1); + all_test ("29433574477411346954729176312712201982215509.28557096414206818026607603358233255484946894686133047229727976564507069176749268741739111176858008", "-4633956465133.314261800679223973287025496806457718", 1); + all_test ("12686266978287967082649588107077967578421597532.105327951152521392921904301941867789915864450059477632284", "0.00000000000000000001680216625099082611964698924207784733377923277771980687646000893625476714140746", 1); + all_test ("-3567385737540210557638345348915.22162", "-0.41824899246496739428149857672095872056590112993464366988860723481961972054071505307907398495301014281825421217207829254327015496033753800645844684", -1); + all_test ("-20371368.63017582940071081998", "-6610141547540851.2618872155", 1); + all_test ("-2180877.248385369504597407913625892", "-0.0000613947546197329952823061843887350018748897219554852015448742989981", -1); + all_test ("-25661548932398513068206775462417323701105944198759768081271555328689916551910650501573584882621966781961436302774002", "-0.00000003995848665017188509548766348670502483977228426250447700812058736871198968592250144174490260078313382961664", -1); + all_test ("700915978647576932038.9889078885976161070216182950", "0.00000000000021269845796478757183434520508745974681450900418628307878284", 1); + all_test ("-1303382398497.931396748821703576829828779945840056689872555876833881376022696155060976", "-0.00000000606644551523073444005306613754631773003870840662806994136979597086670031977138946305205049690099933090", -1); + all_test ("405906568852917813232248628119090577947475734689.8857756127121", "-0.0000000000000000017866056928126257148339056150658060966796161201920608159514292519569333482177040033662644", 1); + all_test ("-0.00038993118656334050327105429584540674169988490158156132652011044524474264534283653197157270482671918112238649334367", "76860558547603845673402706122114999956168146955310350.1139970001390673843778536118055735735229745139379062", -1); + all_test ("-1291.525514189182260086081242332267177585013147", "7647914106851593261.11793036077055947", -1); + all_test ("-12612.41363549722", "400197529.089873841323983042909768373129595576", -1); + all_test ("-865231120.42305", "-6101.373", -1); + all_test ("2135123.616487587", "29874778328.687203196134017891857809472541023600394892", -1); + all_test ("-240496804491219672098", "-0.0000000000000025537337241596083729560310417637018287262621849603524145688120537226170023073025335809179309534705621002788486050424760426340206294822698773287401900", -1); + all_test ("0.0000000000000017704907457081494438152952475686979995935351712219723883521", "219880763814382422594281439908041083191286156495561036270640605626481755929973044677878194029641135689892298021934326005001841305991645975944158141", -1); + all_test ("5562146843300977194583992103.3541447154572529507300968518031922002848845481", "-5385385490941349985.1728987920292488505551505952939981174051495333139609581998031404277776446303204611433649401136931468794308049", 1); + all_test ("1752290198851473333381.229247979245303911113358", "0.0534488804706934281687362", 1); + all_test ("-92147522191432001037455421266530384324844131821397435747892093212737588941410897009039880039.78536641975123525885676036525963399053493", "-94653495796270236528544459336546136861980560329213238551234844", -1); + all_test ("815487408558261730721844283383258480879914323551992615511114634084667366.601583324800070891427050782659806100748059136244157137697115166387443377852094", "-0.00022352674800133403772480060128350715370257398919546352741164890695654568500835062253326191042712002", 1); + all_test ("5749689998455617772483267", "1840103850357796786136102.71620", 1); + all_test ("672157900280788714930056355200674066483401.81631034866806625951256911099862832274306021451656220978012049245", "-114154619396981089.1320525887956211286048722734182840690494935795064338674221730292522680013566926250582468937966455149652051562981", 1); + all_test ("-5494699992405395277727109066553255922407802868013721980441109672.2745818896946274305742059294626478254", "-0.00000000000014929679588889355091556", -1); + all_test ("-385449726074149547840530583797934937181715165939491867569145644860713885605.5264721791956556383239054663012165553", "116230758861245831282.35469658891878592281877915896", -1); + all_test ("-0.0000000010121528251165650737286665285385390272407652360958821083299180952068082201020218158477438177846198635084848930173", "0.014883196009565080385727336397121811890988734916589439190153212627665118520225526554901248590753739002351947839892439723714675499975034", -1); + all_test ("576494346991115932783888314153281740149238819119894206393647915824014580263476342693398091833799159.523480555625532", "-61995543200977083040575763967439592100731063156984228486.38535435929903297792354585158311732314673482333", 1); + all_test ("428873250.560664", "129875284926470970222879379103280436892522797190190796664400470658620567525600201123074551979893854516815261154373333287236970841329590591717797034121", -1); + all_test ("0.0000000000000026870297704737006603169618821643992478682185038681614", "7820302396851385.87642732170367565885193676356664350349738707893636875852", -1); + all_test ("-44.520760710306309879865713891315672271920022787764083922278701523625034485320733717004859", "0.01439428796926164016128066457640262141108921179147399710995842215316044506980299877008384374011689600039480155501049825404811115221757434056043236", -1); + all_test ("-0.00001201118968847844", "-70923798469593760582530476230041738134921398772057910273281889901965679.42358", 1); + all_test ("5843135287113736528157843820316744502939564526886546.0047195639475992647092375381054267129062468983623992352021878814209422214992623", "0.00000060757624666484634102563211416190889408777041958621929849193644313556211406046557886739314619795644390894145644323254283691165", 1); + all_test ("33939864110426158794412428792.47956843115029434531711836467014982826884747667863328480197253623707011712168926394003290273416608578508", "1064677018243359674559461311315576643719466298112018077397283377331298.0670918844184768217715685", -1); + all_test ("-18912", "-0.000000000000000096633006285663483174785933757971320277192376117523241919936331742434935280501727980661135723065936406743562787980", -1); + all_test ("-2804344532565505375601200736426512335574579247149602614364873466432310221288307433080611694637316033618692401292292895996797408039558038455193698965", "-893720293743137.926655354747113007920084052973512410160846993", -1); + all_test ("6764.231463798271135956814698363174738947427445137382091391208755942353390328768698827660861776845954371737556198135", "-0.000017597904259456024333678008", 1); + all_test ("1.76481649511603874803028298380964499606482173", "118286517946791234440962575129866748867383839052261404590790296018753.3551", -1); + all_test ("-0.151932239357399305076147843155550323032938508228686222300958284775879980694971306303640", "829380294.1737767149859532540", -1); + all_test ("0.0000000000001950221826994411075608100769821184304540479623634687640815964857394877326312992673017060046339509291259090179143500537", "-0.544207807833617254080709456086651220078670208155499221226255166753832289251475987493675", 1); + all_test ("725592788412654390.288037792170665708343668934945817652577358075211667306339285606349503938607834479670176", "0.00000000015727681596554688195", 1); + all_test ("-0.0000000000000000025828037795917808174174022628073029870391944907806479693726568881606935015683570702939052853748656921760835", "21479058581519114842906568693885000707.948701", -1); + all_test ("-52318803831972225224657668090895711041816508172.8", "-925177002627943141448550433420188042136738.349349239422830476016023577725025812189", -1); + all_test ("-11595020947248091113626696070928546894526698503484940942.1", "-41743727850266539324572111803709486.560814158883502040355649548872806865758563538962184415", -1); + all_test ("-7945674732961469879932607763620399739445214326825952225210024765118220584355530.0066649877944415388056", "119923.63269933110039577637236168360031988884136", -1); + all_test ("-667465135.521", "3600732041889309108089077145627379409284885679028550049780473370754192258840745952520332031.3349195", -1); + all_test ("-0.00155960825045823734495157128817221951179945771390542271382698231", "-0.00000000000000000001547806123481913844128531558529", -1); + all_test ("0.000003897178488116939077117755504046954668782", "16500182036173066151975330357363436305432978597893641854622839540840890764939718449396748745670289759248", -1); + all_test ("0.1066389596341454370563866669022345823619309097241060909463123947382090196267402259296965465474236522387304285231", "0.10554272066931320067690515900139997226174735430579374207101626812245423053687680829616012414687316642", 1); + all_test ("6311170580654312262766895923050966572616839302483216469449041222764.049350942968378224002193794621061821564299153542544", "-0.00000000000000077721943836572688797512479214783933404468328060", 1); + all_test ("-6473241763588535091671209.6136", "7109946613265111655504066906893421227308129623587629974790367852537008848978739884385313982886613060794958166034914293662450242266370.8", -1); + all_test ("-0.00000000000000000008039492192574383888482371", "6604383032.684474135999128100", -1); + all_test ("0.00000000481203569548875502622555282569420051010869127282373043112622263", "0.000079591821964258103100046810525409740211300100386397203145583898461821616", -1); + all_test ("85823943902986661.3551017490436085790271996332709765818729748512879602777843718155761693739465208300732899", "-353619674248164726117917.76326235745255122675778", 1); + all_test ("5705133585416934331.96", "-692026459205441284419325590512301015920380275971289655588744582196610452918836386452075288", 1); + all_test ("765287548279977385673120140382320109443772413316008156351512085669539136561234228", "3378412883764.772985170", 1); + all_test ("0.0000004444949779299910287084862350709993", "-34895239912483248998398456782819190020892134145899514996827417890581872655651586615097978930.28086971201242063913206088020792", 1); + all_test ("-1808406236.0007411517153424954283974901033587835316874236876462017822855632147931437015468125518156654752077876232166", "2013566681929922981330.04601046976892202943272046385", -1); + all_test ("-4048492393774402282450581898756603285777654317041291261832380799275797348666467089872455453070620263470013031356830428683981574", "40099412654259527050657495952587386178575394648007643060458676.1111791491498057728067622099748", -1); + all_test ("18628915136749176154223386824673062457919.8848077693485186034", "1513881720435328747255261588664662813128641748401.955878978503857272440117644", -1); + all_test ("-1102715066055607391570121246263589329875629472981.9918971388267193266893066174800566737394182297234831718246217036454304180215728533097249", "-507466746731417668276962401930968304387149385.36733202", -1); + all_test ("-0.00000000000000118867735895355706324644741565687516380934012845606449840941596028463353814792777039303066705142312804268503326549993460075345403972111834209", "0.000000003436556517", -1); + all_test ("-0.0000000000000003371984563895388548767205601272951518208249335621347968700193296778014696768556195", "-10274945223018984756966657952438916138616218197724933584616138553807445939342840685241904451258371", 1); + all_test ("-117433402658185448482194314232639429126502459349575210459884357.7406396969270334883393802839875697129920877876569071877681298097932152998", "139976394189242376947006070215378416965", -1); + all_test ("-0.00000000000410999246686291289919439285398573971906473918801526723286816999153997225640711464165501375618395618072", "16857754744323811301.760491652997818191680489759", -1); + all_test ("33433452292.54424975454908357494747405074701508", "8269909530911601430300956762711.49", -1); + all_test ("-283803212239.5587338007666372129716405064", "62180632632.44", -1); + all_test ("10816304647050009681046881227640567650727092915763836975846424094420491356952792053535937227598578243148.70549318016888506158632243072", "23601245638793.9051238958897803858851422315671924508733072717037856936727939646826421249728398919007381394104232", 1); + all_test ("42294808022511884510489816637065479125.12", "-363076851403252016896121227284974203057689376244997308943536424206680183580753707981871249845116125872661250598932697938367496845913845", 1); + all_test ("-68057065545315263763372804.6037879238251", "1849186991871166819", -1); + all_test ("-0.000035422370812676577438081958090968761523064683396142544733667226170582703", "-4886104.52695396941765119019781209957215550071392339312212", 1); + all_test ("-0.00000000101152922410408185", "-154628891267599656838.7544", 1); + all_test ("65053724814685425792643437308.22975034850682336796195307601162523736", "-53422542502015829097671319941538573640235158728608612260590736.22285239457330945763643215406922589852086651975032077423269936", 1); + all_test ("-679014.049691213095078512348789233953999083752383", "225334567529.305999982841966497994072752683700827916742714614297486", -1); + all_test ("161888828328851641417083878458443592052215516899370606619738.36510326324072641758387263980815868443516315712557912616842124441627523", "0.000000000000794258834390076366776294050001062371476872317912962468519864454127907974470307426421865511092144225939633222374776858411435618947559", 1); + all_test ("6162233670505318", "2.46634168", 1); + all_test ("-17546683536111282316342996627368376599858018325962648.6584700382630574850314398607683745", "-80802643256926373101335717601", -1); + all_test ("-2352353228663372948015045466172105999.8803110610547393595549", "-0.00413964594253429181906299898033064114461684408903594038085686221908651158875526470347", -1); + all_test ("-0.00000000000000000004356348734944267973648639107", "-229367364784425681697726599493823156989608369042481979275254.0884841218159995757788959686561159388268846646565860174004081151385", 1); + all_test ("0.03415457575710915160220105512218140806602929852687968668616994967273160715684956613423796070943115985374314105903537233", "-3196749067837621585326283843306992801307.802760498691831198070", 1); + all_test ("0.00000000000000247413037298398028929363025202778579193861821082044594455801367855787265239661476744458519065142081672257010", "44289.8", -1); + all_test ("58.3127511093589129668", "-2611133014902015509360439.7129643377015936731377925522222539911964440440574400407593", 1); + all_test ("2406843722253168117192934590291028781069300073383984975.8180911819738336792993187445407442782766628930100725", "89425216383828", 1); + all_test ("-1099207.26554285655755079330147354518979139456850179395304634417125044240102198026939759672286", "-57693881703804010298386947171610472014880394287849824344777180903601511889954253540830976322899406814539377606313895495643102769.83016248376", 1); + all_test ("-103994242142241963043476374672302180239375906114700919981156677510520442173528213340300295792463789876630187002413998412270858178265773895879435145193", "-0.000000000000031367951905170647781165822641814409694938292", -1); + all_test ("13601721526443719522926093787.934046503185812863872716", "336408896287174621976247324108743253861832261859751110841.29596909381766540334693808958727478573401402102365", -1); + all_test ("-0.00000000000000001469446157409381008342426261966534408211838683793750555946023", "1522608331828812962719302028703469509396748384370489182706462020400287150465785830318500446746747.6460778058447560089208164112108681301784", -1); + all_test ("-0.000000000000000000292119887858775237140722034722696650983806428229978415180240", "509639.198703", -1); + all_test ("-581568431970891620674020761220785883553826553712684204299194.373663495926444491785700217246", "-0.00000799487760788026644276369061232209772149143590654545891959237728077188021480038402000022139388923280596639559887", -1); + all_test ("10576907282617366683945326959370318422762465935099101961150731963334451359367980479.1711956", "93657934108538335658469446550891.33274514", 1); + all_test ("-50779400127432260917442015730665305.693827342498804536", "-278.45484183476521400133060414619839700534856688357221666606163711034752645600781353452713349748727451466275731553", -1); + all_test ("3582739", "1784.034", 1); + all_test ("0.000007142491492373590519731802287885445743376047761637981513279821695831401679304444193667604938367015426898382592976966546278775", "-857115157826.2112333616148328187721853506794021", 1); + all_test ("-77650157.77865724663131558543954559605879484270600244615464493178445559943273821677209941465159610044188242984064", "2", -1); + all_test ("13061793010825779761489046240048151130041423831782034351150825980261340689146749636490271350788971", "736646718813268852209165758615425625665840070879918346", 1); + all_test ("-0.00000000000000000027818072125795253670533401340761483641172537202336362918391508577676998124879659850611085", "-757589742121920450871623430335991255479320533949980775000891583727233254637570819240641737.1122814951925898", 1); + all_test ("-44805268190729632531865.6419780191402046529767672", "521251239499704005781275449094278641042506.3156115052302463420952777340591939364886084763948408205859384130509381650790892060575", -1); + all_test ("-9.16848439809259319052148", "31804088022084780543225640840236725226743771098722292010442082451771.032053418236761910351105445438902994094212892937018928", -1); + all_test ("-0.000000000000000000015946937934151918888138620979468427775546067982434246390130160312768937674401605951766202953", "-4384.37908930790756", 1); + all_test ("-92.0", "-259.1103140486780473992", 1); + all_test ("1829937784973143537783010100739888095502819577009050487909478.998339486027387102532064478083066161408101089244606741999372262029117753", "-0.003466165765516931483921623859725455065870694872586558033998887390346792964596358533056448297144859327570003882840488520157483345744424112", 1); + all_test ("-0.00805730350870332416474130775431753596509549127714076482362747443329333536910223003521268991503827851593840825424710029978467616431589134837782", "42859237293.971714652490950575144555590003616042479874429975572476902289269556706761", -1); + all_test ("14687687102617235468391945141416714260880851700178866765733538453531920743076697994482038.87810993130926761650695883946148734827", "0.0000000000043032139506511692634953935", 1); + all_test ("74855288934335940624584700729.917818635680622422883644107796356783278951273", "-0.0000000024412467395238501084489165324313850210206104", 1); + all_test ("31534804.882", "-107747802197986688050315269264964249408206715357274490951874", 1); + all_test ("0.00000000000005436941845644294932431141904956702081385801461562015917", "0.00000000000004007409174643597984346027883186426344264183588051770037027544931312637485537674353258405773358832901037004", 1); + all_test ("-0.00011401428096591141304086733093089782287404551974129345249206250034253148833654960406327854197854792917730041450409869184707008198528552235035954269", "-0.00000000000459090078596662894002343875075543959122946654955353856571293852319559157327916251", -1); + all_test ("0.00273909582639870092043322082487911991953970891824257601379839286759468486558682979434046468763206507018460313471628142789574554733", "-12174288565178653649738825844.058129335942051261437792772494997783050076234522869196457", 1); + all_test ("-9262163133525541289611786411236936499015108574335221070224302067951107010106083554045354391502928018000897936875310.50063711574683", "-3415896484698655068520389216070918253", -1); + all_test ("0.000000000000775402434179186062776610592070356150419892", "-10567486649730728013576719047602414874836411929687810999158959874142512326985312695510176030747379728213278021", 1); + all_test ("-0.000000000000000029154845261288138429108167871851762042605685339365274521502654014100103052239316462201294992571376102", "0.00000000007215519703698252394014310761077946308103265208763107160443064766528615271128170860242303974651987945813780869799910158572025", -1); + all_test ("-0.000000000000000000038919174519392355544992733520", "-88873239905390283257526586315278488079494343890098540.14371840801969124535809059283682022956915824484887795", 1); + all_test ("-2956006733486.050322519495910617171990967860491609473626923225257235851006044563856964764255650517769695833", "-63580.7607041571683406051338311837270934135009599731889857981100051635443210692920253491149463594177586818089", -1); + all_test ("32693297930914576641605085.456147160027786641825068409422582642333463646578713263684862420", "2046994.563394388211", 1); + all_test ("11585457218048617716818642470310899619712965.757545839437764987354930195688915926362652526394444871037", "-24619892752559156706974656.033638967580349721627125116986752963277069337398575115657062385861834385940136798596681542333424665238168009963257109112", 1); + all_test ("-376741557864930127185019858384127899674528918618.823922265376740844074653162948916457933603707043182097866", "-27589133853961983218044564074996941310096508288788452470863.709706352", 1); + all_test ("-0.00000000000000159347", "0.000000000537720125529707861865661334298939870145", -1); + all_test ("43035909785686641666336021702781351129892247747464104619212766477817619033880081924506", "2814152544538521977901831034701910821444771265677717331726406832990136388071257847595368675837635869488930703285050684920041246854650190323367418", -1); + all_test ("-11985135.8193427509854988143005112183287545730", "0.0000000000001803274435994955450298871518541291278942016627972113349919772137870618374138716105", -1); + all_test ("-0.00000000000000000231213881820372179648211424074545784084490603786969584496054481785651900550127851716747246826568016229452975976262745772409454", "0.00000000002542356646873251984661531567832365397400169898925001739523492396893368004710859653", -1); + all_test ("160250738049532782162433853489598402471976041469770348690123392.0031", "-294498471596460898486795650003243213547297862171486734029240994267080719706597441329.5505160068626877140129559069410890749408503304245", 1); + all_test ("-311499170316724006235994246932956222855452383.9355679763714275758718700623828461", "74109.22858001236432975439589074625834100371918658550933564518627770467991656925437210524238209898744184416226015049386723272030", -1); + all_test ("72262463926314177087592711082448174767989257408928002756189090888827037903900202019977026018923895141350914091904436927", "-0.000000000225167954917337837957771388", 1); + all_test ("783592959000310229426414265767534.3977599563867860198103276131050069803106200343268513507092805929256", "2213775192313849109306210671344446709142941975379549548840760877161562324284900199839612761050250.310478020973421299217241488", -1); + all_test ("-6547449797725.304570", "119824690766003830384751081.0046122063442368459687414526624230150574044341335791064835698117488656542711155304626640574856112236102910475124479214", -1); + all_test ("0.000000000000010204", "-149665073272.5623297479580213", 1); + all_test ("-0.000000000000000001372054475", "3261320307772433532065115421441455427066494965386813158814003180399968053382332347948302205942486750609906989182229631672314317782917588042", -1); + all_test ("16267269269026527605638552384753020375945217358682470573450643637648938800818442471696326897638.960256727665082740611435176610395516518637", "9397452437953662194.6", 1); + all_test ("0.0016003186542702358062119951504575476400770454525551608330060208480446269746952107326275127054026286275145379", "-10177150935819421368111549722330892202837757641685140152152703141782.0731751745579486199764500876128838", 1); + all_test ("-259.796667804953618306869", "5.152172124853561796", -1); + all_test ("11221563347439640500149258879687347315134035785708472989483023267.2300609027733075", "-26207420100355721202593.170521021779774357040235570161585294593", 1); + all_test ("-4086883920877948704292008316195463523825565880525701686248.2367", "19607520206368681093521348463825573467158671987138840203949280288889694329944104400821735075790097995474419621575623", -1); + all_test ("59250037050672269038935756873853022223815088087754056875033986973202160304564921006.3856374891863577365895067682971644381098324", "-1150048048247576308790181384139171657779505.0762328070146919", 1); + all_test ("-101.9883", "2427396663212685327845905010715508779301812460773274950351804533445926036597008", -1); + all_test ("-253869543570783673956384102166918285311284645640813929674091406323420328870905030279906889614764088874316164218.650577522882100114108252753", "1065.486621351936129492744089151898837668657292086320399673336494155243434093656438111857434011880854788399689183448380554", -1); + all_test ("417208985560.7855205554", "100923345912048408289435217840834510246434298689324763023522249789499602478530171790094650567004608931483845354824898446196430525102018126501735", -1); + all_test ("173069663315189207453082599256935631042012490932166775088288608134998421563.501634405769076052916216890728266291846276235969642472697992", "0.0047456362403909994510629032945180910020103403215993419", 1); + all_test ("2053482495939016050925647064247292586.8564263585178084561055184838104344", "-169017380666548364.127029030132409556736680020944511137856136807303318576835588339730940135466516396606957131997990393897794390319423272450917805926", 1); + all_test ("0.000000000000000000010910521060181975906059602362732892055045562230211476996524041744413599254422619291991952288398365621", "0.00000030305366252407729760726252843133109114557519273943871397042650558626022634485938707736986954106451995454302535124160648045134106263888189201243", -1); + all_test ("30640237540440782514115131028848069755044326052924.009093719671904737413172221325840495532222917009786084408779725171808758879846845062707492564014763", "-3587259353440149470021751420228565.933221993721894266387366123546111212496288309568577", 1); + all_test ("-3609844484927222015828.334942620349534873041743", "-0.0000000000156030127736053462961395524", -1); + all_test ("-0.000000000000001658158309268354898123357112970860020", "0.00000870156656843154695875521710025973209056456466507288725866658654130737892621348779455441496534083249326857675543779156635545016633454520", -1); + all_test ("7793690039.8772263749770060309947594436823579276762079330052673201071", "0.00000612582504229588881039048444365709157972604156531064474583010238471462911044732", 1); + all_test ("259361929252303788251189384988868.553981647414752277660626862473682638041582155222042965461036805740", "2581973829978432652835452792244347835027216577276451292110130046577998322535113805747137", -1); + all_test ("129390414845041424.1539", "-481050029407533910303222535233605013660232501391088458212583477453819542398563643833919611592686861686523", 1); + all_test ("-6536842573987360158150696168225611012842820808740490760317604719877598626292023302792453130948717075", "1808166007895107209370145108642559246571611053591602829484725216424576199434411727976513436930373936671801214293.1577146813", -1); + all_test ("-0.00000000000000001874341518823681577662776773255511371168611049285", "114237294927073342220706673330602767506662522210660715163883162244.823645258897119432630", -1); + all_test ("209836878319152205282576333546502150812644732572885749428543679539", "100955482773558958290888650903921036366095.20510847158797748", 1); + all_test ("0.034860367", "-2.9421730845742362", 1); + all_test ("2007681510503796232234969506243559879895607457288542877357020897246614400065889179294420464808957608804208.88977640850467103386663519609600376930", "131278041586300435030378871514179235174947880618231459980968177904236853202540068220693506990312468.7907728564640266180384190626761258847873972319", 1); + all_test ("-0.00003161209326226016404711305", "-1063414207851209583249490599634018820893.87666259230007659491410887957198569", 1); + all_test ("0.000000000009292700053546152515763409646834318801540357443458254443063793407983703255255220501557870090370022700786856368829747621804624", "15968290595293544207165427138659653635885728378308439140692.8375150", -1); + all_test ("23176176.07056103153928107006846727836935989686711695293078954554503341971026457151918796526632004382422212027532033604", "1393760072065023828023446698382962763", -1); + all_test ("231996316054324226009622737751152542708306575853606699680576.2979473704180673568018174937666939555099251408550275412841449934741053120999250311960", "-0.00000000002440470984493188283681881091476406696345434062764274153736555369694432713235258794821778157833124213579089653780125672309835719004532812124933848285", 1); + all_test ("-20648.33905752688067", "364742683268206384344442772254773451200307358841591165850201389171780849730182355714994995466053456220045", -1); + all_test ("-13296891.2", "0.0000006969337082421569919274143628120", -1); + all_test ("37172409606574175943929198111868146041321294172740261.9143767823011700625959830227158253292122411741", "-9229020573653817070250688951097965429045889891091810375887510258483.86432451", 1); + all_test ("1453535362884489285626691516310680832482298497424339784442566191993586458847756138332543022653963954995058698.15580", "-33143622616240901719883077121499909963666515277776.03911638745682103192726777541334139680165450417038099168410422389791894570097008374", 1); + all_test ("-553544731407.954683875078093295639829399072864963186386576846602046", "192999508939696196504970050808433364133176232370021073489176763241408536439.77594027675417445364740098352288673457747531121812928831142123844168252470", -1); + all_test ("53331368736012231282471303455408074592413207200872818.19673290825616228139358150102045346527811025445464013057081041192769618884910913", "29864250451413880308678527443574263718752000952673380.023619969863", 1); + all_test ("0.0000000000000553335708975466510638842756141122700181892189479338073653078191086392759442569036578848626338971871999378", "-2433.862079043560961248651748450179913978912939709492727668652481303092796187", 1); + all_test ("-131087743.6305459391", "1366119444020000948783203513489615222.675978339215788988998559226759468849819166123527857680522", -1); + all_test ("0.0000010414667170852575270156859553928180613463762435534732908049457814385044451504107590913084220195837233515638824516134017851098411421001695264", "-66115584400599354704187997780889126098693373365.7243", 1); + all_test ("-82580207676754903853225612109619332832646591973947655468920313639308916718.1330927060723276446644406371829999060475633907079169", "5123330295520469513903522349127462754600115573.1373461391379131781873", -1); + all_test ("-22881636298670205035641935440359796471601928206681810441710383670980611628185637243569.2507827277681252065670282330799224", "736623256360.52046053521393940948105264615756015326648432", -1); + all_test ("10.6557893608099767579084904", "-1549097478049581073829995395668214851867184047164638481948954196550730492470162977527257584557330.12691586584734276203352320", 1); + all_test ("-990750595009217072591203410182612405197518047760914771032204784294635251950209321008567583494561257290737", "305183437080190842418299140880536765514850999.697345630592391581619258378412681359059795654", -1); + all_test ("-1666770629345794574416820151105.98918396166031507208776276918495816721257656112225182497801163182679207902596802205860048306600841687864861095511", "-0.00000001067708997946", -1); + all_test ("-14840.8160635780542830749790687168810848087921446934163740720565540416857197820946", "34080400103214533424.02376392426614849386411125899538938586694", -1); + all_test ("0.0000000000000016877563085857940725171784798859373742", "0", 1); + all_test ("-33190786246688543666606637359744.217563683075", "1411442489270647265365237504971682227816451192966004619718073064881.0785117653978579470036133709733772486485584681564117735482334823573897932", -1); + all_test ("22250091784709109592.36289103127751407973011885", "-0.0000382591424878799273145128194620542054246216992721442791349175343470175713780048283294641587173331569078106987388529", 1); + all_test ("-366783961078432297345344407263954100597261322478589032766.73282236301460555020", "-96792806400556284879273453156295184.53428387344080543516219317", -1); + all_test ("-4428412434012469201409972157335263140259080336552387999530773415365566408064446887607002402436823395664644162540941981862539131750982436.53", "75696312592552260444421580586326708012624152846535337194315378288808695.3800482862544568581804928901090851775492837416229", -1); + all_test ("-5875606174326455206892.166531322577891655817791602124272", "-35009191320796020285350597114063011014625404863861820815440146042482080541906069341", 1); + all_test ("0.00000053938374247898490593751341139618225706260032227451912740608995112652267024567", "175852452557353643.3590476179170", -1); + all_test ("0.000085430888367277502429220363288215723771185373", "8256298205292814781230409657307281433998721428415657164206.36639", -1); + all_test ("-52206181136131234784399813236.07148184351942727", "187209867307553393739457212014673840096167129608946393051576008336453819741553745147502544430776215770796121630485677673.9724596115587907243111403", -1); + all_test ("-116404659080562114.92071212768286143841500510345567940661701355074747251796041", "-0.0000000000049745937887893457305924521492823436496769064269458995595186839321054906563207671851820946083323716587936229045653732369629477947990064968", -1); + all_test ("28632132796102343.642479895418482981865379537641435463355793", "3947054586925956430852945631879967537015686007064533778477126086105171929289441372934106340502853676944.8775856144613230825303", -1); + all_test ("-857090508200151475054556597610222124661175080017618336676970123774256255824922667023873121804008646192330290129442806", "-972101984776814063384288921892937781463259806047634752997185.4385721825546355179576429", -1); + all_test ("524360242934236610220749675664188585635590483292908774530668032546940050829944754444786102305373006086287153988223497918735", "-894112.62957", 1); + all_test ("-4210359748516193705490258816796808454697789142688778195029295009029687568303590578372169555384509849436838285", "31544435847506925886.4380471855572374745797509775141400719180063314074764017605405542023671969250480247374160173575823024192641879318726", -1); + all_test ("0.00000000000000000039648316584476924066746927696080890012966606658194662052", "93186692411262534487106225917322323273998860.702889752659967", -1); + all_test ("-355809833.80952792320528641233", "80686526919845500998309999431837058.761633435885737503460027358262242", -1); + all_test ("135973290.168739239202104579143727871073186846998465022695079917761494935246543420262539585973598640481769703017097113004230499019752720843814876125395", "-5247621701130676973811017481409509202617774437873284817094169357757993693424454590200078960274872983976142587199662655362147649", 1); + all_test ("1722959380210301975884294773508", "9285857700957558240758114686802782724351979408646270147.79", -1); + all_test ("-2.108499091120865886897591323930243793006036956873698734554284782307034333654312298978700143514443242015114382393092579020064541038144909798932", "0.6600963818550654763059005580259719939747091", -1); + all_test ("239620618436021.91", "-4353302761316014755083307438727860990450226754399292536680958540457321480743198864", 1); + all_test ("-247311515425879756100312067126621077462386243210235600848467077095397086040795417.16091213583", "-260.0692816252127916277315158672499008107826181646194964038208702225413806272325838419818326501439852500060857812695956426279373392731287", -1); + all_test ("0.00000000000000092678002317773819293673427756278593549636636017011488156614", "17608242495263943038945700454791334002001731748793496370046578764838341632679102710921093941418183970826750981020832871212156842541461372", -1); + all_test ("-33395325628320096104732838558355526.34337764550949233422721", "205332050719085679752333364390801841584322469575410029598277675558008298194.4403120686536479725405590603499717318334866527066993402595695782", -1); + all_test ("1704446749770125249947219847049678079826076962438747770032889527765979216824", "-81884993441.044414114132150", 1); + all_test ("4721008.67935983797016512145416126232413", "-0.03498350297025037393206835110018120336910941973578256042733733228736114655699947857927341334", 1); + all_test ("181391051825403456208156.71244213486959497601037", "-776380379297651015893862651994364337679290452023660979418305268365.4639038680782187382", 1); + all_test ("0.0000000847", "22156497747243948647802199255699537070266422639.5633433463683691278073207255994132556519453723419", -1); + all_test ("-6.21217206985247294651387216860807591050001764817572516334758", "886061238651128.7", -1); + all_test ("-1161719026145675243574235610276988347246026816878990032451997176103072809623554165635479395356340140107166377591092789264418175", "-0.000000018735947478220650520638945854023532902579986523026188004265750964790", -1); + all_test ("-0.00000000867192138", "2502507910601152855229403992937540857964041297324987261262589402205840", -1); + all_test ("932600538480920158326929132563.6421982462761565925070778172257671442090601464460086", "-20519384614533168439297510042006580413691480074684.20874560931252451163046908065695481258407657", 1); + all_test ("-423970839089252202458.4142517215652507527660399945359115489273265486900307489264302540041681142598257029618492805741704283129188858300", "-0.0000000000000000020864723406154143161822628597022504762643109363924577177440002989153679290543872240996459231393135479147340630", -1); + all_test ("49491330651043321769388801332639.740296423762", "0.5171693040591007989301158138415776204505193432948807746575263122468776152077", 1); + all_test ("0.001245962897188796973717486355827294945060225829760809691400850708544510", "2093451351363855302147446056836441599578148902408761562976800394573.65341921067439897924178668210176520923190465610921336906740229984", -1); + all_test ("2593248239529730040425963884470681420571770726127.898763080708", "7187960966847715724350587626703224781728201547468602127890467264952177647476374.8350740675946710455460463413291", -1); + all_test ("10876110728592679732.62028952680014147540924866973673791348307668059733003935578406", "14807.3566503507754041309056234009138430821972145065785727273499408126157754376928813995906375584967247205063511345989398044710766229497805904317", 1); + all_test ("930802811312871985657541282630.11555878286243010124609615", "-55898805297735194055894340167715838876998587195058346456322370995879163257917874310396332.8301127894058724494250937495", 1); + all_test ("4373687004743801710.4295871291", "-2399.751203123176895978605217344914876835764318218494324419569769709590467191", 1); + all_test ("19885418415499907740390897118745282009388.522241490773186707378554377", "-0.000000000000000000016311844734", 1); + + all_test ("0.091650", "0", 1); + all_test ("-31.95", "-0.0000004826766", -1); + all_test ("8.66569234", "-5157749157", 1); + all_test ("131.57910", "-0.00000000143732", 1); + all_test ("-0.00000000000000069913178493", "-36.2938", 1); + all_test ("-71.52874", "-12.621", -1); + all_test ("0", "85409.76884", -1); + all_test ("-0.0000000000362430662837", "-801785981.0", 1); + all_test ("23.2", "-102599", 1); + all_test ("35.5", "-0.000000000000000012", 1); + all_test ("0.00000306", "-2.632", 1); + all_test ("0", "-0.0000000000000000007729361018", 1); + all_test ("314012.71462", "-53575.055", 1); + all_test ("-101465", "-6", -1); + all_test ("62740.249", "0.00000000000000000007443159314", 1); + all_test ("6.28898", "30", -1); + all_test ("-14.1", "20523313.15", -1); + all_test ("-121.9", "1.9", -1); + all_test ("9.68", "-1872.932", 1); + all_test ("-2553.3", "413.6", -1); + all_test ("13675.5", "-5", 1); + all_test ("-0.000000000000000001038840261", "2.08", -1); + all_test ("-3252618.447", "3.410", -1); + all_test ("-7530437220", "-66.6578547", -1); + all_test ("51.32", "-0.0002497237", 1); + all_test ("-0.00147259804905", "-15.0", 1); + all_test ("4517.34411456", "19.1775057", 1); + all_test ("-14.006", "0.0000000000000748001", -1); + all_test ("-1029.3", "2", -1); + all_test ("1473.3", "-1.01336820638", 1); + all_test ("5258.8", "2311.6", 1); + all_test ("4.9", "4", 1); + all_test ("8614797251", "5.47", 1); + all_test ("73.173", "-1.4031382", 1); + all_test ("502.36012", "-39996872", 1); + all_test ("-493652528", "2187946548", -1); + all_test ("-600552370.92", "0.011235396004", -1); + all_test ("35.61040429", "-54899.96", 1); + all_test ("1.447", "3.951143", -1); + all_test ("-2814441.354", "-0.030752704", -1); + all_test ("-0.00000000000000001062528419", "14428385.05", -1); + all_test ("-0.00000902457", "-906093.03", 1); + all_test ("-4.49514906109", "15640376291", -1); + all_test ("-14.005", "55.971", -1); + all_test ("-5.58", "5257.64", -1); + all_test ("0.00000000013353112755", "0.1701", -1); + all_test ("-2647318.81", "-115.6", -1); + all_test ("-22.4", "0.00000000000000000002689757418", -1); + all_test ("-1621301570", "-1.074", -1); + all_test ("-7", "-21400", 1); + all_test ("0.00000000000002041639", "1.3", -1); + all_test ("287938.5", "0.00000027218", 1); + all_test ("-0.00000055410455610", "2355408.35784", -1); + all_test ("-18.363786016", "-24.12699692", 1); + all_test ("368728547", "12", 1); + all_test ("0", "-16302264", 1); + all_test ("-6.7", "-127.83676", 1); + all_test ("-0.00000000000038760", "77458475215", -1); + all_test ("-0.0000000004193858594", "-0.000000000000000000874962299872", -1); + all_test ("-64715.0554", "-5106.6", -1); + all_test ("-2", "174636", -1); + all_test ("3.6", "-9.29", 1); + all_test ("0.0000000000000001025", "-1", 1); + all_test ("57.19", "4728633003.0", -1); + all_test ("-0.00000000001896809493", "27551629.4916", -1); + all_test ("-24936.227933", "-17253964", 1); + all_test ("0.0000000016330870", "162322.24", -1); + all_test ("780.4", "-0.00000000000000788606669264", 1); + all_test ("2.008", "-82.793645719", 1); + all_test ("0.000023", "-0.0151128375", 1); + all_test ("1.60", "-4935.4", 1); + all_test ("10320469", "-844.9", 1); + all_test ("4013.16757", "-4.73", 1); + all_test ("-22955362593.9", "-3800487406", -1); + all_test ("-0.000000000000000030708244506", "29", -1); + all_test ("1", "0.00000000006442170", 1); + all_test ("-13923", "0.0000000000000000019", -1); + all_test ("-839013", "-3.11884562268", -1); + all_test ("12.22605", "2.4", 1); + all_test ("-2", "-751739624.9", 1); + all_test ("-0.000000014", "-1.1", 1); + all_test ("-0.0000000000096284906554", "-0.0000000000000000000531", -1); + all_test ("-0.00000000000000477", "-0.000000000000010180391", 1); + all_test ("-2919850130", "1.5", -1); + all_test ("0", "-22.424", 1); + all_test ("-3.8812", "-450574", 1); + all_test ("-81939.3196", "-1.528956", -1); + all_test ("0.0000000000000000000662", "-0.00000005609645255", 1); + all_test ("4.43", "-0.00955682817", 1); + all_test ("-1", "3.68", -1); + all_test ("-2.2337", "-18398007347", 1); + all_test ("17.31058", "-742739604", 1); + all_test ("10", "63510.06483", -1); + all_test ("-1679", "0", -1); + all_test ("1", "0.00000191916669633", 1); + all_test ("677.105", "60922901809", -1); + all_test ("0.000000000000000014238616", "6311.5471", -1); + all_test ("-3", "-193.6", 1); + all_test ("-3.17", "0", -1); + all_test ("1896.17", "0.000000420065102", 1); + all_test ("-21.59982", "1.635168485", -1); + all_test ("-1.1865349", "-1", -1); + all_test ("1.2", "-0.000000000000061", 1); + all_test ("0", "1.52", -1); + all_test ("5.49", "20.789347414", -1); + all_test ("-0.000000000000000023", "0", -1); + all_test ("-4.3", "0.0000000000000001390542834", -1); + all_test ("-50.261594", "-0.000000006027", -1); + all_test ("98987.24", "-2", 1); + all_test ("0.00000000000000005238041903", "-0.000000000021", 1); + all_test ("66.97", "0.0000012729936969", 1); + all_test ("-1471", "83268824096", -1); + all_test ("76195", "-0.000000000000000000022355488306", 1); + all_test ("4.00", "-1.2", 1); + all_test ("2", "0.00000000124844398", 1); + all_test ("-56365405", "-1.4293", -1); + all_test ("-0.000000012648228056", "1016.22", -1); + all_test ("-902947", "-1415195", 1); + all_test ("90004.642", "48.208940", 1); + all_test ("20", "-1.9", 1); + all_test ("0.000000000001587", "-0.000000000000000000062640220", 1); + all_test ("-400040.6", "0.00000009705375", -1); + all_test ("6804221.367", "0", 1); + all_test ("5", "0.00000432", 1); + all_test ("0.00000000086378", "85674151.6", -1); + all_test ("498.115979", "15.68", 1); + all_test ("-7.168163", "-1079.98097073", 1); + all_test ("-920.494", "0.000000015113372", -1); + all_test ("-2.9", "-0.0000000000000013597214164", -1); + all_test ("0.00000278", "0.000000000000000004069", 1); + all_test ("452953568", "5", 1); + all_test ("6.3", "0.00000000000000000108", 1); + all_test ("-6.8363624", "-71489", 1); + all_test ("0.0011232588", "-303.3", 1); + all_test ("-14.0845", "-13.736", -1); + all_test ("-17.02168645", "-224637", 1); + all_test ("-4212280773", "-0.000187770", -1); + all_test ("0.00000003418", "-0.000039", 1); + all_test ("-43.737419409", "8835.871", -1); + all_test ("-97593198", "-0.000000000000000000318554271", -1); + all_test ("0.000000000000000000011383807583", "-6821.9588", 1); + all_test ("0.00000000002148347559", "7307610.12", -1); + all_test ("-192642.694", "0", -1); + all_test ("0.000000000007138411375", "-0.0001386", 1); + all_test ("-85.57", "-0.0000000000000000015380232", -1); + all_test ("553283624.5", "-0.0002938", 1); + all_test ("-0.08812", "4.83", -1); + all_test ("4.9", "-436", 1); + all_test ("-0.00024787", "0.0000000000000000804553", -1); + all_test ("505.177864", "-1058821.702", 1); + all_test ("0", "-9.2", 1); + all_test ("0.000000000139878568", "20.792", -1); + all_test ("194.1635", "26817.14", -1); + all_test ("123", "-0.0000000557024116689", 1); + all_test ("-21597132.5743", "74698648", -1); + all_test ("2.0", "-22574256851.6", 1); + all_test ("-99", "148.3755", -1); + all_test ("-3", "-0.0000000004324672314", -1); + all_test ("25.5594537708", "0.0000001987683", 1); + all_test ("12.204523", "127", -1); + all_test ("-16.1", "-0.00000000003079945018", -1); + all_test ("5", "-231057.18", 1); + all_test ("-0.00000000000566786", "-227438", 1); + all_test ("0.00000000004188", "-4437894.422", 1); + all_test ("3716202", "4.050", 1); + all_test ("878941437", "0.0000067945", 1); + all_test ("0.0000000000006517981381", "487.06", -1); + all_test ("-464400975604", "0.000223", -1); + all_test ("-0.000000000000000463803912", "-0.000000033", 1); + all_test ("-44", "875958", -1); + all_test ("173.04", "259.4491902", -1); + all_test ("-1.66", "35146200.24", -1); + all_test ("0.0000103750", "6.221887", -1); + all_test ("-6034.59820", "0.0068365419", -1); + all_test ("524.34546782", "44.572583393", 1); + all_test ("8711891602", "0.000000000000000000080236", 1); + all_test ("-1", "-0.00000000001045149282985", -1); + all_test ("1009", "2742992.1087", -1); + all_test ("-0.000000000443", "-26.86321244", 1); + all_test ("3089348.2545", "-1", 1); + all_test ("0.00000102676", "-908.53218525", 1); + all_test ("-3.48848", "5330516.1", -1); + all_test ("6.4616", "-1", 1); + all_test ("1", "-9.781657", 1); + all_test ("-3.4", "-521472970", 1); + all_test ("-586.97", "-113.11324", -1); + all_test ("10.2837600", "-2", 1); + all_test ("3.74102080", "-11175.7", 1); + all_test ("0.000000000042971203966", "-2084.4542", 1); + all_test ("-0.000000064891438", "-2043792860.5", 1); + all_test ("-33.47", "-1323.71284738", 1); + all_test ("422.5186", "0.00000000073882404523", 1); + all_test ("-218.3", "-121.56", -1); + all_test ("0", "-1754.876", 1); + all_test ("-248.5", "-1.1", -1); + all_test ("22.04", "135695140693", -1); + all_test ("-0.000000000000181", "-49.2", 1); + all_test ("-896738.71440", "-779277.279830", -1); + all_test ("1635.632", "-1.87", 1); + all_test ("-0.0000000000000000003432937", "-0.0000000000000000128", 1); + all_test ("8185.04579", "28.304207", 1); + all_test ("-57.80410102", "-0.000000000065900351", -1); + all_test ("1", "-0.000000000000014", 1); + all_test ("26.13562", "0.00000000000004472101", 1); + all_test ("-26", "-46846563.0", 1); + all_test ("0.0000008802852", "-38865.86", 1); + all_test ("6590981.4", "25733", 1); + all_test ("3.10", "-0.000095648629463", 1); + all_test ("2", "0.3926", 1); + all_test ("1071.137629", "8717.37", -1); + all_test ("188711", "0.00000000000000000003923", 1); + all_test ("2.64", "1912.289", -1); + all_test ("962.2", "37.5", 1); + all_test ("0", "-14.3056421", 1); + all_test ("6.434877", "41.7051341210", -1); + all_test ("1", "-4", 1); + all_test ("-573.491", "-7850309", 1); + all_test ("-8506.2", "-6", -1); + all_test ("-2436719080.97", "-487.145", -1); + all_test ("1", "-0.000000000000013193", 1); + all_test ("67.3", "331.473345666", -1); + all_test ("-0.00000000000000116355724", "0.000000001349568973", -1); + all_test ("-4380819.68", "-171", -1); + all_test ("-263582.40400", "0.0000000000001840687158", -1); + all_test ("31", "-0.0000000000000000073", 1); + all_test ("-3.234555", "1", -1); + all_test ("-0.0000009745557", "-12583.24883", 1); + all_test ("0.000000004423159", "21297.3", -1); + all_test ("-11954925140", "-244009.66219", -1); + all_test ("4122.60", "-0.000000000080630710245", 1); + all_test ("24458437758", "-29.81012", 1); + all_test ("-3", "5826.7", -1); + all_test ("0", "-40662", 1); + all_test ("-242.79", "-404.29025", 1); + all_test ("-4446.1504587", "3.763848", -1); + all_test ("6", "0", 1); + all_test ("6.3", "0.00000000121", 1); + all_test ("-1.0", "-0.00000000000000000006445409", -1); + all_test ("-9374.2957170", "58340751", -1); + all_test ("20347413.9", "-779599.59", 1); + all_test ("3051.205905", "17883.635", -1); + all_test ("-1345.0889662", "420448113", -1); + all_test ("-48.9", "0", -1); + all_test ("-0.0006551466", "-576096.0", 1); + all_test ("47.80", "1421535456.7", -1); + all_test ("22280251557", "1", 1); + all_test ("73.35790", "1788057733", -1); + all_test ("-80114.1", "0", -1); + all_test ("-0.000000000000707301", "9582641.8231", -1); + all_test ("-40590618", "0.0005028", -1); + all_test ("-26.1551", "-59129881", 1); + all_test ("126.31", "0", 1); + all_test ("-1", "-3.330", 1); + all_test ("-7", "-0.0000200526", -1); + all_test ("-3761.76241528", "-26.8", -1); + all_test ("-0.0000003162744266", "0.0000000000000000394784057113", -1); + all_test ("-130448.713110", "-169586.15212", 1); + all_test ("-40.8968", "0.00000000591143", -1); + all_test ("50781.5422696", "0", 1); + all_test ("-0.00000000000000120", "-0.0000000859583", 1); + all_test ("-26886.528", "-97.8", -1); + all_test ("6.812", "-74976701.51", 1); + all_test ("0", "-958435", 1); + all_test ("-78.09589", "-28195701701", 1); + all_test ("0.000000000000000042071654504", "-26576.9776", 1); + all_test ("6.1", "0.00000000000000000089253676", 1); + all_test ("-2744493.46", "-110.8907926", -1); + all_test ("3.82237319650", "24.69679", -1); + all_test ("642337.78548", "-0.0000000000000000000372333883166", 1); + all_test ("2017548", "-21455.8709783", 1); + all_test ("-115732.814", "-0.00000000029824235", -1); + all_test ("5309.7", "0", 1); + all_test ("16741188415.6", "-0.110485391", 1); + all_test ("-1", "-3", 1); + all_test ("-4", "6.970303371", -1); + all_test ("-186.5987098", "37519.7898", -1); + all_test ("-217.59", "-90791.13282", 1); + all_test ("0", "-264309561.7", 1); + all_test ("3303.44786015", "224832", -1); + all_test ("-1", "8628993", -1); + all_test ("-13840", "31.895590", -1); + all_test ("-422.075562", "0.0000000000003673", -1); + all_test ("-5.4", "-2.988", -1); + all_test ("-12.28195", "-8.1", -1); + all_test ("42.1", "8452.3", -1); + all_test ("40.4", "1", 1); + all_test ("-611.849", "-20937.2313506", 1); + all_test ("-8.530", "-88795904.7", 1); + all_test ("-5235577626", "0.778127928170", -1); + all_test ("370711545091", "0.000000000000000210166457", 1); + all_test ("-7.48128", "-43.9398904797", 1); + all_test ("0.002625414898", "6", -1); + all_test ("1", "-2", 1); + all_test ("-6.731", "26328856", -1); + all_test ("0.0000000000000000000284154564", "-1059603.41", 1); + all_test ("0.000000000443838495", "0.0000000000000017", 1); + all_test ("-3", "-18008.5115", 1); + all_test ("-5.44111", "-0.000000000000002315", -1); + all_test ("-0.00000000000005224", "2615.7", -1); + all_test ("-165.123", "715.4", -1); + all_test ("0.00000000000000000002503685", "103.89909", -1); + all_test ("-843660", "-61054040.1", 1); + all_test ("-0.000000000188978", "1.5162", -1); + all_test ("-13262813", "-3.8259288422", -1); + all_test ("-260760", "22527192335", -1); + all_test ("-0.0000000012743953613", "3", -1); + all_test ("-3.1", "0.0002826855", -1); + all_test ("-0.00000034032373868", "4", -1); + all_test ("-34.4487739299", "-3226659.36", 1); + all_test ("-613804.983", "-0.00000000000000000162", -1); + all_test ("1.64349914689", "-35.11364419", 1); + all_test ("0.00000000007506", "1.5", -1); + all_test ("-15402.36", "-25.57717", -1); + all_test ("-0.02114629039", "-29.30", 1); + all_test ("741.6", "272.88495", 1); + all_test ("268", "-3.19964", 1); + all_test ("-71.4", "21611474", -1); + all_test ("0.000000000000007218501", "937651.654", -1); + all_test ("199.3", "106.687430", 1); + all_test ("-347089643", "-1.23588", -1); + all_test ("1.1", "142.884", -1); + all_test ("-0.00000397691", "3080.547000", -1); + all_test ("862056251", "-0.00000000053632884", 1); + all_test ("1", "-51972744.2", 1); + all_test ("-0.0000000003410179", "-100.6", 1); + all_test ("-2.888005719", "530.1", -1); + all_test ("1", "7572161.50", -1); + all_test ("-347802.7", "-9442843753", 1); + all_test ("0.0023038", "780500", -1); + all_test ("8", "0.0000000086715315930", 1); + all_test ("25.2514", "-5.6679", 1); + all_test ("-273.01392594", "744.7", -1); + all_test ("1", "-0.000000000000000013732783740", 1); + all_test ("-12110.11", "404.59869", -1); + all_test ("-12.2", "1.409", -1); + all_test ("-21399326578", "3", -1); + all_test ("0.0000000000000011173", "-641.0", 1); + all_test ("-32312.03841", "-858381873.058", 1); + all_test ("2.914778", "-4083717632.78", 1); + all_test ("-1", "-145434.3590", 1); + all_test ("-0.000000000000029", "10.5027826", -1); + all_test ("-83110.21", "-159304.18856", 1); + all_test ("0.00000017124", "234078.4", -1); + all_test ("-3.3135862481", "-0.0252", -1); + all_test ("50816417030", "-0.0000000000000000000677050476", 1); + all_test ("-0.000000121283558", "0.0000014", -1); + all_test ("-2.6", "-51", 1); + all_test ("-0.00000000000006649625", "0.000000000000000000158653960", -1); + all_test ("0.10516268852", "65.301", -1); + all_test ("-1.275", "-47740", 1); + all_test ("-1.351", "403525711", -1); + all_test ("2", "-4297959683", 1); + all_test ("-164689.3", "-39864948.9721", 1); + all_test ("9.9", "-69.2411393", 1); + all_test ("8", "0.00000000000103945809296", 1); + all_test ("305178.471", "3", 1); + all_test ("0.000000000000032", "-20930.0799164", 1); + all_test ("-77.49", "395.9622", -1); + all_test ("-152.757430953", "-1398.02", 1); + all_test ("-2307.747", "0.00000000000019805243698", -1); + all_test ("-0.01218", "-7.812", 1); + all_test ("0.0000000000000000003810", "0.0000000000000000029679541", -1); + all_test ("10.688", "0.000000000008058682358", 1); + all_test ("-1", "2578212", -1); + all_test ("-3", "-56.08", 1); + all_test ("-1093", "251.7", -1); + all_test ("-4256.966707", "1.5", -1); + all_test ("0.05564369", "-359117.57", 1); + all_test ("-0.0000016653675", "21.04559509", -1); + all_test ("0.00000000000000000560706598", "0.00000035617423088", -1); + all_test ("-1613281026.0", "-12.8755773", -1); + all_test ("-10117916.33", "-43368489.9992", 1); + all_test ("0.0000000000000000023", "-0.00000000000000000072941926625", 1); + all_test ("0.000000000000000000114", "-39574.34967", 1); + all_test ("688605.3502", "790.091519", 1); + all_test ("93.997217", "-1193.847608", 1); + all_test ("70.4", "0", 1); + all_test ("-1", "-1", 0); + all_test ("2799.9505", "-879350400", 1); + all_test ("26.3519", "2.7329", 1); + all_test ("0.000000001075249872", "1", -1); + all_test ("-1576477620.9", "0", -1); + all_test ("-0.0000000000001887095", "0", -1); + all_test ("-8.5", "-1699611.01", 1); + all_test ("43.9", "269.320", -1); + all_test ("6.861", "-13208", 1); + all_test ("-0.00000000018976769", "4969.1", -1); + all_test ("-0.104", "63006.503", -1); + all_test ("4.699718", "0", 1); + all_test ("-2398.0397", "0.000000000000912", -1); + all_test ("-4898751.931", "1", -1); + all_test ("157885566", "-68580.02", 1); + all_test ("-11645818", "-3", -1); + all_test ("-16294097.923", "-1.2097447985", -1); + all_test ("-0.000000748731", "-454.222", 1); + all_test ("0.00000000000010244980", "134106823.540", -1); + all_test ("0.0000000000000015", "-170.73985", 1); + all_test ("53.927", "6", 1); + all_test ("1859944924", "2923512", 1); + all_test ("-8", "2.06", -1); + all_test ("-1173", "-2", -1); + all_test ("2530717.95510", "-161.959593549", 1); + all_test ("28.7750", "28975251191", -1); + all_test ("14.6", "9.60848", 1); + all_test ("-26625.8", "-181290682.303", 1); + all_test ("-3216.90", "-13439", 1); + all_test ("0.00000469235", "-1", 1); + all_test ("-1767948", "0.000000000000000000030839", -1); + all_test ("-0.0000732020", "133715", -1); + all_test ("1790223107", "0.0000000064", 1); + all_test ("-3", "-2", -1); + all_test ("-63662276937", "3719.7312891", -1); + all_test ("-0.0012587205", "-4217797.73", 1); + all_test ("63388492", "-2816203811.9", 1); + all_test ("0.000000000000030042105", "0", 1); + all_test ("-305040732.4", "0.00070", -1); + all_test ("13331390", "-0.00000016537084927", 1); + all_test ("-0.0000022895", "-16976.1986920", 1); + all_test ("876.4955249", "-243.2", 1); + all_test ("-197.5688", "-4.29794", -1); + all_test ("0.0000000000000000011", "6282.72", -1); + all_test ("0.0000000000050984036283", "7.7881", -1); + all_test ("-10495794506.9", "0", -1); + all_test ("124856173.18", "0.00522", 1); + all_test ("53.3", "-199", 1); + all_test ("-1199.8", "-727.8", -1); + all_test ("-43307.7", "-28360017461.6", 1); + all_test ("-1", "2756856880", -1); + all_test ("-689646263237", "464047", -1); + all_test ("47187.7", "0", 1); + all_test ("-0.00000000000000001510", "-3563.630", 1); + all_test ("-4.858", "15", -1); + all_test ("6199564.0", "4", 1); + all_test ("0.00000008126595122", "94923.9", -1); + all_test ("-4.55", "-0.00000050900013", -1); + all_test ("1", "2296100.7", -1); + all_test ("0", "1.503", -1); + all_test ("0.000000000110946", "0", 1); + all_test ("615423.7235", "184.8711374", 1); + all_test ("1.05514", "0.00000000000000164", 1); + all_test ("496.80639073", "-37990.30", 1); + all_test ("836.9842", "7.8", 1); + all_test ("-5860278130.33", "-0.0000000000000000150199", -1); + all_test ("-0.007816", "-1.811145", 1); + all_test ("0.00000000000000000006492937", "1.6", -1); + all_test ("0", "-4.8", 1); + all_test ("0", "3.8982", -1); + all_test ("23", "34.3741", -1); + all_test ("-3.0", "-0.00000000000104944", -1); + all_test ("-0.1919", "5", -1); + all_test ("99770.2091", "-5.7", 1); + all_test ("51124300393", "-0.00000000017998", 1); + all_test ("-70787232160", "-0.000133", -1); + all_test ("1.13", "-3424775", 1); + all_test ("-0.0000068139312402", "-0.0000000350208", -1); + all_test ("1572.7", "-205.1", 1); + all_test ("-0.000007355799843", "585", -1); + all_test ("0.00000000000153614", "-20.5512", 1); + all_test ("-0.00026", "2029254", -1); + all_test ("2227.1", "372.5", 1); + all_test ("6.7923522322", "7", -1); + all_test ("1.3", "5", -1); + all_test ("-8.54164", "-8", -1); + all_test ("29980.875417", "0.441135960", 1); + all_test ("299010.3", "0", 1); + all_test ("9.27543816", "-0.00078113", 1); + all_test ("-13.507", "5.73", -1); + all_test ("-2724", "79823.9184", -1); + all_test ("665153", "0.00000139621298365", 1); + all_test ("-221507.830", "-42.2728486", -1); + all_test ("-25748575.099", "-184839.8", -1); + all_test ("91089", "11.053483070", 1); + all_test ("-1.954", "-3.146", 1); + all_test ("-118", "-0.0000000000000000253942787", -1); + all_test ("5", "0.0000000000000000008808", 1); + all_test ("-0.113849830", "-13.23", 1); + all_test ("3419823", "9382356.3920", -1); + all_test ("-209675697.9", "-1718.23", -1); + all_test ("-0.000000000001298", "0.1258203689", -1); + all_test ("0.00000122345524", "0", 1); + all_test ("1227261.8715", "4", 1); + all_test ("-0.0022031", "2.041487544", -1); + all_test ("542.9563883", "-5854511410", 1); + all_test ("-11659798", "-2.444", -1); + all_test ("0.0000000000000000010320422", "633.8", -1); + all_test ("0", "-2.8", 1); + all_test ("-242.35223", "-2352762", 1); + all_test ("-189681.68721", "0.0000000000009222784269", -1); + all_test ("0.000000000000000007316", "575", -1); + all_test ("32152.149300", "-0.00000000003464314292", 1); + all_test ("1.02326029645", "-4", 1); + all_test ("3", "0.00000000007128", 1); + all_test ("-6654.74794838", "3880.34", -1); + all_test ("0.0002021", "-52.79057", 1); + all_test ("-0.04040990", "-0.16497", 1); + all_test ("291339", "-8", 1); + all_test ("-1.3669473", "0", -1); + all_test ("0", "-8.9", 1); + all_test ("-223743", "0", -1); + all_test ("0.00000000000270179", "2084", -1); + + all_test ("-5.5239e+3", "-2.2807805e+1", -1); + all_test ("8.554e+2", "0e+0", 1); + all_test ("-2.1176736939e+5", "2.13526332e+2", -1); + all_test ("2.528e-2", "-1.5e-1", 1); + all_test ("-2.1536554e-2", "-3.93e-6", -1); + all_test ("4.853430802e-5", "-4.9e-11", 1); + all_test ("-6.9e-3", "1.9596e+1", -1); + all_test ("-9.93182949e+1", "-7.9983535342e-20", -1); + all_test ("1.629795e+5", "1.58117535423e+5", 1); + all_test ("-2.934333546e-15", "-2.093237829e-14", 1); + all_test ("2.2916931e+1", "7.88e+2", -1); + all_test ("7.656115e+0", "5.5885422e-10", 1); + all_test ("0e+0", "-3.3e+0", 1); + all_test ("-2.4327703616e+3", "1.1e+1", -1); + all_test ("1.61903621e+6", "-2.3444006423e+2", 1); + all_test ("4.5332e+4", "3.281123867e+1", 1); + all_test ("-7.9e-4", "0e+0", -1); + all_test ("-2.6e-19", "-5.4489933e+6", 1); + all_test ("5.877152e+1", "1.5125e-2", 1); + all_test ("6.293000381e-1", "7.2e+1", -1); + all_test ("1.072062222225e+10", "7.521052067e+0", 1); + all_test ("-2.9744557e+7", "0e+0", -1); + all_test ("-1.0235e-13", "-3.671886e+0", 1); + all_test ("-2.06364e-4", "6.2113337e-3", -1); + all_test ("-7.02e+0", "-1.1348644434e+3", 1); + all_test ("-3.57688146e+3", "3.81547e+2", -1); + all_test ("2.9527098536e+3", "1.32080504447e-4", 1); + all_test ("-2.6286e+1", "3.8e+0", -1); + all_test ("-3.45054603e+2", "-9.88229e-15", -1); + all_test ("-2.469e+0", "-3e+0", 1); + all_test ("-8.369800004e-4", "1.4e-17", -1); + all_test ("-1e+0", "4e+0", -1); + all_test ("-3.0829216081e+2", "-3.08e+1", -1); + all_test ("-1e+0", "-5.756e+1", 1); + all_test ("-8.511e+0", "3.126324e+6", -1); + all_test ("2.4474011949e+4", "1.12649e+2", 1); + all_test ("-2.57868e+4", "-1.03178e+1", -1); + all_test ("1e+0", "9.5177e+1", -1); + all_test ("-9.8069663157e-6", "1.4532689e+5", -1); + all_test ("3.721e+1", "-2e+0", 1); + all_test ("-9.7657879751e+10", "-5.67e+2", -1); + all_test ("-4.8657905e+6", "-2.17381281e+1", -1); + all_test ("-4.20131e+0", "-1.3179640655e-8", -1); + all_test ("1.6e+0", "0e+0", 1); + all_test ("5.16068325659e-4", "1.269e+1", -1); + all_test ("9.91969e+5", "0e+0", 1); + all_test ("2.32e+0", "3.69e+1", -1); + all_test ("5.685149e+2", "3.694e-13", 1); + all_test ("-9.0148e-5", "0e+0", -1); + all_test ("-3e+0", "-8.7855e-7", -1); + all_test ("1.3669489e+3", "1.33866e-4", 1); + all_test ("-2.6e+1", "1.36976797894e+3", -1); + all_test ("4.6e+0", "0e+0", 1); + all_test ("-7.2e-8", "1.971355e+2", -1); + all_test ("1.19755e-5", "7e+0", -1); + all_test ("-3.46e+0", "-3.7715361e-11", -1); + all_test ("3.25762245146e+6", "-4.02e+0", 1); + all_test ("1.3174225699e+7", "9.6222695655e+10", -1); + all_test ("6.6e-13", "-5.23193346205e+4", 1); + all_test ("-3.873e+3", "-1.23681175e+3", -1); + all_test ("-1.19869e+5", "-8e+2", -1); + all_test ("2.027381656e+3", "1.47629351439e+11", -1); + all_test ("-1.467418e-17", "9.0073930856e+5", -1); + all_test ("7.1e+0", "6.116301582e+2", -1); + all_test ("-1.7883916e+5", "3.533e-17", -1); + all_test ("8.8e-11", "-5.9707897e-1", 1); + all_test ("-5.337e+3", "4.6614e-13", -1); + all_test ("1e+0", "-3.1e+0", 1); + all_test ("-3.05920196e-6", "-4e+0", 1); + all_test ("-1.692375e-10", "2.29981330096e+6", -1); + all_test ("5.19341813e-1", "6.1e+0", -1); + all_test ("5.796e+3", "-9.386773281e-8", 1); + all_test ("9.117497e+0", "0e+0", 1); + all_test ("6.962934e-8", "1.413982e+2", -1); + all_test ("2e+0", "1.4e+1", -1); + all_test ("-2.04e+0", "-1.30300025e+9", 1); + all_test ("1.57647e+1", "3.0862783894e+0", 1); + all_test ("-4e+0", "7.1e+1", -1); + all_test ("1.21e-6", "-2.109584154e+10", 1); + all_test ("6.55669245e+3", "-8.15e-8", 1); + all_test ("-8.3307e+2", "-9.1476874e+7", 1); + all_test ("0e+0", "-3.64676e+5", 1); + all_test ("-1.2803e+2", "7.2908749e+3", -1); + all_test ("3.2263e+3", "-1.43355e+1", 1); + all_test ("4.92751482244e-18", "1.3747248256e+3", -1); + all_test ("8.20054755e-10", "6.2348e+2", -1); + all_test ("-1.06e+1", "-7.2569084631e+4", 1); + all_test ("1.86e+2", "3.76613527e-5", 1); + all_test ("3.33652e+3", "5.1e+1", 1); + all_test ("3.665307673e+8", "3.31344e+5", 1); + all_test ("-7.341261161e+2", "-2.98910916e+7", 1); + all_test ("6.24638573245e+5", "4.47893448327e+2", 1); + all_test ("1.23e-8", "-5e+0", 1); + all_test ("4.469176e+5", "-2.09863e+3", 1); + all_test ("-2.72624816161e+3", "0e+0", -1); + all_test ("-6.78251e-20", "-6.837e-1", 1); + all_test ("6.2456922e-6", "0e+0", 1); + all_test ("6.2e-4", "4.40516e+4", -1); + all_test ("-7.624e+2", "-3e+0", -1); + all_test ("-5.22549619458e+0", "-4.0866914233e+9", 1); + all_test ("-9.51999532e+7", "-2e+0", -1); + all_test ("-1.07321e+2", "-1.3e+0", -1); + all_test ("-5.405555671e-6", "8.0306e+1", -1); + all_test ("2.2e+0", "6.49e-17", 1); + all_test ("3e+0", "2.2e+0", 1); + all_test ("-1.12e+2", "3.4165375e+1", -1); + all_test ("-2.36978379e+4", "-4.2e+0", -1); + all_test ("-8e+0", "-6.42e+0", -1); + all_test ("-3.2e+1", "6.17231707e-19", -1); + all_test ("-4.8454741051e+1", "4.3339e-10", -1); + all_test ("4.29e+0", "3.28376306e+4", -1); + all_test ("-6.33089e+1", "-5.7065758354e-19", -1); + all_test ("0e+0", "-3.31e-7", 1); + all_test ("-2.18973e+2", "1.88333703659e+4", -1); + all_test ("-1.67e+2", "3e+0", -1); + all_test ("0e+0", "9.7605e-12", -1); + all_test ("1.294433816e+0", "-1.1e+1", 1); + all_test ("-1.4246177e+3", "-1.043532436e+8", 1); + all_test ("-1.0531e+1", "2.2268899e-6", -1); + all_test ("-1.5611e+3", "1.59757e+0", -1); + all_test ("3.3638160556e+11", "6.29136402e+6", 1); + all_test ("-7.7326244542e+2", "-9.6e+0", -1); + all_test ("-3.593606997e+8", "-4e+0", -1); + all_test ("9.4433e+2", "-1e+0", 1); + all_test ("-1.0131e-9", "-4.551632556e+9", 1); + all_test ("1.61735e+5", "-6.550194286e+9", 1); + all_test ("3e+0", "-8.14e+3", 1); + all_test ("-3.492e+0", "8.85393125e+2", -1); + all_test ("-9.3678169131e-19", "-1.98802069e+4", 1); + all_test ("-4.39338019e+7", "1.07850051e-15", -1); + all_test ("-1.1677e+0", "2.22825374e+8", -1); + all_test ("-3.476e+0", "6e+0", -1); + all_test ("1.453e+0", "-6.34599e-7", 1); + all_test ("1.789e-9", "0e+0", 1); + all_test ("-2.92933e+4", "5.802095e+4", -1); + all_test ("9e+0", "2.63702e-7", 1); + all_test ("-6.0696e+4", "9.46475e+5", -1); + all_test ("-1.508052e+6", "2.45600810354e+0", -1); + all_test ("6.83354e+1", "1.93e-12", 1); + all_test ("-1.6e+0", "-2e+0", 1); + all_test ("-7.4275644e+5", "-6.1587e-14", -1); + all_test ("0e+0", "3.540869872e-9", -1); + all_test ("-7.86e+0", "8.041734e+6", -1); + all_test ("-8e+0", "1.569e+1", -1); + all_test ("2.0839e-18", "1.2848955034e-14", -1); + all_test ("6.84909e+3", "2.19e+1", 1); + all_test ("5.556062e+3", "1.037e-12", 1); + all_test ("-1.011918e-9", "3.52315476249e+0", -1); + all_test ("-1.2e+2", "-5.8677085e+1", -1); + all_test ("1.5e+0", "-8.2951e-8", 1); + all_test ("5.254e+0", "-2.08338e+3", 1); + all_test ("8.272e+0", "0e+0", 1); + all_test ("-2.3496e+3", "-1.74217696625e-1", -1); + all_test ("2.33e+0", "-6e+0", 1); + all_test ("8.138135061e-6", "1.52e+1", -1); + all_test ("-2.691357e+5", "1e+0", -1); + all_test ("4.277011e-13", "2.1978e+4", -1); + all_test ("-4.164225e+0", "3.94601989492e-6", -1); + all_test ("-1.32e-18", "-3.94e-3", 1); + all_test ("-2.443211e-11", "2.02e-8", -1); + all_test ("-1.2e+0", "-3.2e+1", 1); + all_test ("4.7652754554e+7", "-2.1e-11", 1); + all_test ("2.02136500541e+9", "-2.77170882e+2", 1); + all_test ("-1.65e-2", "-2.4039e+3", 1); + all_test ("1.8172e+1", "-6.3e-5", 1); + all_test ("1.8703827209e-10", "-1.46184e+4", 1); + all_test ("-1.11606903e+6", "-2.8e-6", -1); + all_test ("-7.84180535e+0", "-6.9715e+2", 1); + all_test ("-1.6095371e-5", "-4.007e+2", 1); + all_test ("2e+0", "2.7730114619e+0", -1); + all_test ("1.3694403e+7", "-3.14014263471e-3", 1); + all_test ("3e+0", "2.4553237278e+3", -1); + all_test ("-3e+0", "-2.78756184842e+11", 1); + all_test ("-1.2522e+2", "-7.7e+1", -1); + all_test ("4.491e-18", "-1.196e+3", 1); + all_test ("-3e+0", "-2.78811358e+4", 1); + all_test ("-3.5481789e+3", "1.6004994927e+5", -1); + all_test ("1.9963146e+6", "-6.923e-1", 1); + all_test ("-1.37573e-12", "2.072e+2", -1); + all_test ("6.570067306e-1", "3.73554490286e-16", 1); + all_test ("3.0659071736e-15", "6.946525e+1", -1); + all_test ("-5.346e+0", "1e+0", -1); + all_test ("8.55e-9", "7.9e-11", 1); + all_test ("-7.5096624e+2", "3.40622424e+5", -1); + all_test ("2.219404561e-14", "5.47749e+0", -1); + all_test ("3.000476e+2", "-1.754092582e+1", 1); + all_test ("0e+0", "-1.69774e+3", 1); + all_test ("2.993e+0", "-1e+0", 1); + all_test ("2.7528038851e+1", "-3.945799123e+4", 1); + all_test ("-6.6266e+2", "-4.5e-19", -1); + all_test ("9.204609e-14", "1.25862e+5", -1); + all_test ("-7.0237408e+5", "-4.56413483775e+3", -1); + all_test ("4.8481576e+2", "-6.53713e+3", 1); + all_test ("1e+0", "1.103e+2", -1); + all_test ("6.57977e+2", "-3.852e-16", 1); + all_test ("3.861e+2", "-6.2072117462e+5", 1); + all_test ("-6e+0", "1.3494901111e+6", -1); + all_test ("-5.870696e-1", "-3.801808e+1", 1); + all_test ("-3.83761721e+8", "8.081107501e-5", -1); + all_test ("6.50057174e+5", "2.0206519e-12", 1); + all_test ("5.5207e+4", "-2.48e+2", 1); + all_test ("0e+0", "1.05116516384e+11", -1); + all_test ("-1.75279284e+4", "3.899762267e-1", -1); + all_test ("-1.6197e+0", "4.3274e+4", -1); + all_test ("1.256294e+6", "-5.58921e-15", 1); + all_test ("3e+0", "2.0586937916e-17", 1); + all_test ("-3.28553e-13", "-1.18e+1", 1); + all_test ("-2.81418e+5", "1.72529458e-12", -1); + all_test ("7.8666421e+3", "5.9153e+0", 1); + all_test ("4.84347589e-8", "2e+0", -1); + all_test ("3e+0", "-2.6655512e+2", 1); + all_test ("6.2696e-10", "-2.054382974e+1", 1); + all_test ("6.1413274e-2", "0e+0", 1); + all_test ("-2.9095e-18", "-6.9975956783e+8", 1); + all_test ("4.01e-20", "-7.5588e-6", 1); + all_test ("9.490622e-18", "-2.77e+0", 1); + all_test ("-1.0267e-14", "-8.790091e-9", 1); + all_test ("-4.077591e-14", "-3.0259558246e+0", 1); + all_test ("-2.8261e+2", "-4.99857e+0", -1); + all_test ("9.899113e+1", "1e+0", 1); + all_test ("5.5e+0", "-7.0265e+0", 1); + all_test ("5.286e-7", "-4.3972682e+2", 1); + all_test ("1.5520187e+6", "1.150018e+2", 1); + all_test ("-2.04e-10", "-4.0474e+2", 1); + all_test ("-2.32245517e+7", "-4.96976e+4", -1); + all_test ("-3.6487688611e-10", "-1.1763503e+2", 1); + all_test ("8.3414625e+0", "0e+0", 1); + all_test ("9.905071e+6", "-5.9541e-4", 1); + all_test ("1.984307e+4", "-2.4291e-7", 1); + all_test ("-1e+0", "-1e+0", 0); + all_test ("2.060415969e+9", "-2.03455e+2", 1); + all_test ("3.1982e-19", "-1.993945e+3", 1); + all_test ("3.093739e+1", "-1.99128676855e+0", 1); + all_test ("1.881e+1", "-1.09028754e+5", 1); + all_test ("0e+0", "-4.7092316e-14", 1); + all_test ("-9.455374693e-10", "-9.45812534991e+6", 1); + all_test ("-1.67881e+4", "-2.1683630866e+3", -1); + all_test ("6.3514013642e-17", "-4.5e+0", 1); + all_test ("1.20179765e-20", "4.9098e+3", -1); + all_test ("0e+0", "-7.476983768e+1", 1); + all_test ("-8.5797e+2", "2.1e+0", -1); + all_test ("-2.75e+1", "-1.749e-18", -1); + all_test ("-1e+0", "8.4e+1", -1); + all_test ("7.110682e+4", "8.5646556e+2", 1); + all_test ("-3.1875423048e+6", "7.216e+1", -1); + all_test ("-1.41969e+0", "0e+0", -1); + all_test ("-3.707432e+6", "1.5048071e+2", -1); + all_test ("-2.65447780189e+11", "2e+0", -1); + all_test ("3.808865e+6", "-7.22140745e-10", 1); + all_test ("2.972544e+3", "0e+0", 1); + all_test ("1.142002886e-2", "-3.063e+0", 1); + all_test ("-3.292e-15", "-2.2e-1", 1); + all_test ("-9.29480350675e-6", "9.4830355594e+4", -1); + all_test ("-2.49267401e-19", "3.3296905e+4", -1); + all_test ("3.5057e+4", "1.2204e+3", 1); + all_test ("2e+0", "9.51e+1", -1); + all_test ("3.87279e+5", "-3.916681548e-13", 1); + all_test ("7.775e+2", "1.814199961e+2", 1); + all_test ("2.35095e-7", "9e+1", -1); + all_test ("-8.077537e+2", "1.477341929e-7", -1); + all_test ("-4.05364541e+3", "-5.1772081e+8", 1); + all_test ("-8.0808881e+2", "-9.006e+1", -1); + all_test ("-1.408092e+5", "-3.86832e+2", -1); + all_test ("5e+0", "2e+0", 1); + all_test ("-2.7424908566e+0", "-1.5471519e+0", -1); + all_test ("7.31598e+0", "6.617089e+2", -1); + all_test ("4.634e-7", "-2.8214e+3", 1); + all_test ("-3.67e+2", "1.2e-18", -1); + all_test ("2.5658e-5", "6.99742e+3", -1); + all_test ("3.7635921e+2", "-2.01901e-17", 1); + all_test ("-4.8483140421e+9", "-3.02562e+1", -1); + all_test ("0e+0", "-2.9395143209e+8", 1); + all_test ("-2.8599503512e+7", "5.35e-1", -1); + all_test ("-1.7e+1", "-9.66381e+0", -1); + all_test ("1.72e+1", "1.0349e-1", 1); + all_test ("1.28429e+3", "2.0794611e+0", 1); + all_test ("1.01e+0", "-5.7758e-11", 1); + all_test ("2.227909e+5", "5.70358533e-7", 1); + all_test ("-1.46175e+2", "-1.17142e+3", 1); + all_test ("-9.231e+3", "1e+0", -1); + all_test ("-1.959219085e+3", "3.71e+1", -1); + all_test ("5.1e+0", "2.93e+2", -1); + all_test ("-1.72022209707e+1", "0e+0", -1); + all_test ("1.1e+0", "1e+0", 1); + all_test ("1.71906029185e+5", "-2.14019e+0", 1); + all_test ("2.3e+0", "-1.5055635614e+9", 1); + all_test ("2.7786e+1", "1.061015128e+9", -1); + all_test ("-1.56275984e+4", "1.09e+0", -1); + all_test ("2.19791673e+1", "-3.104e+2", 1); + all_test ("-4.3337886e+7", "4e+0", -1); + all_test ("1e+0", "-4.22059e-7", 1); + all_test ("3.365e+3", "-1.554e+2", 1); + all_test ("1.1204042327e+10", "-1.3423178346e+10", 1); + all_test ("2e+0", "-4.226459262e+1", 1); + all_test ("-2.15204e+5", "5.958e+0", -1); + all_test ("-9.99386226e+4", "0e+0", -1); + all_test ("-1e+0", "-1.66246413e+7", 1); + all_test ("4.9173e+2", "5.850707e-18", 1); + all_test ("4.9e+0", "-4.7875e-8", 1); + all_test ("-3e+0", "0e+0", -1); + all_test ("1e+0", "-8.0083e-2", 1); + all_test ("-7.83025222e+8", "-5e+0", -1); + all_test ("-4.974944e+4", "3.1477230359e+10", -1); + all_test ("7.180136071e+3", "-1.0544157071e-9", 1); + all_test ("1.6665814118e-3", "1.73898e+3", -1); + all_test ("-2.525921789e+1", "-3.93e+0", -1); + all_test ("-1.734618e-16", "-1.6371419e-20", -1); + all_test ("1.6444334e+6", "-2e+1", 1); + all_test ("-1e+0", "2.072822964e+9", -1); + all_test ("-6.473e-9", "-9.162534e-5", 1); + all_test ("-3.1e+0", "-3.24e+0", 1); + all_test ("1.6655834e+7", "-3.0374218803e+6", 1); + all_test ("2.391e+0", "-3.907e+1", 1); + all_test ("-1.7022720963e+3", "2e+0", -1); + all_test ("4.454083713e+9", "2.0091e+4", 1); + all_test ("-1.0366217734e-15", "-6.721993e+5", 1); + all_test ("-5.7809e+4", "3.784169e+1", -1); + all_test ("1.24172537e+5", "6.3e-9", 1); + all_test ("4.2774283e-9", "2.4637e+1", -1); + all_test ("1.6237405102e+10", "1.6962e-1", 1); + all_test ("1.918662e+2", "1.544681756e+8", -1); + all_test ("1.0276881e+4", "1.788601e+0", 1); + all_test ("1.029335e-8", "1.18168265e+6", -1); + all_test ("-2.55327e+2", "2.5825834e+6", -1); + all_test ("0e+0", "1e+0", -1); + all_test ("-8.909e+2", "-1.73e+2", -1); + all_test ("5.67e+2", "2.56525383318e+5", -1); + all_test ("-8.96e-20", "-8.32900609e+3", 1); + all_test ("1.592758866e+9", "-3.872e+0", 1); + all_test ("-5.639641852e+7", "8.2009e+4", -1); + all_test ("2.9e+0", "4.5e+0", -1); + all_test ("1.1865649388e+5", "1.78418807471e+3", 1); + all_test ("2.07011921e-13", "2.63e+0", -1); + all_test ("3e+0", "-2.21e+0", 1); + all_test ("-9.34727321093e+11", "-6.86793197512e+11", -1); + all_test ("3.9e+0", "4.2973482815e+4", -1); + all_test ("1.227147e+5", "-1.359464668e-2", 1); + all_test ("-5e+0", "-3.3986e+4", 1); + all_test ("6.31103133e+7", "1.94315936e+6", 1); + all_test ("-3.96418e+4", "-8.7168221121e+4", 1); + all_test ("-1.64e+1", "-3.33576978e+6", 1); + all_test ("4.952370705e-11", "-6.63267265e+2", 1); + all_test ("1.253e+1", "-6.14622e+2", 1); + all_test ("0e+0", "-1.442321328e+9", 1); + all_test ("-1.180943e-6", "-9.42e-1", 1); + all_test ("-1.037276289e+7", "-1.5944116485e-8", -1); + all_test ("1.55813448081e+11", "1.1285443e+3", 1); + all_test ("-2.28254e+1", "-4.9e+0", -1); + all_test ("-1e+0", "4.594e+0", -1); + all_test ("-1.07058028623e+0", "2.845e+3", -1); + all_test ("7.011e+1", "0e+0", 1); + all_test ("-4.5094e+2", "1.1459094e+3", -1); + all_test ("2.85e+0", "-1.45112e+4", 1); + all_test ("-1.09547404e+5", "-1.36411488349e+2", -1); + all_test ("-3.0552725e+2", "-2.837293625e+9", 1); + all_test ("-1.31e-5", "1.13782957e+2", -1); + all_test ("-2.8209016e-20", "1.18e+0", -1); + all_test ("-1.07667044e-19", "1e+0", -1); + all_test ("1.3162128667e-10", "1.2689615338e+9", -1); + all_test ("1.66716908e+6", "-1.2430993e-4", 1); + all_test ("1.11122e-2", "-3.77323705304e+7", 1); + all_test ("-7e+0", "5.5865954e+4", -1); + all_test ("-3.15283960233e-16", "-3.2047044e-8", 1); + all_test ("2.0846621548e+1", "3.92e-6", 1); + all_test ("-2.8674e+1", "-1.31313084e-17", -1); + all_test ("1.8332852e-17", "1.341e+1", -1); + all_test ("9e+0", "-9.3e-12", 1); + all_test ("-4.02592028644e+5", "-1.99028e+3", -1); + all_test ("-1.541408372e+6", "-9.28e+0", -1); + all_test ("1.5e+1", "9.783799e+2", -1); + all_test ("-8e+0", "2.047e-7", -1); + all_test ("1.81e+2", "1.43604e-20", 1); + all_test ("0e+0", "-4.9101e+4", 1); + all_test ("-1.78049643e+0", "-4.45673358e+0", 1); + all_test ("1.722535667e+1", "-8.19890866e-9", 1); + all_test ("-6.356e+3", "-2.77223e+2", -1); + all_test ("-8.13e+0", "-1.3129112e+7", 1); + all_test ("-6.2012143e-7", "-4.08330939e+4", 1); + all_test ("-2.11991e+0", "4.592978e+2", -1); + all_test ("-4.773043e+3", "-1.0842355e+2", -1); + all_test ("-9.894928e+0", "6.1e-4", -1); + all_test ("-8.7990384e-10", "-7.1295894e+6", 1); + all_test ("-9.44946188e-18", "2e+1", -1); + all_test ("7.76614e+0", "1.065670038e-20", 1); + all_test ("-4.9149e+2", "1.347155498e+9", -1); + all_test ("-2.869032e+1", "-5.892838e+4", 1); + all_test ("-5.6497e+4", "2.2954968e+8", -1); + all_test ("-7.75e+2", "-3.45480796e+0", -1); + all_test ("-3.3e+0", "-6.836e+1", 1); + all_test ("-4.6e+0", "-6.92355437e-8", -1); + all_test ("0e+0", "-9.3e-10", 1); + all_test ("-2.5751542e-13", "-7.26665e+5", 1); + all_test ("-9.1e-19", "-2.22e-1", 1); + all_test ("-3.0422594e+4", "-1.83546441e+8", 1); + all_test ("-2.15991727483e-12", "3.70254e+2", -1); + all_test ("-1.310483e+2", "-1.00310363e+0", -1); + all_test ("1.272382447e+3", "1.54639612e+8", -1); + all_test ("-8.6e-16", "1.800458e+6", -1); + all_test ("3.7121867683e-11", "1.041097e-12", 1); + all_test ("2.1025817638e+1", "1.7e+0", 1); + all_test ("-3.282377e-1", "0e+0", -1); + all_test ("1.6002692836e+7", "5.2967e+3", 1); + all_test ("-6.59716e+5", "-1.499e+1", -1); + all_test ("-1.489486e+3", "-2.496418887e+5", 1); + all_test ("1.191e-18", "1.12654e+1", -1); + all_test ("-1.28e+2", "1.3e+0", -1); + all_test ("3.319e+3", "-7.45877113531e+11", 1); + all_test ("-2.28982321e+8", "2.01314e-19", -1); + all_test ("-5.569624e+5", "-3.737525683e-9", -1); + all_test ("2.510676e-10", "2.3795e-11", 1); + all_test ("-1.26058e-7", "6.52e+1", -1); + all_test ("0e+0", "-1.21538e-11", 1); + all_test ("3.75822101026e+8", "-4.6e+1", 1); + all_test ("0e+0", "5.18418122608e+11", -1); + all_test ("-5.2e+0", "-1.522025e+1", 1); + all_test ("3.91627e+0", "-1e+0", 1); + all_test ("8.625694625e+0", "4.003945628e+5", -1); + all_test ("-1.5e+1", "1.0794745045e+8", -1); + all_test ("-6.683982e-9", "1.3286e-5", -1); + all_test ("2.148885316e+8", "-6.403e+3", 1); + all_test ("-3.393964981e+1", "1.17e+1", -1); + all_test ("-2.171e+0", "2.44e-19", -1); + all_test ("4.974e+2", "4.441821841e+1", 1); + all_test ("3.9772342e+7", "-1.2177e+1", 1); + all_test ("-5.6487205452e+10", "1.616928e+0", -1); + all_test ("2e+0", "-2.4219201896e+8", 1); + all_test ("4.1809266e+0", "3e+0", 1); + all_test ("3.5648124786e-6", "6.165789278e+0", -1); + all_test ("-6.0454e+4", "-3.3e+0", -1); + all_test ("-1.01e-7", "1.01747e-2", -1); + all_test ("-1e+0", "4.6e-9", -1); + all_test ("7.181192e-6", "4.81e+2", -1); + all_test ("-2.14830776492e+11", "1.56e+2", -1); + all_test ("-1.60213948e-3", "5.539e+3", -1); + all_test ("1.678951271e-7", "5.34118751e+7", -1); + all_test ("7.293818e+5", "2.373e-10", 1); + all_test ("9.65991e+0", "5.66e+0", 1); + all_test ("2.315503e-6", "-6.93e+0", 1); + all_test ("2.19017494955e-3", "-7.4e+1", 1); + all_test ("5.43469e+6", "0e+0", 1); + all_test ("-2.330431561e+3", "1.52623e+1", -1); + all_test ("8.463333e+6", "-2.4e+1", 1); + all_test ("-2.12e+2", "1.5278e+3", -1); + all_test ("-9.61324414111e+11", "1e+0", -1); + all_test ("5.1e+0", "-4.03e+1", 1); + all_test ("0e+0", "8.77053e+1", -1); + all_test ("2.7e+0", "-4.654243671e+4", 1); + all_test ("-2.61595754e+2", "3.4371351e-3", -1); + all_test ("1.9236e+4", "0e+0", 1); + all_test ("1.28744e+5", "1.588e+3", 1); + all_test ("-7.12124e+3", "2.63043e+5", -1); + all_test ("-2.87e+2", "-8.99490089e+8", 1); + all_test ("-9.1451e+1", "-5.621833e+6", 1); + all_test ("-1.458423128e+3", "2.45879369e+4", -1); + all_test ("-2.2e+0", "5e+0", -1); + all_test ("6.7158e+2", "2e+0", 1); + all_test ("-1.861834055e+1", "3.46e+0", -1); + all_test ("-1.42e-19", "-4.4399e+2", 1); + all_test ("-7.7995e-19", "-3.37524763e+8", 1); + all_test ("6.245562401e+3", "-1.9e+0", 1); + all_test ("-7.4396248258e+8", "1.3184e+1", -1); + all_test ("4.2194232e+0", "-9.5e+0", 1); + all_test ("-2.09763179071e+0", "-2.9462e+3", 1); + all_test ("8.7009653053e-4", "5.89164955e+7", -1); + all_test ("-7.256717176e+1", "1.1256e+3", -1); + all_test ("-2e+0", "1.74987486218e+6", -1); + all_test ("-2.8e-2", "-9.439e+0", 1); + all_test ("4.3e-18", "8.421e-3", -1); + all_test ("-3.635286e-8", "1.27536e+2", -1); + all_test ("9e+0", "-8.95518866e+6", 1); + all_test ("7.7059164e+7", "-1.8e+0", 1); + all_test ("1.75973e-16", "4.9e-4", -1); + all_test ("-5.956e+3", "1.1918794e+1", -1); + all_test ("2.07e+1", "0e+0", 1); + all_test ("4.152e+0", "1.850529e-20", 1); + all_test ("4.74e+0", "-5.322106e-18", 1); + all_test ("1.46e+0", "-4.00403e+1", 1); + all_test ("2.36505254e-2", "1.22e-13", 1); + all_test ("5.4446e+3", "-6.5681622266e+1", 1); + all_test ("-5.298322e+4", "-2.662708719e+8", 1); + all_test ("-1.7590457129e-9", "-3.93970854954e+8", 1); + all_test ("5.65218e+0", "-2.996191168e+7", 1); + all_test ("2.9632e-6", "2.19966262214e-20", 1); + all_test ("-4.416e+0", "-1.813776e+4", 1); + all_test ("-1.974e+0", "-6.8e+0", 1); + all_test ("-1.287908e+5", "-9.04795615e-3", -1); + all_test ("-1.2376068058e+2", "1e+0", -1); + all_test ("-2.8599877887e+0", "0e+0", -1); + all_test ("1.4818911e-14", "3.170254e+4", -1); + all_test ("2e-13", "-1.7343311e+6", 1); + all_test ("-1e+0", "2.697691e+3", -1); + all_test ("-1.69563735921e+7", "-1.18e+0", -1); + all_test ("-1.221141e-16", "1.56460805e+8", -1); + all_test ("3e+0", "3.23926451e+3", -1); + all_test ("1.3233e+1", "3.15e+0", 1); + all_test ("-1.78284e+6", "0e+0", -1); + all_test ("1.9075e-5", "-6.4991913129e+1", 1); + all_test ("5.55554e+5", "-6.18098e+6", 1); + all_test ("6.271294e+6", "0e+0", 1); + all_test ("2.6978874e+4", "1.3646501e-2", 1); + + all_test ("24920", "2492", 1); + all_test ("52923623235884.48110534", "52923623235884.4811053", 1); + all_test ("-1018638522.07495421826817980", "-1018638522.0749542182681798", 0); + all_test ("0.00000364136900", "0.0000036413690", 0); + all_test ("-135859105.5", "-785094047.8293510", 1); + all_test ("-4.1657902332676", "-4.165790233267", -1); + all_test ("-19727509864588.3074", "-19727509864588.307", -1); + all_test ("-0.0000000004020750915", "-0.000000000402075091", -1); + all_test ("-1387043910095766779", "-138704391009576677", -1); + all_test ("7.140", "7.14", 0); + all_test ("-0.0000000083734544824491024997299767812", "-0.000000008373454482449102499729976781", -1); + all_test ("-0.000000000000000000739", "-0.00000000000000000073", -1); + all_test ("0.000000000000000673058992451447407822", "0.00000000000000067305899245144740782", 1); + all_test ("107795751025937925", "10779575102593792", 1); + all_test ("-0.000000140098925302534364687090608708", "-0.00000014009892530253436468709060870", -1); + all_test ("-96807628344097344020361511087", "-9680762834409734402036151108", -1); + all_test ("5236305598733477493821144", "523630559873347749382114", 1); + all_test ("0.000012299669952207", "0.00001229966995220", 1); + all_test ("-0.000000000026183583081", "-0.00000000002618358308", -1); + all_test ("18157090114632.3949228869562", "18157090114632.394922886956", 1); + all_test ("-8659730.88830", "-8659730.8883", 0); + all_test ("92367.0595855628821", "92367.059585562882", 1); + all_test ("-1191", "-119", -1); + all_test ("0.809", "0.80", 1); + all_test ("0.000000000000000000518579249419024975384099", "0.00000000000000000051857924941902497538409", 1); + all_test ("196.516", "196.51", 1); + all_test ("1902.90", "1902.9", 0); + all_test ("0.012", "0.01", 1); + all_test ("2521110", "252111", 1); + all_test ("-24795", "-2479", -1); + all_test ("3134.367349", "3134.36734", 1); + all_test ("69006142577114620504.8", "36.0", 1); + all_test ("-437609971173626.98792503", "-437609971173626.9879250", -1); + all_test ("-36.11385408453080506", "-36.1138540845308050", -1); + all_test ("1686.321277", "1686.32127", 1); + all_test ("-84595.85616391029195941", "-84595.8561639102919594", -1); + all_test ("-0.00000000000308289301068", "-0.0000000000030828930106", -1); + all_test ("5", "273372254047642077337", -1); + all_test ("52666073577.1290781606630097094", "52666073577.129078160663009709", 1); + all_test ("0.000000000000000043918", "0.00000000000000004391", 1); + all_test ("-139225776437585184717785093.38", "-139225776437585184717785093.3", -1); + all_test ("-5584.1138579", "-5584.113857", -1); + all_test ("-129253519658715.0", "112386803", -1); + all_test ("-2290.5184387881314043589", "-2290.518438788131404358", -1); + all_test ("-74094153218599401.874188", "-74094153218599401.87418", -1); + all_test ("15.351267988724923583838", "15.35126798872492358383", 1); + all_test ("135.603302", "135.60330", 1); + all_test ("-50.57278382", "-50.5727838", -1); + all_test ("216.98487", "216.9848", 1); + all_test ("-21134.0", "-1", -1); + all_test ("36667803450713332911.35544", "36667803450713332911.3554", 1); + all_test ("-9554701478470869.90", "-9554701478470869.9", 0); + all_test ("-5", "-0.000000022007149864827", -1); + all_test ("-156737758.9503928528394581", "-156737758.950392852839458", -1); + all_test ("1364938.01055262931", "1364938.0105526293", 1); + all_test ("-439149.168324", "-439149.16832", -1); + all_test ("15.521233412177260268175125", "15.52123341217726026817512", 1); + all_test ("229652.78244076556531565167292", "229652.7824407655653156516729", 1); + all_test ("-3121052385.065", "-3121052385.06", -1); + all_test ("-717120317616.005596758", "-717120317616.00559675", -1); + all_test ("50773299385872514328347782", "5077329938587251432834778", 1); + all_test ("0.000000000000000000130149421115895602435542", "0.00000000000000000013014942111589560243554", 1); + all_test ("0.00000000000000002742431130831653697264", "0.0000000000000000274243113083165369726", 1); + all_test ("19079804604.0447062", "19079804604.044706", 1); + all_test ("-269212379960084901007498.0473", "-269212379960084901007498.047", -1); + all_test ("-0.358400680", "-0.35840068", 0); + all_test ("-21574492412094843183898085", "-2157449241209484318389808", -1); + all_test ("-71845410882550730027450926946", "-7184541088255073002745092694", -1); + all_test ("1544.607426323", "1544.60742632", 1); + all_test ("127.8549399242576867890", "127.854939924257686789", 0); + all_test ("-95462566651371.86749077", "-95462566651371.8674907", -1); + all_test ("1854469.010632854371428790793", "1854469.01063285437142879079", 1); + all_test ("-0.0000000000511087722639524", "-0.000000000051108772263952", -1); + all_test ("0", "-312658443822318131.65429523", 1); + all_test ("-2343445339.96760", "-2343445339.9676", 0); + all_test ("0.00000000000000147", "0.0000000000000014", 1); + all_test ("1844372.33", "1844372.3", 1); + all_test ("22982.419674718", "22982.41967471", 1); + all_test ("108594857698581658410.0737", "108594857698581658410.073", 1); + all_test ("-3.033420", "-3.03342", 0); + all_test ("55810550.26594153069059591", "55810550.2659415306905959", 1); + all_test ("628859628.7558", "628859628.755", 1); + all_test ("-547.10", "-547.1", 0); + all_test ("-0.0000000000000000009984305906072622822830075391", "-0.000000000000000000998430590607262282283007539", -1); + all_test ("-41958933743619342422791223708", "-4195893374361934242279122370", -1); + all_test ("-2167382.31949", "-2167382.3194", -1); + all_test ("-0.000000242769356", "-0.00000024276935", -1); + all_test ("175535", "17553", 1); + all_test ("13196567561552073746181107", "1319656756155207374618110", 1); + all_test ("-836.283", "-836.28", -1); + all_test ("-151.6480011", "-151.648001", -1); + all_test ("0.00000000000002112201668247567119900", "0.0000000000000211220166824756711990", 0); + all_test ("-291644372.8176", "-291644372.817", -1); + all_test ("2281", "228", 1); + all_test ("0.000000324729973", "0.00000032472997", 1); + all_test ("-76.8", "0.0001732215889415949412350821", -1); + all_test ("0.0000001164790050629621890224", "0.000000116479005062962189022", 1); + all_test ("-14.262813961", "-14.26281396", -1); + all_test ("-4785353721725589457.76", "-4785353721725589457.7", -1); + all_test ("-0.000000000048", "-0.00000000004", -1); + all_test ("-5324145565493", "-532414556549", -1); + all_test ("46", "-0.000000000566010149624486839", 1); + all_test ("-5225949604210842406679429.93784", "-5225949604210842406679429.9378", -1); + all_test ("-1.222170392", "-1.22217039", -1); + all_test ("-0.00000000000000010679843092306603352830", "-0.0000000000000001067984309230660335283", 0); + all_test ("-844323207816052268597", "-84432320781605226859", -1); + all_test ("-273294.449058068769224", "-273294.44905806876922", -1); + all_test ("-0.000061510623375", "-0.00006151062337", -1); + all_test ("-12", "-1", -1); + all_test ("-1146774191544920686.21847", "-1146774191544920686.2184", -1); + all_test ("7308692", "730869", 1); + all_test ("14463865367.0965", "14463865367.096", 1); + all_test ("0.1790976", "0.179097", 1); + all_test ("-0.00000088251244578915638133974523907", "-0.0000008825124457891563813397452390", -1); + all_test ("611.7", "0", 1); + all_test ("-309574907706487960682.9", "0.67178678369791512733235574", -1); + all_test ("-2889196478.141321900", "-2889196478.14132190", 0); + all_test ("163.97", "163.9", 1); + all_test ("-2194652189.27", "-2194652189.2", -1); + all_test ("-1259.4915400", "-1259.491540", 0); + all_test ("-30128337", "-3012833", -1); + all_test ("-403904222820946941.150781058", "-403904222820946941.15078105", -1); + all_test ("-58.2030", "-58.203", 0); + all_test ("126.5713124708539037", "126.571312470853903", 1); + all_test ("-4", "220065464", -1); + all_test ("1450774048.18357046", "1450774048.1835704", 1); + all_test ("13694997566335", "1369499756633", 1); + all_test ("-24.57850991168163044469", "-24.5785099116816304446", -1); + all_test ("-3319659536.191", "-3319659536.19", -1); + all_test ("10865.96", "10865.9", 1); + all_test ("-188510157872663341831", "-18851015787266334183", -1); + all_test ("62342691016946", "6234269101694", 1); + all_test ("-20478.3157551016331897", "-20478.315755101633189", -1); + all_test ("-2575595857296977614.9440249", "-2575595857296977614.944024", -1); + all_test ("0.00026567201697160", "0.0002656720169716", 0); + all_test ("-0.000000010270578723943120849114", "-0.00000001027057872394312084911", -1); + all_test ("0.00000022383", "0.0000002238", 1); + all_test ("2376696496129402852542.91945204", "2376696496129402852542.9194520", 1); + all_test ("0.0000000000000000001100974033101769024", "0.000000000000000000110097403310176902", 1); + all_test ("24448082823953.92815", "24448082823953.9281", 1); + all_test ("49.832437916691637221", "49.83243791669163722", 1); + all_test ("-10536487297762435987902669715", "-1053648729776243598790266971", -1); + all_test ("-296549547862779403135.41", "-296549547862779403135.4", -1); + all_test ("-9.5", "2.21", -1); + all_test ("1.98179", "1.9817", 1); + all_test ("-1199981732936688041", "-119998173293668804", -1); + all_test ("0", "-0.0000000000000000000109460230704099637262", 1); + all_test ("-50936625.15944921283142", "-50936625.1594492128314", -1); + all_test ("-0.000000000003616130540960851987251", "-0.00000000000361613054096085198725", -1); + all_test ("-0.000000000980270326383637798406174532", "-0.00000000098027032638363779840617453", -1); + all_test ("-0.0000000000000000000300003812042071861", "-0.000000000000000000030000381204207186", -1); + all_test ("83049889282.1", "0.00000000000001025185302485201018151409355123", 1); + all_test ("233131790953874220450317498.14", "233131790953874220450317498.1", 1); + all_test ("-3.7412702321747291", "-3.741270232174729", -1); + all_test ("-0.0000009922266", "-0.000000992226", -1); + all_test ("-1", "0.0000002780803", -1); + all_test ("0.0000000000002146830950262", "0.000000000000214683095026", 1); + all_test ("1", "-1.5071", 1); + all_test ("-0.000000000465117016507026272818023", "-0.00000000046511701650702627281802", -1); + all_test ("35.39382", "35.3938", 1); + all_test ("-209.660", "-209.66", 0); + all_test ("-90", "-9", -1); + all_test ("0", "-0.00692", 1); + all_test ("-180091979.9605073632174693529", "-180091979.960507363217469352", -1); + all_test ("-122272534374617365", "-12227253437461736", -1); + all_test ("-8572377", "-857237", -1); + all_test ("-0.08864728209412867534496", "-0.0886472820941286753449", -1); + all_test ("0.00000000000000000006218601802455410039603451124", "0.0000000000000000000621860180245541003960345112", 1); + all_test ("8920721679663873214715343.144", "8920721679663873214715343.14", 1); + all_test ("0.274427890206313529182339245", "0.27442789020631352918233924", 1); + all_test ("-2011471992.5", "0", -1); + all_test ("1599651.4112339122", "1599651.411233912", 1); + all_test ("8257580447850.449229990", "8257580447850.44922999", 0); + all_test ("-834308419.89", "-834308419.8", -1); + all_test ("196710676681449226960408", "19671067668144922696040", 1); + all_test ("-41631749783269189618702.063072", "-41631749783269189618702.06307", -1); + all_test ("0.00000054256828175879255377", "0.0000005425682817587925537", 1); + all_test ("10420033248908625.057365906", "10420033248908625.05736590", 1); + all_test ("33958751985671992.081663881", "33958751985671992.08166388", 1); + all_test ("38573.3", "-73", 1); + all_test ("-220.99", "-220.9", -1); + all_test ("0.00000000000000000006632", "0.0000000000000000000663", 1); + all_test ("136.8915", "136.891", 1); + all_test ("-42909979.8482", "-42909979.848", -1); + all_test ("316479242.2412", "316479242.241", 1); + all_test ("-36.2228569144", "-36.222856914", -1); + all_test ("-0.000000000000000145887", "-0.00000000000000014588", -1); + all_test ("-0.034420", "-0.03442", 0); + all_test ("-7487.2940835", "-7487.294083", -1); + all_test ("0.0000000001322905", "0.000000000132290", 1); + all_test ("4540208843067942284033465362", "454020884306794228403346536", 1); + all_test ("-0.00001872", "-0.0000187", -1); + all_test ("1.679", "1.67", 1); + all_test ("-0.003693", "-0.00369", -1); + all_test ("-73534521830291117736646922", "-7353452183029111773664692", -1); + all_test ("-439971017251.505", "-439971017251.50", -1); + all_test ("-0.00000000070562052512643", "-0.0000000007056205251264", -1); + all_test ("0.00000000000036078093367389488954734882", "0.0000000000003607809336738948895473488", 1); + all_test ("183.3930", "183.393", 0); + all_test ("0.000000000000000000045738234226758", "0.00000000000000000004573823422675", 1); + all_test ("5184478988.786158717", "5184478988.78615871", 1); + all_test ("1228655406.4", "-0.000000000001861", 1); + all_test ("5.4", "29713477480117786223897387069", -1); + all_test ("-31065857257211", "-3106585725721", -1); + all_test ("-0.0000000080362523", "-0.000000008036252", -1); + all_test ("52", "-4818398178.32313312", 1); + all_test ("44618406226893376866220.0165600", "44618406226893376866220.016560", 0); + all_test ("60575775575555146660699.8158363", "60575775575555146660699.815836", 1); + all_test ("0.000000000000000000010650670229091", "0.00000000000000000001065067022909", 1); + all_test ("-1.27", "-1.2", -1); + all_test ("-110508.5720888844", "-110508.572088884", -1); + all_test ("584649.40290077882", "584649.4029007788", 1); + all_test ("-991707393.8949", "-991707393.894", -1); + all_test ("-0.000000000000000005615887181289922", "-0.00000000000000000561588718128992", -1); + all_test ("277763471701101937737505118889", "27776347170110193773750511888", 1); + all_test ("0.000000000006833349812829515208501351867", "0.00000000000683334981282951520850135186", 1); + all_test ("0.0000000000000000000825119426382375328", "0.000000000000000000082511942638237532", 1); + all_test ("164214635502117894.45016275", "164214635502117894.4501627", 1); + all_test ("156755613767148.4684291", "156755613767148.468429", 1); + all_test ("337131.847212007602363066", "337131.84721200760236306", 1); + all_test ("-743114207120.9575", "-743114207120.957", -1); + all_test ("0.00097637", "0.0009763", 1); + all_test ("0.000000000000000016965784141152262443", "0.00000000000000001696578414115226244", 1); + all_test ("-0.679736199868", "-0.67973619986", -1); + all_test ("31059776.87593", "31059776.8759", 1); + all_test ("-0.00000000000315991373636284335", "-0.0000000000031599137363628433", -1); + all_test ("-4717725826066274081763.901", "-4717725826066274081763.90", -1); + all_test ("-0.00000000000000000010531404316238", "-0.0000000000000000001053140431623", -1); + all_test ("-0.0000000000000092308522050", "-0.000000000000009230852205", 0); + all_test ("-31939210155282393", "-3193921015528239", -1); + all_test ("234.1354842403", "234.135484240", 1); + all_test ("0", "25500772861644.63741880315", -1); + all_test ("-2820.544", "-2820.54", -1); + all_test ("-0.0000000000000000000171940410392", "-0.000000000000000000017194041039", -1); + all_test ("-3953375698956251412.549803593", "-3953375698956251412.54980359", -1); + all_test ("-198189130.0782001207250", "-198189130.078200120725", 0); + all_test ("-61352644292414307", "-6135264429241430", -1); + all_test ("92629.915756020804289", "92629.91575602080428", 1); + all_test ("2.2482", "2.248", 1); + all_test ("72.5680804939448786575044940949", "72.568080493944878657504494094", 1); + all_test ("29840260084837.110", "29840260084837.11", 0); + all_test ("-154554841.4372781448", "-154554841.437278144", -1); + all_test ("-4715870743255944543754826804", "-471587074325594454375482680", -1); + all_test ("0", "-673196116754.92594558368787", 1); + all_test ("122070161359937463835761732151", "12207016135993746383576173215", 1); + all_test ("0.00000000000000001992532704", "0.0000000000000000199253270", 1); + all_test ("186651.580960498548", "186651.58096049854", 1); + all_test ("2493953119584326.98694", "2493953119584326.9869", 1); + all_test ("0.0000000000248988460997106039259", "0.000000000024898846099710603925", 1); + all_test ("0.00000000126179033507144813915", "0.0000000012617903350714481391", 1); + all_test ("8.5210960565733", "8.521096056573", 1); + all_test ("-0.115997983788", "-0.11599798378", -1); + all_test ("116478460414160856", "11647846041416085", 1); + all_test ("-0.0000000000410758577068834165", "-0.000000000041075857706883416", -1); + all_test ("-3.877785932990082724610869253", "-3.87778593299008272461086925", -1); + all_test ("-1104.347468121953607708416", "-1104.34746812195360770841", -1); + all_test ("1788566441339035", "178856644133903", 1); + all_test ("-30944694030711", "-3094469403071", -1); + all_test ("-1", "-59318.35091346", 1); + all_test ("22.928", "22.92", 1); + all_test ("-20.365598091573148941340533554", "-20.36559809157314894134053355", -1); + all_test ("164432", "16443", 1); + all_test ("-1505.1453", "-1505.145", -1); + all_test ("14849.5", "-1035048221058", 1); + all_test ("-21813.7768933", "-21813.776893", -1); + all_test ("-3", "-133", 1); + all_test ("-0.0000000000000011616", "-0.000000000000001161", -1); + all_test ("289100821.7784", "289100821.778", 1); + all_test ("6019702.0", "-354753899721763221.19223", 1); + all_test ("37105.701735589966456", "37105.70173558996645", 1); + all_test ("15977.362", "15977.36", 1); + all_test ("-24795509226542636447908722", "-2479550922654263644790872", -1); + all_test ("-13.2", "0", -1); + all_test ("-0.000000000000000037701155411491341477", "-0.00000000000000003770115541149134147", -1); + all_test ("2513229.7", "-0.0000000000000011002329726788604366137233", 1); + all_test ("10760725997292.38254893708", "10760725997292.3825489370", 1); + all_test ("504177973263.4841942", "504177973263.484194", 1); + all_test ("3200.062372584607515", "3200.06237258460751", 1); + all_test ("-10354064661931765.3820", "-10354064661931765.382", 0); + all_test ("13619513905.82", "13619513905.8", 1); + all_test ("2", "-20.2867031651859982183", 1); + all_test ("-0.000000001042392150476", "-0.00000000104239215047", -1); + all_test ("-15943439249924914", "-1594343924992491", -1); + all_test ("-1012088906865956056745.1886775", "-1012088906865956056745.188677", -1); + all_test ("0.0000206", "0.000020", 1); + all_test ("-186827747346939858.7304", "-186827747346939858.730", -1); + all_test ("-30132095587981544870.6", "1489083.55535518931", -1); + all_test ("7012", "701", 1); + all_test ("40130924927125476099322.48103", "40130924927125476099322.4810", 1); + all_test ("0.0000000000000000000981", "0.000000000000000000098", 1); + all_test ("-19372.3055662", "-19372.305566", -1); + all_test ("-19.83638584167", "-19.8363858416", -1); + all_test ("42.6", "5178793.40712651", -1); + all_test ("498949500082608940888", "49894950008260894088", 1); + all_test ("2790925312621021.3331276", "2790925312621021.333127", 1); + all_test ("0.00000000000844831740749858241", "0.0000000000084483174074985824", 1); + all_test ("6.50", "6.5", 0); + all_test ("0.000003462780", "0.00000346278", 0); + all_test ("-751629020.898865", "-751629020.89886", -1); + all_test ("0.00000007309247977705", "0.0000000730924797770", 1); + all_test ("-0.00220406121000", "-0.0022040612100", 0); + all_test ("1120182731416530221572473", "112018273141653022157247", 1); + all_test ("-0.8347609918057479", "-0.834760991805747", -1); + all_test ("-5807.666472", "-5807.66647", -1); + all_test ("-4167388.899763015", "-4167388.89976301", -1); + all_test ("-401150740402834660825.50243454", "-401150740402834660825.5024345", -1); + all_test ("-35794.29921122403049778953976", "-35794.2992112240304977895397", -1); + all_test ("84431862959.2121997678178446917", "84431862959.212199767817844691", 1); + all_test ("-2539996.17345032025783026803138", "-2539996.1734503202578302680313", -1); + all_test ("0.00000000000000099705053162571348", "0.0000000000000009970505316257134", 1); + all_test ("23401.12855330127", "23401.1285533012", 1); + all_test ("8164385.3895774781453", "8164385.389577478145", 1); + all_test ("-0.000000000000000005992633459836508190", "-0.00000000000000000599263345983650819", 0); + all_test ("0.00000001336378654", "0.0000000133637865", 1); + all_test ("0.50994808508176183", "0.5099480850817618", 1); + all_test ("-1600777113482754136", "-160077711348275413", -1); + all_test ("-4525072.832", "-4525072.83", -1); + all_test ("-21", "-2", -1); + all_test ("268678.963124964", "268678.96312496", 1); + all_test ("0.0002563283407958355682202564483", "0.000256328340795835568220256448", 1); + all_test ("-0.001692254617913891380920881908", "-0.00169225461791389138092088190", -1); + all_test ("-1322598467.8998", "-1322598467.899", -1); + all_test ("-12041123394.9989604", "-12041123394.998960", -1); + all_test ("0.0000000000000195012", "0.000000000000019501", 1); + all_test ("-4342560023646872240660", "-434256002364687224066", -1); + all_test ("-35117", "-3511", -1); + all_test ("0.00000000000000000069551761107698717501", "0.0000000000000000006955176110769871750", 1); + all_test ("1185010344.148941", "1185010344.14894", 1); + all_test ("-0.000000000030952985207690202030601829098", "-0.00000000003095298520769020203060182909", -1); + all_test ("0.000000000000000582651473217774254164326212239", "0.00000000000000058265147321777425416432621223", 1); + all_test ("504359.80087", "504359.8008", 1); + all_test ("-1023", "-102", -1); + all_test ("-0.00000000000044602178960376487", "-0.0000000000004460217896037648", -1); + all_test ("-27163960789.700", "-27163960789.70", 0); + all_test ("9.75", "9.7", 1); + all_test ("15749.6", "-64114895", 1); + all_test ("-1.78646", "-1.7864", -1); + all_test ("0", "-0.0000293962545673136560132940521", 1); + all_test ("1568482319330379083.46066570", "1568482319330379083.4606657", 0); + all_test ("1.5", "0.24059486639369", 1); + all_test ("72631883478316528107390894.761", "72631883478316528107390894.76", 1); + all_test ("34.435342", "34.43534", 1); + all_test ("-21658874", "-2165887", -1); + all_test ("4.39", "4.3", 1); + all_test ("0.0001793758139490056488536388", "0.000179375813949005648853638", 1); + all_test ("0.000014078039388936962", "0.00001407803938893696", 1); + all_test ("0.00000000000003559010620", "0.0000000000000355901062", 0); + all_test ("1114593033649166", "111459303364916", 1); + all_test ("-839727705223987847927.8", "0.0000000000000000009297088124606271555053", -1); + all_test ("0.000000001093460554010662", "0.00000000109346055401066", 1); + all_test ("-103.512", "-103.51", -1); + all_test ("67798048.163", "67798048.16", 1); + all_test ("52308232397211107247556311601", "5230823239721110724755631160", 1); + all_test ("0.000000000000000001692", "0.00000000000000000169", 1); + all_test ("0.001001742891829562912794", "0.00100174289182956291279", 1); + all_test ("44854731", "4485473", 1); + all_test ("-142442148181118926872.0291262", "-142442148181118926872.029126", -1); + all_test ("-212.25", "-212.2", -1); + all_test ("0.00064262226396649288736045009", "0.0006426222639664928873604500", 1); + all_test ("-1963634914900782.3083054837942", "-1963634914900782.308305483794", -1); + all_test ("-29235219.36", "-29235219.3", -1); + all_test ("13157328.110", "13157328.11", 0); + all_test ("-0.00000024923670350319764405595266619", "-0.0000002492367035031976440559526661", -1); + all_test ("211241733874.26", "211241733874.2", 1); + all_test ("-0.0000000000001031601613971119366688714", "-0.000000000000103160161397111936668871", -1); + all_test ("-41.38924804686835819982429", "-41.3892480468683581998242", -1); + all_test ("-6", "-0.00000000000947293362099347980476194676305", -1); + all_test ("0", "2025.61", -1); + all_test ("4509184573.49", "4509184573.4", 1); + all_test ("0.00000000000000001080", "0.0000000000000000108", 0); + all_test ("0.000000000000000025970809826510597", "0.00000000000000002597080982651059", 1); + all_test ("-10487551.18", "-10487551.1", -1); + all_test ("-1", "-232678585.74", 1); + all_test ("2144754227667106756.251334", "2144754227667106756.25133", 1); + all_test ("11696039.4573616732", "11696039.457361673", 1); + all_test ("1.8", "-1197.974427959", 1); + all_test ("15.0", "0.14094197085256646250149695458", 1); + all_test ("-9911214476849.9868926", "-9911214476849.986892", -1); + all_test ("746601322434.3", "-2026225456262211.028", 1); + all_test ("33327.320", "33327.32", 0); + all_test ("37.45616", "37.4561", 1); + all_test ("1613310.79", "1613310.7", 1); + all_test ("-324.19116", "-324.1911", -1); + all_test ("-8205973490351098524", "-820597349035109852", -1); + all_test ("-38010778199", "-3801077819", -1); + all_test ("465062636441606050103294707247", "46506263644160605010329470724", 1); + all_test ("-234531342243689027509422607.087", "-234531342243689027509422607.08", -1); + all_test ("-6519.701031489886865549", "-6519.70103148988686554", -1); + all_test ("-27758350575381", "-2775835057538", -1); + all_test ("11205680254917.29959", "11205680254917.2995", 1); + all_test ("2037540", "203754", 1); + all_test ("-0.000000000143432822908384760", "-0.00000000014343282290838476", 0); + all_test ("-1080471500378115463.91037", "-1080471500378115463.9103", -1); + all_test ("11310.5806", "11310.580", 1); + all_test ("268.4", "4405497532754453.71", -1); + all_test ("-0.03269186675484629883", "-0.0326918667548462988", -1); + all_test ("3.0", "-1246100744", 1); + all_test ("-0.000009472607806448155830419", "-0.00000947260780644815583041", -1); + all_test ("-68623184.5", "-1870260073", 1); + all_test ("0.00000000115796390522683677275464134000", "0.0000000011579639052268367727546413400", 0); + all_test ("-0.000000001712702962512851", "-0.00000000171270296251285", -1); + all_test ("6963.3801375810328365724139570", "6963.380137581032836572413957", 0); + all_test ("0.000000000000000136327583962505", "0.00000000000000013632758396250", 1); + all_test ("-179275.62567103827058669819082", "-179275.6256710382705866981908", -1); + all_test ("0.00000218570795745319276132718732", "0.0000021857079574531927613271873", 1); + all_test ("68.31423316364099583801307", "68.3142331636409958380130", 1); + all_test ("19.5833307957304445294855674", "19.583330795730444529485567", 1); + all_test ("4.02", "4.0", 1); + all_test ("-862843", "-86284", -1); + all_test ("-56544409662235409.368186", "-56544409662235409.36818", -1); + all_test ("-0.00000000000003660585469627", "-0.0000000000000366058546962", -1); + all_test ("-1.863", "-1.86", -1); + all_test ("52501888926", "5250188892", 1); + all_test ("-1", "-0.00000000000000000978061879517092", -1); + all_test ("-0.00000000140842797026112010675644120", "-0.0000000014084279702611201067564412", 0); + all_test ("-8681.34675166", "-8681.3467516", -1); + all_test ("70986248658313756946.175", "70986248658313756946.17", 1); + all_test ("9087.12275147312492852", "9087.1227514731249285", 1); + all_test ("-1946391549304989528206958429.3", "0.00000000000000000001852761384", -1); + all_test ("-24991110196476816.5973432", "-24991110196476816.597343", -1); + all_test ("0.000000000000000012941178189261090807423", "0.00000000000000001294117818926109080742", 1); + all_test ("12016926398.4701744866213809", "12016926398.470174486621380", 1); + all_test ("3012709140.5485148192204195", "3012709140.548514819220419", 1); + all_test ("-0.000000000000014627930", "-0.00000000000001462793", 0); + all_test ("332348006.1892716773566", "332348006.189271677356", 1); + all_test ("-0.000000019", "-0.00000001", -1); + all_test ("-0.0000024642005864", "-0.000002464200586", -1); + all_test ("-15853920353685720", "-1585392035368572", -1); + all_test ("-3", "0.00334", -1); + all_test ("-4368864535997.00731830", "-4368864535997.0073183", 0); + all_test ("0.0000000000000000010", "0.000000000000000001", 0); + all_test ("-307303170292.614", "-307303170292.61", -1); + all_test ("25.45464373426403840448612", "25.4546437342640384044861", 1); + all_test ("942241618172218308593287", "94224161817221830859328", 1); + all_test ("0.00000000000000005357021085236752029646", "0.0000000000000000535702108523675202964", 1); + all_test ("0.000000000357348983", "0.00000000035734898", 1); + all_test ("-1578782291785511380364", "-157878229178551138036", -1); + all_test ("-76812604459187.94", "-76812604459187.9", -1); + all_test ("0.000000000000000000024", "0.00000000000000000002", 1); + all_test ("80910090177", "8091009017", 1); + all_test ("26196262061157.296", "26196262061157.29", 1); + all_test ("-2.5419448086543270", "-2.541944808654327", 0); + all_test ("5510.149", "5510.14", 1); + all_test ("240282.7241338", "240282.724133", 1); + all_test ("361596169011252", "36159616901125", 1); + all_test ("-203941370720480263273.3", "7313.9912", -1); + all_test ("-6425057953.0172", "-6425057953.017", -1); + all_test ("3529900444.00198687592090253454", "3529900444.0019868759209025345", 1); + all_test ("-1913233401877.8263043645", "-1913233401877.826304364", -1); + all_test ("0.00000000231115060509654299602960266", "0.0000000023111506050965429960296026", 1); + all_test ("-18819022481403295095312", "-1881902248140329509531", -1); + all_test ("-13790408.0512", "-13790408.051", -1); + all_test ("2996.67", "2996.6", 1); + all_test ("5", "-2364783035602699164.1934942679", 1); + all_test ("-794688606062", "-79468860606", -1); + all_test ("-15183315947.8764211541", "-15183315947.876421154", -1); + all_test ("15976.600931534513375", "15976.60093153451337", 1); + all_test ("62985782290", "6298578229", 1); + all_test ("-0.000000000000000136844163154210", "-0.00000000000000013684416315421", 0); + all_test ("9311325062667667325773987", "931132506266766732577398", 1); + all_test ("-251.776", "-251.77", -1); + all_test ("69.947", "69.94", 1); + all_test ("494.518135609425364940472684", "494.51813560942536494047268", 1); + all_test ("-0.000000000000000000770311595488584", "-0.00000000000000000077031159548858", -1); + all_test ("-31883468122.462112645954460826", "-31883468122.46211264595446082", -1); + all_test ("45164896297917952.745283345624", "45164896297917952.74528334562", 1); + all_test ("9.9", "6607070556969953716001823", -1); + all_test ("0.00000000000015847318576697", "0.0000000000001584731857669", 1); + all_test ("8453134914884811", "845313491488481", 1); + all_test ("4363007389023360.0947505417", "4363007389023360.094750541", 1); + all_test ("0.00000651", "0.0000065", 1); + all_test ("63980", "6398", 1); + all_test ("184865087582523954342727244.41", "184865087582523954342727244.4", 1); + all_test ("210", "21", 1); + all_test ("160857383504.45305139461", "160857383504.4530513946", 1); + all_test ("-68212.03884", "-68212.0388", -1); + all_test ("0.000000000000000000027320749051653154055", "0.00000000000000000002732074905165315405", 1); + all_test ("0.0000000018738126472074437195860615988", "0.000000001873812647207443719586061598", 1); + all_test ("-1119289980974198379.09520", "-1119289980974198379.0952", 0); + all_test ("0.00000000000020615568", "0.0000000000002061556", 1); + all_test ("24740673.0", "-19.6", 1); + all_test ("-0.00000000000000000008590177716950083750561846", "-0.0000000000000000000859017771695008375056184", -1); + all_test ("3", "381552602624", -1); + all_test ("-194022.047372437749", "-194022.04737243774", -1); + all_test ("-19.840941985", "-19.84094198", -1); + all_test ("786400.65729", "786400.6572", 1); + all_test ("-0.0000037430397514518105", "-0.000003743039751451810", -1); + all_test ("279955180857166858.67063", "279955180857166858.6706", 1); + all_test ("7.74", "7.7", 1); + all_test ("0.21829393131", "0.2182939313", 1); + all_test ("124841568240942.234680", "124841568240942.23468", 0); + all_test ("0.000000000000000471099502548165170284259", "0.00000000000000047109950254816517028425", 1); + all_test ("-99.86772739", "-99.8677273", -1); + all_test ("10", "41950771951.66109", -1); + all_test ("-0.00000000000000209702", "-0.0000000000000020970", -1); + all_test ("-0.000002340625428766004404187457", "-0.00000234062542876600440418745", -1); + all_test ("-4763.9", "2.034660667930931", -1); + all_test ("4038", "403", 1); + all_test ("9602830359170510968473768.362", "9602830359170510968473768.36", 1); + all_test ("1673967.68004214151", "1673967.6800421415", 1); + all_test ("-40724652990901152.3", "-1", -1); + all_test ("5.3613955", "5.361395", 1); + all_test ("-50544224094691571.5806233861187", "-50544224094691571.580623386118", -1); + all_test ("971836.46599301", "971836.4659930", 1); + all_test ("0.0000000000000000492654484203", "0.000000000000000049265448420", 1); + all_test ("0.0000000000000273350022839", "0.000000000000027335002283", 1); + all_test ("-0.0000000000000111187728980548441", "-0.000000000000011118772898054844", -1); + all_test ("240.32166914346", "240.3216691434", 1); + all_test ("-301.469168", "-301.46916", -1); + all_test ("0", "361314256851430.8380", -1); + all_test ("4095.137770623652511", "4095.13777062365251", 1); + all_test ("0.0015377038155762591158011773", "0.001537703815576259115801177", 1); + all_test ("-122.105313489953435", "-122.10531348995343", -1); + all_test ("-12529067051281794", "-1252906705128179", -1); + all_test ("-0.0000064280", "-0.000006428", 0); + all_test ("728173692003587479", "72817369200358747", 1); + all_test ("0.00000000005148126849474197", "0.0000000000514812684947419", 1); + all_test ("155032124343881936061774467.7", "71403.71", 1); + all_test ("5336736899935835.270053", "5336736899935835.27005", 1); + all_test ("174556.818526489", "174556.81852648", 1); + all_test ("-0.00000000529718819", "-0.0000000052971881", -1); + all_test ("39710699.39476764508186780", "39710699.3947676450818678", 0); + all_test ("-504505.226304998729", "-504505.22630499872", -1); + all_test ("121.845727307", "121.84572730", 1); + all_test ("-0.0000000000014085632", "-0.000000000001408563", -1); + all_test ("-53304292.806841332223", "-53304292.80684133222", -1); + all_test ("0.00000000000000000029", "0.0000000000000000002", 1); + all_test ("0.000000000000162235692", "0.00000000000016223569", 1); + all_test ("1124.8204793587524", "1124.820479358752", 1); + all_test ("1676932756858", "167693275685", 1); + all_test ("-138785033434702745562559175", "-13878503343470274556255917", -1); + all_test ("-26787241126112270.786851", "-26787241126112270.78685", -1); + all_test ("3.01", "3.0", 1); + all_test ("0.00000000000000165985383", "0.0000000000000016598538", 1); + all_test ("0.000000002121", "0.00000000212", 1); + all_test ("100065.900759", "100065.90075", 1); + all_test ("3.0786", "3.078", 1); + all_test ("1829645.4450108032076981336", "1829645.445010803207698133", 1); + all_test ("-31.80223", "-31.8022", -1); + all_test ("530006.60", "530006.6", 0); + all_test ("0.001298918", "0.00129891", 1); + all_test ("0.36635660", "0.3663566", 0); + all_test ("77511746654159493674.79419", "77511746654159493674.7941", 1); + all_test ("339255.7", "-1473225.1695489201158451", 1); + all_test ("1.11", "1.1", 1); + all_test ("-0.000000000025234359435300648563442278", "-0.00000000002523435943530064856344227", -1); + all_test ("-527785722956482.1568788276023", "-527785722956482.156878827602", -1); + all_test ("15.829063161229710883887068159", "15.82906316122971088388706815", 1); + all_test ("0", "9.020934402455", -1); + all_test ("5.50898793", "5.5089879", 1); + all_test ("176437906524318811079.64601", "176437906524318811079.6460", 1); + all_test ("-397.5475158726300", "-397.547515872630", 0); + all_test ("-0.00000000001556055515635481323709942", "-0.0000000000155605551563548132370994", -1); + all_test ("22.4958236487616739001889", "22.495823648761673900188", 1); + all_test ("225949901218559.6254904852", "225949901218559.625490485", 1); + all_test ("34352062918", "3435206291", 1); + all_test ("0.00000000000127995729371224", "0.0000000000012799572937122", 1); + all_test ("-18289597669354.148272509794", "-18289597669354.14827250979", -1); + all_test ("62072.9263", "62072.926", 1); + all_test ("-0.00000000038775267220204260640135935", "-0.0000000003877526722020426064013593", -1); + all_test ("15", "49854", -1); + all_test ("-622727179956664623.584677020", "-622727179956664623.58467702", 0); + all_test ("124612619885534601636883847056", "12461261988553460163688384705", 1); + all_test ("-44704302", "-4470430", -1); + all_test ("-0.0000000000007320382329813686", "-0.000000000000732038232981368", -1); + all_test ("57035102.20300582807941489", "57035102.2030058280794148", 1); + all_test ("-0.00000000001794738068861544419872319", "-0.0000000000179473806886154441987231", -1); + all_test ("-1.2228", "-1.222", -1); + all_test ("43666858484365456517278", "4366685848436545651727", 1); + all_test ("-0.0000000000314085", "-0.000000000031408", -1); + all_test ("0", "0.00000000000063486", -1); + all_test ("63.6991829", "63.699182", 1); + all_test ("-0.0000000000199308483511083746", "-0.000000000019930848351108374", -1); + all_test ("3.1", "-3709905843220.155177257", 1); + all_test ("-39631940063", "-3963194006", -1); + all_test ("7073142.8", "3", 1); + all_test ("-1999449463", "-199944946", -1); + all_test ("290002.761327072634018931", "290002.76132707263401893", 1); + all_test ("12860083520871521.6822227", "12860083520871521.682222", 1); + all_test ("183820.026930161", "183820.02693016", 1); + all_test ("0.000000781790", "0.00000078179", 0); + all_test ("1.446", "1.44", 1); + all_test ("0.0000008551572300216445253650", "0.000000855157230021644525365", 0); + all_test ("0.4780426111531057579684661647", "0.478042611153105757968466164", 1); + all_test ("-1711959015605354291", "-171195901560535429", -1); + all_test ("863248002669318.08600609171", "863248002669318.0860060917", 1); + all_test ("-1028946422414.8414841087619794", "-1028946422414.841484108761979", -1); + all_test ("0.0000000000000000000419470", "0.000000000000000000041947", 0); + all_test ("-2914967412378208104.4188038431", "-2914967412378208104.418803843", -1); + all_test ("-0.002008", "-0.00200", -1); + all_test ("-0.00000000000002626730784814031567584", "-0.0000000000000262673078481403156758", -1); + all_test ("-19391200616386965", "-1939120061638696", -1); + all_test ("15805.555288168078384", "15805.55528816807838", 1); + all_test ("0.000000000000000065791655", "0.00000000000000006579165", 1); + all_test ("-0.00000000000028926319996", "-0.0000000000002892631999", -1); + all_test ("-10555951879654.4116", "-10555951879654.411", -1); + all_test ("77254637873210650.73", "77254637873210650.7", 1); + all_test ("1154.7950888803119206706", "1154.795088880311920670", 1); + all_test ("-0.00000002121424546283688", "-0.0000000212142454628368", -1); + all_test ("-6884545854992086.64462961512340", "-6884545854992086.6446296151234", 0); + all_test ("-0.0000002787346373194072109221861494", "-0.000000278734637319407210922186149", -1); + all_test ("1589425692.0903352784430490711", "1589425692.090335278443049071", 1); + all_test ("-0.000000069284383167241482592797", "-0.00000006928438316724148259279", -1); + all_test ("-1297741", "-129774", -1); + all_test ("-82630489346849562513.319012060", "-82630489346849562513.31901206", 0); + all_test ("-2788.926", "-2788.92", -1); + all_test ("0", "-4383482151.279035955215656", 1); + all_test ("20802679.3368961001940047753", "20802679.336896100194004775", 1); + all_test ("88377599.6874", "88377599.687", 1); + all_test ("-15439.11", "-15439.1", -1); + all_test ("644", "64", 1); + all_test ("289240770089054460230094", "28924077008905446023009", 1); + all_test ("2374.044", "2374.04", 1); + all_test ("206285132736.429455540", "206285132736.42945554", 0); + all_test ("-2.655584158995322", "-2.65558415899532", -1); + all_test ("6.66", "6.6", 1); + all_test ("-0.00147702317521839535481784", "-0.0014770231752183953548178", -1); + all_test ("0.00025983386631037", "0.0002598338663103", 1); + all_test ("125878687977.170727149556144", "125878687977.17072714955614", 1); + all_test ("0.00000000014242990543328642932285580466", "0.0000000001424299054332864293228558046", 1); + all_test ("531497192.9", "-2.8789608913347", 1); + all_test ("128572050211770604885888", "12857205021177060488588", 1); + all_test ("0.00000000000049823251747441545405900232", "0.0000000000004982325174744154540590023", 1); + all_test ("-3554", "-355", -1); + all_test ("0", "-131462.704889581898753", 1); + all_test ("-110360.109", "-110360.10", -1); + all_test ("46243539.17811357252990972", "46243539.1781135725299097", 1); + all_test ("-394476311386474662807.561867", "-394476311386474662807.56186", -1); + all_test ("52032.8849384149084108910", "52032.884938414908410891", 0); + all_test ("-3670157142977774795911.8817", "-3670157142977774795911.881", -1); + all_test ("-1268380.68072308126212968448547", "-1268380.6807230812621296844854", -1); + all_test ("-143400922253476294484942", "-14340092225347629448494", -1); + all_test ("1.4797498644139485849619679", "1.479749864413948584961967", 1); + all_test ("3220359.45542896240415069", "3220359.4554289624041506", 1); + all_test ("-34.67710018368", "-34.6771001836", -1); + all_test ("18.565971", "18.56597", 1); + all_test ("-0.0000000107587", "-0.000000010758", -1); + all_test ("-16558604266", "-1655860426", -1); + all_test ("6289.6556", "6289.655", 1); + all_test ("1061140593553797", "106114059355379", 1); + all_test ("-6946576.61799943", "-6946576.6179994", -1); + all_test ("-3549420020.8", "-0.000000000197268526037141123595658758051", -1); + all_test ("-0.00000000000000045", "-0.0000000000000004", -1); + all_test ("3.95", "3.9", 1); + all_test ("0.00000000017950293191", "0.0000000001795029319", 1); + all_test ("-0.0000000000000002653486566279708933590491", "-0.000000000000000265348656627970893359049", -1); + all_test ("5834654233963853186742787.19252", "5834654233963853186742787.1925", 1); + all_test ("0.00000000000000146193758453924734921291", "0.0000000000000014619375845392473492129", 1); + all_test ("21.2", "-5466882.34678998616", 1); + all_test ("-226.313", "-226.31", -1); + all_test ("-0.00060919", "-0.0006091", -1); + all_test ("2862921800133731.00223602", "2862921800133731.0022360", 1); + all_test ("0.000001450407700996599075301", "0.00000145040770099659907530", 1); + all_test ("272534713642655203877194515", "27253471364265520387719451", 1); + all_test ("400533357.2054", "400533357.205", 1); + all_test ("-52301.7548455317094", "-52301.754845531709", -1); + all_test ("-60434", "-6043", -1); + all_test ("-4713231.0582649012375636764", "-4713231.058264901237563676", -1); + all_test ("442933.48162982928258413695403", "442933.4816298292825841369540", 1); + all_test ("-143913.618851426974774247273449", "-143913.61885142697477424727344", -1); + all_test ("257.994941295", "257.99494129", 1); + all_test ("-567639505016552", "-56763950501655", -1); + all_test ("0.000000107", "0.00000010", 1); + all_test ("-70142602142.0685215078078", "-70142602142.068521507807", -1); + all_test ("9937222087105.4475", "9937222087105.447", 1); + all_test ("-502191309583350641", "-50219130958335064", -1); + all_test ("30437.61407", "30437.6140", 1); + all_test ("-104085888962140304973.61065995", "-104085888962140304973.6106599", -1); + all_test ("74681549.65066", "74681549.6506", 1); + all_test ("0", "34.0", -1); + all_test ("1283299494621733760436152524.7", "191981915098.416203175", 1); + all_test ("-2079057190454275.24388611959130", "-2079057190454275.2438861195913", 0); + all_test ("-71969837200476.48650", "-71969837200476.4865", 0); + all_test ("-130332745336076.430672680", "-130332745336076.43067268", 0); + all_test ("-262322534.7873", "-262322534.787", -1); + all_test ("-4622120040.36051", "-4622120040.3605", -1); + all_test ("393.81", "393.8", 1); + all_test ("-8778932.1977656", "-8778932.197765", -1); + all_test ("-0.000000004319221300856935220146173063", "-0.00000000431922130085693522014617306", -1); + all_test ("1.3", "-2901258187734.962", 1); + all_test ("-16.56973", "-16.5697", -1); + all_test ("-30104811614630.4940925402114444", "-30104811614630.494092540211444", -1); + all_test ("-0.238917470430091754", "-0.23891747043009175", -1); + all_test ("40.82242337", "40.8224233", 1); + all_test ("-30694613567562.20297241", "-30694613567562.2029724", -1); + all_test ("-0.000000001679207115467275", "-0.00000000167920711546727", -1); + all_test ("-1", "10591891.719", -1); + all_test ("1.85299397", "1.8529939", 1); + all_test ("3.1", "-0.0000000010927840471796860", 1); + all_test ("-0.5778526120297929752108974", "-0.577852612029792975210897", -1); + all_test ("-0.00000002031283434", "-0.0000000203128343", -1); + all_test ("-1609260013071237241578458.130", "-1609260013071237241578458.13", 0); + all_test ("142924542265794697.6840281240", "142924542265794697.684028124", 0); + all_test ("445463969.1", "-0.0000000000003547121196389709462", 1); + all_test ("0.0000000000000000000126560009292128566", "0.000000000000000000012656000929212856", 1); + all_test ("41537.281211574", "41537.28121157", 1); + all_test ("0.000008600441757756", "0.00000860044175775", 1); + all_test ("-4.0918630496265", "-4.091863049626", -1); + all_test ("515782766783.866833275741", "515782766783.86683327574", 1); + all_test ("0.00000392", "0.0000039", 1); + all_test ("7482300.41", "7482300.4", 1); + all_test ("70457460459564179796739", "7045746045956417979673", 1); + all_test ("-13615229017824905947.22", "-13615229017824905947.2", -1); + all_test ("8459428653.6932870235609249397", "8459428653.693287023560924939", 1); + all_test ("-27.974019", "-27.97401", -1); + all_test ("10877384546812", "1087738454681", 1); + all_test ("17.146861043222", "17.14686104322", 1); + all_test ("-0.0000000000012741539", "-0.000000000001274153", -1); + all_test ("-18976303359654085296749.6386", "-18976303359654085296749.638", -1); + all_test ("-14105745484762.813773506", "-14105745484762.81377350", -1); + all_test ("-1674391.840", "-1674391.84", 0); + all_test ("-84922688.1007771598494556708", "-84922688.100777159849455670", -1); + all_test ("-12.57", "-12.5", -1); + all_test ("-0.00000000048", "-0.0000000004", -1); + all_test ("-0.00000032914110816", "-0.0000003291411081", -1); + all_test ("0.000000000027615548", "0.00000000002761554", 1); + all_test ("0.000000000460044976036", "0.00000000046004497603", 1); + all_test ("0.000000000000000469322464666856288338391046819", "0.00000000000000046932246466685628833839104681", 1); + all_test ("112.86854732363", "112.8685473236", 1); + all_test ("118566.37", "118566.3", 1); + all_test ("5014945347.21114863", "5014945347.2111486", 1); + all_test ("655824.126216661", "655824.12621666", 1); + all_test ("-53.0", "-2828707252974182.26", 1); + all_test ("-107852322318138.23", "-107852322318138.2", -1); + all_test ("817.381", "817.38", 1); + all_test ("-8.10721735", "-8.1072173", -1); + all_test ("2", "109155.92", -1); + all_test ("-0.09059", "-0.0905", -1); + all_test ("0.000000038", "0.00000003", 1); + all_test ("135803.4375", "135803.437", 1); + all_test ("-0.104981688246294", "-0.10498168824629", -1); + all_test ("-319117053919238717943917700", "-31911705391923871794391770", -1); + all_test ("-0.00000004966732670", "-0.0000000496673267", 0); + all_test ("0.00000000000000017556177582070698", "0.0000000000000001755617758207069", 1); + all_test ("-6039943363.364348624747813", "-6039943363.36434862474781", -1); + all_test ("-0.0768825", "-0.076882", -1); + all_test ("-0.00000157341483784912166430698733808", "-0.0000015734148378491216643069873380", -1); + all_test ("-588017", "-58801", -1); + all_test ("-2129041.040892", "-2129041.04089", -1); + all_test ("-4859858157015921288139272.0", "-281.9", -1); + all_test ("0.000000000000028619814741904", "0.00000000000002861981474190", 1); + all_test ("398.5406", "398.540", 1); + all_test ("-117104803640", "-11710480364", -1); + all_test ("-78601667654180532972556760.3008", "-78601667654180532972556760.300", -1); + all_test ("2228270436870143.19", "2228270436870143.1", 1); + all_test ("-161233", "-16123", -1); + all_test ("136330282209580168399263.62462", "136330282209580168399263.6246", 1); + all_test ("-86.44928389", "-86.4492838", -1); + all_test ("338.24", "338.2", 1); + all_test ("-14549618702.664447503248196729", "-14549618702.66444750324819672", -1); + all_test ("-30.6085886720119612", "-30.608588672011961", -1); + all_test ("-1990373027501001721683307.30225", "-1990373027501001721683307.3022", -1); + all_test ("1876002848.466", "1876002848.46", 1); + all_test ("-810.41963070149375272", "-810.4196307014937527", -1); + all_test ("2414021.80458", "2414021.8045", 1); + all_test ("-1.3248", "-1.324", -1); + all_test ("0.00000000000000000003281908871647629993048189", "0.0000000000000000000328190887164762999304818", 1); + all_test ("8190932122089709410211260.1941", "8190932122089709410211260.194", 1); + all_test ("18558359008664.901", "18558359008664.90", 1); + all_test ("-1.836260852084759052811977", "-1.83626085208475905281197", -1); + all_test ("52848.0661641241616642195", "52848.066164124161664219", 1); + all_test ("1.795", "1.79", 1); + all_test ("3563.84130546918276031", "3563.8413054691827603", 1); + all_test ("33450019.5", "2459854832688517296246058802", -1); + all_test ("5536285180182881.87923167404513", "5536285180182881.8792316740451", 1); + all_test ("0", "0.000000000000000043296465733471525299", -1); + all_test ("70086.68252172", "70086.6825217", 1); + all_test ("292760.4240", "292760.424", 0); + all_test ("2028140262335.9131026003356", "2028140262335.913102600335", 1); + all_test ("0.0000000000087", "0.000000000008", 1); + all_test ("4", "-3470098.6074792982", 1); + all_test ("13358558600177683796925578", "1335855860017768379692557", 1); + all_test ("-83.8", "21363730.46561184451", -1); + all_test ("365324.84504266484131556038", "365324.8450426648413155603", 1); + all_test ("-3185507140.95393405534321", "-3185507140.9539340553432", -1); + all_test ("-0.0000000000000065472358345", "-0.000000000000006547235834", -1); + all_test ("-1.1306", "-1.130", -1); + all_test ("0.0000000000000000012657157731644007947139831", "0.000000000000000001265715773164400794713983", 1); + all_test ("-4595761438.2546337711", "-4595761438.254633771", -1); + all_test ("8.102560", "8.10256", 0); + all_test ("-4732877234851.04517", "-4732877234851.0451", -1); + all_test ("22849746934084811", "2284974693408481", 1); + all_test ("-21570598205187056339788.8827687", "-21570598205187056339788.882768", -1); + all_test ("-0.00411486610", "-0.0041148661", 0); + all_test ("0.0000000017473355067071", "0.000000001747335506707", 1); + all_test ("1672207932406612", "167220793240661", 1); + all_test ("-2170952508398772659.3116947863", "-2170952508398772659.311694786", -1); + all_test ("104296691.3651", "104296691.365", 1); + all_test ("6413348457044198.6357", "6413348457044198.635", 1); + all_test ("867588124512790019695847208.17", "867588124512790019695847208.1", 1); + all_test ("0.000000000000000006377653", "0.00000000000000000637765", 1); + all_test ("0.0000000000000005421562844800408", "0.000000000000000542156284480040", 1); + all_test ("0.0000000000001734898208084", "0.000000000000173489820808", 1); + all_test ("719191761181325213", "71919176118132521", 1); + all_test ("0.02250426125915164019127", "0.0225042612591516401912", 1); + all_test ("0.000000000000015950471472766126156", "0.00000000000001595047147276612615", 1); + all_test ("-8.165141564", "-8.16514156", -1); + all_test ("0.000016048771130", "0.00001604877113", 0); + all_test ("-2", "-88807525195548174559556063", 1); + all_test ("58675.118464", "58675.11846", 1); + all_test ("0.000000627412133283", "0.00000062741213328", 1); + all_test ("-1292498491535.25344", "-1292498491535.2534", -1); + all_test ("-820304961.0323010898698", "-820304961.032301089869", -1); + all_test ("-0.000611", "-0.00061", -1); + all_test ("-11144524535537715", "-1114452453553771", -1); + all_test ("-55716774643252100979.5446623", "-55716774643252100979.544662", -1); + all_test ("-0.000044176893810056", "-0.00004417689381005", -1); + all_test ("292752046.323027", "292752046.32302", 1); + all_test ("7380730", "738073", 1); + all_test ("86355898012532849.7700967309940", "86355898012532849.770096730994", 0); + all_test ("0.00000004315310515126045613636", "0.0000000431531051512604561363", 1); + all_test ("0.00000000000000000001737", "0.0000000000000000000173", 1); + all_test ("813314317.05965", "813314317.0596", 1); + all_test ("0.0000000000288347370619778500827429666573", "0.000000000028834737061977850082742966657", 1); + all_test ("1.227", "1.22", 1); + all_test ("-1.2630735", "-1.263073", -1); + all_test ("91944402440.06945779449085371", "91944402440.0694577944908537", 1); + all_test ("-4449792517039894", "-444979251703989", -1); + all_test ("9", "-2448498702.514138316389405792", 1); + all_test ("15", "-230.83", 1); + all_test ("31.144613239645410083514841201", "31.14461323964541008351484120", 1); + all_test ("-19284", "-1928", -1); + all_test ("0", "5426339861896942660314675307", -1); + all_test ("1129076194", "112907619", 1); + all_test ("1044840688537574338326", "104484068853757433832", 1); + all_test ("0.00000000000000043539078118147011", "0.0000000000000004353907811814701", 1); + all_test ("-5", "4", -1); + all_test ("-1377061.5292411334", "-1377061.529241133", -1); + all_test ("-4.0", "332202357", -1); + all_test ("-0.00000000000000000227", "-0.0000000000000000022", -1); + all_test ("1826995888603.5824430107", "1826995888603.582443010", 1); + all_test ("10390673669.135717884263351", "10390673669.13571788426335", 1); + all_test ("-715072321926440135536.7648", "-715072321926440135536.764", -1); + all_test ("103992420.52458", "103992420.5245", 1); + all_test ("0.000000991070083580408202601308047", "0.00000099107008358040820260130804", 1); + all_test ("1.86853500870534570128", "1.8685350087053457012", 1); + all_test ("58616551.73241771152", "58616551.7324177115", 1); + all_test ("-1.6", "18525081582051265136724.3660", -1); + all_test ("1993238064975", "199323806497", 1); + all_test ("-1784581450011.6549586151626", "-1784581450011.654958615162", -1); + all_test ("-4555209568014421116848941.3959", "-4555209568014421116848941.395", -1); + all_test ("-7048913007.5566", "-7048913007.556", -1); + all_test ("-0.000000000871843054424826674157106", "-0.00000000087184305442482667415710", -1); + all_test ("-14840053.072", "-14840053.07", -1); + all_test ("-501405456751853073076", "-50140545675185307307", -1); + all_test ("-199545.60412498", "-199545.6041249", -1); + all_test ("0.00000009216303215937061205", "0.0000000921630321593706120", 1); + all_test ("4.71041834808516", "4.7104183480851", 1); + all_test ("361.419249298421346667", "361.41924929842134666", 1); + all_test ("409136581.554547189131", "409136581.55454718913", 1); + all_test ("55122849429299788341942", "5512284942929978834194", 1); + all_test ("13003440939757220210.6", "-131681614", 1); + all_test ("-1609638422403038.78", "-1609638422403038.7", -1); + all_test ("28363.187944820474154448061814", "-28363.187944820474154448061814", 1); + all_test ("-2916651.5496", "311663.7", -1); + all_test ("-0.000000000000028", "-1.0051639273", 1); + all_test ("-15087.357", "-1.94820806", -1); + all_test ("-0.00000000000000003599985370238339034191676", "175367726221406968.13920", -1); + all_test ("313569.577740085324", "-313569.577740085324", 1); + all_test ("4.14321707846", "-4.14321707846", 1); + all_test ("2.025069", "-2.025069", 1); + all_test ("-204173696764981798", "-348359047110101", -1); + all_test ("-12752947190480205615461", "15.198090402942077", -1); + all_test ("-74.2", "4628073528657420.923843246681", -1); + all_test ("719.1719040512", "-719.1719040512", 1); + all_test ("393.313192", "-393.313192", 1); + all_test ("-494455879492.541426667665550", "-13002235405592907201044204", 1); + all_test ("0", "0", 0); + all_test ("-233021.97", "-7.4", -1); + all_test ("-240459748", "0.000000006517712156", -1); + all_test ("81179.0", "-81179.0", 1); + all_test ("-0.0000192016725715", "-1.21890405451046803716074614", 1); + all_test ("-178252184222.7107", "-35038911.288687", -1); + all_test ("36405716.36527673752", "-36405716.36527673752", 1); + all_test ("-8.776", "7.7701605830015406834539038", -1); + all_test ("6.1", "-6.1", 1); + all_test ("4820089993.340", "-4820089993.340", 1); + all_test ("-131045153934", "-141414703667118909", 1); + all_test ("-0.000000000000001331938110449733777894", "-308053367.910427914340992681501", 1); + all_test ("-0.004193089770215420540599206921", "-30.0", 1); + all_test ("1694294619094634.85763668135", "-1694294619094634.85763668135", 1); + all_test ("40.541819234520934594813", "-40.541819234520934594813", 1); + all_test ("-0.10021507", "-2049541544645617700923988306", 1); + all_test ("6609143733354158875894", "-6609143733354158875894", 1); + ) diff --git a/drafts/bs-big/__tests__/div_test.ml b/drafts/bs-big/__tests__/div_test.ml new file mode 100644 index 0000000..e416e3b --- /dev/null +++ b/drafts/bs-big/__tests__/div_test.ml @@ -0,0 +1,721 @@ +open Jest + +let () = + describe "div_tests" (fun () -> + let open Expect in + + let div_test = + let count = ref 0 in + fun (a, b, exp) -> + count := !count + 1; + let v = Big.div (Big.fromString a) (Big.fromString b) |. Big.toString in + test ("div_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("div_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + Big.setDP 40; + Big.setRM 1; + + bool_test false (Big.fromInt 0 |. Big.div (Big.fromInt 1) |> is_minus_zero); + bool_test true (Big.fromInt 0 |. Big.div (Big.fromInt (-1)) |> is_minus_zero); + bool_test true (Big.fromString ("-0") |. Big.div (Big.fromInt 1) |> is_minus_zero); + bool_test false (Big.fromString ("-0") |. Big.div (Big.fromInt (-1)) |> is_minus_zero); + + div_test ("1", "1", "1"); + div_test ("-1", "1", "-1"); + div_test ("1", "-1", "-1"); + div_test ("-1", "-1", "1"); + div_test ("0.00000", "1.000000", "0"); + div_test ("1", "1", "1"); + div_test ("1", "-45", "-0.0222222222222222222222222222222222222222"); + div_test ("1", "22", "0.0454545454545454545454545454545454545455"); + div_test ("1", "0144", "0.0069444444444444444444444444444444444444"); + div_test ("1", "6.1915", "0.1615117499798110312525236210934345473633"); + div_test ("1", "-1.02", "-0.9803921568627450980392156862745098039216"); + div_test ("1", "0.09", "11.1111111111111111111111111111111111111111"); + div_test ("1", "-0.0001", "-10000"); + div_test ("1", "8e5", "0.00000125"); + div_test ("1", "9E12", "1.111111111111111111111111111e-13"); + div_test ("1", "1e-14", "100000000000000"); + div_test ("1", "3.345E-9", "298953662.1823617339312406576980568011958146487294"); + div_test ("1", "-345.43e+4", "-2.894942535390672495150971253220624e-7"); + div_test ("1", "-94.12E+0", "-0.0106247343816404589885252868678283042924"); + div_test ("0", "0.001", "0"); + div_test ("0", "111.1111111110000", "0"); + div_test ("-1", "1", "-1"); + div_test ("-0.01", "0.01", "-1"); + div_test ("54", "-54", "-1"); + div_test ("9.99", "-9.99", "-1"); + div_test ("0.00023432495704937", "-0.00023432495704937", "-1"); + div_test ("100", "100", "1"); + div_test ("-999.99", "0.01", "-99999"); + div_test ("03.333", "-4", "-0.83325"); + div_test ("-1", "-0.1", "10"); + div_test ("43534.5435", "0.054645", "796679.3576722481471314850398023606917375789185"); + div_test ("99999", "1", "99999"); + + Big.setDP 0; + Big.setRM 0; + div_test ("999.5", "1", "999"); + div_test ("-999.5", "1", "-999"); + div_test ("998.5", "1", "998"); + div_test ("-998.5", "1", "-998"); + + Big.setRM 1; + div_test ("999.5", "1", "1000"); + div_test ("-999.5", "1", "-1000"); + div_test ("998.5", "1", "999"); + div_test ("-998.5", "1", "-999"); + + Big.setRM 2; + div_test ("999.5", "1", "1000"); + div_test ("-999.5", "1", "-1000"); + div_test ("999.4", "1", "999"); + div_test ("-999.4", "1", "-999"); + div_test ("999.500001", "1", "1000"); + div_test ("-999.500001", "1", "-1000"); + div_test ("998.5", "1", "998"); + div_test ("-998.5", "1", "-998"); + div_test ("998.6", "1", "999"); + div_test ("-998.6", "1", "-999"); + div_test ("998.500001", "1", "999"); + div_test ("-998.500001", "1", "-999"); + + Big.setRM 0; + Big.setDP 2; + div_test ("0", "-19", "0"); + Big.setDP 2; + div_test ("-0.000000000000004556", "-2021.9", "0"); + Big.setDP 5; + div_test ("2", "8639.4", "0.00023"); + Big.setDP 7; + div_test ("-2949.53", "48.6", "-60.6899176"); + Big.setDP 8; + div_test ("1.80", "-214368", "-0.00000839"); + Big.setDP 0; + div_test ("-8", "0.00000000000190", "-4210526315789"); + Big.setDP 4; + div_test ("1.7135", "336.0", "0.005"); + Big.setDP 5; + div_test ("-0.0000000000000013895", "1.000", "0"); + Big.setDP 6; + div_test ("-1.08916", "-8.3", "0.131224"); + Big.setDP 5; + div_test ("8.80", "-14.1", "-0.62411"); + Big.setDP 6; + div_test ("84.6", "2.2", "38.454545"); + Big.setDP 0; + div_test ("0.0000395", "-2.03", "0"); + Big.setDP 8; + div_test ("-3", "8", "-0.375"); + Big.setDP 11; + div_test ("0.000000000000512", "-0.3546", "0"); + Big.setDP 9; + div_test ("0", "26.569", "0"); + Big.setDP 11; + div_test ("-0.0000000000000000001865", "24.4", "0"); + Big.setDP 0; + div_test ("274900", "-1612", "-170"); + Big.setDP 10; + div_test ("-0.000073", "1.9", "-0.000038421"); + Big.setDP 3; + div_test ("0", "3", "0"); + Big.setDP 6; + div_test ("0", "2.0", "0"); + Big.setDP 3; + div_test ("-36.54", "-2.1", "17.4"); + Big.setDP 10; + div_test ("-5.9", "-1.48", "3.9864864864"); + Big.setDP 4; + div_test ("2", "1.06", "1.8867"); + Big.setDP 9; + div_test ("6.4926", "-2.03223", "-3.194815547"); + Big.setDP 3; + div_test ("7", "0.0000006929", "10102467.888"); + Big.setDP 7; + div_test ("0", "-61.6", "0"); + Big.setDP 1; + div_test ("30.72", "-6664", "0"); + Big.setDP 1; + div_test ("374.7", "9784.7", "0"); + Big.setDP 7; + div_test ("0.012783", "-4.2172", "-0.0030311"); + Big.setDP 2; + div_test ("-5", "-0.27", "18.51"); + Big.setDP 1; + div_test ("-42.5", "-0.0000000000000000085", "5000000000000000000"); + Big.setDP 1; + div_test ("0", "3.537", "0"); + Big.setDP 1; + div_test ("-1", "-183", "0"); + Big.setDP 3; + div_test ("-194.9", "0.00000000000000030", "-649666666666666666.666"); + Big.setDP 4; + div_test ("-15198", "-255.98", "59.3718"); + Big.setDP 6; + div_test ("0.000000000000000133668", "2", "0"); + Big.setDP 2; + div_test ("-2259.2", "-0.00000000010", "22592000000000"); + Big.setDP 4; + div_test ("6.1", "-0.0000042954", "-1420123.8534"); + Big.setDP 7; + div_test ("-3306", "-3", "1102"); + Big.setDP 8; + div_test ("-6", "82", "-0.07317073"); + Big.setDP 2; + div_test ("0", "-2", "0"); + Big.setDP 2; + div_test ("2.6", "64.9", "0.04"); + Big.setDP 7; + div_test ("-24562.0", "0.00000001652", "-1486803874092.0096852"); + Big.setDP 11; + div_test ("-1", "1.2", "-0.83333333333"); + Big.setDP 1; + div_test ("-5.3", "0.00000000007373", "-71883900718.8"); + Big.setDP 6; + div_test ("-0.00000022686", "-3.5902", "0"); + Big.setDP 4; + div_test ("-0.0000000000010995", "-2029.4", "0"); + Big.setDP 8; + div_test ("-199.16", "54.80", "-3.63430656"); + Big.setDP 1; + div_test ("-14.0", "0.0000035634", "-3928832"); + Big.setDP 1; + div_test ("-7", "3481", "0"); + Big.setDP 0; + div_test ("1", "-8266", "0"); + Big.setDP 7; + div_test ("2482", "-0.0006766", "-3668341.7085427"); + Big.setDP 3; + div_test ("-1.2", "-40", "0.03"); + Big.setDP 10; + div_test ("-13.7", "-1", "13.7"); + Big.setDP 7; + div_test ("1.8", "-1", "-1.8"); + Big.setDP 8; + div_test ("66.626", "-3327", "-0.02002584"); + Big.setDP 6; + div_test ("-33.74", "3", "-11.246666"); + Big.setDP 2; + div_test ("0", "2.5", "0"); + Big.setDP 5; + div_test ("2061.8", "2", "1030.9"); + Big.setDP 4; + div_test ("-4.604", "5", "-0.9208"); + Big.setDP 1; + div_test ("2", "35.88", "0"); + Big.setDP 8; + div_test ("-0.0000000546", "-80.0", "0"); + Big.setDP 7; + div_test ("-9", "369.0", "-0.0243902"); + Big.setDP 11; + div_test ("-32", "-9.773", "3.27432722807"); + Big.setDP 7; + div_test ("0.00000000005460", "14.49", "0"); + Big.setDP 5; + div_test ("-0.0000000672", "-0.00000000015861", "423.68072"); + Big.setDP 5; + div_test ("-16069.0", "-702.5", "22.87402"); + Big.setDP 2; + div_test ("0", "0.01938", "0"); + Big.setDP 0; + div_test ("1", "18", "0"); + Big.setDP 0; + div_test ("13.9", "250.571", "0"); + Big.setDP 5; + div_test ("0", "-1.2", "0"); + Big.setDP 5; + div_test ("1.2837", "187", "0.00686"); + Big.setDP 0; + div_test ("-31874", "-105.084", "303"); + Big.setDP 8; + div_test ("-592.15", "0.059380", "-9972.21286628"); + Big.setDP 5; + div_test ("1.534", "74.40", "0.02061"); + Big.setDP 6; + div_test ("-4", "-1.2", "3.333333"); + Big.setDP 4; + div_test ("154642", "2.28275", "67743.7301"); + Big.setDP 5; + div_test ("-0.00000000000000158719", "3.014", "0"); + Big.setDP 11; + div_test ("-446149", "608.6", "-733.07426881367"); + Big.setDP 1; + div_test ("0", "-11.8954", "0"); + Big.setDP 2; + div_test ("0.0014970", "3", "0"); + Big.setDP 9; + div_test ("2250.56", "0.0000000001102", "20422504537205.081669691"); + Big.setDP 0; + div_test ("-3.86", "-5", "0"); + Big.setDP 8; + div_test ("-4", "20707", "-0.00019317"); + Big.setDP 9; + div_test ("-0.0000000000054397", "0.0000000000045", "-1.208822222"); + Big.setDP 3; + div_test ("-1", "-483542", "0"); + Big.setDP 8; + div_test ("-2377.90", "0.00007863", "-30241638.05163423"); + Big.setDP 6; + div_test ("0.000000000000000000027346", "1", "0"); + Big.setDP 11; + div_test ("-28", "-2", "14"); + Big.setDP 0; + div_test ("-1.0", "-0.034", "29"); + Big.setDP 4; + div_test ("-7894.7", "581.33", "-13.5804"); + Big.setDP 6; + div_test ("2", "-778", "-0.00257"); + Big.setDP 2; + div_test ("11", "1.3", "8.46"); + Big.setDP 10; + div_test ("0", "-5", "0"); + Big.setDP 9; + div_test ("0", "-1", "0"); + Big.setDP 9; + div_test ("-0.00000000000000000051935", "-7", "0"); + Big.setDP 9; + div_test ("5", "1.5", "3.333333333"); + Big.setDP 0; + div_test ("6.80", "-193488", "0"); + Big.setDP 0; + div_test ("-9.6050", "-21.5", "0"); + Big.setDP 4; + div_test ("-0.000000000322", "-0.00000000000000000371", "86792452.8301"); + Big.setDP 10; + div_test ("3", "3", "1"); + Big.setDP 2; + div_test ("1.3", "-61.56", "-0.02"); + Big.setDP 4; + div_test ("-849", "-3.102", "273.6943"); + Big.setDP 3; + div_test ("0.0000000029", "-27.6", "0"); + Big.setDP 5; + div_test ("-2.6", "2.4", "-1.08333"); + Big.setDP 2; + div_test ("1.28086", "2.4160", "0.53"); + Big.setDP 4; + div_test ("1083.9", "-3.635", "-298.1843"); + Big.setDP 9; + div_test ("-5", "4.47", "-1.118568232"); + Big.setDP 2; + div_test ("-0.00000000000000000010", "19.216", "0"); + Big.setDP 8; + div_test ("2.72", "0.019588", "138.86052685"); + Big.setDP 11; + div_test ("3.689", "0.0000000000000000086", "428953488372093023.25581395348"); + Big.setDP 7; + div_test ("3179", "-2343.55", "-1.356489"); + Big.setDP 2; + div_test ("-71.0", "-84", "0.84"); + Big.setDP 8; + div_test ("3.7360", "0.00007358", "50774.66702908"); + Big.setDP 11; + div_test ("-45", "-4775.2", "0.00942368906"); + Big.setDP 4; + div_test ("0.0000000000220819", "-16.3820", "0"); + Big.setDP 4; + div_test ("20.51", "1", "20.51"); + Big.setDP 7; + div_test ("-136.7", "-2", "68.35"); + Big.setDP 5; + div_test ("3.36", "-23", "-0.14608"); + Big.setDP 8; + div_test ("9.92", "-2.039", "-4.86512996"); + Big.setDP 11; + div_test ("-303052", "25.5", "-11884.39215686274"); + Big.setDP 6; + div_test ("298.7", "-1", "-298.7"); + Big.setDP 3; + div_test ("0", "-5", "0"); + Big.setDP 8; + div_test ("7.2583", "-2", "-3.62915"); + Big.setDP 10; + div_test ("0.014973", "1.4", "0.010695"); + Big.setDP 7; + div_test ("-0.0001731", "-12.94", "0.0000133"); + Big.setDP 4; + div_test ("86738", "43.0", "2017.1627"); + Big.setDP 10; + div_test ("-7", "3", "-2.3333333333"); + Big.setDP 11; + div_test ("0.00000000000000000002070", "502.66", "0"); + Big.setDP 3; + div_test ("-0.0000000000000000000114", "-1", "0"); + Big.setDP 4; + div_test ("0.0000000000675", "-14701", "0"); + Big.setDP 0; + div_test ("0.0000000000043", "2", "0"); + Big.setDP 8; + div_test ("-2.91", "0.000000000000164", "-17743902439024.3902439"); + Big.setDP 0; + div_test ("0.05450", "-6", "0"); + Big.setDP 0; + div_test ("-1", "21.30", "0"); + Big.setDP 7; + div_test ("1652.54", "85.203", "19.3953264"); + Big.setDP 0; + div_test ("14.07", "-6", "-2"); + Big.setDP 1; + div_test ("7", "-0.000000000000000000044", "-159090909090909090909"); + Big.setDP 2; + div_test ("2", "6", "0.33"); + Big.setDP 3; + div_test ("9.6", "-273.5", "-0.035"); + Big.setDP 1; + div_test ("9", "-0.000000000000000013", "-692307692307692307.6"); + Big.setDP 9; + div_test ("0", "-0.0000000000028", "0"); + Big.setDP 0; + div_test ("0.000000048", "-3.2", "0"); + Big.setDP 1; + div_test ("-62.46", "56", "-1.1"); + Big.setDP 11; + div_test ("30", "4", "7.5"); + Big.setDP 1; + div_test ("6.3", "-0.0000000019", "-3315789473.6"); + Big.setDP 7; + div_test ("-2", "-26.1", "0.0766283"); + Big.setDP 2; + div_test ("-1.609", "26.5", "-0.06"); + Big.setDP 4; + div_test ("8.5", "-13.384", "-0.635"); + Big.setDP 2; + div_test ("0", "0.0000000000000000002043", "0"); + Big.setDP 0; + div_test ("3", "1.3", "2"); + Big.setDP 7; + div_test ("0.000009924", "-1.7", "-0.0000058"); + Big.setDP 4; + div_test ("-0.00000000000000000012", "0.0000000000051854", "0"); + Big.setDP 7; + div_test ("0", "305.5", "0"); + Big.setDP 11; + div_test ("0", "1.0", "0"); + Big.setDP 4; + div_test ("2268", "-5", "-453.6"); + Big.setDP 7; + div_test ("-18.21", "5.3797", "-3.3849471"); + Big.setDP 5; + div_test ("-594", "1.5802", "-375.90178"); + Big.setDP 2; + div_test ("30.877", "-24.9", "-1.24"); + Big.setDP 3; + div_test ("-499.20", "0.141904", "-3517.871"); + Big.setDP 11; + div_test ("-1", "6", "-0.16666666666"); + Big.setDP 10; + div_test ("77618", "16.43", "4724.1631162507"); + Big.setDP 11; + div_test ("-3.63796", "38.2", "-0.09523455497"); + Big.setDP 4; + div_test ("0.000031", "20.373", "0"); + Big.setDP 3; + div_test ("-153967", "14.659", "-10503.24"); + Big.setDP 6; + div_test ("0", "1", "0"); + Big.setDP 1; + div_test ("-7503.3", "-69.0", "108.7"); + Big.setDP 8; + div_test ("-5.46", "0.0000113328", "-481787.37822956"); + Big.setDP 0; + div_test ("-2", "-5", "0"); + Big.setDP 4; + div_test ("-37.202", "-2", "18.601"); + Big.setDP 6; + div_test ("4.16", "9.9", "0.420202"); + Big.setDP 7; + div_test ("-0.00012", "-1.3", "0.0000923"); + Big.setDP 5; + div_test ("0", "-0.0000000000013828", "0"); + Big.setDP 9; + div_test ("0.00000000000000336", "73518", "0"); + Big.setDP 10; + div_test ("0", "47234.4", "0"); + Big.setDP 3; + div_test ("0.038327", "-0.00000000000000259", "-14798069498069.498"); + Big.setDP 9; + div_test ("0.000000000000497", "117", "0"); + Big.setDP 7; + div_test ("-4694", "-4", "1173.5"); + Big.setDP 8; + div_test ("-2.6950", "-95.8", "0.02813152"); + Big.setDP 8; + div_test ("333.48", "90.012", "3.70483935"); + Big.setDP 10; + div_test ("1", "14.9", "0.0671140939"); + Big.setDP 8; + div_test ("636.6", "7", "90.94285714"); + Big.setDP 5; + div_test ("1.2", "-1", "-1.2"); + Big.setDP 11; + div_test ("1.0", "0.0000000000021", "476190476190.47619047619"); + Big.setDP 8; + div_test ("-19.16", "-1", "19.16"); + Big.setDP 4; + div_test ("-3", "3", "-1"); + Big.setDP 0; + div_test ("-7.8", "86.5", "0"); + Big.setDP 6; + div_test ("-0.000000016187", "-11623.5", "0"); + Big.setDP 6; + div_test ("-23.8", "-0.00000011", "216363636.363636"); + Big.setDP 11; + div_test ("-5", "853.76", "-0.00585644677"); + Big.setDP 8; + div_test ("-0.000000000000000000018", "0.000000000137", "0"); + Big.setDP 9; + div_test ("-384.98", "4.2", "-91.661904761"); + Big.setDP 3; + div_test ("-2485.1", "-2.6", "955.807"); + Big.setDP 10; + div_test ("0", "2", "0"); + Big.setDP 10; + div_test ("-13949", "33.74", "-413.4262003556"); + Big.setDP 0; + div_test ("-1.01", "-0.0000000000000001275", "7921568627450980"); + Big.setDP 4; + div_test ("-0.51154", "-0.000826", "619.2978"); + Big.setDP 8; + div_test ("-6.10", "-0.00000000000000001360", "448529411764705882.35294117"); + Big.setDP 8; + div_test ("492.24", "-4", "-123.06"); + Big.setDP 8; + div_test ("4", "1.515", "2.64026402"); + Big.setDP 5; + div_test ("-31.7", "-64.89", "0.48851"); + Big.setDP 4; + div_test ("125.593", "-3", "-41.8643"); + Big.setDP 3; + div_test ("0", "0.0000000000010", "0"); + Big.setDP 7; + div_test ("164.6", "9.5", "17.3263157"); + Big.setDP 7; + div_test ("-0.0000034", "-3", "0.0000011"); + Big.setDP 6; + div_test ("-858", "-0.000021", "40857142.857142"); + Big.setDP 4; + div_test ("4480.34", "-27100", "-0.1653"); + Big.setDP 0; + div_test ("-1257.20", "-0.0000000000003639", "3454795273426765"); + Big.setDP 6; + div_test ("4.591", "-0.000000017", "-270058823.529411"); + Big.setDP 4; + div_test ("-0.000000000020028", "0.000000000000123", "-162.8292"); + Big.setDP 8; + div_test ("-8.17", "52191", "-0.00015654"); + Big.setDP 8; + div_test ("-5", "0.056326", "-88.76895217"); + Big.setDP 5; + div_test ("0", "2", "0"); + Big.setDP 6; + div_test ("0.0000000000000000043", "-1574", "0"); + Big.setDP 9; + div_test ("-8", "-24455", "0.000327131"); + Big.setDP 6; + div_test ("-1", "-154643", "0.000006"); + Big.setDP 11; + div_test ("124.635", "5", "24.927"); + Big.setDP 3; + div_test ("-0.0000000000000010", "51.6", "0"); + + Big.setRM 2; + Big.setDP 9; + div_test ("21.4", "9", "2.377777778"); + Big.setDP 7; + div_test ("2.55", "-9", "-0.2833333"); + Big.setDP 4; + div_test ("0.000000000000001668", "-9", "0"); + Big.setDP 1; + div_test ("-2.0", "6240.6", "0"); + Big.setDP 7; + div_test ("0", "-0.000000000000013", "0"); + Big.setDP 7; + div_test ("1.6", "5", "0.32"); + Big.setDP 2; + div_test ("-0.000000000352", "1.00", "0"); + Big.setDP 2; + div_test ("-450031", "-9.0758", "49585.82"); + Big.setDP 0; + div_test ("-1.141", "3451", "0"); + Big.setDP 11; + div_test ("26.261", "-0.0000000000001727", "-152061378112333.5263462652"); + Big.setDP 6; + div_test ("0", "-1292.02", "0"); + Big.setDP 8; + div_test ("-0.000000000000000136", "10447", "0"); + Big.setDP 8; + div_test ("2", "2.8048", "0.71306332"); + Big.setDP 3; + div_test ("-0.0000000000000000198022", "-0.0000000000056765", "0"); + Big.setDP 11; + div_test ("41.235", "-3", "-13.745"); + Big.setDP 5; + div_test ("-11.800", "-0.00000000000000000183668", "6424635755820284426.24736"); + Big.setDP 9; + div_test ("7.861", "1", "7.861"); + Big.setDP 5; + div_test ("2.21", "3153", "0.0007"); + Big.setDP 9; + div_test ("0", "-129.33", "0"); + Big.setDP 2; + div_test ("1831.2", "-626.6", "-2.92"); + Big.setDP 6; + div_test ("18.0", "36", "0.5"); + Big.setDP 11; + div_test ("-6.248", "-0.000000000000000031898", "195874349488996175.30879678977"); + Big.setDP 4; + div_test ("-25.7246", "-1", "25.7246"); + Big.setDP 8; + div_test ("146.7", "-1", "-146.7"); + Big.setDP 1; + div_test ("41.7", "105.8", "0.4"); + Big.setDP 1; + div_test ("1.3759", "-2", "-0.7"); + Big.setDP 5; + div_test ("-0.0000000000000174554", "3", "0"); + Big.setDP 1; + div_test ("-752.4", "0.02277", "-33043.5"); + Big.setDP 5; + div_test ("1201.7", "-11.1", "-108.26126"); + Big.setDP 6; + div_test ("-3.2", "-1.599", "2.001251"); + Big.setDP 4; + div_test ("-1", "-1", "1"); + Big.setDP 2; + div_test ("-1.37", "-701.9", "0"); + Big.setDP 7; + div_test ("-4.0", "0.000000000300700", "-13302294645.8264051"); + Big.setDP 5; + div_test ("0.2376", "3.56", "0.06674"); + Big.setDP 1; + div_test ("0.0000000027396", "2.899", "0"); + Big.setDP 8; + div_test ("109.07", "-0.000000004824", "-22609867330.01658375"); + Big.setDP 4; + div_test ("-57.669", "111.54", "-0.517"); + Big.setDP 8; + div_test ("0", "1", "0"); + Big.setDP 3; + div_test ("0", "6744", "0"); + Big.setDP 7; + div_test ("2.4", "1", "2.4"); + Big.setDP 11; + div_test ("3.51", "-3010.8", "-0.00116580311"); + Big.setDP 0; + div_test ("-5", "-2.36", "2"); + Big.setDP 1; + div_test ("-1", "159.44", "0"); + + Big.setRM 1; + Big.setDP 0; + div_test ("-1.5e+1", "-3e+0", "5"); + Big.setDP 1; + div_test ("-4.4e-13", "-1e+0", "0"); + Big.setDP 1; + div_test ("-1e+0", "1.4e+1", "-0.1"); + Big.setDP 1; + div_test ("2.7e+0", "-1e+0", "-2.7"); + Big.setDP 1; + div_test ("-4e+0", "-4e+0", "1"); + Big.setDP 0; + div_test ("-3e+0", "1.5e+0", "-2"); + Big.setDP 1; + div_test ("1.2e+0", "-1e+0", "-1.2"); + Big.setDP 0; + div_test ("1e+0", "2e+0", "1"); + Big.setDP 1; + div_test ("3e-9", "1e+0", "0"); + Big.setDP 0; + div_test ("-2e+0", "1.4e+1", "0"); + Big.setDP 1; + div_test ("3.3e+0", "-2.4e+1", "-0.1"); + Big.setDP 1; + div_test ("6.3e-12", "-2e+0", "0"); + Big.setDP 0; + div_test ("-8e+0", "-1e+0", "8"); + Big.setDP 1; + div_test ("3.4e-13", "-6e+0", "0"); + Big.setDP 1; + div_test ("1e+0", "-3e+0", "-0.3"); + Big.setDP 0; + div_test ("-2e+0", "-2e+0", "1"); + Big.setDP 1; + div_test ("3.3e+0", "-1.1e+0", "-3"); + Big.setDP 0; + div_test ("-2e+0", "1.7e+0", "-1"); + Big.setDP 1; + div_test ("-7e+0", "-3e+0", "2.3"); + Big.setDP 0; + div_test ("1.9e+0", "2e+0", "1"); + Big.setDP 0; + div_test ("2e+0", "-3e+0", "-1"); + Big.setDP 1; + div_test ("2.4e+1", "-2e+0", "-12"); + Big.setDP 1; + div_test ("-6e+0", "-1e+0", "6"); + Big.setDP 1; + div_test ("-2e+0", "6e+0", "-0.3"); + Big.setDP 1; + div_test ("1e+0", "-2.5e+0", "-0.4"); + Big.setDP 1; + div_test ("-1.1e-17", "3.1e+1", "0"); + Big.setDP 0; + div_test ("1.4e-4", "-5e+1", "0"); + Big.setDP 1; + div_test ("-1e+0", "-1e+0", "1"); + Big.setDP 0; + div_test ("-5.9e+0", "1e+0", "-6"); + Big.setDP 0; + div_test ("-1e+0", "1.6e+0", "-1"); + Big.setDP 1; + div_test ("1e+0", "-1.9e-1", "-5.3"); + Big.setDP 0; + div_test ("5.1e-1", "8e+0", "0"); + Big.setDP 1; + div_test ("-2e+0", "1e+0", "-2"); + Big.setDP 0; + div_test ("1e+0", "-1e-7", "-10000000"); + Big.setDP 0; + div_test ("3e+0", "1e-11", "300000000000"); + Big.setDP 0; + div_test ("1e+1", "-4.4e-8", "-227272727"); + Big.setDP 1; + div_test ("4.3e+1", "-7e+0", "-6.1"); + Big.setDP 0; + div_test ("-9e+0", "-5e+0", "2"); + Big.setDP 0; + div_test ("1e+0", "-3.2e+0", "0"); + Big.setDP 0; + div_test ("3e+0", "1.2e+0", "3"); + Big.setDP 1; + div_test ("1.4e+0", "2e+0", "0.7"); + Big.setDP 1; + div_test ("-3e+0", "6e+0", "-0.5"); + Big.setDP 0; + div_test ("-2e+0", "-6e+0", "0"); + Big.setDP 0; + div_test ("-3e+0", "6.3e+1", "0"); + Big.setDP 0; + div_test ("-1e+0", "1.4e+0", "-1"); + Big.setDP 1; + div_test ("-8e+0", "2.8e+0", "-2.9"); + Big.setDP 1; + div_test ("-2e+0", "1.4e+1", "-0.1"); + Big.setDP 1; + div_test ("1e+0", "-1e+0", "-1"); + Big.setDP 0; + div_test ("-7e+0", "-1.2e+0", "6"); + Big.setDP 1; + div_test ("1e+0", "3e+0", "0.3"); + Big.setDP 0; + div_test ("4e+0", "-2e+0", "-2"); +) diff --git a/drafts/bs-big/__tests__/exception_test.ml b/drafts/bs-big/__tests__/exception_test.ml new file mode 100644 index 0000000..50bd348 --- /dev/null +++ b/drafts/bs-big/__tests__/exception_test.ml @@ -0,0 +1,26 @@ +open Jest + +(*check that exceptions are wrapped properly in OCaml exceptions*) +let () = + describe "exception_tests" (fun () -> + let open Expect in + + let exn_test = + let count = ref 0 in + fun f exn -> + count := !count + 1; + let passed = + try + let _ = f () in + failwith "f should throw" + with e -> e = exn + in + test ("excn_test" ^ string_of_int !count) (fun () -> expect passed |> toBe true) + in + exn_test (fun () -> Big.div (Big.fromInt 1) (Big.fromInt 0)) Big.Div_by_zero; + exn_test (fun () -> Big.fromString "bad string") Big.Invalid_number; + exn_test (fun () -> Big.setDP (-1); Big.fromInt 1) Big.Invalid_decimal_places; + exn_test (fun () -> Big.setRM (-1); Big.fromInt 1) Big.Invalid_rounding_mode; + exn_test (fun () -> Big.fromInt (-1) |. Big.sqrt) Big.No_square_root; + exn_test (fun () -> Big.fromInt 1 |. Big.toPrecision ~sd:(-1) () |. Big.fromString) Big.Invalid_precision +) diff --git a/drafts/bs-big/__tests__/minus_test.ml b/drafts/bs-big/__tests__/minus_test.ml new file mode 100644 index 0000000..f0e3db6 --- /dev/null +++ b/drafts/bs-big/__tests__/minus_test.ml @@ -0,0 +1,735 @@ +open Jest + +let () = + describe "minus_tests" (fun () -> + let open Expect in + + let minus_test = + let count = ref 0 in + fun (a, b, exp) -> + count := !count + 1; + let v = Big.minus (Big.fromString a) (Big.fromString b) |. Big.toString in + test ("div_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("div_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + minus_test ("1", "0", "1"); + minus_test ("1", "-0", "1"); + minus_test ("-1", "0", "-1"); + minus_test ("-1", "-0", "-1"); + minus_test ("0", "1", "-1"); + minus_test ("0", "-1", "1"); + minus_test ("-0", "1", "-1"); + minus_test ("-0", "-1", "1"); + + bool_test false (Big.minus (Big.fromInt 0) (Big.fromInt 0) |> is_minus_zero); + bool_test false (Big.minus (Big.fromInt 0) (Big.fromString "-0") |> is_minus_zero); + bool_test true (Big.minus (Big.fromString "-0") (Big.fromInt 0) |> is_minus_zero); + bool_test false (Big.minus (Big.fromInt 1) (Big.fromInt 1) |> is_minus_zero); + bool_test false (Big.minus (Big.fromInt (-1)) (Big.fromInt (-1)) |> is_minus_zero); + + minus_test ("-0.00000020", "-1.5", "1.4999998"); + minus_test ("-5", "0", "-5"); + minus_test ("-2", "1.5", "-3.5"); + minus_test ("7", "-3", "10"); + minus_test ("0", "0", "0"); + minus_test ("0", "0", "0"); + minus_test ("0", "-9", "9"); + minus_test ("-15", "-7", "-8"); + minus_test ("-3", "0", "-3"); + minus_test ("3", "-5", "8"); + minus_test ("4", "-2", "6"); + minus_test ("2", "23", "-21"); + minus_test ("0", "0", "0"); + minus_test ("0.00000000022", "0", "2.2e-10"); + minus_test ("3", "-7", "10"); + minus_test ("0", "1.1", "-1.1"); + minus_test ("-2", "0", "-2"); + minus_test ("0", "-1", "1"); + minus_test ("2.3", "-3", "5.3"); + minus_test ("-3", "1", "-4"); + minus_test ("0.000040", "3", "-2.99996"); + minus_test ("0", "1", "-1"); + minus_test ("0", "2", "-2"); + minus_test ("0", "0", "0"); + minus_test ("3", "1.8", "1.2"); + minus_test ("0", "1.4", "-1.4"); + minus_test ("-1", "1", "-2"); + minus_test ("-3", "-1.0", "-2"); + minus_test ("1", "-4.5", "5.5"); + minus_test ("-1.8", "4", "-5.8"); + minus_test ("0", "-1.6", "1.6"); + minus_test ("1", "3.1", "-2.1"); + minus_test ("0.000000000000000000013", "-7", "7.000000000000000000013"); + minus_test ("0", "0", "0"); + minus_test ("-3", "2.4", "-5.4"); + minus_test ("-3.0", "2.2", "-5.2"); + minus_test ("0", "-2", "2"); + minus_test ("-1", "1.0", "-2"); + minus_test ("0", "5", "-5"); + minus_test ("5", "0", "5"); + minus_test ("-1", "0.0000014", "-1.0000014"); + minus_test ("3", "0", "3"); + minus_test ("0", "4.1", "-4.1"); + minus_test ("0", "-2.7", "2.7"); + minus_test ("-1", "0", "-1"); + minus_test ("-0.0000000000000030", "3", "-3.000000000000003"); + minus_test ("-2", "-1.8", "-0.2"); + minus_test ("0", "1", "-1"); + minus_test ("-1", "-1", "0"); + minus_test ("0", "-0.0000000011", "1.1e-9"); + minus_test ("6", "-15", "21"); + minus_test ("-2.2", "-1.6", "-0.6"); + minus_test ("0", "0", "0"); + minus_test ("0", "-5", "5"); + minus_test ("-6", "5", "-11"); + minus_test ("-3.1", "0.000000000000029", "-3.100000000000029"); + minus_test ("0", "3.6", "-3.6"); + minus_test ("0", "-7", "7"); + minus_test ("-5", "-1", "-4"); + minus_test ("0", "1.5", "-1.5"); + minus_test ("1", "2", "-1"); + minus_test ("-2", "0", "-2"); + minus_test ("-9", "-13", "4"); + minus_test ("-2", "0", "-2"); + minus_test ("1.1", "0", "1.1"); + minus_test ("8", "-0.000000000027", "8.000000000027"); + minus_test ("-0.000036", "-4", "3.999964"); + minus_test ("0", "5", "-5"); + minus_test ("0", "1", "-1"); + minus_test ("-7", "-5.9", "-1.1"); + minus_test ("-7", "-1", "-6"); + minus_test ("-1", "0", "-1"); + minus_test ("-0.000000036", "9", "-9.000000036"); + minus_test ("-6", "0", "-6"); + minus_test ("-9", "-6", "-3"); + minus_test ("2", "3.1", "-1.1"); + minus_test ("0", "-2", "2"); + minus_test ("0", "7", "-7"); + minus_test ("2.8", "3", "-0.2"); + minus_test ("-2", "0", "-2"); + minus_test ("0", "-3", "3"); + minus_test ("-3.7", "-5", "1.3"); + minus_test ("-1.3", "2.0", "-3.3"); + minus_test ("-4.7", "-3.0", "-1.7"); + minus_test ("-1.5", "0", "-1.5"); + minus_test ("4", "0", "4"); + minus_test ("-4", "0", "-4"); + minus_test ("-6", "-3", "-3"); + minus_test ("-1", "0", "-1"); + minus_test ("3", "-3", "6"); + minus_test ("0", "-3", "3"); + minus_test ("-2.6", "-1", "-1.6"); + minus_test ("0", "-0.0000000000000000013", "1.3e-18"); + minus_test ("2", "-3", "5"); + minus_test ("7", "0", "7"); + minus_test ("-1.8", "-3", "1.2"); + minus_test ("-5", "0", "-5"); + minus_test ("0", "0", "0"); + minus_test ("1", "0", "1"); + minus_test ("6", "-3.1", "9.1"); + minus_test ("1", "-3", "4"); + minus_test ("-1", "7", "-8"); + minus_test ("-2", "-2", "0"); + minus_test ("3.0", "-1.8", "4.8"); + minus_test ("0", "0", "0"); + minus_test ("0", "-9", "9"); + minus_test ("-4", "0", "-4"); + minus_test ("-1", "-1.9", "0.9"); + minus_test ("0", "-2", "2"); + minus_test ("-6", "1", "-7"); + minus_test ("1", "1", "0"); + minus_test ("-3.8", "3.4", "-7.2"); + minus_test ("5", "-2", "7"); + minus_test ("0", "0", "0"); + minus_test ("-5", "1", "-6"); + minus_test ("2", "0", "2"); + minus_test ("-6", "-32", "26"); + minus_test ("-3", "7", "-10"); + minus_test ("0", "0", "0"); + minus_test ("-1", "3", "-4"); + minus_test ("-5.6", "-0.00000000023", "-5.59999999977"); + minus_test ("1.1", "-3", "4.1"); + minus_test ("0", "3", "-3"); + minus_test ("0.0000000028", "1", "-0.9999999972"); + minus_test ("1", "0", "1"); + minus_test ("-2.9", "0", "-2.9"); + minus_test ("-4", "-3", "-1"); + minus_test ("-1", "0", "-1"); + minus_test ("0", "-8", "8"); + minus_test ("5", "-1", "6"); + minus_test ("50", "0", "50"); + minus_test ("1.4", "-0.023", "1.423"); + minus_test ("0", "0", "0"); + minus_test ("0", "-0.000000000000000000044", "4.4e-20"); + minus_test ("6", "1.0", "5"); + minus_test ("0", "0", "0"); + minus_test ("-5", "0", "-5"); + minus_test ("1", "4", "-3"); + minus_test ("5", "8", "-3"); + minus_test ("-1", "0", "-1"); + minus_test ("4", "1", "3"); + minus_test ("1.1", "0", "1.1"); + minus_test ("2", "-1.8", "3.8"); + minus_test ("1.2", "3", "-1.8"); + minus_test ("1.0", "-2", "3"); + minus_test ("0", "-26", "26"); + minus_test ("-1.2", "-0.000021", "-1.199979"); + minus_test ("0.00000000000000022", "0", "2.2e-16"); + + minus_test ("-0.00000000000000121361969403227661937847795811", "574992758622232775968317372974458171501.4254915170813", "-5.7499275862223277596831737297445817150142549151708130121361969403227661937847795811e+38"); + minus_test ("-4550837208408065075504522665550667460", "5.751431060476645646485961575720", "-4.55083720840806507550452266555066746575143106047664564648596157572e+36"); + minus_test ("7996662362107395829425.18720176386230", "-8731907507950", "7.9966623708393033373751872017638623e+21"); + minus_test ("-68461838113448256548677344232782026104.040843480437532", "0.0000142986280419", "-6.84618381134482565486773442327820261040408577790655739e+37"); + minus_test ("-665.7", "3908931.49090108734150120238488", "-3909597.19090108734150120238488"); + minus_test ("338109.679317396058", "-45.6", "338155.279317396058"); + minus_test ("-2471514788.354942554630483008", "-0.0000000055765369280717362958649740", "-2471514788.354942549053946079928263704135026"); + minus_test ("-18642529601026.27209290620938355635", "67022255553746002366834404466320.198", "-6.702225555374600238547693406734647009290620938355635e+31"); + minus_test ("27195199183.93214817879349469171272068644528813652023534", "-1", "27195199184.93214817879349469171272068644528813652023534"); + minus_test ("41026854231898.0486363115993557", "-0.0000000000000029972604673995461216855", "41026854231898.0486363115993586972604673995461216855"); + minus_test ("-1220181643016279028.87348578653647757882815849", "-4124297626266.931179306588915876637", "-1220177518718652761.94230647994756170219115849"); + minus_test ("174593431895507873748465653530769377174", "7.3340", "1.74593431895507873748465653530769377166666e+38"); + minus_test ("93091029642275068666781.0284945435443997658445", "-31928424886539383422.9555351175713959", "9.31229580671616080502039840296611157956658445e+22"); + minus_test ("-86027968259520771550471521850.6", "0.0000000000000000292728157559323008342389754688224199225762190199185607", "-8.60279682595207715504715218506000000000000000292728157559323008342389754688224199225762190199185607e+28"); + minus_test ("-1.44467944259873814286", "2.3245669450269604739750258313435250093720066817981549442", "-3.7692463876256986168350258313435250093720066817981549442"); + minus_test ("15548437865455556312866591689712167475961", "2.2", "1.55484378654555563128665916897121674759588e+40"); + minus_test ("0.00000000000000000020770604235293769845", "-0.0000992358273674621622485217917158420", "0.00009923582736746236995456414465354045"); + minus_test ("-1626846234967158413103510196475626.88719324087757539708", "-0.0000000000000007877989096708003891755677772229305473607860191", "-1.6268462349671584131035101964756268871932408775746092810903291996108244322227770694526392139809e+33"); + minus_test ("-0.00001339836", "0.0000333909797773140", "-0.000046789339777314"); + minus_test ("-20.6409", "-0.0000000000017673756783209754", "-20.6408999999982326243216790246"); + minus_test ("-0.00000000164445378704494553248164602947761915692700", "-294719705242476177981296942472301246209096", "2.94719705242476177981296942472301246209095999999998355546212955054467518353970522380843073e+41"); + minus_test ("-714.4854312", "479.74301995618099492271043882", "-1194.22845115618099492271043882"); + minus_test ("41306640988462651378.04879814073", "2.3", "41306640988462651375.74879814073"); + minus_test ("1888287331013305459263552414.6839815", "7369526522887481233382690934873900068542595569442820447065", "-7.3695265228874812333826909348720117812115822639835568946503160185e+57"); + minus_test ("-63087590127015461742418723247183314165549180801856.76047", "511852", "-6.308759012701546174241872324718331416554918131370876047e+49"); + minus_test ("-712813331685105224867937788768200257082.35597637750550", "-0.000000154423320652795188516788493", "-7.12813331685105224867937788768200257082355976223082179347204811483211507e+38"); + minus_test ("-0.00000021267799883027266680922532294584", "-99920149812553578396", "99920149812553578395.99999978732200116972733319077467705416"); + minus_test ("-0.000001314853272479802673030806326616332901672901446530", "-0.00000000000000177806", "-0.00000131485327070174267303080632661633290167290144653"); + minus_test ("-335141130.448", "-622097386577809642069744047.28826330", "6.220973865778096417346029168402633e+26"); + minus_test ("0", "120769246650024506936432254.2242696", "-1.207692466500245069364322542242696e+26"); + minus_test ("-23641982115679784801339.39566245781597254522", "-3682962980152156410.3125514", "-2.363829915269963264492908311105781597254522e+22"); + minus_test ("-88042183866221727883616143734328.731116339192172335", "2124601502534008501755.584348081323605468287", "-8.8042183868346329386150152236084315464420515777803287e+31"); + minus_test ("11947261350807745084450506573219.467267625392669956554", "-2144324041379.38432776094911354677701674948588", "1.194726135080774508659483061459885159538634178350333101674948588e+31"); + minus_test ("230257242957.393", "-10607111174738890296557505.142420583396378", "1.0607111174739120553800462535420583396378e+25"); + minus_test ("-0.000000000000000000205207122559582205445490420", "-137363469389767969588812337824785302440844", "1.3736346938976796958881233782478530244084399999999999999999979479287744041779455450958e+41"); + minus_test ("-681.369980", "279143637047358960283640320234319673269492015123776", "-2.7914363704735896028364032023431967326949201512445736998e+50"); + minus_test ("0.00000000000047867734749297313578318166203844289133575435501552", "5318894.3577269473404992938443574038899509659386283", "-5318894.35772694734002061649686443075416778427658985710866424564498448"); + minus_test ("-7009640457950142150404723076242641700234100735651466.001", "450572184269898130184881623816.351532207", "-7.009640457950142150405173648426911598364285617275282352532207e+51"); + minus_test ("-667761.1964938970806540832766776998292", "-11916.0", "-655845.1964938970806540832766776998292"); + minus_test ("78115005042419615473330500516096634.176852324566877077", "-6798.68296696083172787385428", "7.811500504241961547333050051610343285981928539860495085428e+34"); + minus_test ("7810338218505304105029156703754.942106797", "0.000001731538457890332023362604451262238656250891", "7.810338218505304105029156703754942105065461542109667976637395548737761343749109e+30"); + minus_test ("147524.3448475445608", "1648294473575921", "-1648294473428396.6551524554392"); + minus_test ("-0.000000000000000000171463070071732948056011420608183352219588685", "586793187554936.5855", "-586793187554936.585500000000000000171463070071732948056011420608183352219588685"); + minus_test ("-1211390378858441999502927549647140419603384681145414251351213", "-635082911540249607321.024949083796644", "-1.211390378858441999502927549647140419602749598233874001743891975050916203356e+60"); + minus_test ("4", "16059489423456265750163100012.9030479691340920432572860034", "-1.60594894234562657501631000089030479691340920432572860034e+28"); + minus_test ("-0.02386494924652569606758900911891223878669277", "6954997.21231337279682439457198586266365943551328684831121", "-6954997.23617832204335009063957487178257167429997961831121"); + minus_test ("-77097949257283524913898.9005058281976253594672", "2548220758876398059247570217121711835.85372529", "-2.5482207588764751571968275006466257347542311181976253594672e+36"); + minus_test ("0.0000000000000000003167303237768130560", "-1774472.102377282878491377352513811904", "1774472.102377282878491377669244135680813056"); + minus_test ("12826152962883951576635.9617817", "-85603180142227733048283563048771.16275698594", "8.560318015505388601116751462540712453868594e+31"); + minus_test ("-28594.58153422332574547631803496831493", "0.00138135692454804974058929153874335145729995858764536203", "-28594.58291558025029352605862425985367335145729995858764536203"); + minus_test ("-1076543179517781327152214.4430186084047103180550303835484", "-0.000001966501043041903595634052091", "-1.076543179517781327152214443016641903667276151434749496309e+24"); + minus_test ("1.1303763207006847408087108827484230273165561756244577060659", "-5226422630308737810960949550589969908179555303", "5.2264226303087378109609495505899699081795553041303763207006847408087108827484230273165561756244577060659e+45"); + minus_test ("4.6379", "0.0010851657258206953367908525441350095857171922501796819281707", "4.6368148342741793046632091474558649904142828077498203180718293"); + minus_test ("-0.00000121970222487531743738910465210", "14700571395.710868072772989809", "-14700571395.7108692924752146843174373891046521"); + minus_test ("-0.00948647116781336833163259991", "-1.7768824919899484548781987321907266047229337854", "1.7673960208221350865465661322807266047229337854"); + minus_test ("0.0000000000294045914362167819882890883773282671860065407908497565282", "1203484199859679.515373248387944", "-1203484199859679.5153732483585394085637832180117109116226717328139934592091502434718"); + minus_test ("370605558535696550704041748.54", "2859.002553198485573190388217618142019", "3.70605558535696550704038889537446801514426809611782381857981e+26"); + minus_test ("23063425385264062114.4182185521", "919024.6882123634392645395934284705089", "23063425385263143089.7300061886607354604065715294911"); + minus_test ("196575005.9706725", "-5209445831094830", "5209446027669835.9706725"); + minus_test ("-749632.806770304627392347831545996165984090513451938727374", "772302148117130.7584834", "-772302148866763.565253704627392347831545996165984090513451938727374"); + minus_test ("218023.954642124004155088474898834365173675390209344675040", "-4493284.9", "4711308.85464212400415508847489883436517367539020934467504"); + minus_test ("371184371226569100503051893.30461921952559443426660043299229", "-0.0000000034906715619289934", "3.7118437122656910050305189330461922301626599619559383299229e+26"); + minus_test ("220152166905051656324095658827324313008647.0", "-0.00000541198892301696315819055681172535", "2.2015216690505165632409565882732431300864700000541198892301696315819055681172535e+41"); + minus_test ("343183254236262724.51785020", "1", "343183254236262723.5178502"); + minus_test ("0.0000000003890086401641242121857013479571090262584101373", "-8317.38612508391889137944463821522953", "8317.3861250843079000196087624274152313479571090262584101373"); + minus_test ("0.00000000000000000086155332", "-17.6333243552751", "17.63332435527510000086155332"); + minus_test ("0", "268666137918342629663843421660.888578", "-2.68666137918342629663843421660888578e+29"); + minus_test ("0.00000000000000135738708106732310272812674949101792", "53327465.2335089327976851709827349825", "-53327465.23350893279768381359565391517689727187325050898208"); + minus_test ("266910608197788439217725496348217", "-0.00000000000000138658", "2.6691060819778843921772549634821700000000000000138658e+32"); + minus_test ("11641358", "81237.72625754123497510364150080", "11560120.2737424587650248963584992"); + minus_test ("-10397358465137390.59112438352080341792626708545", "0.000000000000035771048469575519305632795707", "-10397358465137390.591124383520839188974736660969305632795707"); + minus_test ("-319067503684881132718867038113132023386552638920.93464409992", "-4362498854097189202568295213849864755626616334057699.89553", "4.36217978659350432143557634681175162360322978141877896088590008e+51"); + minus_test ("-291431002924776541728754603601.36970805037321548645", "5964565940.126384157441377", "-2.9143100292477654173471916954149609220781459248645e+29"); + minus_test ("-1.2311860880", "-596880833224", "596880833222.768813912"); + minus_test ("87.132412112577000", "3", "84.132412112577"); + minus_test ("14496251944930895122386093.97997766", "-0.0186085382187367427216451737443431075455317", "1.44962519449308951223860939985861982187367427216451737443431075455317e+25"); + minus_test ("-1454167.8755560906631572", "-14023057721.47963687", "14021603553.6040807793368428"); + minus_test ("-48.0205403500832716158268160170078138883305085421632055636", "-4225012867.41212544381914188804", "4225012819.3915850937358702722131839829921861116694914578367944364"); + minus_test ("132233805697430308711156924448348175516180746442", "0.0000017428839153838195472106854742425800", "1.3223380569743030871115692444834817551618074644199999825711608461618045278931452575742e+47"); + minus_test ("-3464742138515.3596070", "-116196292944709774661.6869498643733175605", "116196289479967636146.3273428643733175605"); + minus_test ("959618941323760340533285165929739125596307241332873169.21229", "66867302503354526158135738979.180422740", "9.5961894132376034053328509906243662224178108319713419003186726e+53"); + minus_test ("272744684991153578922570226355.46751565943", "2120.8826649154579918903365041556839175862", "2.727446849911535789225702242345848507439720081096634958443160824138e+29"); + minus_test ("392752713096323327908999", "0.000000017921157295538031059674698531743345633301", "3.92752713096323327908998999999982078842704461968940325301468256654366699e+23"); + minus_test ("98160222492281761742.521218301", "-0.0285627038777634002456158926936381577455032644551906387514964", "98160222492281761742.5497810048777634002456158926936381577455032644551906387514964"); + minus_test ("-4.36", "-271625870935.20401097518", "271625870930.84401097518"); + minus_test ("-19.4212927874167898", "-3296800120589635669055398465088086245282862075.96730", "3.2968001205896356690553984650880862452828620565460072125832102e+45"); + minus_test ("-7384530397856089", "-45.9", "-7384530397856043.1"); + minus_test ("-774820079197336364734223154.8", "-10.942584818509498694779756530950038148", "-7.74820079197336364734223143857415181490501305220243469049961852e+26"); + minus_test ("-150596940796161658996.388271502068869", "2985065345825248339763675882859244909723097343219", "-2.985065345825248339763675883009841850519259002215388271502068869e+48"); + minus_test ("-23847.667194770678602066965772568166575932862070476568359149", "1.05838941", "-23848.725584180678602066965772568166575932862070476568359149"); + minus_test ("-139.90436152895151552565739375535355738822610296926957375853", "0.2047189", "-140.10908042895151552565739375535355738822610296926957375853"); + minus_test ("-4859551136289853679597736", "5705851489", "-4.859551136289859385449225e+24"); + minus_test ("-2.822932759210967942204799418357885484503668027660403642776", "-21260029158.7755772147552", "21260029155.952644455544232057795200581642114515496331972339596357224"); + minus_test ("70214727623926969557083.633194040081188", "0.000000000000000008876781900", "7.02147276239269695570836331940400811879911232181e+22"); + minus_test ("168167915122787.2659904", "-0.000000000000000000022424096865237242831921499442051317229853874001", "168167915122787.265990400000000000022424096865237242831921499442051317229853874001"); + minus_test ("-10381081602312", "0.000000000000000923228830", "-10381081602312.00000000000000092322883"); + minus_test ("6481217378435019509.3", "204127.50354634007763", "6481217378434815381.79645365992237"); + minus_test ("-1055871579008468883600015600194814.219411847", "0.00000000000000001993933675383625869609055753063233531835884", "-1.05587157900846888360001560019481421941184700000001993933675383625869609055753063233531835884e+33"); + minus_test ("-11.9", "2190021917.5", "-2190021929.4"); + minus_test ("8893568.397103781249", "-7.29674059550", "8893575.693844376749"); + minus_test ("-270074164732402092470707995826826345208506171395062650454324", "392935540317", "-2.70074164732402092470707995826826345208506171395455585994641e+59"); + minus_test ("-582332724559151988564243629866.793819328", "-752.316045", "-5.82332724559151988564243629114477774328e+29"); + minus_test ("115780050433.9744723375949160", "-10354559440726926933085330907464207489638", "1.0354559440726926933085330907579987540071974472337594916e+40"); + minus_test ("-0.0000000000092082909772982168202901287881437", "-140307240110991278811078363131.3533385306060728599114476021", "1.403072401109912788110783631313533385305968645689341493852797098712118563e+29"); + minus_test ("-0.0000000000000000001302905868005538222253", "-687601306119.30280105580919933093896015091959269610032847933", "687601306119.30280105580919933080866956411903887387502847933"); + minus_test ("-17406776.9106520", "7404147683526942010449859408523376672505043.20", "-7.404147683526942010449859408523376689911820110652e+42"); + minus_test ("-5810490488292821.088550524158200456214711210120", "51309126128019006928075619352.35509020203161", "-5.130912612802481741856391217344364072618981045621471121012e+28"); + minus_test ("-244663279887797845457244.69627014023746468381042256674045148", "-0.383335594341020704911762197811406655", "-2.44663279887797845457244312934545896443978898660368929044825e+23"); + minus_test ("316759637646274728459769194971270681520143070356211369", "138969888208.552504340", "3.1675963764627472845976919497127068152014293138632316044749566e+53"); + minus_test ("-1026716565990818152.338103221159", "1255719213990793975090997507278", "-1.255719213991820691656988325430338103221159e+30"); + minus_test ("854.93693123842152090961298359199223034349519195749", "-424117414357060.756799", "424117414357915.69373023842152090961298359199223034349519195749"); + minus_test ("-0.006379478941040566506054", "3928.2672878523130519347199700529360289380801729479368", "-3928.2736673312540925012260240529360289380801729479368"); + minus_test ("3469779053.85027069235104893994561560034151457638008273176647", "25676509132014403666611211903.3702668974", "-2.567650913201440366314143284951999620504895106005438439965848542361991726823353e+28"); + minus_test ("-6.0694", "-820322384540258597408240140073275834913353.69", "8.203223845402585974082401400732758349133476206e+41"); + minus_test ("-0.000000000000030532", "24.896880201507626275851", "-24.896880201507656807851"); + minus_test ("105468873", "0", "105468873"); + minus_test ("256760156309110476", "-13837063158475039.0608439897688680023912472959404758275635521", "270597219467585515.0608439897688680023912472959404758275635521"); + minus_test ("0.000000000000000001698545937726615224762953174", "0.0091708187464", "-0.009170818746399998301454062273384775237046826"); + minus_test ("-21254127772.055477", "170724844816140294005708794935062810958442.2386", "-1.70724844816140294005708794935084065086214294077e+41"); + minus_test ("4.3", "-42289375032753833461292867654449379918122659582300511814.86", "4.228937503275383346129286765444937991812265958230051181916e+55"); + minus_test ("-10.6945731348037109472689588888585520230967031058063284652", "-0.000000000000000013225637814061559914861522643297461025", "-10.6945731348037109340433210747969921082351804625088674402"); + minus_test ("42022129692143246218.588174513905523856665669864568", "-6688196881698", "42022136380340127916.588174513905523856665669864568"); + minus_test ("59567595164759708273.58488961999", "-2882669546962777869333", "2.94223714212753757760658488961999e+21"); + minus_test ("-0.00000000000000023219819555088939", "0.000002699155773875942009505196424", "-0.000002699155774108140205056085814"); + minus_test ("69.02", "1019.384525", "-950.364525"); + minus_test ("0.28885545083047505669261757814370521673472269407769277", "-54409284625846293530958014777988170910931971864508243085507", "5.440928462584629353095801477798817091093197186450824308550728885545083047505669261757814370521673472269407769277e+58"); + minus_test ("357051970556175609969558033601717918622832633809282", "-0.00000000000000009191759009979", "3.5705197055617560996955803360171791862283263380928200000000000000009191759009979e+50"); + minus_test ("55324032341233413075839541.33979738365146913154063", "18778204875511803067.37488033228813311299318998557567838806", "5.532401356302853756403647396491705136333601854744001442432161194e+25"); + minus_test ("-954279324346950395396438207814989843", "5855883956282.7418", "-9.542793243469503953964440636989461257418e+35"); + minus_test ("0.0000559372400719154055", "36326.3773033065", "-36326.3772473692599280845945"); + minus_test ("-2308273733231941938445560342695.8870897860340173552415859451", "0.0000000000000000000176744410303783123790738765240224970704250496463086", "-2.3082737332319419384455603426958870897860340173552592603861303783123790738765240224970704250496463086e+30"); + minus_test ("-0.0000000000000075315134692867358694825", "0.000000000020673253575755655053286884627683943900054889", "-2.0680785089224941789156367127683943900054889e-11"); + minus_test ("2141565935846165335053366646564.55", "249139386942.433521867737894", "2.141565935846165334804227259622116478132262106e+30"); + minus_test ("0.0000000000000020997422982353397148204786811844837507999862174", "0.000000000000000002356388173646211525529238", "2.0973859100616935032949494431844837507999862174e-15"); + minus_test ("-9.3", "1210724787708353076304704165555.510002672635727895531335", "-1.210724787708353076304704165564810002672635727895531335e+30"); + minus_test ("-94455687.8", "0.0000002761251584122631449121019167818539664249453145710", "-94455687.800000276125158412263144912101916781853966424945314571"); + minus_test ("-527306114203076623189237999707479.9688776820253214193899164", "1599.728954415768000917144378511032", "-5.27306114203076623189237999709079697832097793322336534294911032e+32"); + minus_test ("5201144349263847987496751693.2718392256495115509", "-0.000000000000000008062522688625856069134486136704806619173555611278", "5.201144349263847987496751693271839225649511558962522688625856069134486136704806619173555611278e+27"); + minus_test ("-769134537.983940345", "-596619628089684709170992.484", "5.96619628089683940036454500059655e+23"); + minus_test ("16103.67287682796494953", "-465781.44458474726", "481885.11746157522494953"); + minus_test ("972019.0403266398942", "0.00000000032060736406868701231737725067236", "972019.04032663957359263593131298768262274932764"); + minus_test ("-3722457663697211882835707", "-16.8", "-3.7224576636972118828356902e+24"); + minus_test ("140260.1", "5", "140255.1"); + minus_test ("5314287735775902656123286734.69857230", "-33935993.716814133855691839888466392152019494030707469085", "5.314287735775902656157222728415386433855691839888466392152019494030707469085e+27"); + minus_test ("68283872710781941018806771046574852133", "0.00000000075", "6.828387271078194101880677104657485213299999999925e+37"); + minus_test ("-369081.4527", "141567.2246", "-510648.6773"); + minus_test ("20446533321512161063774845264.22916016420704184590862638", "-68295029.764030715", "2.044653332151216106384314029399319087920704184590862638e+28"); + minus_test ("-600307.74138395225787263", "-0.0000001304496382302165936930", "-600307.741383821808234399783406307"); + minus_test ("24411161239.85690978507516121", "2051270884829.8383684099295195107651592681789671", "-2026859723589.9814586248543583007651592681789671"); + minus_test ("4384414740.5595825362370080404420", "-0.00000000000000554366638630081310095841078569927213406536019558277955", "4384414740.55958253623701358410838630081310095841078569927213406536019558277955"); + minus_test ("9025031.8925028", "-32.8", "9025064.6925028"); + minus_test ("-256722752342173962991.91", "-0.0000000000000000002123046323462613566369", "-256722752342173962991.9099999999999999997876953676537386433631"); + minus_test ("43542362222453910743776206071468.7163717435431410983843", "1100168.647375874421732648073262226", "4.3542362222453910743776204971300068995869121408450311037774e+31"); + minus_test ("0.062784590888327314154797", "1057478188.877253410081536", "-1057478188.814468819193208685845203"); + minus_test ("-7050", "45104384760478621637071269060904128288820257014210.74", "-4.510438476047862163707126906090412828882025702126074e+49"); + minus_test ("1592658310474883023", "-399176738358380589054069565962.3840352823659556138516", "3.991767383599732473645444489853840352823659556138516e+29"); + minus_test ("206141261", "-1266053.469", "207407314.469"); + minus_test ("644.1", "-0.4369751366969488640109929651726886244920517832668019", "644.5369751366969488640109929651726886244920517832668019"); + minus_test ("1612132.216890744513316472", "-51082267675271", "51082269287403.216890744513316472"); + minus_test ("1230427083.97", "0.000758744063330274578234716889288876558038637793691373850", "1230427083.96924125593666972542176528311071112344196136220630862615"); + minus_test ("-35776247491956058344815123524285", "0.000000000012958363043907", "-3.5776247491956058344815123524285000000000012958363043907e+31"); + minus_test ("8661462327754244989542.365", "0", "8.661462327754244989542365e+21"); + minus_test ("-1629190886816579351740029513722257473580386199203949.0", "-6496265115300408904692604.738158", "-1.629190886816579351740029507225992358279977294511344261842e+51"); + minus_test ("13.891128134595", "4", "9.891128134595"); + minus_test ("-11113.7", "0.000000007958782556879962582439914573325191682999786", "-11113.700000007958782556879962582439914573325191682999786"); + minus_test ("-1118611298789753369562561", "0", "-1.118611298789753369562561e+24"); + minus_test ("0.000000000590336252071681886600391810609976", "-67.75", "67.750000000590336252071681886600391810609976"); + minus_test ("-169823638653318606537007998653864233599165.937", "-281597273362859424.39994", "-1.6982363865331860653700771705659087073974153706e+41"); + minus_test ("-3.156805980919999726868943", "546306412638131947574220", "-5.46306412638131947574223156805980919999726868943e+23"); + minus_test ("-0.000000000961866927553387950929926693447189622664803906118589565996", "1599939073440130339796992146.295983955944260728", "-1.599939073440130339796992146295983956906127655553387950929926693447189622664803906118589565996e+27"); + minus_test ("0.4283", "0.000000000020729812246752207692169547780166634734001", "0.428299999979270187753247792307830452219833365265999"); + minus_test ("-0.0004573434550153087210903", "0.03770996737891493754829068954377697580116", "-0.03816731083393024626938098954377697580116"); + minus_test ("-3960.59579547", "-1814.0503015604326701", "-2146.5454939095673299"); + minus_test ("228667830414358772925710849158.07453", "-242389246", "2.2866783041435877292595323840407453e+29"); + minus_test ("-4938.8", "33796487947361", "-33796487952299.8"); + minus_test ("23066858157696468038.419700247057090437730118", "1017294462916594953213682499527318061014200", "-1.017294462916594953213659432669160364546161580299752942909562269882e+42"); + minus_test ("-3.329", "7129476962505466189.958258", "-7129476962505466193.287258"); + minus_test ("0.0002134952691176147868498212012808766187", "-55.418", "55.4182134952691176147868498212012808766187"); + minus_test ("-287906196200519721661337752259844531254735020373.400102226", "-149964438772134655329086295.489409993989261332871176761", "-2.87906196200519721661187787821072396599405934077910692232010738667128823239e+47"); + minus_test ("0.879756603251906828679553532880817", "-169.6608007559773549752480442", "170.540557359229261803927597732880817"); + minus_test ("0.0000006245253019711867486517080491", "-0.000000000000000016145400714914217811", "6.24525301987332149366622266911e-7"); + minus_test ("-0.00000000000000000028355442083", "-6.7960400", "6.79603999999999999971644557917"); + minus_test ("-327828.933845", "-0.000000000016720812786354347397949935318536433299320234", "-327828.933844999983279187213645652602050064681463566700679766"); + minus_test ("-12062798839897370982166084543665094512857864041322339898381", "-983855787277604624519041110446627116266868551757862371483", "-1.1078943052619766357647043433218467396590995489564477526898e+58"); + minus_test ("-368029067460.235618031440780659671986274176149669", "-7.8327366781", "-368029067452.402881353340780659671986274176149669"); + minus_test ("48.841", "621799398797787989614515.034591400113887912474171355", "-6.21799398797787989614466193591400113887912474171355e+23"); + minus_test ("0.00000000000000000001028447389", "11411023852013652", "-11411023852013651.99999999999999999998971552611"); + minus_test ("109388.053063770057103", "-0.000161002185201484294184231320866015688631673966536", "109388.053224772242304484294184231320866015688631673966536"); + minus_test ("0.0000000075454081720580498999564801", "-6133333234722476.50731423128929112324554345104797981", "6133333234722476.50731423883469929530359335100445991"); + minus_test ("0.0000000000001748707964040132704465271", "0.0014559085438085897564402233344521317116113630490391191639", "-0.0014559085436337189600362100640056046116113630490391191639"); + minus_test ("169.5777437575868731193679671977293144862017912", "171384684233482289557.248837", "-171384684233482289387.6710932424131268806320328022706855137982088"); + minus_test ("0.000000000000000963994117406293262728543", "10931977.50377877", "-10931977.503778769999999036005882593706737271457"); + minus_test ("-0.0000000000000004943772275105155307931235866139", "-6331812416762098838522", "6.3318124167620988385219999999999999995056227724894844692068764133861e+21"); + minus_test ("551506392806.03421875426724909838", "1494156988342161962977365.44", "-1.49415698834161045658455940578124573275090162e+24"); + minus_test ("-35954803866862.46955421251697497767880", "-96620255925.814702354", "-35858183610936.6548518585169749776788"); + minus_test ("-8973170535214416154002860437001664", "8701360172863868015378154133091486710755411398837050.58411296", "-8.70136017286386802435132466830590286475827183583871458411296e+51"); + minus_test ("369.0854266274373143948330319405738975782757717917", "0", "369.0854266274373143948330319405738975782757717917"); + minus_test ("4130252362617611707187141280611348999706", "-120506138511555615072992404.1670872857058427291541946", "4.1302523626177322133256528362264219921101670872857058427291541946e+39"); + minus_test ("0.00000000000000000129518837", "-43970554119955228415415630801336595257.433109069593", "4.397055411995522841541563080133659525743310906959300000129518837e+37"); + minus_test ("-199832949667155587976206363450860330500926252.4790", "88697015896564.601775678484183991355335780830", "-1.9983294966715558797620636345094902751682281708077567848418399135533578083e+44"); + minus_test ("-3", "-94608429043423790061", "94608429043423790058"); + minus_test ("5914252851", "-32833159514298.717701562542", "32839073767149.717701562542"); + minus_test ("0.00000000000000000062135622742614277", "-934153618.26014440731275", "934153618.26014440731275000062135622742614277"); + minus_test ("-414018564163156440", "82550425859087829706198633745536278044153640.5895796189250", "-8.2550425859087829706198634159554842207310080589579618925e+43"); + minus_test ("-1496454100585258488602.0286", "0.000000000109895026640912465560937708538864597016913853723419507", "-1.496454100585258488602028600000109895026640912465560937708538864597016913853723419507e+21"); + minus_test ("-1341525946245998", "193723560793329369351971060", "-1.93723560794670895298217058e+26"); + minus_test ("0.000000000000004972247161753329501987430882626554770098611002363504786", "-0.02206405830101097017174889990515767580456922875023374", "0.022064058301015942418910653234659663235451855305003838611002363504786"); + minus_test ("759412612479446413", "-0.001641148192720654679893469509982581527584330378", "759412612479446413.001641148192720654679893469509982581527584330378"); + minus_test ("202578904.71133021395689295350439448588680928447617886", "-35337424341284.346281238517", "35337626920189.05761145247389295350439448588680928447617886"); + minus_test ("10862970759795016587884612569718575353781870555253901512816", "-214.533", "1.0862970759795016587884612569718575353781870555253901513030533e+58"); + minus_test ("-0.00000000000000040285962950086", "-216829085197233503.866070375365413688040", "216829085197233503.86607037536541328518037049914"); + minus_test ("550250782173491663208128526734.569", "-0.000000000100710017655581949422409688681756709469258865537626639492015", "5.50250782173491663208128526734569000000100710017655581949422409688681756709469258865537626639492015e+29"); + minus_test ("-19678891452829871158.36095", "1040.72243146362968914160338864", "-19678891452829872199.08338146362968914160338864"); + minus_test ("-20972447940296172836322634.7", "0.00000000000000150351", "-2.097244794029617283632263470000000000000150351e+25"); + minus_test ("-135716917862073377635780105702430442287902.2441615427680", "-156170394359696385001989148011019228708", "-1.35560747467713681250778116554419423059194244161542768e+41"); + minus_test ("249073042918039345", "758712100158049101656321168.88542968", "-7.5871209990897605873828182388542968e+26"); + minus_test ("9228932554571685674.6101721970", "93.5210831751023", "9228932554571685581.0890890218977"); + minus_test ("0", "-3271.372", "3271.372"); + minus_test ("712617017414340344456425371594378983", "-7013575085098427106742320.320014442", "7.12617017421353919541523798701121303320014442e+35"); + minus_test ("0.00000000000000991278822903249", "-266685953910734027663766948621954.4074654249748", "2.6668595391073402766376694862195440746542497480991278822903249e+32"); + minus_test ("-0.00001168408090912846185222706894568927004955366630406", "-0.00000357928456", "-0.00000810479634912846185222706894568927004955366630406"); + minus_test ("-0.0000000000000000001077428", "-18065.9571", "18065.9570999999999999998922572"); + minus_test ("-26767075956743559361260276966383.60643853154", "9.811418917439919669145337064909359580107696", "-2.6767075956743559361260276966393417857448979919669145337064909359580107696e+31"); + minus_test ("-94992614046521719511194550871785575096581461042589", "-7.24", "-9.499261404652171951119455087178557509658146104258176e+49"); + minus_test ("249.84717238354744614", "-58760885296179353551418799.1637574", "5.876088529617935355141904901092978354744614e+25"); + minus_test ("0.190077788951733727544", "3029470118670840", "-3029470118670839.809922211048266272456"); + minus_test ("-535577308373493988698.28", "-0.00000000000000000001223589264699363887684193", "-535577308373493988698.27999999999999999998776410735300636112315807"); + minus_test ("17330374908582279821881.6419631817630053975265540001599", "51572037568522929067270779857332002426120", "-5.15720375685229290499404049487497226042383580368182369946024734459998401e+40"); + minus_test ("2620791577.5388", "-429.387", "2620792006.9258"); + minus_test ("24955342165062415125441804.9102804783908687387110", "-894.26", "2.4955342165062415125442699170280478390868738711e+25"); + minus_test ("-30.966199737786598010412005660223057114288056999548471748", "7554891.786144582480621940890219161695392942927639518", "-7554922.752344320267219951302224821918450057215696517548471748"); + minus_test ("1.1132", "33358298757744778319077792505.510848143559223", "-3.3358298757744778319077792504397648143559223e+28"); + minus_test ("-71806617.15", "5002475659678496285425142082140754487", "-5.00247565967849628542514208221256110415e+36"); + minus_test ("-64642.3969", "-45742744308293235253.79", "45742744308293170611.3931"); + minus_test ("0.000000000000000005061114767099631770343151056312", "-0.1380692319876694309061865652400348112805369059470451819398816", "0.1380692319876694359673013323396665816236879622590451819398816"); + minus_test ("1104962688677222230.43026613036133967074026481598059", "65279233245714944288887", "-6.527812828302626706665656973386963866032925973518401941e+22"); + minus_test ("-244.20751029974608088458301628723627482919450688930317756", "-10.309887906765666581", "-233.89762239298041430358301628723627482919450688930317756"); + minus_test ("-374204737.17485473467771059091311676198780910101246261", "-1772169195775224156804629688653654033.48913943457", "1.77216919577522415680462968827944929631428469989228940908688323801219089898753739e+36"); + minus_test ("0.0000825267296819574292144866422", "0.000000024644261884116746400488936364031", "0.000082502085420073312468086153263635969"); + minus_test ("-337528893876584865851246910311878729078289", "-181706307425668740481.5172", "-3.375288938765848658510652040044530603378074828e+41"); + minus_test ("338.68219932619", "36769458628.200", "-36769458289.51780067381"); + minus_test ("946213.052924553279580429320", "0.0000000000000000000164588680615834011158188287840390933880557701437361142926", "946213.0529245532795804293035411319384165988841811712159609066119442298562638857074"); + minus_test ("-2", "-1595717583274440094311744086944287786728005322", "1.59571758327444009431174408694428778672800532e+45"); + minus_test ("17453173.964073494242189989440985005742212919109806776575", "-14.66", "17453188.624073494242189989440985005742212919109806776575"); + minus_test ("9035579398295.9420488582066606273524126698350184209", "966939914253463733672441.61004035647", "-9.669399142444281542741456679914982633393726475873301649815791e+23"); + minus_test ("7", "-27403953633424153.2922529596537493", "27403953633424160.2922529596537493"); + minus_test ("-0.00000000000000000065661940373886034771780807724464", "23789019501708804655829.7720420134937860512", "-2.378901950170880465582977204201349378605185661940373886034771780807724464e+22"); + minus_test ("-379831", "1792454931672118909115.7219790011", "-1.7924549316721192889467219790011e+21"); + minus_test ("-6815476482314.81368548838834442636132177246866027753", "-23737403998114260637862634", "2.373740399810744516138031918631451161165557363867822753133972247e+25"); + minus_test ("-277091361.834", "1255049423087969154842.0583316773528577200623", "-1.2550494230882462462038923316773528577200623e+21"); + minus_test ("0.000527964207481201439802251215793030527669347056468169977214382", "1104312503520806883476040.604659402909367", "-1.104312503520806883476040604131438701885798560197748784206969472330652943531830022785618e+24"); + minus_test ("416.19049862551799054889649850446495", "25962521611212.630583656", "-25962521610796.44008503048200945110350149553505"); + minus_test ("-2", "0.00000023172759362622993578493256103424786936904115653889542088", "-2.00000023172759362622993578493256103424786936904115653889542088"); + minus_test ("2322661483960492703.7985297249359258447971802752303052984194", "-0.00285627578605593051554020854314614896", "2322661483960492703.8013860007219817753127204837734514473794"); + minus_test ("-50114375544024117743137634.7132631195193", "-4518136285230626801", "-5.01143710258878325125108337132631195193e+25"); + minus_test ("491790857283052164040388091239524266252647468540.602280", "0.0000000000000000002505634", "4.917908572830521640403880912395242662526474685406022799999999999997494366e+47"); + minus_test ("223757557.31976336704487143430860", "-30.36327", "223757587.6830333670448714343086"); + minus_test ("2266.004651", "-0.0000005867989135639875708", "2266.0046515867989135639875708"); + minus_test ("6958762418946097.285", "8704860092930499346311.824744308693", "-8.704853134168080400214539744308693e+21"); + minus_test ("-0.0000000000008758100333932644717298947984578724622849096677225", "-310962285610.30017170574463655670078", "310962285610.3001717057437607466673867355282701052015421275377150903322775"); + minus_test ("3654335458448.908519039918424", "-1017862207107897070244694254273184418309706541.32954379163", "1.017862207107897070244694254273188072645164990238062831548424e+45"); + minus_test ("0.000000028485591", "0", "2.8485591e-8"); + minus_test ("5073947900606220328306097118306928028865584", "-0.0000610672338767500", "5.07394790060622032830609711830692802886558400006106723387675e+42"); + minus_test ("184963915.618593586643741543203", "-1677.631219", "184965593.249812586643741543203"); + minus_test ("396871997862363101002483892.26", "-0.0000000000000000066839646413390330134202944396013877478232108451615", "3.968719978623631010024838922600000000000000066839646413390330134202944396013877478232108451615e+26"); + minus_test ("-0.001443", "-0.0000000000001480307586020440332395145414988692178570219362536734359922", "-0.0014429999998519692413979559667604854585011307821429780637463265640078"); + minus_test ("5173379226320319729203764178125730829947033.85", "16568260.329616", "5.173379226320319729203764178125730813378773520384e+42"); + minus_test ("-378684740425288590329.865832078814181361689411770555828033", "21039423253539461585612290662", "-2.1039423632224202010900880991865832078814181361689411770555828033e+28"); + minus_test ("-143411025.19904252040830704437889996439197644180", "0", "-143411025.1990425204083070443788999643919764418"); + minus_test ("-3971034326547", "-0.000000000000001192201124343158918732899783", "-3971034326546.999999999999998807798875656841081267100217"); + minus_test ("-1957074390.30", "-785.9373", "-1957073604.3627"); + minus_test ("11798157981084854910522713.726423390731883", "0.00000000000000000794673726058684351969247016507", "1.179815798108485491052271372642339073188299205326273941315648030752983493e+25"); + minus_test ("0", "63718006.533955912499520687", "-63718006.533955912499520687"); + minus_test ("-106057718559494874723085290836.38939560519223757224643923", "68938204335.59", "-1.0605771855949487479202349517197939560519223757224643923e+29"); + minus_test ("765027217313815006", "160135.21207763126955482", "765027217313654870.78792236873044518"); + minus_test ("-821923031708250104665643576287477708843314087.882590093", "-3990962158191136912693.079142196669532", "-8.21923031708250104665639585325319517706401394803447896330468e+44"); + minus_test ("0.00509812696199828345610871074161", "696247014515864996317842", "-6.9624701451586499631784199490187303800171654389128925839e+23"); + minus_test ("29732795045547659.0996914254", "-51709086127799933076710172937271558434987133.720", "5.17090861277999330767101729670043534805347928196914254e+43"); + minus_test ("-16286.209377407275812137531392451949", "0.00000000000000000022372394617291", "-16286.20937740727581213775511639812191"); + minus_test ("-1375253307827927096349134575050603.94211767852698652", "905513058712.3724033", "-1.37525330782792709635004008810931631452097852698652e+33"); + minus_test ("6307.78968779279695539093771472627844783336", "-0.00002778260088313361218945039359426278958850789168", "6307.78971557539783852454990417667204209614958850789168"); + minus_test ("-1251971126793648464770.62302133464300", "4108332118551588855518884176084", "-4.108332119803559982312532640854623021334643e+30"); + minus_test ("796875815810006347157872416846682346.70724147", "-26887.93843", "7.9687581581000634715787241684670923464567147e+35"); + minus_test ("503761901876.1", "-0.00000058591916804106576202", "503761901876.10000058591916804106576202"); + minus_test ("-0.0000144343551936630598170853542", "0.00000000000000001330848692526361142604488661622", "-0.00001443435519367636830401061781142604488661622"); + minus_test ("333807319855762444667280144179919.21709315488049995404", "3710.87428669634", "3.3380731985576244466728014417620834280645854049995404e+32"); + minus_test ("0.000000000000007381560468758912676992936863885310325961189", "5277874186685074734.78128632893251930850699235193165881271", "-5277874186685074734.781286328932511926946523593018981819773136114689674038811"); + minus_test ("0.002045907391481002055126364741722746123920492354", "-134940106198957372161636571.3843066120486149838380841998784", "1.34940106198957372161636571386352519440095985893210564620122746123920492354e+26"); + minus_test ("-30130112088.993827003962835076", "188322529121371266385077234579252182224.5691709790", "-1.88322529121371266385077234609382294313562997982962835076e+38"); + minus_test ("-3", "-8324641628446525083548695251230914153428", "8.324641628446525083548695251230914153425e+39"); + minus_test ("0.00018606293964295302172654549272224527271134692398", "-282281050085963.9114203115670420384745855159215452", "282281050085963.91160637450668499149631206141426744527271134692398"); + minus_test ("-16333583942997041272867370326132870504131195981.4696057800513", "45720082683202081441524403533698410.5545453845767", "-1.6333583943042761355550572407574394907664894392024151164628e+46"); + minus_test ("279328203.5", "-5825567.71080931239385137020833", "285153771.21080931239385137020833"); + minus_test ("-269224.94927224666095", "0.0000000000000000003064416316790457", "-269224.9492722466609500003064416316790457"); + minus_test ("6744812299069336942789392301581837129883725551922493.40", "-5703915992.9167440851668499293951029", "6.7448122990693369427893923015818371298837312558384863167440851668499293951029e+51"); + minus_test ("-0.000000000000000066706723472682", "-145217233354840.9452974499221403003294897671707915", "145217233354840.9452974499221402336227662944887915"); + minus_test ("8627053077274630737609487236548.4979774", "11.791146312838460410035604930189", "8.627053077274630737609487236536706831087161539589964395069811e+30"); + minus_test ("-0.01202422952668513636643178716923354493558618790", "-0.4635434098404790609527188243911111255589856688195077910287", "0.4515191803137939245862870372218775806233994809195077910287"); + minus_test ("-22486311958570.75", "136623992244353739977111844218335966565067420559172408797", "-1.3662399224435373997711184421833596656506744304548436736775e+56"); + minus_test ("-252554701524493.902565999316640", "0", "-252554701524493.90256599931664"); + minus_test ("0.00000000010355292", "-13318465915882548061708659853990135442387095003099676083", "1.331846591588254806170865985399013544238709500309967608300000000010355292e+55"); + minus_test ("0.000000000000003588941991478575635246817587941", "5787662416433534641981775919801763640029.288211579210799", "-5.787662416433534641981775919801763640029288211579210795411058008521424364753182412059e+39"); + minus_test ("3803854629.170758287238", "722557244.90221176531910610529831590", "3081297384.2685465219188938947016841"); + minus_test ("-4035292286478852880912536818781650501388972481375613031", "7023934966.329481438434165", "-4.035292286478852880912536818781650501388972488399547997329481438434165e+54"); + minus_test ("0", "-4651.5712076", "4651.5712076"); + minus_test ("943569.4471", "368852398555888115298707.33698897234448443580026", "-3.6885239855588811435513788988897234448443580026e+23"); + minus_test ("-7688139997698910283021899776208658703126", "-3014.021539", "-7.688139997698910283021899776208658700111978461e+39"); + minus_test ("-76014.328438738930802423876495451104480710964006", "0.16299839827610198847716746", "-76014.491437137206904412353662911104480710964006"); + minus_test ("425793955", "236826394", "188967561"); + minus_test ("1912.281988", "112194.49296301061246", "-110282.21097501061246"); + minus_test ("-5003494177.4861", "-1.82", "-5003494175.6661"); + minus_test ("7617479678.376905694802432279901930587745665869", "-947377.04", "7618427055.416905694802432279901930587745665869"); + minus_test ("367903789829906246.71158889842", "21491233153686072381957715968967883669600234520102964736911", "-2.149123315368607238195771596896788366959986661631313483066428841110158e+58"); + minus_test ("-6397756530845969250791946194979007883084.20444410377877774", "-2", "-6.39775653084596925079194619497900788308220444410377877774e+39"); + minus_test ("-75490132843212222631302495635041908895.42", "121330908238673", "-7.549013284321222263130261696595014756842e+37"); + minus_test ("7452613620257648176992750760.263566991938225", "519063023319381552888", "7.452613101194624857611197872263566991938225e+27"); + minus_test ("0.00000000000000778133736110171456441934891601883471609303002832912018885", "322394945530.295120804275213239014033", "-322394945530.29512080427520545767667189828543558065108398116528390696997167087981115"); + minus_test ("-8453.41542", "-92872449307.96646595226774421156553041473428714203142", "92872440854.55104595226774421156553041473428714203142"); + minus_test ("4184618260709992776470144081019630641.9546", "-39747088643178.4900618612667154842919288568428", "4.1846182607099927764701838281082738204446618612667154842919288568428e+36"); + minus_test ("-1002876199682238092689386871396", "-115235.191932983", "-1.002876199682238092689386756160808067017e+30"); + minus_test ("-0.0000020", "-67044918017341867873741", "6.7044918017341867873740999998e+22"); + minus_test ("19249573172273106187.51981325183516777379", "-0.0000036330230998383752637622876226209213994133789721626367167406", "19249573172273106187.5198168848582676121652637622876226209213994133789721626367167406"); + minus_test ("2367.8562797376185225678048", "-336.407580836131941", "2704.2638605737504635678048"); + minus_test ("15788198606260330370566880001150524384989538847.1566", "-13709725199190579602641841302109970817776478707296", "1.37255133977968399330124081821111213421614682461431566e+49"); + minus_test ("-0.000031568319907", "-319812227.101518430949692784775684487114739", "319812227.101486862629785784775684487114739"); + minus_test ("12598796115", "780974770970176277984213873835856961457.264132549460821743", "-7.80974770970176277984213873823258165342264132549460821743e+38"); + minus_test ("-12.05916350311631637603038624139252323932639510735991686", "-5079694354454213499772.98021638032478529", "5.07969435445421349976092105287720846891396961375860747676067360489264008314e+21"); + minus_test ("71001042332266", "-3.8749502633208489001742955080741839268852411926", "71001042332269.8749502633208489001742955080741839268852411926"); + minus_test ("-820079175.6236", "2602133034534013517476745071429", "-2.6021330345340135174775651506046236e+30"); + minus_test ("-0.05761", "-39324478925.37411997", "39324478925.31650997"); + minus_test ("-62331428327357976057401629977344374544913756472193", "5", "-6.2331428327357976057401629977344374544913756472198e+49"); + minus_test ("0.0000000079919621468803275713173314506", "-858.3109258585612540534304739091057092569004843368", "858.3109258665532162003108014804230407075004843368"); + minus_test ("0", "49228741196127252", "-49228741196127252"); + minus_test ("-0.000034775952537402974515789650718361816884555", "-81545435078.9081293428693463384918512495662737197672903499", "81545435078.9080945669168089355173354599155553579504057949"); + minus_test ("16831812489134711005.277009209496663", "-2711976951712313.504224327994229016719141489", "16834524466086423318.781233537490892016719141489"); + minus_test ("-14.478", "-7657287359215.379", "7657287359200.901"); + minus_test ("-5818291298159242639134804410045447574555164535.312859", "-2.318", "-5.818291298159242639134804410045447574555164532994859e+45"); + minus_test ("-0.00000000000000000538849432020724", "-0.00000000000043292954381309", "4.3292415531876979276e-13"); + minus_test ("129925455598327874.011965", "-373481502322636.54947846", "130298937100650510.56144346"); + minus_test ("23460218954598.255822499367", "5031071127.77603001713489698449235", "23455187883470.47979248223210301550765"); + minus_test ("0.1925927960745748035942288444958429531342391265261594074", "0.000000000001459509170829311723098341575950975186409687619", "0.192592796073115294423399532772744611558288151339749719781"); + minus_test ("-117656959944939983221909881756492.60506693656", "614774667011953263151051375859904824607146.03088402", "-6.1477466712961022309599135908181470636363863595095656e+41"); + minus_test ("4636798651708977942823954.838902837557757807933209543802058", "90429847774248975608629.657240991460781465643663", "4.546368803934728967215325181661846096976342289546543802058e+24"); + minus_test ("-8547.67216", "695927494328.0531238602508437", "-695927502875.7252838602508437"); + minus_test ("0.000000000000000000014395480531584764422752572199140185540212150740674066683", "0.00000000000000000165514253473158542904", "-1.640747054200000664617247427800859814459787849259325933317e-18"); + minus_test ("-14004821946.12197759187", "504302757065358604146449888186847067296187319675184252.5", "-5.0430275706535860414644988818684706729618733368000619862197759187e+53"); + minus_test ("0.00020661761959205061422959604052997905", "5983723321093859965577864973.03971707767767374", "-5.98372332109385996557786497303951046005808168938577040395947002095e+27"); + minus_test ("46.214922256501145", "-19450859033.49527912435693482", "19450859079.71020138085807982"); + minus_test ("607064966949689390411116362805267199510935776380", "-326141246118.898400528715804016912422852185420861463709", "6.07064966949689390411116362805267199837077022498898400528715804016912422852185420861463709e+47"); + minus_test ("7237360928.529978130333768130950", "52337694872297307366400191176848518321.9397556503425061", "-5.233769487229730736640019116961115739340977752000873796905e+37"); + minus_test ("-8.77", "0.00000250309032382179368", "-8.77000250309032382179368"); + minus_test ("2238967687307501052.8777593247573250304131289359965647930", "0.0000000006178212737146909670918694", "2238967687307501052.877759324139503756698437968904695393"); + minus_test ("4800872.6343266910471003503", "-43.630262", "4800916.2645886910471003503"); + minus_test ("6647.98125718514930441819193526467280173179366", "-4671450984642064474363.0922986578251558474619141444116721601", "4.67145098464206448101107355584297446026565384940908447389189366e+21"); + minus_test ("5213460994088.42423086209586241417259053025217796299975798215", "-4383637172725.279", "9597098166813.70323086209586241417259053025217796299975798215"); + minus_test ("-3.853", "20.661", "-24.514"); + minus_test ("-14271230745287310945.6312400262684102", "0.00000029645344606", "-14271230745287310945.63124032272185626"); + minus_test ("0.00000000032289911998", "92366796259.63491126551", "-92366796259.63491126518710088002"); + minus_test ("0.0000366129951186090146374619139990790117703732293398409315027110", "37573094701656757193581695.06285323469", "-3.7573094701656757193581695062816621694881390985362538086000920988229626770660159068497289e+25"); + minus_test ("-0.5052577098964168325539487540838485290578969474", "-2.469847", "1.9645892901035831674460512459161514709421030526"); + minus_test ("4157486.219788", "-0.000000000000000030", "4157486.21978800000000003"); + minus_test ("-18128173766.45100920958", "0.0000000270000492658439841803", "-18128173766.4510092365800492658439841803"); + minus_test ("0.00000011629092179596057280755013975516", "-21061915294588585007285269886442442.89790253758527", "2.106191529458858500728526988644244289790265387619179596057280755013975516e+34"); + minus_test ("1628917.78", "-21383191736538.31532452805283554", "21383193365456.09532452805283554"); + minus_test ("1559380098949430706272504015810.69555717100498119630529074", "165173284.748129", "1.55938009894943070627233884252594742817100498119630529074e+30"); + minus_test ("36374023831462155387508503692769818148680320937241486", "-1.031827911563637271237851439355833437004912", "3.6374023831462155387508503692769818148680320937241487031827911563637271237851439355833437004912e+52"); + minus_test ("4.8081", "0.0003519196291075952295892328224194785771237221553", "4.8077480803708924047704107671775805214228762778447"); + minus_test ("-3782511514044035022728785099618757257160775562240791309177", "-0.000000000000795400939", "-3.782511514044035022728785099618757257160775562240791309176999999999999204599061e+57"); + minus_test ("-0.00005330668607181480434", "71992567276897950313737317415196.7780236926093645024753", "-7.199256727689795031373731741519677807699929543631727964e+31"); + minus_test ("-336.6", "0.000000127038712398089934486863716910205972688100425270367714213640", "-336.60000012703871239808993448686371691020597268810042527036771421364"); + minus_test ("0.000000002105290992087417133622746", "534450465748570290833221890995266975.81084848298", "-5.34450465748570290833221890995266975810848480874709007912582866377254e+35"); + minus_test ("364174039086712731", "1199801.7839398845629477125742176401101168032886363303997296", "364174039085512929.2160601154370522874257823598898831967113636696002704"); + minus_test ("53877990578308734625625639885060125168528280779536508786", "103516583128.45068629304281452459340", "5.38779905783087346256256398850601251685282806760199256575493137069571854754066e+55"); + minus_test ("3.754616214", "-371.3860189917370620745548727151697481689878945779565644", "375.1406352057370620745548727151697481689878945779565644"); + minus_test ("-437926015567097757255992979555892654.76", "-176655130153455.0051", "-4.379260155670977572558163244257391997549e+35"); + minus_test ("-0.1515104603550", "4834028992891471292.78", "-4834028992891471292.931510460355"); + minus_test ("2.585364", "23561717378268.26567934", "-23561717378265.68031534"); + minus_test ("-0.00000091447444444639", "-14131860317888699752291325342793026389759140", "1.413186031788869975229132534279302638975913999999908552555555361e+43"); + minus_test ("-16752710965652120653891175893", "2680897440943339017130745026.27310", "-1.94336084065954596710219209192731e+28"); + minus_test ("-7690583538728476436923091784910770916580375622563360.6", "4501948.1501019307848784354357334781717072047589062130609366", "-7.6905835387284764369230917849107709165803756270653087501019307848784354357334781717072047589062130609366e+51"); + minus_test ("-210025330495963043.1263117974098", "4.0408", "-210025330495963047.1671117974098"); + minus_test ("0.000000000000000479418012427570596658200595436786", "-0.000000049076192452", "4.9076192931418012427570596658200595436786e-8"); + minus_test ("-4960517.52677", "-0.20046636670669982714317739081794719428221226519297075795", "-4960517.32630363329330017285682260918205280571778773480702924205"); + minus_test ("0.00000000000000288393352959940194003685227429", "-8.192356703062703306084975083202", "8.19235670306270619001850468260394003685227429"); + minus_test ("-0.000000028227155496211712", "-0.056083781", "0.056083752772844503788288"); + minus_test ("-839454439636.987095", "775436321034387281261238203040959529197645939448222.14142187", "-7.7543632103438728126123820304095952919848539388785912851687e+50"); + minus_test ("0", "0.002509727311267980178283", "-0.002509727311267980178283"); + minus_test ("138194000652491447330479606912366232", "51353410500300307.8188174125", "1.381940006524914472791261964120659241811825875e+35"); + minus_test ("-0.0000086433365715041098678710807336961726259747239597811694878263", "-145268834.890490551072993367", "145268834.8904819077364218628901321289192663038273740252760402188305121737"); + minus_test ("19818.037591821397251595707488", "-14488431569410083120931256684496228387192907.10558580383653", "1.4488431569410083120931256684496228387212725143177625233781595707488e+43"); + minus_test ("-18346363094160301954515801173824097.520003457764168574", "-132648009061.542335857", "-1.8346363094160301954515668525815035977667600764168574e+34"); + minus_test ("0.000000097667699203314068161184", "-350287455.727299", "350287455.727299097667699203314068161184"); + minus_test ("15800829403166795.5956516579102376267581193644", "29.54785", "15800829403166766.0478016579102376267581193644"); + minus_test ("-195433133492107651439595.4648774", "135838131242484112792610949874.2647657738877701854426", "-1.358383266756176049002623894697296431738877701854426e+29"); + minus_test ("-2", "-331826679660519916423352740752709.621460214", "3.31826679660519916423352740752707621460214e+32"); + minus_test ("412805093083.82448845946357429243448308860021150924", "-4809048739065577.4431952808766327302", "4809461544158661.26768374034020702263448308860021150924"); + minus_test ("-0.00000000000235767643592123724694037105632168276114465", "-631328471724074335984942302107.380800425094037515623490", "6.3132847172407433598494230210738080042509167983918756876275305962894367831723885535e+29"); + minus_test ("-0.00000000000000220460849133312061988", "-323463691145097046132093042761677037355966973.1622930610540", "3.2346369114509704613209304276167703735596697316229306105399779539150866687938012e+44"); + minus_test ("-253226218107370.687861922377273342910306", "-52546031966435521927925716976", "5.2546031966435268701707609605312138077622726657089694e+28"); + minus_test ("-148850237194.787856", "1335742711780796103930791.895449687698338781835275", "-1.335742711780944954167986683305687698338781835275e+24"); + minus_test ("3481814465412.29117434619146758762840", "57.076809325489408713318479840", "3481814465355.21436502070205887430992016"); + minus_test ("-15060251059.6808167001235294317015914788204", "-0.00000000000523357091851957064551", "-15060251059.68081670011829586078307190817489"); + minus_test ("29418890050482267.571", "1512904619571947700639.092531808891009", "-1.512875200681897218371521531808891009e+21"); + minus_test ("-142805667193382230472426114.689990961689308909", "-519593843130556.62290843106349543226083561151272", "-1.4280566719286263662929555806708253062581347673916438848728e+26"); + minus_test ("-358638707277120721995733548.388859943630638806306978", "-12.513", "-3.58638707277120721995733535875859943630638806306978e+26"); + minus_test ("-0.000000000957413518520", "154616552.5166", "-154616552.51660000095741351852"); + minus_test ("0.0000000000001317378310642388269736805357842209597616683098", "-379.8345851707018360080", "379.8345851707019677458310642388269736805357842209597616683098"); + minus_test ("1372405.3778516179192341", "0.000000000000002163", "1372405.377851617919231937"); + minus_test ("61969275419603.4874854962928918", "5690625807302485253835751613390387468762288135", "-5.6906258073024852538357516133903254994868685315125145037071082e+45"); + minus_test ("0.000000000000000000034542917777656343403295447877924", "-61797209717624749784326365240476675880321846180162004605.08", "6.1797209717624749784326365240476675880321846180162004605080000000000000000034542917777656343403295447877924e+55"); + minus_test ("149340986382607394618252", "-348422861056802876633.244173070463082440851567934244", "1.49689409243664197494885244173070463082440851567934244e+23"); + minus_test ("21.0305752637461994", "-0.00000000000000000018", "21.03057526374619940018"); + minus_test ("0.000000000000245763391729127989068640916678750088674", "3273.6525", "-3273.652499999999754236608270872010931359083321249911326"); + minus_test ("8345432957379892013764872946202.3591286636257", "775586.72252749606", "8.3454329573798920137648721706156366011675657e+30"); + minus_test ("0.0000000009480848572374298346871921803725380637", "0.00000000000000911217413808095850740763197861728244451", "9.4807574506329175372868477274055944641755549e-10"); + minus_test ("70880626.4544855056079364096562061524443476869494980365", "89384389228261065.70802344171649", "-89384389157380439.2535379361085535903437938475556523130505019635"); + minus_test ("0.000000045482894532333129301508476587210437088400596510400692048", "24.795178", "-24.795177954517105467666870698491523412789562911599403489599307952"); + minus_test ("12.868", "-781064.3974167751464737017896493722545380625", "781077.2654167751464737017896493722545380625"); + minus_test ("25861.13776", "-13581866495119551449671.4104186135980", "1.3581866495119551475532548178613598e+22"); + minus_test ("0.0000000279851374783866294881264604138618", "0", "2.79851374783866294881264604138618e-8"); + minus_test ("0.00000000000023206437663193708130977441410825096207", "0.000000000000000000425087532539980230979512", "2.3206395154440454132954343459625096207e-13"); + minus_test ("-0.0000000000000009639012508328042527698", "-81245998951741764.163321", "81245998951741764.1633209999999990360987491671957472302"); + minus_test ("144172855150098.8332813431897919012738325392504726164868382730", "0.00000000000000673875", "144172855150098.833281343189785162523832539250472616486838273"); + minus_test ("85529799866102780989277206081042484508661294846.1678649", "0.000000006974145550375375", "8.5529799866102780989277206081042484508661294846167864893025854449624625e+46"); + minus_test ("0.000000000000000000012367964247205144574", "-24.9923163", "24.992316300000000000012367964247205144574"); + minus_test ("-44089358978.731833149676054401997", "-3455102051335455388472971892.2931", "3.455102051335455344383612913561266850323945598003e+27"); + minus_test ("2736316.76004751504759105989955248293683757", "8624.126564458951823396869380153", "2727692.63348305609576766303017232993683757"); + minus_test ("-7512235696480.75815974687820", "4322425432060440.112621890781", "-4329937667756920.8707816376592"); + minus_test ("1041115705901246425717958893168", "192120533687402856766617056619385", "-1.91079417981501610340899097726217e+32"); + minus_test ("0", "2999934433827046995221465.734220582881837016702755103103369", "-2.999934433827046995221465734220582881837016702755103103369e+24"); + minus_test ("9132760.7806176704193036626898196556957735479237133471", "-22308955.789058912", "31441716.5696765824193036626898196556957735479237133471"); + minus_test ("3", "2510378.8302", "-2510375.8302"); + minus_test ("-601681273.341517", "0.000000241648614891714420578", "-601681273.341517241648614891714420578"); + minus_test ("7267886123144958232.238682838203", "6452575385170169.8619732325801597156212862621827", "7261433547759788062.3767096056228402843787137378173"); + minus_test ("1078231543180", "-48380974651269509996197011777331635750068803914.42093022312", "4.838097465126950999619701177733163682830034709442093022312e+46"); + minus_test ("-1565742468.40376463", "0.0000000000010050045763134196571949420320006727965700414589703", "-1565742468.4037646300010050045763134196571949420320006727965700414589703"); + minus_test ("-38.8392135498095373389405034839742338375432749653", "0.0000000000002005139891413163385623", "-38.8392135498097378529296448003127961375432749653"); + minus_test ("-548507159746966309439370232114407604859278960168.292101", "199162629302104211276079352651591547730479754027.137688159010", "-7.4766978904907052071544958476599915258975871419542978915901e+47"); + minus_test ("-133758998429281991365.53", "66349112060274991956125.55718817444465", "-6.648287105870427394749108718817444465e+22"); + minus_test ("-39898963484560669919956991873123027250358.023847", "473431260689632044598244688486253.757", "-3.9898963957991930609589036471367715736611780847e+40"); + minus_test ("0.000000048220620061585093302526746146", "11163285812734658091858.1", "-1.1163285812734658091858099999951779379938414906697473253854e+22"); + minus_test ("122477777.735604874", "1468489954", "-1346012176.264395126"); + minus_test ("9276934317177450323278091141313420338701", "0.00000000001807544083251601944163916296938991", "9.27693431717745032327809114131342033870099999999998192455916748398055836083703061009e+39"); + minus_test ("-726473085520805.68375", "-0.00000123946378123648562805", "-726473085520805.68374876053621876351437195"); + minus_test ("-862282453600744233837865549353.0199427", "-778120.1206481", "-8.622824536007442338378647712328992946e+29"); + minus_test ("181724674499441806352104852243619274064166.468709530648193", "87301023839580890632.74008889", "1.81724674499441806352017551219779693173533728620640648193e+41"); + minus_test ("6267361382130301.64571563169641350047", "-26946623311829959264900239615329966386.978158853097020829667", "2.6946623311829959264906506976712096688623874484793434330137e+37"); + minus_test ("9277033429827", "-11814312598907199463437424804147161225245724986.3549313", "1.18143125989071994634374248041471705022791548133549313e+46"); + minus_test ("0.00000000000000002212994406752", "506633182883598094135216", "-5.0663318288359809413521599999999999999997787005593248e+23"); + minus_test ("-1416.8382390011", "-616915584637554", "616915584636137.1617609989"); + minus_test ("173.67513129697677560331958844251459", "1761111548897687055316514264676906704871", "-1.76111154889768705531651426467690670469732486870302322439668041155748541e+39"); + minus_test ("-67316184421669659743.09478", "-247379520759715899369976143088432782692.1213428655", "2.473795207597158993026599586667631229490265628655e+38"); + minus_test ("-754359424425.325316286", "0.0000000000583", "-754359424425.3253162860583"); + minus_test ("-10745411.84893952612941343946024114284555985539357467110", "-2141617925741482283282941658235570196", "2.1416179257414822832829416582248247841510604738705865605397588571544401446064253289e+36"); + minus_test ("0.0000000005131824448956120259143731094456835119548321563889982", "0.0000000000261047578282225790207950702922733665519445636593133768591747", "4.870776870673894468935780391534101454028875927296848231408253e-10"); + minus_test ("0.0004478755432082113312483869192", "0.005599339808981958070363083539134166424719944", "-0.005151464265773746739114696619934166424719944"); + minus_test ("-0.000000000000001512526283647", "-0.0001153048049432909602774", "0.000115304804941778433993753"); + minus_test ("88012539757.9404775939244071255700825395712721930057171", "0.000000000008035455856306225847392238301065068", "88012539757.940477593916371669713776313723879954704652032"); + minus_test ("0.00000000000000000073487390383290696928688042616356700", "-0.0000000000000000019730868218008762078515130641383111305700506367751468707226", "2.7079607256337831771383934903018781305700506367751468707226e-18"); + minus_test ("54733464273.704359284996374313377912882194031", "0.0000000000000066", "54733464273.704359284996367713377912882194031"); + minus_test ("0.000000000000002583138166590499538768478879737734800", "-1493063867598060178500693.39747107", "1.4930638675980601785006933974710700000025831381665904995387684788797377348e+24"); + minus_test ("0.0000000000035", "16749083849855920068346", "-1.67490838498559200683459999999999965e+22"); + minus_test ("-0.000078422658166136557055297306793562873739079876517", "7.9665125435", "-7.966590966158166136557055297306793562873739079876517"); + minus_test ("0.000000000000000004026190822483046169679424015359624776872534298", "-6085341714.088449383656", "6085341714.088449383656000004026190822483046169679424015359624776872534298"); + minus_test ("-5.0471797394110", "-3508848877366497564225222.8325257807827", "3.5088488773664975642252177853460413717e+24"); + minus_test ("-1495955602856711738.322374249597444877184247", "0.00000337196217180", "-1495955602856711738.322377621559616677184247"); + minus_test ("-104.2132489251390", "445169760230242591585531000760.7493281224701823786204109196", "-4.451697602302425915855310008649625770476091823786204109196e+29"); + minus_test ("-11595.7728900", "0.000000077", "-11595.772890077"); + minus_test ("5693501895857569.824083133994650783219625725263527941848014", "38554113375996.91610257332", "5654947782481572.907980560674650783219625725263527941848014"); + minus_test ("-30342286.086738328729", "-0.003035138441", "-30342286.083703190288"); + minus_test ("23.0418", "-21373402684893068914382744570171080639", "2.13734026848930689143827445701710806620418e+37"); + minus_test ("1", "1792759503737685636350819178488081433275948", "-1.792759503737685636350819178488081433275947e+42"); + minus_test ("-38470355434482826491837564169", "-5414067362036587155177091588060858998697264.4", "5.4140673620365486848216571052343671611330954e+42"); + minus_test ("5376267017268469803391742461123.1484717294535169", "-3003564661167.71329437830040953302813675659856575", "5.37626701726846980639530712229086176610775392643302813675659856575e+30"); + minus_test ("242777368241805037089.180775943923462029927", "-0.0000000000102172171156058275649815", "242777368241805037089.1807759439336792470426058275649815"); + minus_test ("-0.00000000000000008656604284642653008106731777826037099", "-6154.026848568460638", "6154.02684856846063791343395715357346991893268222173962901"); + minus_test ("-25.0959689", "0", "-25.0959689"); + minus_test ("4.4106469958140159750720", "-2.7", "7.110646995814015975072"); + minus_test ("-1191115481.24960789843322513194152993", "101480579638.7", "-102671695119.94960789843322513194152993"); + minus_test ("-64335581449382102148651961778", "-13922618962022310.38526581442116512370091", "-6.433558144936817952968993946761473418557883487629909e+28"); + minus_test ("0.000002419556771906375756783331125070178732526767", "-704659820.24047391470481450387646", "704659820.240476334261586410252216783331125070178732526767"); + minus_test ("91086229113018291.85868623557295042563793418491", "-6412976188024708199931810226.6257", "6.41297618811579442904482851848438623557295042563793418491e+27"); + minus_test ("-166376886435906071.671676003286240157545425223534", "-0.000000000000091700715807851859225796752901241413659885", "-166376886435906071.671676003286148456829617371674774203247098758586340115"); + minus_test ("-1604178602185.15391140031008758283", "-0.003382166434467926234482400431856589755224770", "-1604178602185.15052923387561965659551759956814341024477523"); + minus_test ("-1550.5067982", "1755233709470197458.5321953822", "-1755233709470199009.0389935822"); + minus_test ("0.3014", "43133762452399944536671349566322158.93626365", "-4.313376245239994453667134956632215863486365e+34"); + minus_test ("-64.5979", "-0.00000150928436566222094395688472086656530077", "-64.59789849071563433777905604311527913343469923"); + minus_test ("-771717.603678878", "0.0000000000000011883865777330973023055360", "-771717.603678878000001188386577733097302305536"); + minus_test ("0.0000066980807778368470000446256117729524345121272595145987", "-32254507023.88915752082", "32254507023.8891642189007778368470000446256117729524345121272595145987"); + minus_test ("-3.896651617783010917182197706278524524091", "-234356.4491086908087268932525516", "234352.552457073025715976070353893721475475909"); + minus_test ("0.000000000000000000365309384905118249080774978958", "-2593982058025640086344149662711100252281819944.0726056015", "2.593982058025640086344149662711100252281819944072605601500000000365309384905118249080774978958e+45"); + minus_test ("-807268846295783.66565769288073589114", "-9279.26445753", "-807268846286504.40120016288073589114"); + minus_test ("-0.000205066477824679946712948821846487595173765417878", "-11856312001.2579", "11856312001.257694933522175320053287051178153512404826234582122"); + minus_test ("21715853560267741681005732.8864129839650731630056482243802", "-26518465662155265718064844202342", "2.65184873780088259858065252080748864129839650731630056482243802e+31"); + minus_test ("-0.0000000002358578440972167", "214498383035810423", "-214498383035810423.0000000002358578440972167"); + minus_test ("4361467034560145704861429904045767902851.92573820902038", "3.59", "4.36146703456014570486142990404576790284833573820902038e+39"); + minus_test ("-5399354467819638876391446017237518290882302", "-9418844852716336037742898633771821467185538647360652378656.5", "9.4188448527163306383884308141329450757395214098423614963545e+57"); + minus_test ("-0.0000001178659835758080442880526500344288949201205201989828562345873", "3789033099896128122043510040864191.7055425399", "-3.7890330998961281220435100408641917055426577659835758080442880526500344288949201205201989828562345873e+33"); + minus_test ("0.00000000005982976503399938136849324", "0.00000000000075755295405642132036", "5.907221207994296004813324e-11"); + + minus_test ("-421450565450862733739882741263410125987400848651432120569319841269419221990711610801409.8070215252564874", "-243392659607204009035334731041415676417559363520670299047012358737705418584457146.868335409", "-4.214503220582031265358737059286790845717244310920685998990207942570604842852930263442629386861162564874e+86"); + minus_test ("2995340172136827282681082940837304688534605164044247935816574334297096539991453139359346773494887259928780399192576191569246077843624156140842225", "-1221176047834651784581078792412765867711628546241044712073657285378727907841444910656147964990491084587511386617.262995074491", "2.995340172136827282681082940837305909710652998696032516895366747062964251619999380404058847152172638656688240637486847717211068334708743652228842262995074491e+144"); + minus_test ("66496777.1048248699226846854182647353383780982905985351644739", "611110887295764011339.52942021906792320951632532924734194110935652615437372802282890281281736794257440312255694791", "-611110887295697514562.42459534914523852409806059390896384281875799098989982802282890281281736794257440312255694791"); + minus_test ("-1008448844147", "-0.0000000000000000019476287", "-1008448844146.9999999999999999980523713"); + minus_test ("-0.000000000000000000516432305268991528777659423596262", "-298372128925675105602022884944348.2680420889095373857666394", "2.98372128925675105602022884944348268042088909537385250207094731008471222340576403738e+32"); + minus_test ("-123500072490134997.714568930708754033518940686118181893673033346987867", "-2578011852826744661373892702884.2218394002814041283307474989342835625859515222796606255126639775600582467053535947189955421841414538276875776982", "2.5780118528266211613014025678865072704695726500948118068128161016689129181752917936255126639775600582467053535947189955421841414538276875776982e+30"); + minus_test ("21874922820040.11669694092724059036160007405283774815020181046771169772206306814891484445951224460904841652605502865721442462130288010", "31200659.3720643364048896004458800281137277425602565342", "21874891619380.7446326045223509899157200459391100055899452762677116977220630681489148444595122446090484165260550286572144246213028801"); + minus_test ("-67826336382297566597618786205691264038459363425175950127924836604587803884808989.730966693870183767", "-0.000010934566312291377545830845045333824309160616881090991", "-6.7826336382297566597618786205691264038459363425175950127924836604587803884808989730955759303871475622454169154954666175690839383118909009e+79"); + minus_test ("-86697937667412", "-0.000000000000000010885508014854389736820644838727265143960231771135151634179626636837681706789395306987969756304048180103464002627364375565746495636426525896", "-86697937667411.999999999999999989114491985145610263179355161272734856039768228864848365820373363162318293210604693012030243695951819896535997372635624434253504363573474104"); + minus_test ("13239420394588114639023745289048683419202338196760858236726250820537420580804213017510790278292290014782026362194", "-0.0000000000000006743804370173243035185881087573", "1.32394203945881146390237452890486834192023381967608582367262508205374205808042130175107902782922900147820263621940000000000000006743804370173243035185881087573e+112"); + minus_test ("15390.4", "4140709577543085939068096954669836524172838073868529566429367862425997374799588343038360402928322145938978599798868.9860038387559873", "-4.1407095775430859390680969546698365241728380738685295664293678624259973747995883430383604029283221459389785997834785860038387559873e+114"); + minus_test ("1068041657610774618407195645889793312307387843651159034936031674459010136784601252596838684187431642727503640875306262502315681768438", "-270043310707338335874517438680428125320070134440535322728713924276969", "1.068041657610774618407195645889793312307387843651159034936031674729053447491939588471356122867859768047573775315841585231029606045407e+132"); + minus_test ("-154248552738364025256732966577155380446860806518778173860697213762291995224.05508159477619681374", "-0.004301153450587648414307336514788194741568895974277211381969307271", "-1.54248552738364025256732966577155380446860806518778173860697213762291995224050780441325609165325692663485211805258431104025722788618030692729e+74"); + minus_test ("-63378626295.9", "3581805238164539487164037240742370503938629203589842975477397652", "-3.5818052381645394871640372407423705039386292035898430388560239479e+63"); + minus_test ("-4278738506861855303803.685941371999517217112263860961", "1", "-4.278738506861855303804685941371999517217112263860961e+21"); + minus_test ("4722957382126750592971015303833730398703112.9325022739644", "135935655079909511034147686928535747252480216156484264244569583366838078412.147497624", "-1.359356550799095110341476869285310242950980894058912932292657496364393752992149953500356e+74"); + minus_test ("-0.085968464304838528608760871311794870568574888285345150515011250264989219693613274665433658244439289382746661487914586830547", "-1063290105646753333057649979045695307527992816411892112479790721669979250549466052710783805392449284495837713080894121068105045830138816290.52", "1.063290105646753333057649979045695307527992816411892112479790721669979250549466052710783805392449284495837713080894121068105045830138816290434031535695161471391239128688205129431425111714654849484988749735010780306386725334566341755560710617253338512085413169453e+138"); + minus_test ("16124498471436271836.174203105207953106915", "-0.0000000000000000024763633167036725188984815540228360744116272407116469322488952920669576143580628085795995666173708903799390536974903000256740969", "16124498471436271836.1742031052079531093913633167036725188984815540228360744116272407116469322488952920669576143580628085795995666173708903799390536974903000256740969"); + minus_test ("13060329629573076844480853604358182661217396692808889824.8934224473655695659109683301950879985310417264401844104664883", "2655975253497367378557314381561996.880511919813781979361114586185190856887597866439252779127105", "1.30603296295730768444781976291046852938388393784273278280129105275517875865498537440098971416434438600009316313393833e+55"); + minus_test ("7828918777589631958673609756697717233158380319992892621665", "664080.907156046062276770226566166774715944049", "7.828918777589631958673609756697717233158380319992891957584092843953937723229773433833225284055951e+57"); + minus_test ("1102045632452.9793048891721127647873110178015535129097555045251534115765524554358921107344361810504392212504634634", "10480858160855531623861683.3953304547", "-1.04808581608544295782292304160255655278872352126889821984464870902444954748465884234475445641078892655638189495607787495365366e+25"); + minus_test ("1588237583004474241570674574155806135977994054265831583868733852477199751.6125369120506144977", "-1758643150655173823782138162406249816325114275744255398376729480619194524", "3.3468807336596480653528127365620559523031083300100869822454633330963942756125369120506144977e+72"); + minus_test ("-121908802598585866222616306604158404572834073196639.30608547355363660580248376236860407669299263592702", "-47300202299798563445786841751110283088211407088073898239866395", "4.730020229967665464318825588488766678160724868350106416666975569391452644636339419751623763139592330700736407298e+61"); + minus_test ("0.00001018", "-0.0000000000000000003775949557336735085158573036212360452188352127143755001043595772762253543341426632340961625924634823303829450325116", "0.0000101800000000003775949557336735085158573036212360452188352127143755001043595772762253543341426632340961625924634823303829450325116"); + minus_test ("-397079706875731796310420230640137723941921196836019.63", "-0.041045084177321369958383091589758576", "-3.97079706875731796310420230640137723941921196836019588954915822678630041616908410241424e+50"); + minus_test ("-25255670718458145585125947408178.20003200206718595937", "23790086654614644315060006023753790313128255720789244411931242762019828811933845880517294907262", "-2.379008665461464431506000602375379031312825572078924441193124278727549953039199146564324231544020003200206718595937e+94"); + minus_test ("388216212.4067014280868903953571410637325737919396528867014154838280455505188062329013057244757878", "606945158458429249401712430149203335884502730947097871424092354090910701814671093294150735256.311971299391789036587867972923", "-6.069451584584292494017124301492033358845027309470978714240923540909107018146710932937625190439052698713048986412307269091904262080603471132985845161719544494811937670986942755242122e+92"); + minus_test ("-13758420895788683271912900568609892935336486526537239092874365", "0.0000000427931529718203244548288038739877932413390488514893154906501275029696961218603307975431172274454", "-1.37584208957886832719129005686098929353364865265372390928743650000000427931529718203244548288038739877932413390488514893154906501275029696961218603307975431172274454e+61"); + minus_test ("0.000370061363293", "-0.00000000729718323650351200936805011200230897331673895494582965292153458641292454418451631", "0.00037006866047623650351200936805011200230897331673895494582965292153458641292454418451631"); + minus_test ("-0.000000000000000037267063363570380515693697474002406633393933", "5371503530945116760368005450503842267224225935.443693351128547707505116811332630555129489463135", "-5.371503530945116760368005450503842267224225935443693351128547744772180174903011070823186937137406633393933e+45"); + minus_test ("987277696994412694084034600111639245624814061790126142560388376636239445837.3", "0.0000021235425818843833696026604635378067565443474", "9.872776969944126940840346001116392456248140617901261425603883766362394458372999978764574181156166303973395364621932434556526e+74"); + minus_test ("-0.0000220122231289032322357369232053897035669971251749680777769003202659812319155442107", "3509368133759059638669289822772173467.5789662072733463078733831264876196643926418400220747139696586172005930587312837", "-3.5093681337590596386692898227721734675789882194964752111056188634108250540962088371472496820474355175208590399631992442107e+36"); + minus_test ("-0.0000000000000035350393604865398332629110742215182474841758918373895373399045442910854670022381868595891655052656143931905987096001246764946455093272", "0.000000000000000024560182", "-3.5595995424865398332629110742215182474841758918373895373399045442910854670022381868595891655052656143931905987096001246764946455093272e-15"); + minus_test ("-207299473460686051638799737978676287687756682811506270896244029691640707953363231798114058314798954715497689478762298979167444328.2154321", "84.9875755884409473552243470559913666018369306750346853705848251516641143427438599427140088", "-2.072994734606860516387997379786762876877566828115062708962440296916407079533632317981140583147989547154976894787622989791674444132030076884409473552243470559913666018369306750346853705848251516641143427438599427140088e+128"); + minus_test ("3271753269852982202221073139870131965618400215989200201303890204830390736963230557181963499423.97161923384826121516522802454125216009692783106615", "610709896713545517320.61325351307180550727524165198", "3.27175326985298220222107313987013196561840021598920020130389020483039073635252066046841798210335836572077645570788998637256125216009692783106615e+93"); + minus_test ("-171890925468345318289557520417686524897898778387.7049747769377054087", "0.0000000000008626202220397871613368552810353647018975957787995640929353071154146588942452406480447534761421336774021631535188253352941985865", "-1.718909254683453182895575204176865248978987783877049747769385680289220397871613368552810353647018975957787995640929353071154146588942452406480447534761421336774021631535188253352941985865e+47"); + minus_test ("11797561306382075049308870675243395524960617768982687731904993854819896455053370294329059.5", "-9266409282787978360416645397432756233517921427389.714082569117296693989915074785029952731114155890581220089683737330882", "1.1797561306382075049308870675243395524969884178265475710265410500217329211286888215756449214082569117296693989915074785029952731114155890581220089683737330882e+88"); + minus_test ("-424430636249988989578724500467105386916790551644026356512230425657196415575958762209685893722637592.42515458907522545588092531969", "-699146481762025356180846176956775322378040371282973135438056771990065583612223969221925059327626424485", "6.9872205112577536719126745245630821699112358073132910908154454156440838719664801045971537343390378689257484541092477454411907468031e+101"); + minus_test ("-0.00000130798527635604695258712844244105224418951215845097932279572456369133399455", "0.000000176284029965375880004181656007589949467118245220868298039483413025781635383510797", "-0.000001484269306321422832591310098448642193656630403671847620835207976717115629933510797"); + minus_test ("0.000000000000462071916734680776281054", "1143549992221513568696244482022549056707895554082064.282542", "-1.143549992221513568696244482022549056707895554082064282541999999537928083265319223718946e+51"); + minus_test ("0.0000000000000000426800518382365970695662273350350877364291904795717019319799963342380112501925257351654", "0.0000000000000013278679842106035272342072", "-1.2851879323723669301646409726649649122635708095204282980680200036657619887498074742648346e-15"); + minus_test ("-0.000000000000000000016354802329513866", "122022209857.15312653353983161651403936785710765909662481656738699983151473856575442647972705932905488645338136045162567147688725", "-122022209857.15312653353983161653039417018662152509662481656738699983151473856575442647972705932905488645338136045162567147688725"); + minus_test ("25801628293435628816490256345279207687083725145006124892029160063238265267.3431144744384935936819525999160077311803590506825603145972954326789291", "-285119248451148500201319196762968888442368918233718192676490082873043334950267626673646944070692473524519642", "2.851192484511485002013191967629689142439972116693470091667464281522510220339927716797718360998525367627849093431144744384935936819525999160077311803590506825603145972954326789291e+107"); + minus_test ("0.1423", "2429833169520732752372574762485088466742598273119469284544035996929667546050321271916945887077199411341346293601.72939677", "-2.42983316952073275237257476248508846674259827311946928454403599692966754605032127191694588707719941134134629360158709677e+111"); + minus_test ("3.80188793676049024809", "0.0000000000002833272682244473387924044230539081036171682212105326649350597590901815021244717391629977491943712364070741264536987011350709308", "3.8018879367602069208217755526612075955769460918963828317787894673350649402409098184978755282608370022508056287635929258735463012988649290692"); + minus_test ("-322814450973877874279521.0", "263039808493736512406179831713394337242295861157184.672295063", "-2.63039808493736512406179832036208788216173735436705672295063e+50"); + minus_test ("398742236640963", "44.00495510581548851408966", "398742236640918.99504489418451148591034"); +) diff --git a/drafts/bs-big/__tests__/mod_test.ml b/drafts/bs-big/__tests__/mod_test.ml new file mode 100644 index 0000000..7d9e90b --- /dev/null +++ b/drafts/bs-big/__tests__/mod_test.ml @@ -0,0 +1,1702 @@ +open Jest +let () = + describe "mod_tests" (fun () -> + let open Expect in + + let mod_test = + let count = ref 0 in + fun (a, b, exp) -> + count := !count + 1; + let v = Big.mod_ (Big.fromString a) (Big.fromString b) |. Big.toString in + test ("div_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("mod_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + Big.setDP 20; + + bool_test false (Big.mod_ (Big.fromInt 0) (Big.fromInt 1) |> is_minus_zero); + bool_test false (Big.mod_ (Big.fromInt 0) (Big.fromString "-1") |> is_minus_zero); + bool_test true (Big.mod_ (Big.fromString "-0") (Big.fromInt 1) |> is_minus_zero); + bool_test true (Big.mod_ (Big.fromString "-0") (Big.fromInt (-1)) |> is_minus_zero); + bool_test false (Big.mod_ (Big.fromInt (1)) (Big.fromInt (1)) |> is_minus_zero); + + mod_test ("-842658.56", "-19.52", "-19.2"); + mod_test ("-34.871", "-7325043345", "-34.871"); + mod_test ("78691958", "49006.018397", "37298.472815"); + mod_test ("-11618324684", "621.3", "-394.1"); + mod_test ("0", "69.07362125", "0"); + mod_test ("0.27474921216", "0.00000000002460017868", "2.224673016e-11"); + mod_test ("0", "59137483772", "0"); + mod_test ("-0.000000000000000000014634493", "-4.2", "-1.4634493e-20"); + mod_test ("-5.470", "-1.8989", "-1.6722"); + mod_test ("-95519.5319132", "4.1", "-1.8319132"); + mod_test ("43.257", "-4704608304", "43.257"); + mod_test ("-32128.403", "68263.11", "-32128.403"); + mod_test ("85.4005884", "-0.000000000000000010953667", "4.132633e-18"); + mod_test ("3197.909", "-10738864.39", "3197.909"); + mod_test ("1.03436722695", "2.6", "1.03436722695"); + mod_test ("-4", "-56.36464628", "-4"); + mod_test ("92.0618", "-454.866", "92.0618"); + mod_test ("-6.147123243", "-53259.9", "-6.147123243"); + mod_test ("-3", "-0.4911", "-0.0534"); + mod_test ("0", "-12.3", "0"); + mod_test ("-0.001713264153", "0.00000000000000000001843605", "-1.36779e-20"); + mod_test ("2", "-9325.1665961", "2"); + mod_test ("42016273.6500", "-122.861496017", "99.24210634"); + mod_test ("35.9", "3867744417", "35.9"); + mod_test ("0.000000000000000479760268839", "-209975.082", "4.79760268839e-16"); + mod_test ("0.0000000000000000000428713848", "3", "4.28713848e-20"); + mod_test ("0.000000000000000104698757876", "-15902.7654", "1.04698757876e-16"); + mod_test ("-4", "3124473.52104", "-4"); + mod_test ("-9.58", "1.00", "-0.58"); + mod_test ("79", "1", "0"); + mod_test ("0", "-0.0000000000013618", "0"); + mod_test ("1.55", "-31", "1.55"); + mod_test ("-2.6", "-13.58133", "-2.6"); + mod_test ("0", "90950", "0"); + mod_test ("-46.1", "61.8", "-46.1"); + mod_test ("-0.00000000000023461", "-0.00000000134", "-2.3461e-13"); + mod_test ("-9761.89778", "4645363921.75", "-9761.89778"); + mod_test ("0.000000000000000090372203", "0.00000322253", "9.0372203e-17"); + mod_test ("-23560577.226", "-0.5304109598", "-0.3270269352"); + mod_test ("-11752006.868", "0.003773", "-0.002016"); + mod_test ("0.000000036524", "-1.2", "3.6524e-8"); + mod_test ("4713.9562", "0.000000000000000000561", "2.23e-19"); + mod_test ("-351870798", "28.8", "-1.2"); + mod_test ("-4.6", "-0.00000000058", "-4.4e-10"); + mod_test ("-21863.82", "4214.9937962", "-788.851019"); + mod_test ("-30.221041721", "20401.1", "-30.221041721"); + mod_test ("-2.35", "3", "-2.35"); + mod_test ("64462", "90.840", "56.44"); + mod_test ("46", "433563.55477", "46"); + mod_test ("47852501568", "-147426331397", "47852501568"); + mod_test ("0", "3812504.1", "0"); + mod_test ("0.000000000000142963770", "1210345642.9", "1.4296377e-13"); + mod_test ("-0.0024002323743", "-0.000000000000000013220659", "-3.535752e-18"); + mod_test ("225.773", "66128.74787", "225.773"); + mod_test ("-158.4165", "12.78", "-5.0565"); + mod_test ("-21042099137", "10.935", "-4.565"); + mod_test ("32791.03", "411590460", "32791.03"); + mod_test ("-1984910.86246", "-153845.7", "-138762.46246"); + mod_test ("75010460639.6", "-0.00000000005103249", "2.835305e-11"); + mod_test ("-0.00000000000000025595509", "25.023", "-2.5595509e-16"); + mod_test ("-103052291", "-350.4", "-1.4"); + mod_test ("0.00000000000000015307870924", "-0.0000035499", "1.5307870924e-16"); + mod_test ("4402230", "122.112", "92.4"); + mod_test ("-3073677", "532.95653726", "-116.64962158"); + mod_test ("-0.026619162", "-0.00000000000000010", "0"); + mod_test ("0.000065666975666", "-6.558", "0.000065666975666"); + mod_test ("-3.3", "0.000000000033194405282", "-1.2721464422e-11"); + mod_test ("94101.0", "-810285.8180", "94101"); + mod_test ("229868", "9654.7078", "7809.7206"); + mod_test ("0.000000001926", "-0.00000000000000000005918", "2.562e-20"); + mod_test ("67", "0.00000006016496", "2.00248e-8"); + mod_test ("0.0000000000000000000832655", "-327907966408", "8.32655e-20"); + mod_test ("-1534", "-293318.339", "-1534"); + mod_test ("0.00000000000000000511522652", "-1145.46888006", "5.11522652e-18"); + mod_test ("0.00000000465574", "707.0", "4.65574e-9"); + mod_test ("0.230910067", "-1712.01", "0.230910067"); + mod_test ("-31874.7", "-2617976302", "-31874.7"); + mod_test ("22.8", "3819", "22.8"); + mod_test ("-0.0000015419", "329", "-0.0000015419"); + mod_test ("-9176.3441", "741523.991", "-9176.3441"); + mod_test ("-5.1103", "-25460.136", "-5.1103"); + mod_test ("15232730973", "-2.28", "1.32"); + mod_test ("0.081", "-1111.578", "0.081"); + mod_test ("3.1", "-42.207", "3.1"); + mod_test ("-0.000000000000000433", "0.00000000000000000254528412564", "-3.016986412e-19"); + mod_test ("-83943.1", "-4303134750", "-83943.1"); + mod_test ("19.825539", "4432543.44", "19.825539"); + mod_test ("-2416", "8097.16337", "-2416"); + mod_test ("-3.836", "0.00000823841385579", "-0.00000502522549283"); + mod_test ("2290356160", "-965232.20", "825381.6"); + mod_test ("1.12", "-35806.5278", "1.12"); + mod_test ("0", "-0.0000144726783", "0"); + mod_test ("-1571629111.33", "6.4736", "-3.8676"); + mod_test ("-0.0053778", "1.1", "-0.0053778"); + mod_test ("-0.0000013840", "-12.1", "-0.000001384"); + mod_test ("-22.9310218204", "-1.6843970", "-1.0338608204"); + mod_test ("-71.300", "-25.868806", "-19.562388"); + mod_test ("0.02847", "-63397392.02", "0.02847"); + mod_test ("-0.0000000000000331096", "0.00000183271", "-3.31096e-14"); + mod_test ("-27821115", "-34.83906", "-0.40734"); + mod_test ("0.000000000000436294954175", "-2261.01154", "4.36294954175e-13"); + mod_test ("45.86441", "-530611.936214", "45.86441"); + mod_test ("-1999679428", "0.00000000000000000002297558409", "-5.828173e-23"); + mod_test ("-105924.2800", "-426.10612", "-249.96224"); + mod_test ("754.9", "-1", "0.9"); + mod_test ("0.000000238266109662", "29355.83", "2.38266109662e-7"); + mod_test ("25.3", "-0.00000000000000086417416", "5.8408656e-16"); + mod_test ("-1261.3", "39.0", "-13.3"); + mod_test ("1.017", "-153", "1.017"); + mod_test ("27.690", "-21507592", "27.69"); + mod_test ("-2623.072516", "3.06", "-0.652516"); + mod_test ("91", "13034138.923", "91"); + mod_test ("-5212749.21", "-0.00000000000000000001986395", "-2.1827e-21"); + mod_test ("117.4212", "-29.978", "27.4872"); + mod_test ("-47179.732", "-77504621680", "-47179.732"); + mod_test ("0", "-3.7234", "0"); + mod_test ("443705716.830", "3024.9575", "1925.7725"); + mod_test ("-0.000000000000000000017191196518", "-14.725715414", "-1.7191196518e-20"); + mod_test ("30.4", "399719414108", "30.4"); + mod_test ("16145.97", "-48642", "16145.97"); + mod_test ("2765166", "-18.6825", "6.54"); + mod_test ("37.63", "-1284.342", "37.63"); + mod_test ("-0.0000000000000000000177845858", "0.0000005860954024", "-1.77845858e-20"); + mod_test ("-2.3", "2582.24565000", "-2.3"); + mod_test ("16.7", "-0.0000000017369", "1.362e-9"); + mod_test ("170180366706", "4626.181", "2388.659"); + mod_test ("-1404312.6", "-17000256053", "-1404312.6"); + mod_test ("-7603530366", "316.496322753", "-236.943012537"); + mod_test ("8", "1.59866", "0.0067"); + mod_test ("-4.963", "8.73", "-4.963"); + mod_test ("25644160.8", "-5842.06855", "3321.93405"); + mod_test ("-4.31384", "-220.2", "-4.31384"); + mod_test ("186.9", "-48200.85", "186.9"); + mod_test ("5", "57089.99", "5"); + mod_test ("-244278052979", "-2", "-1"); + mod_test ("8", "-5763.4", "8"); + mod_test ("29549", "-1", "0"); + mod_test ("-2.0", "-0.00000000000000446955628", "-3.76062704e-15"); + mod_test ("737330.9", "-746370915533", "737330.9"); + mod_test ("-0.000882183174", "-16.5", "-0.000882183174"); + mod_test ("-45", "0.000000001106035", "-7.5858e-10"); + mod_test ("-594.06", "-29.85802821", "-26.75746401"); + mod_test ("-27.648237", "-1047.5249", "-27.648237"); + mod_test ("2", "-739163.624", "2"); + mod_test ("544827.1330", "54848981.1", "544827.133"); + mod_test ("1", "0.00000000000076553", "2.9959e-13"); + mod_test ("-10.89", "0.000000000000000000047", "-5e-21"); + mod_test ("-3052.938", "9327.5819201", "-3052.938"); + mod_test ("-24.1", "127758.429", "-24.1"); + mod_test ("3.9", "12173.38", "3.9"); + mod_test ("0.0000000000000213926861909", "-77.4", "2.13926861909e-14"); + mod_test ("-90173804.260", "-5062619.06909", "-4109280.08547"); + mod_test ("637", "43943.2610", "637"); + mod_test ("14867.1", "894449", "14867.1"); + mod_test ("7.3", "-1.1", "0.7"); + mod_test ("2894844.4", "-1", "0.4"); + mod_test ("-0.00000000000196", "-2.6741", "-1.96e-12"); + mod_test ("0.00000000000000071433493", "5.9227", "7.1433493e-16"); + mod_test ("69", "-7204969", "69"); + mod_test ("-12468163", "-10022891.867", "-2445271.133"); + mod_test ("45469.1932906", "-3095367650", "45469.1932906"); + mod_test ("73072906.39", "-112013211", "73072906.39"); + mod_test ("1.4", "972.159255713", "1.4"); + mod_test ("66924.3855375", "19.93", "19.3755375"); + mod_test ("26.4256214076", "11.4775634275", "3.4704945526"); + mod_test ("23362.0174956", "-0.0000000001748", "1.536e-10"); + mod_test ("18276818006", "-5.74", "1.1"); + mod_test ("-8319.8", "3", "-0.8"); + mod_test ("-7.7413714358", "43763934316.0", "-7.7413714358"); + mod_test ("-688566579", "-1.83", "-0.3"); + mod_test ("29854", "-268509731.22", "29854"); + mod_test ("-194.15246", "-3.2255572", "-0.619028"); + mod_test ("2.0186177", "-326915", "2.0186177"); + mod_test ("-4", "1259", "-4"); + mod_test ("3.56", "-0.000000000000000000515993", "1.2338e-19"); + mod_test ("0.000001783", "-16426085", "0.000001783"); + mod_test ("-1766987819", "-87.259", "-49.72"); + mod_test ("-17.1", "0.00000000000000021840564", "-5.750892e-17"); + mod_test ("-8589.659", "0.000000000000000505", "-3.75e-16"); + mod_test ("-65891.7", "-38663.83", "-27227.87"); + mod_test ("-1.0", "0.00000000000000003836", "-1.78e-17"); + mod_test ("-33378.26", "-1226528.13", "-33378.26"); + mod_test ("2", "492342441", "2"); + mod_test ("1274", "-3092459411.0", "1274"); + mod_test ("0.2631770", "-493249535.4", "0.263177"); + mod_test ("-0.00000000000000000141", "4201192116", "-1.41e-18"); + mod_test ("-574.29154", "133427.3", "-574.29154"); + mod_test ("104617.3", "293188753.50", "104617.3"); + mod_test ("0", "38.96345", "0"); + mod_test ("-0.0000017289693288", "-5.4", "-0.0000017289693288"); + mod_test ("0", "4", "0"); + mod_test ("9.65", "1.2", "0.05"); + mod_test ("0.000000000017", "-50377365", "1.7e-11"); + mod_test ("137.3064", "0.0000001012", "7.04e-8"); + mod_test ("-9.89405", "29.2", "-9.89405"); + mod_test ("3.23", "-3048751.09", "3.23"); + mod_test ("87020568364", "-1", "0"); + mod_test ("-3658", "-0.4067222", "-0.3472554"); + mod_test ("0.0000000000483229749", "-508858", "4.83229749e-11"); + mod_test ("3", "-0.000000000000000006525172012", "6.0850742e-19"); + mod_test ("-52.63", "-373.710", "-52.63"); + mod_test ("-6.49915814", "352.2", "-6.49915814"); + mod_test ("0", "-44190.198", "0"); + mod_test ("0.00000000000000003763584929", "6", "3.763584929e-17"); + mod_test ("1.299983", "194.7", "1.299983"); + mod_test ("1", "9.52", "1"); + mod_test ("-86603.9", "446867516", "-86603.9"); + mod_test ("-1482885.420", "-0.0000000018878840", "-9.643e-10"); + mod_test ("-170.531717", "-633436587.6", "-170.531717"); + mod_test ("15.36378", "6540.267", "15.36378"); + mod_test ("-20570.61", "18.955913858", "-3.44346407"); + mod_test ("77", "0.000000000000027", "2.3e-14"); + mod_test ("0.000000001687849", "-0.0131699248663", "1.687849e-9"); + mod_test ("-0.000000000000026", "3291407.1", "-2.6e-14"); + mod_test ("-290.613", "0.00000000000000000008353794", "-6.386436e-20"); + mod_test ("200", "66.97", "66.06"); + mod_test ("2.2", "-43.41589", "2.2"); + mod_test ("98201.177964", "0.007000", "0.004964"); + mod_test ("35.453991547", "128.68861", "35.453991547"); + mod_test ("5.27", "1", "0.27"); + mod_test ("-1", "0.000119683476689", "-0.000044552263405"); + mod_test ("-34.0", "3", "-1"); + mod_test ("3378", "-44180", "3378"); + mod_test ("15", "-4", "3"); + mod_test ("0.0000004190944243", "37285824.4", "4.190944243e-7"); + mod_test ("-298.4", "506466", "-298.4"); + mod_test ("-0.00000010893", "-0.000426882829396", "-1.0893e-7"); + mod_test ("-1.9756065817", "941.5", "-1.9756065817"); + mod_test ("-1026297.2", "-205657.802", "-203665.992"); + mod_test ("2", "0.0000000005621541447", "3.513430991e-10"); + mod_test ("-7951901.67", "-0.0000000000055383", "-2.3814e-12"); + mod_test ("9", "0.000000000015125851830", "7.24233339e-12"); + mod_test ("72.245762", "-39.70217", "32.543592"); + mod_test ("6.62321", "-912632", "6.62321"); + mod_test ("617021", "-42.5970821", "2.2657815"); + mod_test ("1469815.28770", "537.217915", "524.290175"); + mod_test ("345897.6", "-0.00000000000108024", "9.7032e-13"); + mod_test ("0", "1.8688906295", "0"); + mod_test ("164", "-82114.2", "164"); + mod_test ("57.84537", "-1.4", "0.44537"); + mod_test ("114.340500", "6333334050", "114.3405"); + mod_test ("4.80", "-6077773.6", "4.8"); + mod_test ("162", "-37.75886044", "10.96455824"); + mod_test ("0.000000016367092", "1", "1.6367092e-8"); + mod_test ("148.2", "-46", "10.2"); + mod_test ("1.5768318844", "-7512089036.8", "1.5768318844"); + mod_test ("-0.0000000000000014460", "0.0011257005", "-1.446e-15"); + mod_test ("64.079", "-141", "64.079"); + mod_test ("-0.0582", "-13.35353476", "-0.0582"); + mod_test ("-1.0007", "63155.153933", "-1.0007"); + mod_test ("-623313173.6", "0.0000000081031", "-2.4548e-9"); + mod_test ("-36.9", "-1", "-0.9"); + mod_test ("2.0857", "0.000000000000000000205859744928", "1.887979864e-19"); + mod_test ("0.0000000494417", "492420240", "4.94417e-8"); + mod_test ("0.000000000000012194", "0.000000000000000013778591965", "1.372470294e-17"); + mod_test ("-16179.166", "16.4610327", "-14.4318886"); + mod_test ("3.24", "55986", "3.24"); + mod_test ("-61938", "47825328585", "-61938"); + mod_test ("4.36", "-1", "0.36"); + mod_test ("-9857364.3", "-1", "-0.3"); + mod_test ("9943.75", "3.5", "0.25"); + mod_test ("151.4907", "-1", "0.4907"); + mod_test ("0.000000000113985670", "-2286508", "1.1398567e-10"); + mod_test ("-1468", "-12915320.7", "-1468"); + mod_test ("46.543901", "0.00000014040913", "3.32077e-8"); + mod_test ("3", "190.34681", "3"); + mod_test ("-468.5022", "-0.00000000309208106131", "-1.13251725725e-9"); + mod_test ("-0.00000000000153707", "-112649.31435", "-1.53707e-12"); + mod_test ("-1.5", "0.000000067829063910", "-6.729086517e-8"); + mod_test ("42031.2", "-1.165644", "0.408648"); + mod_test ("-137623012.4", "-71.9609", "-21.9379"); + mod_test ("-278354", "8", "-2"); + mod_test ("5370.3", "71543859", "5370.3"); + mod_test ("-0.2469826911", "-0.0000000000008289323096", "-3.584481336e-13"); + mod_test ("338.68861185", "0.000000000000371927032", "2.00995384e-13"); + mod_test ("-0.00000000144", "115767.5757", "-1.44e-9"); + mod_test ("-3183918.6386", "-980.559", "-43.5656"); + mod_test ("-0.000000000004661097", "-0.051176618", "-4.661097e-12"); + mod_test ("-1", "948.171", "-1"); + mod_test ("1057394189", "62.751", "54.866"); + mod_test ("167.9", "0.00000000000009753", "8.45e-15"); + mod_test ("-12.172", "800.4476", "-12.172"); + mod_test ("-1.4", "-139187231194", "-1.4"); + mod_test ("359356.2", "-0.006806", "0.005734"); + mod_test ("4744567.6711", "-1.74", "0.0511"); + mod_test ("-0.0000000000234390", "-75.75283631", "-2.3439e-11"); + mod_test ("-6557078727.02", "-0.000000000000000015", "-5e-18"); + mod_test ("-1.33", "-5.111037", "-1.33"); + mod_test ("-431.277", "-1", "-0.277"); + mod_test ("0.0000000000000000000697336", "-8212.9015367", "6.97336e-20"); + mod_test ("3370.2674507", "445.572089", "251.2628277"); + mod_test ("-2.33567", "-0.0000000104784", "-8.888e-9"); + mod_test ("0.00000983659", "83423921", "0.00000983659"); + mod_test ("-51.2", "-0.0027394686", "-0.0020713346"); + mod_test ("0.000000000819617035421", "0.000000011", "8.19617035421e-10"); + mod_test ("0.00079279091535", "7", "0.00079279091535"); + mod_test ("-0.000000000095324834", "28091.00", "-9.5324834e-11"); + mod_test ("-0.00000000000000015", "23.52", "-1.5e-16"); + mod_test ("0.1438", "1035688.4", "0.1438"); + mod_test ("16693", "-1", "0"); + mod_test ("-781.09402123", "6.9", "-1.39402123"); + mod_test ("1", "20.70", "1"); + mod_test ("-3", "0.000006782445", "-0.00000249249"); + mod_test ("0.00000000000000000022", "-54710642.596", "2.2e-19"); + mod_test ("-590.69625205", "26.40", "-9.89625205"); + mod_test ("10", "-5.67", "4.33"); + mod_test ("-7", "-0.00000000000643634802", "-3.80362768e-12"); + mod_test ("-9680099.05", "-62.737684457", "-50.764391642"); + mod_test ("-1.5", "9914.9781", "-1.5"); + mod_test ("-1", "0.0000000507688288763", "-3.15199093625e-8"); + mod_test ("-0.000000000032713211391", "-0.000000046529", "-3.2713211391e-11"); + mod_test ("5.40", "1612427.39748", "5.4"); + mod_test ("0", "-0.0000000000000000000146", "0"); + mod_test ("-0.000000000000000000817527", "-52.0", "-8.17527e-19"); + mod_test ("1053329.8", "-120573.937", "88738.304"); + mod_test ("0.0000000000713", "-100743.840", "7.13e-11"); + mod_test ("8219", "-7505759130.86", "8219"); + mod_test ("16655.7", "243", "131.7"); + mod_test ("259.650", "278.73", "259.65"); + mod_test ("-284.091", "-1", "-0.091"); + mod_test ("0.1250", "-23713.35", "0.125"); + mod_test ("0.00000000490018764513", "-4.41", "4.90018764513e-9"); + mod_test ("-584.70403", "11076992", "-584.70403"); + mod_test ("-221.643", "-30.5", "-8.143"); + mod_test ("-9.69", "1177241", "-9.69"); + mod_test ("-4.97845868064", "-1.3178692059", "-1.02485106294"); + mod_test ("-1.04328912629", "-12.828540", "-1.04328912629"); + mod_test ("26", "-4.91596", "1.4202"); + mod_test ("94.686", "7.5851", "3.6648"); + mod_test ("0", "-0.000000000000000363", "0"); + mod_test ("-1.431", "65.06874", "-1.431"); + mod_test ("-878.898828", "-5.21", "-3.618828"); + mod_test ("-0.00000000000000014146660", "1.05112178985", "-1.414666e-16"); + mod_test ("0", "360.6112165", "0"); + mod_test ("4.464476", "0.00016302503", "0.00003555345"); + mod_test ("1145096", "-217.15", "64.05"); + mod_test ("29.46", "104.40", "29.46"); + mod_test ("841.82", "-2171922.59229", "841.82"); + mod_test ("46", "1", "0"); + mod_test ("22829.8889", "-1578709411", "22829.8889"); + mod_test ("-0.00374341104", "1.2", "-0.00374341104"); + mod_test ("410", "7", "4"); + mod_test ("0.076125848849", "1.103", "0.076125848849"); + mod_test ("0.000001844875808", "0.000000000000020813", "2.0037e-14"); + mod_test ("6.685", "0.003905472818", "0.002736008402"); + mod_test ("41011740.6", "908.670191", "728.869597"); + mod_test ("-152.527", "-1", "-0.527"); + mod_test ("12815.035", "-1497.81264", "832.53388"); + mod_test ("-0.000000000000004048729", "0.00000000126", "-4.048729e-15"); + mod_test ("-19949.700625", "-314.64", "-127.380625"); + mod_test ("-2.4", "569419658.2", "-2.4"); + mod_test ("0.00000000000000597954708", "4", "5.97954708e-15"); + mod_test ("-17.0", "1.58", "-1.2"); + mod_test ("22811600498", "2", "0"); + mod_test ("3.1328", "-119317.4", "3.1328"); + mod_test ("2.26039694", "1567.2", "2.26039694"); + mod_test ("-0.0004559", "-1.59", "-0.0004559"); + mod_test ("-0.000000000000165", "3", "-1.65e-13"); + mod_test ("-215.9051", "14846316.4792", "-215.9051"); + mod_test ("-1", "6004363.2", "-1"); + mod_test ("173513829480", "-117.2937046", "37.6296904"); + mod_test ("2269413223", "44.831", "39.204"); + mod_test ("-1411953.506", "0.000003338150524", "-0.000001742597716"); + mod_test ("-26.596", "-7", "-5.596"); + mod_test ("-0.00000000000010245141710", "6652789979", "-1.024514171e-13"); + mod_test ("2.042", "24673", "2.042"); + mod_test ("-2.71", "68.05392544", "-2.71"); + mod_test ("-3", "220821.80", "-3"); + mod_test ("116.073", "-0.0000000000024392780", "2.029598e-12"); + mod_test ("-0.00000006283674", "0.0000000000000079", "-5.7e-15"); + mod_test ("-3", "-7", "-3"); + mod_test ("-0.0000000000000005058", "-1.5", "-5.058e-16"); + mod_test ("-683", "1013123.5", "-683"); + mod_test ("-6", "16985130.432", "-6"); + mod_test ("-76481.64", "-0.0002575", "-0.0001725"); + mod_test ("1610.8849133", "-2.02567", "0.4772633"); + mod_test ("-19.3482", "-1.5", "-1.3482"); + mod_test ("779.8394", "390457.98231", "779.8394"); + mod_test ("0.00000012", "-8855.3", "1.2e-7"); + mod_test ("27226552.2", "2168.811", "1467.717"); + mod_test ("6.353167529", "1283573.56", "6.353167529"); + mod_test ("2", "26.2339535", "2"); + mod_test ("-34", "5319.486", "-34"); + mod_test ("0", "3123027047", "0"); + mod_test ("1", "27465.6301", "1"); + mod_test ("-1.5", "-41136.47", "-1.5"); + mod_test ("0.00000000000000000001311857", "-23", "1.311857e-20"); + mod_test ("14831.7", "4.41", "0.87"); + mod_test ("2953.07357", "34.48", "22.27357"); + mod_test ("-1.5", "-2465544", "-1.5"); + mod_test ("-376", "-244.16", "-131.84"); + mod_test ("-1799906518", "219", "-49"); + mod_test ("16431536", "987.209", "429.404"); + mod_test ("-0.0000000000000000406462459", "36617.26003", "-4.06462459e-17"); + mod_test ("-0.00000004133646", "26594407.6", "-4.133646e-8"); + mod_test ("6.3642", "-0.00000000000000000009857799", "8.84487e-20"); + mod_test ("1.780751", "11652994", "1.780751"); + mod_test ("95.6", "19178496109.2", "95.6"); + mod_test ("2.57393833", "852658757", "2.57393833"); + mod_test ("147.77838", "27.129", "12.13338"); + mod_test ("-773.3025", "-6", "-5.3025"); + mod_test ("3", "-31458.09", "3"); + mod_test ("-2.93096796427", "2.3", "-0.63096796427"); + mod_test ("2", "6190.943", "2"); + mod_test ("-2", "-2.47", "-2"); + mod_test ("-60.45556497", "0.00000067724055444", "-5.489328444e-7"); + mod_test ("0", "52221", "0"); + mod_test ("0.003001960", "-277761107", "0.00300196"); + mod_test ("5.3848225844", "434804", "5.3848225844"); + mod_test ("650.7467123", "-4", "2.7467123"); + mod_test ("1.4", "-65970188", "1.4"); + mod_test ("-3500.45", "500254.11730", "-3500.45"); + mod_test ("-0.000000000049", "4919966334", "-4.9e-11"); + mod_test ("17.92802", "-4.826", "3.45002"); + mod_test ("248.79", "936.1", "248.79"); + mod_test ("0.000000000000000000062725", "-1.050053808", "6.2725e-20"); + mod_test ("-21.4103", "1.9075", "-0.4278"); + mod_test ("-7785809980", "1574", "-92"); + mod_test ("688.6", "86674028", "688.6"); + mod_test ("0.000000000002917443", "-245.8", "2.917443e-12"); + mod_test ("-0.07547", "-15.028", "-0.07547"); + mod_test ("0.0031519195605", "-2272651712.25", "0.0031519195605"); + mod_test ("150494.446", "-51709.2935", "47075.859"); + mod_test ("-12010", "0.000000000000000016290", "-3.28e-18"); + mod_test ("-32.408275623", "-1", "-0.408275623"); + mod_test ("0.000000000000383814", "-1", "3.83814e-13"); + mod_test ("0.000000000000000003469380524", "0.0000000000036", "3.469380524e-18"); + mod_test ("1", "15.8856255428", "1"); + mod_test ("119.378058192", "-2.4396301", "2.275813392"); + mod_test ("33773052.62", "0.00000000111954987477", "7.3387294787e-10"); + mod_test ("6", "-120890538.30", "6"); + mod_test ("-0.00000000000059065444364", "22714637", "-5.9065444364e-13"); + mod_test ("-1774625862.4", "8507651416", "-1774625862.4"); + mod_test ("30.1", "5.7", "1.6"); + mod_test ("-1.806", "38.81", "-1.806"); + mod_test ("3", "-1683506", "3"); + mod_test ("-88.75", "-1411.1", "-88.75"); + mod_test ("-31", "0.00007026872", "-0.00004067864"); + mod_test ("2437.18437", "2.70220899140", "2.4940687486"); + mod_test ("0", "-41630623", "0"); + mod_test ("-258.66793", "-182.14421", "-76.52372"); + mod_test ("-14228.6", "95437.0", "-14228.6"); + mod_test ("1733.518", "-128426.9", "1733.518"); + mod_test ("0.0000000000000000000532527998218", "-63.28534135", "5.32527998218e-20"); + mod_test ("-295.03967", "-3", "-1.03967"); + mod_test ("2.956649054", "899957.06", "2.956649054"); + mod_test ("-2313.023", "-63930.69", "-2313.023"); + mod_test ("13803.9", "5.8329456", "3.1507104"); + mod_test ("21.8238290", "-3", "0.823829"); + mod_test ("-22.3", "-77.5771049044", "-22.3"); + mod_test ("0", "10.70", "0"); + mod_test ("0.000000101", "-14430384604.6", "1.01e-7"); + mod_test ("-600271019.62", "-2.4", "-2.02"); + mod_test ("-53874920.5", "21.676509", "-16.648855"); + mod_test ("-0.000000000000000061", "-69.27505", "-6.1e-17"); + mod_test ("-0.00000000000117570154770", "874813.194864", "-1.1757015477e-12"); + mod_test ("3724726", "0.0000000000009126675", "4.24705e-13"); + mod_test ("6493", "-82605.38", "6493"); + mod_test ("-2.88", "10", "-2.88"); + mod_test ("53970", "-99064", "53970"); + mod_test ("-12.440", "-0.000000000019", "-5e-12"); + mod_test ("54.64", "-6.1", "5.84"); + mod_test ("0.004000", "14", "0.004"); + mod_test ("-1570593.12158", "-2.56612", "-1.9417"); + mod_test ("-0.0000000000000113891", "-0.000000000042", "-1.13891e-14"); + mod_test ("-29.9444", "-2245", "-29.9444"); + mod_test ("0.568740", "3.7564033753", "0.56874"); + mod_test ("-52606.48321", "-4.34014413083", "-3.9363443404"); + mod_test ("-0.0000000334", "0.000000000902008057677", "-2.5701865951e-11"); + mod_test ("-634849.178", "3953007.487", "-634849.178"); + mod_test ("127992.04562", "3009797.1", "127992.04562"); + mod_test ("1", "-43.9035960", "1"); + mod_test ("-11.0349", "-2", "-1.0349"); + mod_test ("158.7", "257566", "158.7"); + mod_test ("43047346", "-115148338070", "43047346"); + mod_test ("9691.0996", "-15.5219", "5.434"); + mod_test ("-77.9", "-2.0", "-1.9"); + mod_test ("-38.3896", "-0.000000882", "-5.14e-7"); + + mod_test ("2318237922853539360.167157597022570", "-9702015238687.680494235371626139504030926823802574", "9295675788919.833075194557918488338251940141560718"); + mod_test ("-3346995255.54414928936", "-19484973963827626752773520333240590885639375", "-3346995255.54414928936"); + mod_test ("-270721769", "22539228.03492196260802407744489638356810047", "-251032.58093644870371107066124339718279436"); + mod_test ("-0.00000000000000000308066481692295683548642301228852180070143433425056969292333", "206232915.762239501154732324", "-3.08066481692295683548642301228852180070143433425056969292333e-18"); + mod_test ("-0.00000000156454306292867840840689", "2635", "-1.56454306292867840840689e-9"); + mod_test ("12886035692416820.3977457533594029154555584175743", "-113496127978790341.941210015456704515", "12886035692416820.3977457533594029154555584175743"); + mod_test ("-299395547.883083669188105176893563510454667", "-3152.9580", "-115.077083669188105176893563510454667"); + mod_test ("8076327350.789696755252236317", "9", "5.789696755252236317"); + mod_test ("2241730616485747642201052100686334", "15115372376051.1433309224128", "15028644606255.6407694748928"); + mod_test ("0.000000020545442143", "910205431326260.56522101419792183224139104902865869227", "2.0545442143e-8"); + mod_test ("-299.2", "-1095069605114867345071265098807585478368438601713540771676", "-299.2"); + mod_test ("0", "-0.00000000000000000006258032721", "0"); + mod_test ("-9561792051.46130", "-0.00000037912322661422", "-3.0664875638608e-7"); + mod_test ("-4589.274150042", "5463826693798.059180748770", "-4589.274150042"); + mod_test ("-177372488891124.8209441829612234253673371", "-2184484411972.871928873110", "-429251521322.1947054610512234253673371"); + mod_test ("2840794355990579101690516447419567416103576933551526", "-225384346136689418.311568171615", "4159399848092788.810925291935"); + mod_test ("433169940324134426366793327.235", "-1918606541369710.9167801826", "369802826989779.100695574"); + mod_test ("0.00000231962990639112417450960779176176525188784519762202020426278", "11491626.8146875740651454657723913302260", "0.00000231962990639112417450960779176176525188784519762202020426278"); + mod_test ("-118317530966985340050567.3794340230", "-1290337888625470391870404816877827630953112876.297", "-1.18317530966985340050567379434023e+23"); + mod_test ("507941745866485347809651792.3258074064530387681549475622", "-78.8876", "48.5294074064530387681549475622"); + mod_test ("3280516686867.41769205935464611912132313550145186748", "-0.00000000000000125477", "5.0338132313550145186748e-16"); + mod_test ("39.99", "-196.666", "39.99"); + mod_test ("198328732837738155510399443.82996", "0.049415792708", "0.034407057628"); + mod_test ("23.9909397975464820637937485614", "0.0000000001050229258855441", "8.54924991032156614e-11"); + mod_test ("-1157214583831665284482", "1.0988344", "-0.0759048"); + mod_test ("19626.043251177620", "0.0000000034291719721621", "1.7452276531105e-9"); + mod_test ("11144329315299884830592174718286.015391668774749336449044", "-276730.619204816478", "84261.983174911066749336449044"); + mod_test ("71.3348063927327012696442274193666742024", "1.003", "0.1218063927327012696442274193666742024"); + mod_test ("2353.964728726069", "-1147885339335726766004631.4827280116227481840172642411087841", "2353.964728726069"); + mod_test ("-3.4", "99841150890712628939215423679763543630485717", "-3.4"); + mod_test ("-17423609848720294448155093008156493860946579332348817", "-407401303.1", "-39793145.5"); + mod_test ("268219889", "66408.228187594864", "63463.578491939168"); + mod_test ("-7067928231578399800943353710459167713.4021506", "-44099.172874028", "-34277.265446476"); + mod_test ("0.0000000000003143", "0.763206816948175243403280699590867", "3.143e-13"); + mod_test ("4.036744136250", "0.00971177", "0.00635958625"); + mod_test ("1793819.269108", "493646013195.8520", "1793819.269108"); + mod_test ("-15826468630.86978", "-0.000000000000000000372629410691473337097845426967193919000496413569810554360", "-3.3602620906243362074116532307435310028959396493592065148e-19"); + mod_test ("-18.7707479011363", "-0.00000000000002581603178761489486464393960475608950385662413624987", "-9.1067040799565470223405647782611453765936052898943e-15"); + mod_test ("238432236541400642177165.39210", "-5", "0.3921"); + mod_test ("-6811268416946324947973610791528879575619937612025", "0.0000000000000001069504654335424482337205845600046597647661", "-8.16882733210848477277494710610839496492589e-17"); + mod_test ("-0.0000000000000001763427790981229873712832162", "-0.00000000000000000002454861590426229238192323806393241482688272809526858064170", "-1.00710578069411919285971867734642985013640916857852506689e-20"); + mod_test ("19755770505453660565232908.50109071", "11636774869145974997.1", "6173329669666681241.40109071"); + mod_test ("-0.0000000000002209009508639970169662640887364083811", "0.000000000000000089645450775854240465099382429782771424049138745143690592", "-1.4560152292168460259210429423632311142922131965946381312e-17"); + mod_test ("563088", "-0.00000008456562014728262541201891984898", "2.11408406705846430113462806523e-8"); + mod_test ("0.000000000000014349029064561994176595511", "-185.73981699167343715247600", "1.4349029064561994176595511e-14"); + mod_test ("-0.00000000001083082172818863769543", "1190273509470734307.14840", "-1.083082172818863769543e-11"); + mod_test ("-0.0000007000816503264538441903792097551608671", "426939", "-7.000816503264538441903792097551608671e-7"); + mod_test ("-74639664.5738469080670677219615636886365697", "11681605088890876252615.81485333", "-74639664.5738469080670677219615636886365697"); + mod_test ("-17473762843659544328007830640965916", "4735599287262364762422146713625.0556784154158620151196", "-4.1370729486807194325314144030856023255308850262237956e+30"); + mod_test ("-35798372944152782907433662314743475258228956226653087.007402", "2986648933436031786673397525017144049.527376", "-2.586979851276128040119426347481949619034666e+36"); + mod_test ("594962882338997095.95600951831319665393181826", "-0.000040093460748026675395936734376802508692547860", "0.00000106629014969426833642467613848819248141182"); + mod_test ("-98128552510799809261642798951333594.3", "-0.0150759218573700771020952512609526302985126417", "-0.0093980498660155309329725865407755408137845842"); + mod_test ("-28905866.022560718711724183906982038769016", "784580.53565571528753557678117", "-660966.738954968360443419784862038769016"); + mod_test ("-47314330483943356635.9", "4636924735068749202877120062.478835103", "-47314330483943356635.9"); + mod_test ("792568.576", "-1979027334.876406", "792568.576"); + mod_test ("2082231914.648466978927", "0.000000238131951894409076127502052426857902593605206359", "4.9424034607223232258131091994225827538144585637e-8"); + mod_test ("-3411944212928743691.0878807671609226126352448564441", "-35500488815007653257376478967389.5309684", "-3411944212928743691.0878807671609226126352448564441"); + mod_test ("41501124315127150415.980342038928850343648471670", "0.000000000000000000053662500082765049695814837696308208138940564988179296927086", "5.264308454143252141026226146634076056628101699532578384974e-20"); + mod_test ("-8105952948653953296.0699944999485216414062634578", "-86.16623488113", "-12.7456165483885216414062634578"); + mod_test ("0.3363661610339352417675708613420020704697718205608204221483", "0.000000015893", "2.1879352417675708613420020704697718205608204221483e-9"); + mod_test ("-2210034411007336613344093585636474574394416824601186", "-5697969717442263672614992696703295962015334995729800", "-2.210034411007336613344093585636474574394416824601186e+51"); + mod_test ("-19624478.484621985479326459244324640415206", "1107819793188885.038860867", "-19624478.484621985479326459244324640415206"); + mod_test ("0.0000000000000000027", "3631127636124777836273261304119863249137.03745979717836204256", "2.7e-18"); + mod_test ("428890527306795", "1668185806826743336487.38672816383301425507832145712664", "428890527306795"); + mod_test ("-118370476542022564.70047766418757366578", "-1228521.83117210457036591052269149317400179607062584234", "-805751.95595400766902842055758098139122173498985457682"); + mod_test ("185286933", "2634674111701244320881602650.2421109389", "185286933"); + mod_test ("-7816588257503735832158705.4", "-11446124074192432060805137497617191.5046", "-7.8165882575037358321587054e+24"); + mod_test ("-31168709097858.0", "-17218.68615703", "-10432.31999475"); + mod_test ("-1193968682851815353278.892", "16233847.397485882794799291566785542165584", "-2556325.316384280762019592125096432742624"); + mod_test ("-0.000000000000000000429785230445766557625717658510987246778343793367089404", "-716612915846390386454071955208510757337687098919716", "-4.29785230445766557625717658510987246778343793367089404e-19"); + mod_test ("760.787298", "-2603560575.1399", "760.787298"); + mod_test ("-18743620234475404481049.76769588257", "2970338095303214.63301260929704123104600934034050653148876822", "-2683854960098077.08770269798321468491598555389258155949698992"); + mod_test ("-226541276978", "101925495756252505609089275771221594.112426392858882002885", "-226541276978"); + mod_test ("-0.0000000000026983", "487122954421920311203.9905962", "-2.6983e-12"); + mod_test ("203252938.721649167192089873629233502162687452", "221.20710344937374", "109.823743846799189873629233502162687452"); + mod_test ("-2171101234717018601412530711075541768098", "-1268548470639454153963685.60015", "-1.07365992860948866922827981755e+24"); + mod_test ("11052697820027335752485837522176323720287184.550750155", "-553810966103.02590552831652788244539331678489580819303648", "525192380831.77413824185332709628772520041226644631472352"); + mod_test ("-3884559198046300262478611735179875511934488582167963637380", "8.036636030768", "-3.27660412216"); + mod_test ("2.0", "-45.2", "2"); + mod_test ("0", "-0.163349511377933876791410190902077510", "0"); + mod_test ("-730572579439411951784822207340668557", "0.0000000000000028", "-4e-16"); + mod_test ("0.000000000000000001168651449131923286954932276275033439404771143330881475", "-47210255.27658777658181021168421281357", "1.168651449131923286954932276275033439404771143330881475e-18"); + mod_test ("-30769567698.202004635902421797597470637", "-2117030646075139493515312478944809325583483881105", "-30769567698.202004635902421797597470637"); + mod_test ("0.22203824107047587018951755693974277131200048220", "-136.52076", "0.2220382410704758701895175569397427713120004822"); + mod_test ("4489045408103326401151265241469016732232592556114681884438", "0.000000000000001314763381159004315842197", "6.8074495798791174068935e-16"); + mod_test ("-21348129287570112842795163717617654521736400718052510", "-1995504519697835638540568077.0196418", "-1.1402642626986948193867205135517104e+27"); + mod_test ("-14.48287435139371979106", "-278112747003022610742126629257947172194929.64536", "-14.48287435139371979106"); + mod_test ("0.0000000000000110719145581948062251355493585472867", "-7978399748.1558009430388367158631487853516499292946094", "1.10719145581948062251355493585472867e-14"); + mod_test ("119501784974", "-0.0031818401885065375156179", "0.0016290398380208417060804"); + mod_test ("-0.133707475845003705950317295850288779512882217932", "329652021145697865591302212038174941275757995054.713783674845", "-0.133707475845003705950317295850288779512882217932"); + mod_test ("-12542871568091185279.0460234294798148233", "25754.120417", "-21877.7952474294798148233"); + mod_test ("-3818054566.20841286030331762281612", "-1936.24778639274331686587963417792515204476546099", "-472.43293099041187629213445041741051174848665583"); + mod_test ("118000308055.9373727402663957624604063", "9918.67574327356", "4846.8753496034663957624604063"); + mod_test ("-11.38", "-24193758424792525116909481098205.677446", "-11.38"); + mod_test ("2.46889727437003280961289299604392122014099570", "-4644753841435365046988433379518839103541882981334804890807.8", "2.4688972743700328096128929960439212201409957"); + mod_test ("1805667164641860305883.31324", "0.00000000016618955069904640141657751519707415214669847044", "1.046133052518583849356487736801523519251586328e-11"); + mod_test ("-0.000000000000000000012169689776926610597997556555980427323944885949030949402", "-434910402113045297454505.1302573189763520", "-1.2169689776926610597997556555980427323944885949030949402e-20"); + mod_test ("-1739.4", "0.155584511367509963502532516739270411", "-0.120747422606118005188995371696075431"); + mod_test ("-569589695561180399227800563933576000706960457.3656765081522", "3483.46493456384339944984809629410413910476502", "-3467.25917700145185407850776398960809939327178"); + mod_test ("27827944878804.043096443231553973596298120", "327784539432851688676.574297", "27827944878804.04309644323155397359629812"); + mod_test ("-0.0000000000000000000273570270893076789122004877379023084477997941182649713787", "55071786762378989.632689594", "-2.73570270893076789122004877379023084477997941182649713787e-20"); + mod_test ("-1", "30698458.1545228514266", "-1"); + mod_test ("-77.6796737181065072239544734403386720988476876081692968190", "-48043379.33911367817680827247020826", "-77.679673718106507223954473440338672098847687608169296819"); + mod_test ("-0.00000000002231552048713565363805177481170756001463248", "-7745938658044151", "-2.231552048713565363805177481170756001463248e-11"); + mod_test ("4080930738001215900471542815678.870", "-259094.384407758455239", "219215.641754292988748"); + mod_test ("-65148376658415.8821831041618603950", "176.7", "-41.982183104161860395"); + mod_test ("-20649466814.805802613083057980846632715554163812995", "-0.0000000001319860149268122557211741866249364289650956", "-9.623959984992160004489809813728963916899e-11"); + mod_test ("-8637039792424460231", "1171511157428179825785002.9414399798460302750", "-8637039792424460231"); + mod_test ("170120714324740496497515610676549361259437493939036", "0.0000001984234593401508456286993357944778724317751259644793106", "1.80272091831781979821089649811533712715612789460516662e-8"); + mod_test ("3040385342.35657760274052", "-372946621956569451.93539995558371617994622295531744", "3040385342.35657760274052"); + mod_test ("234417346052636032.106833697570476435658983423056", "405728269025466785030711845788149565209977.743", "234417346052636032.106833697570476435658983423056"); + mod_test ("3003698058950457901967364.923201608", "-0.00000000000033926708389437080558726155721138587500872389823", "2.3077148260391721408496333950768060426097166773e-13"); + mod_test ("-1", "13121297327432473503324600878404", "-1"); + mod_test ("-0.00000000000086987493647337590015438704985", "1126309963348141179998313355117347492625867522.06445459173", "-8.6987493647337590015438704985e-13"); + mod_test ("0.01175883004658442799157", "-1304796615695885174911897002429657121243.096878772927435101", "0.01175883004658442799157"); + mod_test ("-4.1", "-925940.0049", "-4.1"); + mod_test ("94413979984015715031.72143", "-44956570520496128861135438942192313346223.4679844", "94413979984015715031.72143"); + mod_test ("-2084.96276512750756221737052806049261165250425", "1.5202660037865707", "-0.67807393611913251737052806049261165250425"); + mod_test ("5530042131715182582", "0.00000076755550127601384796182326285660346554068838", "4.3620483782819522891660511451578934939479584e-7"); + mod_test ("-67042.802", "-28411888994.212820705785482909844033014", "-67042.802"); + mod_test ("-5360742.0", "327368856548045.08220112714929243516", "-5360742"); + mod_test ("47117230722.16973123915245237545229011004357913004", "-47488231.617918014245187991287717374685823103416490829", "8904957.195061107925965018036654421707060540881097632"); + mod_test ("-0.000000000000151343572349948255798487186356", "42.39640064100021994629331666", "-1.51343572349948255798487186356e-13"); + mod_test ("113840373593648670861500086", "16082411799435623101958677220820405667", "1.13840373593648670861500086e+26"); + mod_test ("-8.22", "-2867798109411674.996765068247085164513407273890902397064937", "-8.22"); + mod_test ("-3.50238614", "-6860188389136636488339219859054193101069684390", "-3.50238614"); + mod_test ("107107360259917227679425620190.388983860971684", "8800479523270977282088607107997626691064406556317263323.341", "1.07107360259917227679425620190388983860971684e+29"); + mod_test ("-175822.1223383477", "-88621983013742415713.67926832", "-175822.1223383477"); + mod_test ("-0.0000000001165498478337125015371156469966957212161218123244751", "-62550285299530518719359714148367546793907", "-1.165498478337125015371156469966957212161218123244751e-10"); + mod_test ("0.0000000000000000320110187403311537074296810233047925148", "-60407506473103.897451724471", "3.20110187403311537074296810233047925148e-17"); + mod_test ("-0.000000000000000338282064563114", "-96190376454071434357.783403611375151575341982065544942431", "-3.38282064563114e-16"); + mod_test ("-0.000000000000446753711341", "-9.4", "-4.46753711341e-13"); + mod_test ("369078971611659797359596697169091.7394557", "4390355307871218680185944", "3.2920328769890124360129157394557e+24"); + mod_test ("0.00167752355829931578551694576878658836500507142636702529088528", "3276066309050", "0.00167752355829931578551694576878658836500507142636702529088528"); + mod_test ("-40341913269616270298908054352.555424105652", "-76.6805753", "-22.343535105652"); + mod_test ("0.000000000000000234899796181467417005659941", "-0.00000000000000002455754630676905247611", "1.3881879420545944720669941e-17"); + mod_test ("-2288200091016313974155687089998490026813781889257797", "173612435224249143072698340434416969557762958", "-4.06305517399251906560023908396396030698941e+41"); + mod_test ("-119.570203264189", "0.00000000000000000270873280446606560343105459296495864", "-3.0654086667132932857371380394960016e-19"); + mod_test ("9636003428434421863325355207384758", "27189148267469.7985900247652", "763104629651.47867591268"); + mod_test ("336.422676596", "45198935114500.3922307046", "336.422676596"); + mod_test ("-14.0627943158485824648781649958871436175344604029182482603314", "514937038588634.2538384203447", "-14.0627943158485824648781649958871436175344604029182482603314"); + mod_test ("0.00000023418399644897328432613203542773200097298268", "150.05994", "2.3418399644897328432613203542773200097298268e-7"); + mod_test ("-7549019185595.78985813486261693520665842030485693423", "0.00000107047", "-3.7760261693520665842030485693423e-7"); + mod_test ("2084", "-4702062390.892", "2084"); + mod_test ("-0.000000000000004338", "23.449915", "-4.338e-15"); + mod_test ("355378988141704324089218417352212802.4373051939435896809", "-410089.6820", "397574.1193051939435896809"); + mod_test ("-0.00000001989462540690061730462809985539649615779", "-38.286442069994941913718432", "-1.989462540690061730462809985539649615779e-8"); + mod_test ("18131048627056749262739468342.355859006591", "-1199.6142723004281428", "211.04880824112304"); + mod_test ("-7485271015053088795456302791998022618551521.6832", "0.0000000000000000000469320709938399196323702081094328803321", "-2.69710660151015687863998038860418026399e-20"); + mod_test ("0.000000000951589985684289940380019704065655070039753", "-26373114201649323963859575.5038618827163", "9.51589985684289940380019704065655070039753e-10"); + mod_test ("29612852829840055823.4234313598", "-0.000000000000000000390000839472495342007727670085919905954881", "1.00427280201824924510562417012541840544546e-19"); + mod_test ("-5607158.61839129739841", "7", "-4.61839129739841"); + mod_test ("-5033.1047890916762223467249791215764", "-125308255061340894094178.363334", "-5033.1047890916762223467249791215764"); + mod_test ("721650415570508.30568044521", "40444523802228.33072733", "34093510932626.68331583521"); + mod_test ("2909689458580570441", "35832160731.298726", "11893825723.095282"); + mod_test ("-5860896283.24109", "-0.000000000000000001291619269537172108644", "-3.63300889125010974528e-19"); + mod_test ("-194225255714783295041136360134265455943072328542285", "69.6", "-40.2"); + mod_test ("-64931541870946970276.043833373186791755", "0.0023858644", "-0.001926882786791755"); + mod_test ("1768097901758505513385227.27886663656389579248832549927529", "49683790014635", "22391913150827.27886663656389579248832549927529"); + mod_test ("15607444724715380472693190116075827307544230542858", "-30863780897913937221259082805810494697060093553853613140", "1.5607444724715380472693190116075827307544230542858e+49"); + mod_test ("-5", "-4637217487418.54919740129555570192754032790658061945", "-5"); + mod_test ("-0.0000000000000000000828", "131673552653745805914768.46227", "-8.28e-20"); + mod_test ("-0.00000000764789734", "1709371095001247612801478608832281576263433223592134788490", "-7.64789734e-9"); + mod_test ("154437761882957023383482721504354803201034660811788829", "-0.000000000000006907027", "5.846749e-15"); + mod_test ("715263.3", "0.00000000000001885535871127301429501799", "1.588206408282257808507009e-14"); + mod_test ("2", "-139137", "2"); + mod_test ("-33.5", "252567485444977003649.689937162645", "-33.5"); + mod_test ("0.000041876254378856129586442165482266321783", "322959107295001633.58", "0.000041876254378856129586442165482266321783"); + mod_test ("-54186163890839675559037155.29991407802075734", "0.0000000000022878015271202914230826203651610666594361551538884626909", "-2.2681269475854053487147725795128202226083088877672780421e-12"); + mod_test ("0.0000000009449673438295910508", "-17.0733222", "9.449673438295910508e-10"); + mod_test ("21265617482392966322733539382375295590999877466103755238889", "-352694528885882768342.45632391826455624336", "221163195874277534438.6290731360549322576"); + mod_test ("-1307793651716492003679476694280841686029964.654735755057269084", "-89261449075265.032742854725660037428102593", "-30163701590263.071635290265954147983863299"); + mod_test ("5914702572.83224302033871291000363", "-0.000000000000000886450497717875025851850", "4.967313925042229243866e-16"); + mod_test ("263730784.16038091", "-58734788098538430712.3", "263730784.16038091"); + mod_test ("0.000000001854032486183296214519", "-0.000000000355070869879153", "7.8678136787531214519e-11"); + mod_test ("-31884740503448053282155167604", "-9334262264990899277546182645450.74129764939998707", "-3.1884740503448053282155167604e+28"); + mod_test ("11557392706097.3454852500293825329599950094143", "2.52303246491988770256", "0.4512976779915504676799950094143"); + mod_test ("-71596377460606253231921860426759937622737054", "4887438282022459980414.75188230501531", "-3.01046057949271437163960532658638822e+21"); + mod_test ("233.31782712896541142", "-0.000000000000061176056765670789881258454117135367568123364367998", "3.1635882250994428931750935802393986143468670072e-15"); + mod_test ("365.885010333042430035757670950257510558158528", "0.00012", "0.000090333042430035757670950257510558158528"); + mod_test ("535753130902782277401868.255371439243127", "-143.10142002690254095307", "118.497092196935045142"); + mod_test ("0.000000000470393111281920", "-51.9318603511297101", "4.7039311128192e-10"); + mod_test ("13458.12201247046122595270157739959756782786002", "6387839814.018150125742976314622109379608051443", "13458.12201247046122595270157739959756782786002"); + mod_test ("-5.831075554650765329716", "-11970348016752784794040399571598021585032773536121.380962", "-5.831075554650765329716"); + mod_test ("0.00000000000262395619618229355713043239", "-87185298877269401376712558913.7470", "2.62395619618229355713043239e-12"); + mod_test ("141.0", "188771.3963534769931324152", "141"); + mod_test ("-9236972803514324.7806408277606845", "-0.00000000000007809628857086731989071851354", "-1.650710030068608338878824096e-14"); + mod_test ("1.2974663175859402553689735548443", "-0.0000000000001062828009896091833554986467183627932744813138557760818085", "7.61109945460281796836350249437619994413734484557859166905e-14"); + mod_test ("0.0270550933935502424060575696830352678525170478229935415832", "-451291.14957148684", "0.0270550933935502424060575696830352678525170478229935415832"); + mod_test ("-92.3630313298", "-0.0000000025494749392548", "-1.4586947958892e-9"); + mod_test ("5", "2.230", "0.54"); + mod_test ("0.00000000000000047652193195365538282280574751077165811188614512152190254", "-0.2219408161751349997065647158660685689613558", "4.7652193195365538282280574751077165811188614512152190254e-16"); + mod_test ("-11584699154744825490947848080895226756397973538", "87574.623306", "-81181.758812"); + mod_test ("677064505276662938729662254128.29994114", "707.4", "272.89994114"); + mod_test ("-0.00006824223430307152214885541", "-259323624933420687586166700605273793769205140227.53768209", "-0.00006824223430307152214885541"); + mod_test ("42649.4427", "6691515410463", "42649.4427"); + mod_test ("-1168876626035009643806416736226233", "615863945.824703012224567830126", "-392657283.272481237688137233096"); + mod_test ("-99850601104584713060403542.32679025848626541", "4984333871554095648842233050848980249665273650", "-9.985060110458471306040354232679025848626541e+25"); + mod_test ("1", "0.000000000020714284873094147095452920238214225", "8.535434304189538408987784126387475e-12"); + mod_test ("-40382172868238902141831024410171370609.8497129774930", "1302788268944196991798424860.3558746", "-6.82458913661894485779787415457058777493e+26"); + mod_test ("-0.0000002901522230060366316110382713638332433750838395", "1797816163.6022664896252467454244679282", "-2.901522230060366316110382713638332433750838395e-7"); + mod_test ("15.07", "-202256.9", "15.07"); + mod_test ("0.00000000001513399901378093", "-0.0000011431", "1.513399901378093e-11"); + mod_test ("8067543766555814361258.9809653", "-1063782.5113", "771356.4731653"); + mod_test ("-0.000007452478259217127353", "-1269742061.7650", "-0.000007452478259217127353"); + mod_test ("3083816844578.0036462734892162357142", "-62.043", "12.0776462734892162357142"); + mod_test ("0", "19676669.3210", "0"); + mod_test ("12000.579726", "-0.00000000000000000011473979542082043429", "6.885862514870385948e-20"); + mod_test ("157760.0162346769710343762123266316522595", "0.00000000000000002072", "6.6923266316522595e-18"); + mod_test ("12.56649651", "0.0000000011486174569183055328395211586383654058895981238621", "6.243894925921526655230893363862847927286267313448e-10"); + mod_test ("1619418216785919248186484303127025755692.6", "-5.32529795", "2.4485417"); + mod_test ("-7894381522375439472424053746795845545020655311347324165373", "22494560920042179494908995572822416399654.3988", "-1.79805849224239031722296510506179645210727012e+40"); + mod_test ("0.0000000000144180437967392496819227076903747539933453407576", "21.003335", "1.44180437967392496819227076903747539933453407576e-11"); + mod_test ("508588836239.155636417726778522264", "-402450669.2", "293641039.555636417726778522264"); + mod_test ("15935406874866887008916010678224808183941097", "-20533021922984769932524329949941646599184", "1.781862630705541277130637070090422974313e+39"); + mod_test ("10577358966.62645197", "-3902498.5606677997620066743", "1587867.216714614961912647"); + mod_test ("-2.3", "-247.215776", "-2.3"); + mod_test ("-0.0000000000000000004534097652705", "21900.378494953943", "-4.534097652705e-19"); + mod_test ("-622302543239963404259053402472736239978107701", "-37144508134104022867053839784711386961366245133.798061", "-6.22302543239963404259053402472736239978107701e+44"); + mod_test ("963", "-1143859.8306131050309784880555908137246920", "963"); + mod_test ("-1105334398087211096372825533031660097846.368", "676850877469691.4610087010635866598320915855", "-528741020326514.019428617163961817534907474"); + mod_test ("-33.537", "0.00000000000000000240610602831844082653894660603468520326205996616490648230", "-5.055045646408436609503461106111907664625346674246231926e-19"); + mod_test ("989.69", "1818860793340242.34985869797714179945790", "989.69"); + mod_test ("10897111350996763207208776906688937.9374615427", "34065063399932552093174621472004861573778946476274074", "1.08971113509967632072087769066889379374615427e+34"); + mod_test ("-11632431937037532580778695673.04032", "74582043438.8721965449504177221562482147014523596481", "-53296552278.8841298987146598409845587169502001115997"); + mod_test ("-141.4055769529530650", "136398726400805051012116675708221546904997943.0983953382506760", "-141.405576952953065"); + mod_test ("2436945370.995", "1123321514602145559580", "2436945370.995"); + mod_test ("68966344530824.7651173919961179400965271017811497107820", "3016650.5058630595142431070", "430737.119987074593653282096527101781149710782"); + mod_test ("0.000000000149640169704895568509292298172960103", "2388965841.03588731292125318485549177319506347036", "1.49640169704895568509292298172960103e-10"); + mod_test ("0.000015", "-3304.73941676117143286536062311830598946", "0.000015"); + mod_test ("0.00000000047066315132394427031416", "-6192", "4.7066315132394427031416e-10"); + mod_test ("-0.0000000000000000000581928591150593239271964107701426222875128", "5909007611163710886717422164.5826709875973058037321", "-5.81928591150593239271964107701426222875128e-20"); + mod_test ("31384923094914821999292552425.2009815380728309425967", "77537672972.35166", "11679771345.2858615380728309425967"); + mod_test ("-37567843820039777389745510805385", "-71883985.6201303", "-21998426.2683717"); + mod_test ("-8457.2", "-0.0000001173257195508166367392288464056131809270998457", "-2.69885424250247290675786668651098778106586768e-8"); + mod_test ("25100609273081546346038727027615", "0.0000000000000886831920439450", "5.162428876817e-14"); + mod_test ("-18047576.1098270311193001138015699506418833418804938917", "192214125807611.95755841586183852694517418512423624080241", "-18047576.1098270311193001138015699506418833418804938917"); + mod_test ("-95.588906373514114132242", "-0.0000000003929994337493746273806772122562877169246192899290", "-3.19339159019421511190151559546325880388122429492e-10"); + mod_test ("-0.0000000000000000002355739833279382506655556792223696880503752520", "-0.00000000000000079651826138154154521027236636093398105375492817", "-2.35573983327938250665555679222369688050375252e-19"); + mod_test ("-2007", "-6160033729282.9851660562442", "-2007"); + mod_test ("0.00000000000094972368099037971103433", "4734161412127674820247110768919593576233188914.242822976357", "9.4972368099037971103433e-13"); + mod_test ("0.138175287929598290229868824644141412392715", "-31558584857557504718252045560.11304", "0.138175287929598290229868824644141412392715"); + mod_test ("1196620705.9415675785887940558444736246545644683738095", "-70465530484696222361776144167727350283884319.64044686", "1196620705.9415675785887940558444736246545644683738095"); + mod_test ("11074860894", "1561765758632.45", "11074860894"); + mod_test ("-4381924184574059696448709.53108872210260149095882186", "1.028", "-0.23908872210260149095882186"); + mod_test ("0.00000001155422786572893769342087552370206756710219340", "-13931734385.2", "1.15542278657289376934208755237020675671021934e-8"); + mod_test ("69191800707.52", "8416.42298638305", "181.0075723297"); + mod_test ("2081967242.78645435603091", "-0.0000000641307577303646051321340042511613883", "1.04729585981376168223728825373660659e-8"); + mod_test ("851318799560282460315775006926769346175917826.47889714", "3053712.3623410179455158701230239730564268230", "440718.735027453982530562337797644313071866"); + mod_test ("-10058222.5796344546386", "6627451174822895.34794097800071486253721590178533538", "-10058222.5796344546386"); + mod_test ("0.000000000037566442917643747268847042234718910033651246885819716699339", "1.3779", "3.7566442917643747268847042234718910033651246885819716699339e-11"); + mod_test ("875.90002405088", "0.000000970077655599692785652735177637", "3.5638028118889148093740648709e-7"); + mod_test ("-62.7931846870391496", "-636485693987795148000356.1626652406993787", "-62.7931846870391496"); + mod_test ("0.00000000000000100341179", "-544501716519662.633193865233920", "1.00341179e-15"); + mod_test ("0.00000000000000351499628540049570637673", "-223431373521.7926681956463703562745846396661", "3.51499628540049570637673e-15"); + mod_test ("-220603353886874667147934643649.87295033625852695", "14892.592908", "-14434.15489033625852695"); + mod_test ("-0.0000000000000001612847241392420250768267369", "17433478642639304.4236073577621811634134", "-1.612847241392420250768267369e-16"); + mod_test ("-1883174595828380403709352050091085026369077660279268.9", "-0.0012895", "-0.001097"); + mod_test ("-125549014214.7375819121786172926612698843039792917253281", "-101.5885766453", "-100.8153792133786172926612698843039792917253281"); + mod_test ("1065766474589037077293252213448", "104.84555", "81.7216"); + mod_test ("-0.0047533898584759553535897361825760775807323217889394835", "-18213101567414468503998329412491692494599546949.8", "-0.0047533898584759553535897361825760775807323217889394835"); + mod_test ("1270005291407.8881300436", "4138621074845956468.09769209", "1270005291407.8881300436"); + mod_test ("-260441856275307932803222450437995247080731478", "704992903069127.4325788", "-431855187882906.333326"); + mod_test ("-0.00000000000000000009754763692467059466885260432113614665268499743", "-1095452837.106034703346392429672156", "-9.754763692467059466885260432113614665268499743e-20"); + mod_test ("15.2", "-9898.141488362", "15.2"); + mod_test ("-4.642097816103323517795932640", "2320173035769155029864.2360071417144711754883993503027", "-4.64209781610332351779593264"); + mod_test ("27232043073441728507866158240.138995261078", "-215290045818292170941580969748443497", "2.7232043073441728507866158240138995261078e+28"); + mod_test ("-7820551181460133788154158506805766936661586187217825438.43", "9043807302.81268", "-8827979159.46068"); + mod_test ("40454701041551859098452066940764312196468.06490346453770", "1.43336157528769251880838", "0.053020665769834197966"); + mod_test ("0", "6893071800513.175", "0"); + mod_test ("-23294105221282442798534198559904763230604376248570", "1108006854160532581.643019501", "-634324850398077026.428796591"); + mod_test ("-70.48", "425148951767015.661297750583259821000170", "-70.48"); + mod_test ("-40097263.65021696329198038628255519578725029828361985869", "8008783649.929271", "-40097263.65021696329198038628255519578725029828361985869"); + mod_test ("-3744957147569480041094559658.8985734744", "-1.39589737574796529539305515486016767152", "-0.007414375129527604087594017204876948"); + mod_test ("1", "12243765348634238072286305372976115524601373993259986307", "1"); + mod_test ("1133226250873003731000285272922.678821486883559776563400259", "-48449121713.05851357863749277194726", "46399517902.028653911554106994622540259"); + mod_test ("-1110.00985672050392625354008504049692", "0.000000000000000144467905969585159040405525015114077352752345766119586", "-5.0667226393916955793430389451065661055080904169044368e-17"); + mod_test ("281516884461013501680.63", "-1.4", "1.23"); + mod_test ("1424834076734161906.49994168746374", "-0.0008975084074165482738612610040251114952525910764632040285", "0.0003696875090618801911161885049781983725485998646848861645"); + mod_test ("-128763476617069.02187580755667", "-6603.36282886993434", "-2812.31711094080867"); + mod_test ("572750920744637008914545508209975834156579.5795909538492834", "-11502534832438064096814", "5.5309188778180859429155795909538492834e+21"); + mod_test ("-0.00000000000371736421699926447258798163058670009", "257486.470069146779", "-3.71736421699926447258798163058670009e-12"); + mod_test ("-0.00000000000000130129857", "0.0000000000021237415884955381438534891507974579736322323393189949494486", "-1.30129857e-15"); + mod_test ("97510480169357047959.778521006822362538", "-0.0046089528809", "0.003841092011662538"); + mod_test ("0.000000049938779602084071943723403", "0.00000000000000000040598762102204974283610961143933322030167695316672919233780", "2.328791623754087509772477793320317342677727105556945004032e-19"); + mod_test ("-0.000000000000017579612833728413841360648325607406735458075688296134041848", "-0.00000000000000000046795016181219", "-1.29104929872111360648325607406735458075688296134041848e-19"); + mod_test ("417587148573267450086061214415849335522635545129971", "72162262599593511511391535.25753637130715", "1.588290674385543384224627617743657423135e+25"); + mod_test ("1899704999505146.65318875024320183643806671", "8011298158372506449467236619268.06739540", "1899704999505146.65318875024320183643806671"); + mod_test ("-0.00000000011026161484148139283420032525", "3", "-1.1026161484148139283420032525e-10"); + mod_test ("-641378081607809826819509989054058308747306", "-32614433220951683931.97290822167335112076028624", "-32321533365320656543.47914416134229484916012224"); + mod_test ("73426.2174993055579013322865502961038551", "-22991170194389000791863400240", "73426.2174993055579013322865502961038551"); + mod_test ("0.0753432448671128796055779867138537182985932603289568836", "0.000696623968026162316598353569181604985489965", "0.0001078563202873494129558012422403798656770403289568836"); + mod_test ("-77918852302.666", "1", "-0.666"); + mod_test ("40834438105282568531887549132894212920316057.4119", "-69096.2816004", "9282.443256"); + mod_test ("0.0000001081007656128892877603069470142579", "-146763.9202434867", "1.081007656128892877603069470142579e-7"); + mod_test ("-19065040207291206222014126191923749015295117270838828148117", "-59458447985079036923403398069307106616288796371525.0", "-6.933918951125046770982521962871037753580749088442e+48"); + mod_test ("-50.454890710", "1.57811064514885740036542902647362298773", "-1.53346071038542058867170017931768738037"); + mod_test ("0.0000000000000000029130545090762297054692", "-0.0000000000000031732390760633505614997707573729383", "2.9130545090762297054692e-18"); + mod_test ("-0.0000000149477116306405895605823556902142791919238574341861798", "206795087.6", "-1.49477116306405895605823556902142791919238574341861798e-8"); + mod_test ("0.0000000000000000071", "5470646583815966704709512378933741816164381248458912550", "7.1e-18"); + mod_test ("-2357250201772857325710", "-177521457545596938.745399459682135971137972095", "-120288482421173048.58597434059857523000652259"); + mod_test ("0.0000000000000029091", "-22982331952112767752908263644179706433315770.17359251594", "2.9091e-15"); + mod_test ("70410732817903246800961841933624181629.60085297037", "0.0000000000000000000103454336294636075289", "3.524329949160506449e-21"); + mod_test ("-27369983157.1458440282472352878", "23.763912432052919566354032773607568646834308263895", "-6.32537443505237861917552362621110083695094947093"); + mod_test ("65056.653", "32408712.331948093248921801757883672", "65056.653"); + mod_test ("-79299703594581340711344589476907732591.49009044336", "-105750.084896815429373214442762165", "-104265.478222642869860762619825095"); + mod_test ("0.81012834507591033602543", "42890384.300", "0.81012834507591033602543"); + mod_test ("231647806.280", "2306380.2577620003122660083794072550721890979450664365063025", "1009780.50379996877339916205927449278109020549335634936975"); + mod_test ("-0.04266283385", "-231833828.7857580897334", "-0.04266283385"); + mod_test ("2.9617", "-417567079608596894283345450125373793666347.08065279467956618", "2.9617"); + mod_test ("0.00000000000005671393697246617", "0.00000000002372488709978367633405147788335971135485863563547", "5.671393697246617e-14"); + mod_test ("20411507237949901.00007048085657674491003063099663777294", "0.0000000000000179718685180331186307", "6.87219923858062022287294e-15"); + mod_test ("78562464348554551960.51656952881040712219428", "-360452902524757862924847627712001.90071009646781972063", "78562464348554551960.51656952881040712219428"); + mod_test ("-1784.7", "1.107", "-0.216"); + mod_test ("-21207.62887", "-30083662469912.93830185385", "-21207.62887"); + mod_test ("181794573664525362505571198963.74048513161596812818", "-0.000000000000000006966183124261834480", "1.44054114626355864e-18"); + mod_test ("1497127573695.63303", "-7299620151322256127312252586", "1497127573695.63303"); + mod_test ("-143331341997458746373473632414689879129001.0510139759652713223", "-1039245311665254920360224447402081.203667", "-4.163981858938863521252654102664372514539759652713223e+32"); + mod_test ("-7.42318768495154312740078", "-5725.37969786010009373491349369", "-7.42318768495154312740078"); + mod_test ("1.7", "0.000000000000000000358545942655", "3.3438498447e-19"); + mod_test ("-0.0000000000000000230187885344529285768794826532", "-97947.8515169117863685621966428355043134881268104806819344", "-2.30187885344529285768794826532e-17"); + mod_test ("0.00000000000032661966", "28146830442002.99800238434978678633563002677", "3.2661966e-13"); + mod_test ("131444649737941070", "20345737092636.1111991821569377453431132947653", "11188119511791.653283266182165083488115816162"); + mod_test ("-70.95", "0.00000007627177390524757759931", "-3.355915079851121925592e-8"); + mod_test ("-0.0000000359844794247092743644998506637111", "-821842552305272024445101236331.431697024181064278117", "-3.59844794247092743644998506637111e-8"); + mod_test ("11559244775803152829995363390516552788279232383634", "-0.000000003810335052601512043915061311335400346835301683933", "5.89171798463495478689746049513730071363650371891e-10"); + mod_test ("2527.74183", "43431759.31595200153", "2527.74183"); + mod_test ("-6716182884374088980171.84153844", "74722140.737467381748608636560886010812295783760526770", "-35823304.85096169083049875979729671181231669302395569"); + mod_test ("12972207321585575187726304322503969808542965.246569633947495", "831901009396237267279615788531418438.849563723", "5.26615819172264979504828722953264235810155283947495e+35"); + mod_test ("7665883776671616025905367508643801886903976481377913", "-0.000685209961385", "0.000289003802725"); + mod_test ("0.00000000000000130", "4084984.0344696574643138186852656784876", "1.3e-15"); + mod_test ("-23744.44703412", "-346011607426.441393159348354522971440097840365544826", "-23744.44703412"); + mod_test ("8434642778165686647233872583840184835847700452.5722438", "46", "26.5722438"); + mod_test ("0.0000000000000044601453487291992988959798617835937678162460190934757181", "-34957408111696949000006895.170094", "4.4601453487291992988959798617835937678162460190934757181e-15"); + mod_test ("-717775516482666361197134085201665528104789114410", "-2", "0"); + mod_test ("8276714696969298506623725320011988.89729", "-0.00616112392295074383996719947907960025278866567521351783", "0.00016560800550555404330800366686568701046935505208586586"); + mod_test ("-742605.43840212025", "-33.033107325052", "-21.18573495129"); + mod_test ("1172677829393895.629925304143622500366643409500207216001030", "37.100", "5.22992530414362250036664340950020721600103"); + mod_test ("10537016513706770761008.26248373823335994957890378", "94969063464568723440795883667.8253648809642701", "1.053701651370677076100826248373823335994957890378e+22"); + mod_test ("11451.575753798226574650597066008283798", "740458328282622534051565222682743827901164966582017856", "11451.575753798226574650597066008283798"); + mod_test ("1.572", "49515379454772293729194042647.91538", "1.572"); + mod_test ("-1", "7.059040", "-1"); + mod_test ("-34927437284064606817941117126.257390774", "-8736962940.827", "-3438064168.261390774"); + mod_test ("25409.947283363583521450111285770286331002016996164554", "-50439325984133502226433618670969699480790", "25409.947283363583521450111285770286331002016996164554"); + mod_test ("-541726513791047904976207535366014345", "-406733502885622404519647553066345.1969741566", "-3.642214502844845605566422347088878273975654e+32"); + mod_test ("-890820344589514985.0665574100007448", "-159324785981391287370653452100749211478426067970583818.931403", "-890820344589514985.0665574100007448"); + mod_test ("515196923836873751650822811674732842614640352.18206884311573", "440807068101717819348891.987", "2.0134973484292983702212721006884311573e+23"); + mod_test ("-443343.14120147", "-81519350429738153710983021502973.9213162228", "-443343.14120147"); + mod_test ("-0.0000000000000902702192042232797334789149068563741867484672231", "-7320", "-9.02702192042232797334789149068563741867484672231e-14"); + mod_test ("-45277903240084126.84557360106009", "-20896812318476199906609422.521834898564460854802489", "-45277903240084126.84557360106009"); + mod_test ("28165869957795828694237799735446687517170194.348151719250977", "-38550284385557947404379815866117040.122550", "1.842769006556153994091762719885883071901719250977e+33"); + mod_test ("15021482085.44976192138587853899725782258348", "-9904.699", "5677.35076192138587853899725782258348"); + mod_test ("4917.303585861", "-18.964359", "5.534604861"); + mod_test ("175476267.7992032958565", "-1036388592.3909824125745400050986887954", "175476267.7992032958565"); + mod_test ("170405946320111", "-17818386128487328808126289961", "170405946320111"); + mod_test ("8550180809850301212655626511667743382400090.02", "-6540107956116752962567.2", "3.55071180489327368509322e+21"); + mod_test ("-818705136461275003.08078930092467399502130815326105604518", "-39778740814076648429007.124204603754658", "-818705136461275003.08078930092467399502130815326105604518"); + mod_test ("-1.20675758374006649995086560", "-3", "-1.2067575837400664999508656"); + mod_test ("109.3", "94.6", "14.7"); + mod_test ("0.000000065573671480225125603602776141267516038374303", "553.480300880442516", "6.5573671480225125603602776141267516038374303e-8"); + mod_test ("296362415.06624949768701", "244445717421187779.650675510094172662242508672751839189", "296362415.06624949768701"); + mod_test ("29374332532.3238432343394", "0.00000000000000000005936857517089413921548905299963269225088201364509247681385", "3.119291720989480852560154607439451452770778662623725737015e-20"); + mod_test ("328821752173776490.719819431468332405273703018690", "-2542341869177777917056573693425171357215.954882228930423158", "328821752173776490.71981943146833240527370301869"); + mod_test ("-0.0012143107904367445170056", "-1003.4406", "-0.0012143107904367445170056"); + mod_test ("-3168184610490460.8945194460195", "-3573568062298202180968377963159", "-3168184610490460.8945194460195"); + mod_test ("-16901853866719201501332692.8432369358905099363918280445405398", "-31691345775963588152383111237433553165931816.117915", "-1.69018538667192015013326928432369358905099363918280445405398e+25"); + mod_test ("-93621088901252.29805520418", "-2.0188684214862682192621695358466139055618", "-1.8934621792649249958167189632731171199736"); + mod_test ("242258091070118423201219529950729719863290357823444711.8", "1108727758065732675.6587799039404934075575195715350085051", "882685173218682761.8921148545569801605823909846489452171"); + mod_test ("-3399066202816.303625", "2618943", "-318805.303625"); + mod_test ("-28834481903864652309.71183", "0.0000000000000004565222353934092602845491745327666313637270997826", "-5.34810620719243797216459942508340612766671723426e-17"); + mod_test ("213672683755841644553544017650723723396202652336.302605922", "-0.00000033677276118692029744817391550088675892", "2.934185014134463864485655375166849324e-7"); + mod_test ("-6", "-999457121904797189706147649392540679689483876019", "-6"); + mod_test ("0.000000000622195463951304359", "-448.8352331", "6.22195463951304359e-10"); + mod_test ("0.00273159264338707604", "131503167", "0.00273159264338707604"); + mod_test ("-0.8826707721080745", "-70.82", "-0.8826707721080745"); + mod_test ("-6.169582503328100", "-1", "-0.1695825033281"); + mod_test ("161790666328890520068178.994438807", "22534.8", "14223.794438807"); + mod_test ("-617570557615637.65256125752701839451975945", "-0.0148696896889671858", "-0.01332652388531174471975945"); + mod_test ("131606.29662152417276937754010546930907406", "0.000000000000009288216788868504125788635720602972497436211", "4.548851830590558791346414703724411897415634e-15"); + mod_test ("51.3977490595725037876457161936459379346361103", "-143177764436300664530563651.36873324", "51.3977490595725037876457161936459379346361103"); + mod_test ("-0.000000000000000000055480154187811579505094934438713145361465492675145621278503", "5", "-5.5480154187811579505094934438713145361465492675145621278503e-20"); + mod_test ("-426820677348783115368590283660534000419588.633035253", "5649682945695760173704.00", "-3.898820592824218831748633035253e+21"); + mod_test ("-18877995762227202359719425947641943773826", "0.000000003168736894305713249647662065", "-2.410163138756323232829425645e-9"); + mod_test ("-230734625.125675830245801", "-24887751.105039540142964", "-6744865.180319968959125"); + mod_test ("-2.55", "-0.000000000000000003328273034182616010363199785", "-1.2785182565162876532434802e-19"); + mod_test ("0.83072894855068062175257214671400", "347832.9728307138", "0.830728948550680621752572146714"); + mod_test ("1554", "-0.000000000000000009695649707683834887551815366596414977600762431389183799355", "6.05878904773660946108899894496980695021759226671044100733e-18"); + mod_test ("295506566.953646020992273150648001797147299", "-21973527294862.8233628", "295506566.953646020992273150648001797147299"); + mod_test ("2181379173600069460.2272418575314841", "-33121557.64630663141", "31392819.5003625467214841"); + mod_test ("-1102425661172241572593712529.4318", "-1655029068876808.4683087946075879962249", "-666832641952964.5659918135994689948094"); + mod_test ("98281131957208481431777620.35596736255967554627181769", "556842234645404079383345567305273.303513803874857641931", "9.828113195720848143177762035596736255967554627181769e+25"); + mod_test ("11835752763446.82223054394121198", "0.0000000408069264362150926140815302294483025590", "1.2484009569088335298499242835706081261e-8"); + mod_test ("-50148655247666948.0767382", "-374032530098.019610", "-243774774968.8659882"); + mod_test ("-173042648372113278197497944864583449315536350193384127", "0.0000000000000000000366841720", "-3.265408e-21"); + mod_test ("2", "-3771771239046067919037045", "2"); + mod_test ("-0.0053190456442251124794436212618", "798725962261113.7", "-0.0053190456442251124794436212618"); + mod_test ("-370307", "152017395754118405461987924364280", "-370307"); + mod_test ("-277699892815627339975120", "-143.6810986", "-27.6564706"); + mod_test ("-5775916.6464283799155032293780149633514899100", "2134.505358", "-2079.65303837991550322937801496335148991"); + mod_test ("1429207694023.57717520337", "3", "1.57717520337"); + mod_test ("-5", "4", "-1"); + mod_test ("-52848862092.572286019", "813661418640716426286793.75702600471722081556694278784", "-52848862092.572286019"); + mod_test ("1844275644561406088.1", "66184292639.361611328054340279", "30103188873.61915648682705296"); + mod_test ("-195554.912236539033400998430626025643711716348904995", "0.00177428671859871088664745504177813109978841798", "-0.00128510649380978957377209918017012798784363842"); + mod_test ("78.250868739", "200592382754.965094921301649595609", "78.250868739"); + mod_test ("-1.605", "-0.00000050108803722427943381", "-4.8521755346940298951e-7"); + mod_test ("-175950845282749621749.3060626398844805224872563725036868663", "-0.00031", "-0.0001626398844805224872563725036868663"); + mod_test ("570951706006271.614500911029949202716327198256", "9579594454359595046.96141239240213595155989807741151781", "570951706006271.614500911029949202716327198256"); + mod_test ("-101348056.99", "1.2", "-0.19"); + mod_test ("0.000001115108462416442750881276832385920295416166957454340", "2.391104283537695024603255485729184", "0.00000111510846241644275088127683238592029541616695745434"); + mod_test ("-384.29267210", "-42.6115840552808285042372718273816", "-0.7884156024725434618645535535656"); + mod_test ("-0.00000000000000394320", "1490433052780511340442598422397421169.9727476", "-3.9432e-15"); + mod_test ("-2", "-124412814393298131.63102541685397", "-2"); + mod_test ("39255373365250694983.01012619735480364604931589", "0.00000000000028924174", "2.8356244931589e-13"); + mod_test ("83649682374745658097928332400566916840.904100062101", "12515556884", "3441295412.904100062101"); + mod_test ("-37978362152425454856329406585920723065797640812416", "-40807030880665280609832.633548429382227699775", "-8.44139811680207521268650854435671218648655e+21"); + mod_test ("0.00000000117630746081997641552101447", "126289176518.39164497878613023988707803064880568", "1.17630746081997641552101447e-9"); + mod_test ("-1880854096029528626232093236836285358.8229354826767064", "-13.55", "-12.4729354826767064"); + mod_test ("0.02073", "607.8621233700367", "0.02073"); + mod_test ("-804231633252810472161116.753061839", "-51.139385439676348957", "-3.050773812069762116"); + mod_test ("5877876231822600040431086011103959340188703599.31851144", "-5388452483964553888.345931647692324169003115975043825880851", "1930961800526326288.60986182402199524006990099301495612649"); + mod_test ("77946964651085243.218457918863112", "0.00000000001144602007465348949097950134087916681540997", "8.85127498118220306889399715954400610693283e-12"); + mod_test ("-288323254635330759933511.4835", "-0.000000799099661848570195554780769778567229952228099", "-6.07308413294153274384235191515598586543048706e-7"); + mod_test ("34156.9612032703394033850068373910911950393885281598409066705", "-790.014721903868173877309773404251366", "186.3281614040079266606865810082824570393885281598409066705"); + mod_test ("-62309462096741992398456920.82284105487052640595", "-0.0000000069200714440436038475285366066199260381235724356693", "-5.1591434837700767752333272066996752713093302820209e-9"); + mod_test ("-0.03081418420901964033772890", "-2258.6097737546792912978930040107448576", "-0.0308141842090196403377289"); + mod_test ("19440352005832939832434953349.524735305804224848165284560319", "13663546035.3870791", "9500641135.581258405804224848165284560319"); + mod_test ("0.000000000000000000174792814753795064312182753542642524992498259236217566516", "-77523522800322397605770.38924241467650641624", "1.74792814753795064312182753542642524992498259236217566516e-19"); + mod_test ("-1815265994282465978739.24367005494108", "0.00000000000000000687759", "-4.05185e-18"); + mod_test ("-1.34345147096631", "-6865002719881812387470285582221951284174906039012461831", "-1.34345147096631"); + mod_test ("-1331063.88165", "11341955270415278370914418086588317083074.0482", "-1331063.88165"); + mod_test ("2.046", "-0.0000000000000005877097220931", "4.012083803814e-16"); + mod_test ("3545.91036649009998376741645699670257681183407320627384466111", "250.0", "45.91036649009998376741645699670257681183407320627384466111"); + mod_test ("3304.02", "299035.58", "3304.02"); + mod_test ("-0.0000000000000000000942622", "-0.00000000000000000025221802", "-9.42622e-20"); + mod_test ("342502985242332681201199551069.576", "-25743002421256401.04397330499669057", "13427630853006016.61638681371921084"); + mod_test ("0.00000000000004233681060170499506821015920037", "255095113757561337754353944933355753406.38155", "4.233681060170499506821015920037e-14"); + mod_test ("-28.5269472861067005353912", "-270472762833365.3801132655767", "-28.5269472861067005353912"); + mod_test ("-277847759.515216", "135166968528972", "-277847759.515216"); + mod_test ("-29856675437162421995266099874726439278", "-19896996992.6267371979256450155346521949519355", "-17602172309.435172515150769689705114114019276"); + mod_test ("2", "-2017800319934087984840833728734", "2"); + mod_test ("0.00000000000000007184336760908973", "-579084.38782881989356541750992", "7.184336760908973e-17"); + mod_test ("-0.0000000000000199905729465678002272254515680192399295794760827", "0.832997729248146391449238508309446517475", "-1.99905729465678002272254515680192399295794760827e-14"); + mod_test ("-0.000000000000000127832283699455", "-17051853.75327", "-1.27832283699455e-16"); + mod_test ("-1698692.68276072", "0.000000000000342190555852264550226068807192", "-1.32201147548526749368535158272e-13"); + mod_test ("-89715846809778312.0866002761050235922348184666331", "5683352", "-4378864.0866002761050235922348184666331"); + mod_test ("1867077.167389665646672502266524422230512016", "-8121328626157873800223785135.111300799674416212197931655390", "1867077.167389665646672502266524422230512016"); + mod_test ("215901.879", "-29.8", "0.879"); + mod_test ("5119759698.60147051603509092616983122712457476", "97582629730470.286607", "5119759698.60147051603509092616983122712457476"); + mod_test ("5632091904144.80457549", "-260531502143715092510.9558622691", "5632091904144.80457549"); + mod_test ("-0.000691477562292642246090904144721704048411477714", "-202833029325548043615849420487515503451726003", "-0.000691477562292642246090904144721704048411477714"); + mod_test ("-5014290818995813355670219945.489013253728448913277", "-49", "-38.489013253728448913277"); + mod_test ("-1.19", "1.14", "-0.05"); + mod_test ("6.01200548016561079", "-25.3", "6.01200548016561079"); + mod_test ("0.0000000000000008934209997058692257", "-9845722515207.841", "8.934209997058692257e-16"); + mod_test ("-8271.180908766644265814", "-532.21", "-288.030908766644265814"); + mod_test ("18149268424457.205469", "21102403", "20109889.205469"); + mod_test ("0.000000000000000005630166790779595999136", "0.000579481131868747005452691950764827230956628754512075686", "5.630166790779595999136e-18"); + mod_test ("-0.0000969512096310107418573215633893505216", "146313161286844954805207556174167131617843885.68176097", "-0.0000969512096310107418573215633893505216"); + mod_test ("-4.4", "-6.1775206278626", "-4.4"); + mod_test ("-534834.70968332438874787934900992041831587", "-38363548234134309078598125637011026.84251944598377781303061", "-534834.70968332438874787934900992041831587"); + mod_test ("-0.00003406607808", "-0.0000652979835334948349904827499755959633629915945362770066", "-0.00003406607808"); + mod_test ("-1", "-2110983581171793713817325.1475619322694002968191006", "-1"); + mod_test ("-80227305.1656", "1944676344179122208154551672251566716245569224444.0", "-80227305.1656"); + mod_test ("-45889999955242942968871808966625304007272799508621", "8550404.862499169389885162309987843918802343917887", "-4729231.891447747380274990179385678025799484562412"); + mod_test ("-27878389918833569427320729603169170858.95474004228507890192", "23932009803269840591376795875", "-3.41193385706058529612983948395474004228507890192e+27"); + mod_test ("567202319309292978520604165782060160263365186515328568", "-11334572195439351811672.1473522129007618", "8.0497193228717959915213827171314311074e+21"); + mod_test ("-8697359171345893713842426564522034778871562.5154932", "15619404167072.618217767650", "-3493725216866.96939850825"); + mod_test ("-218.363776", "697131146810968473489.82299654842890962", "-218.363776"); + mod_test ("26202481114591937993.735307329625927271775", "-304156997.304184411106538785706126202394720899", "140113250.272976945765125367941961760435198404"); + mod_test ("-0.007731087980246464302345811575", "-24413038924588027145692146.387588856788321", "-0.007731087980246464302345811575"); + mod_test ("680497639988324180.39625512073408", "-4532942013750624897951996571799269425412122", "680497639988324180.39625512073408"); + mod_test ("-0.0000009293033204732942233089593840249955775555658283600103866", "-173511.41982571409206143199884579179605", "-9.293033204732942233089593840249955775555658283600103866e-7"); + mod_test ("0.0000000000098336953795657517132120257800838", "23300757376665714817666483157023722058388.5033214128449579573", "9.8336953795657517132120257800838e-12"); + mod_test ("41084687427290874759976776474299799533721185272283", "193585163.52662", "163743760.94914"); + mod_test ("-116.95132", "-39255072372928843286086966431.00", "-116.95132"); + mod_test ("2347142650267689935587322698.7284595028691", "-3", "1.7284595028691"); + mod_test ("0.000000000000014286361610", "0.3810969482393140582407695856576689976423039861", "1.428636161e-14"); + mod_test ("-7308074599589641011784024611055476301285", "-2979647.083231856789860049490151382783519022739462374", "-41940.765367177770459610205511353021036633288408806"); + mod_test ("357753139664202.5873944", "-41.95942286390296", "23.4743830801152"); + mod_test ("854571067694022997.4884", "6537373963.3180845607368152893095548460", "6053336053.291260561298904945337925438"); + mod_test ("-0.00000000000004386908462560891112864885989973", "129740635819911122760039.7464589619454", "-4.386908462560891112864885989973e-14"); + mod_test ("0.00000000000000021290574183432875072166863135108510281580702", "61908914489485349291471752909373768165637670.8208", "2.1290574183432875072166863135108510281580702e-16"); + mod_test ("2871883224301570575582468652.9376262287274595077514806", "-0.00000152916795423240707414339", "5.3155439780727520002144e-7"); + mod_test ("3", "80708788610217964553584510306368.549353793563", "3"); + mod_test ("-10835622995844.77266724348161957054233451560047028326613046", "-1175193791680339.76056817361012416666902891954476177079", "-10835622995844.77266724348161957054233451560047028326613046"); + mod_test ("1025038648031221253.57383030896217", "-5242.40711853563044167975", "2542.2793327788128154595"); + mod_test ("-0.00000000252", "-220187026862816215614922589820191309081445441861274232.84", "-2.52e-9"); + mod_test ("2438882128515521004992810616244816644660.875", "-14585625494005545128827621", "6.211192260353379557970309875e+24"); + mod_test ("-1253637.42184071686942470", "6043.294", "-2675.5638407168694247"); + mod_test ("30.3149681983737", "3.96", "2.5949681983737"); + mod_test ("458648663984496211521246069201336181", "0.00000000000000041796956694972368386032730115563266442065659", "1.189340470755219691379214537787056846685979e-16"); + mod_test ("-877569106991311.769260729863", "2246530785645583.53767418", "-877569106991311.769260729863"); + mod_test ("-33180244.9424", "68040037.571844483716882853268188712468340362", "-33180244.9424"); + mod_test ("26056925297726128046555.65872815844589322660275", "23799748744565261102060860.628349245228", "2.605692529772612804655565872815844589322660275e+22"); + mod_test ("-2.932266679268", "-2061492876.118067901623547245130932150882910", "-2.932266679268"); + mod_test ("-24303392384298907971178613116155773044858954198134", "0.000000144547733182595133021", "-6.2763446759435083203e-8"); + mod_test ("9977", "793339.568052455522323049704543732060826", "9977"); + mod_test ("3044797849984420605285366.474651143157", "25186260049851668345583291614301619318511974775753812002050.8326735955299366787084106211969141751506", "3.044797849984420605285366474651143157e+24"); + mod_test ("639737463904283952640443433078141655542321388667481890755297474427803997023609757112922145297681502347448794470168805201764741986941", "-14552442514714892538227035420.61249278214225741", "3.07716512012830819205367001585789874568359778e+27"); + mod_test ("0.0000009480666812553237528290117310639076036954221787358487462393246935364400792376", "1.0", "9.480666812553237528290117310639076036954221787358487462393246935364400792376e-7"); + mod_test ("16673429143256557896853574875292172327063389650998117777668136985538005.9156698099892691658894660539763873869793114863329930039146096813387028", "-107478408440617999633969729.9071529239187240331642550654002067338975836414285167506215860", "8.20260811545606661396908107304136068380872993912615354808000919495595106968750582594596813387028e+25"); + mod_test ("-2433298586307081.77465641473337660801763802817481653388429397435772288734383710955919905923279924807", "8945608818026652762135420517379.424606537007", "-2433298586307081.77465641473337660801763802817481653388429397435772288734383710955919905923279924807"); + mod_test ("-70843295832985633806095066724872543838444364150876355516508644344503020757888058408332911592444048015580157647", "159194370214483300881159411658565511338185028333524386712582766324718381977826309423371642975467856662959008464353958219661", "-7.0843295832985633806095066724872543838444364150876355516508644344503020757888058408332911592444048015580157647e+109"); + mod_test ("3.2263", "71756256022538928427069542438.00966178692388729446382444038774751007836179716329976575691385315023922435789196791754653262230986812059146", "3.2263"); + mod_test ("108061134.3910585273259047952072200021695505338334592792817809710438", "1260951025714501457005284501987116458944716243549637898428510181316826466436575714044748818353924236900363398289", "108061134.3910585273259047952072200021695505338334592792817809710438"); + mod_test ("43607983963968869595947769368216107706521387015680146006305613629433990860442947600228456010092", "121385730326389922895424600532542775257956396540395781939587936260842487516174244325430.384295616198856908112758", "1.1504925896106825966642741273863721105609952802207648727165046290817382897631508088378461034727326937297965944e+86"); + mod_test ("-2.6480956814", "2148671523057716670055099537649941488566244507589768590863804139800870729193528442.071130969310679730958621114", "-2.6480956814"); + mod_test ("-470479333263.84377245126007813562135983915023544360010239389244912214130585392185699431847364158901094167357758815083446794565320814454973581796", "27849448232164647723510637195798019946766053448137414448566670989993.67717797401551478004030639298176072944", "-470479333263.84377245126007813562135983915023544360010239389244912214130585392185699431847364158901094167357758815083446794565320814454973581796"); + mod_test ("0", "-6993020667326513594.01598727239030644128692238032346465300777782504759087255641592855556786881965341488969418534051814789", "0"); + mod_test ("-10372286284244779022048585", "-0.0000001930730138191035178741471788596965420386122185118633654121349245216394001018297980054707996074710125164147", "-8.47592995170001700266169749815180334434465081954780254569435821161404742961756995939834569063835498482552e-8"); + mod_test ("274897009856813.734380955979520483734957204601027214931003941720546146487845256149072527968056465339318846303131569226913408938616354923540700172412", "7", "1.734380955979520483734957204601027214931003941720546146487845256149072527968056465339318846303131569226913408938616354923540700172412"); + mod_test ("738408012842109785457164849764507323379297.79095792233769102310198027453532813226348191188862586945019214410536832", "15306177324248047715406533.5158700026", "1.506634005344982055089315836033881173769102310198027453532813226348191188862586945019214410536832e+25"); + mod_test ("0.000000001307002813605936443383593439823579112009200431906135937099617451361199016339230482184530115838223218189460633917243083200", "-156347131201.0667716470724866", "1.3070028136059364433835934398235791120092004319061359370996174513611990163392304821845301158382232181894606339172430832e-9"); + mod_test ("-4792567274869561212802263.9162146352653952716695372928501404982289832583166534206544945624150460220976057951121526613072397239125750526383369389", "-2571615359217819081745372380499521952091705406387642084116393860754896982150026573094709965566690085424189906211974018648786870967996877095142", "-4.7925672748695612128022639162146352653952716695372928501404982289832583166534206544945624150460220976057951121526613072397239125750526383369389e+24"); + mod_test ("-40.05748869168454725527441481953494139473673991070979113635160468475219376406826789262579745739976", "-41875468662578995790027634863433077814557063632577215827031.031982081918392876105825240291071725658144212578666", "-40.05748869168454725527441481953494139473673991070979113635160468475219376406826789262579745739976"); + mod_test ("-0.0000022907766811721016183225617138609000543876574860984718810338550238748128247445010491861049613", "-3279074504656188611648707.4983942082641992057679531912380705659521798322669577604617597486447068188912830230847051445600458515668443081070949175", "-0.0000022907766811721016183225617138609000543876574860984718810338550238748128247445010491861049613"); + mod_test ("-0.000000000340313277", "-0.000000001255112168870655023338247473949331250106676281883642901353991", "-3.40313277e-10"); + mod_test ("-50225365.1475566438998761801442412", "284028617245837000189928101232939099744527904229835535.835746075", "-50225365.1475566438998761801442412"); + mod_test ("63.344721423304857459331086841825237874925064097", "57155073593666.40553442288889921516416834083269742567707391607", "63.344721423304857459331086841825237874925064097"); + mod_test ("-405919933.1066287819696386581647229483641869199888974504501408794124002251348919063696581146156799005", "2647178729438306865645909642983752549443679075960964976334982663855617.77", "-405919933.1066287819696386581647229483641869199888974504501408794124002251348919063696581146156799005"); + mod_test ("-0.000000000000130754174234156809102364575558", "1512769765054847098913787446631276445464675564737758845532029029227218416561642292270741819169983956650914922547871552583245517440681359875", "-1.30754174234156809102364575558e-13"); + mod_test ("-42805325218726498366672740080295203192725414965527973209314316749.7120445518644682586008052614425260815242140724520046592053081", "0.000123298332335657505901061098051881119196170384724006568439947745355121025753230625359269654114501774394590171609541470588517", "-0.000032325304000891296915093212441483965264186154572168660357953720611674306961720593830907904561258705086770592138813164224068"); + mod_test ("-75210406056668422373802918016368260769067586508935441638493539318778550326.50528533489988415483952", "440622997.6355053630471029", "-340429684.42458949795004585483952"); + mod_test ("-1222922824327546500522220970819290434122898473371530650066004876062845284114.47721875136651190", "-1379027454245733767586", "-881180208974102493198.4772187513665119"); + mod_test ("-30656582150188875494703614722772772221409126232115063256882064964663663147033209144753246762464712.948730003091026599897432459556025696", "-2913934951186033025005819092772439514996587951119743767357433798109195725658300879072952407504422194931477368634077", "-3.0656582150188875494703614722772772221409126232115063256882064964663663147033209144753246762464712948730003091026599897432459556025696e+97"); + mod_test ("-6460522065030402275014019.2874194931729240210323452441436174892", "-84550416554285528170014238135907266547165974999578715609084038263.46129840157771271779704084743623515311185778729738812", "-6.4605220650304022750140192874194931729240210323452441436174892e+24"); + mod_test ("-0.016364386296444405533757351682555346465502820950062088651150128675773350177464733695707386307349689534592475248473689442", "-662351516465.9032743599806965674027961010966377214913163", "-0.016364386296444405533757351682555346465502820950062088651150128675773350177464733695707386307349689534592475248473689442"); + mod_test ("1103343525164099798605597537113983882179727144422100669678631936027042820706120285756898888893404677995338896062374110057717750895679", "91748792242920404655427917872546031638524.76204683127448751123961871264830271567888066463998429231705219642715054074868199195373673227635494751953719", "3.076328553647557636193208401331029365654020485144903415117912662361833098755573989373555529561896396760648323565651091850507799771898789127729144278e+40"); + mod_test ("-0.0894652716283348818337684886989151280762017763427032659791509101256464820297", "-12966.6884", "-0.0894652716283348818337684886989151280762017763427032659791509101256464820297"); + mod_test ("13114418006467273871814114136828793244459258873580991741468083458844936", "4759000553255960840361168620.3774494470837273198", "4.2761722071204063036259345611428685193209688534e+27"); + mod_test ("-28951495771059579052038784935583719855135835316878812739160571275658593082655402834569052032878823395641241968136.92574783376902191547024436698530", "-3031768663774740737176934765360849728180780437211886327623459816735182479695223019269147895285170079834032202516966937529989903070284157092473214668.7", "-2.89514957710595790520387849355837198551358353168788127391605712756585930826554028345690520328788233956412419681369257478337690219154702443669853e+112"); + mod_test ("2393723882767965821294763322394195744548891304060902", "-140981135960273230.0025778", "86668711566444988.9814302"); + mod_test ("-3224488416109581472101333552995382215707383396998952009319985210337309105631785072396803.91964338865842816515912815197781787", "102818159313377657005579111128189067224885718.140628085554012525428767372817189722551478405035418445112060974169840360487565259217", "-8.1595634025043932590241822413741540317627232887069206304733728507469999734166316619875329520357299837254473649437591096347440866e+43"); + mod_test ("0.000000000000000162614535957335504400161243268689702722565890737357214918357356590168738846464706769774484467251167640135858015634083627803179977581109102", "0.00000106803134832455205844954340150714254354766339175870844951355513521917239107042458407307482848507498559", "1.62614535957335504400161243268689702722565890737357214918357356590168738846464706769774484467251167640135858015634083627803179977581109102e-16"); + mod_test ("-3927.4031809", "-0.0000000035029583866611658486269733571456482523405154883369032001554318344330512146832289592781514675456658500756286236294841624823979375753461327906", "-2.6932691679676130460056959057199199083055272525449126446015947490329456323969370838199750438158748550553789684640297326857241719276712355958e-9"); + mod_test ("2592701578783037181466698143885146669128411307594485136303860886846006143235135122817836647040961317262173311873893155", "-2476735053659095937599211826013828027536167714634610749923083443278572078026871812469079060633677096037053974280521689349022693979242065", "2.592701578783037181466698143885146669128411307594485136303860886846006143235135122817836647040961317262173311873893155e+117"); + mod_test ("96.04335877730532081621787788158383111099350287030581038188446699532128180774027960706578", "19731419380883276630592147059117156462461951865864609673166.4479371059569659447212290002838890816175493435199181043231716596224989574671224595362826", "96.04335877730532081621787788158383111099350287030581038188446699532128180774027960706578"); + mod_test ("325023114939529014657978169628372760601480839073817238211782426113558723164836055970989007713696933704", "106223840476390782472173917090144170488887005908229635819404889799358852135763.040387492", "1.05150216674283695595324235267625323135707751092953285615150305395692443496735212656796e+77"); + mod_test ("-0.00000000000000033647992217979179179186957", "-0.00000000000000000003156150266634952697310752", "-2.74225383948473157029928e-21"); + mod_test ("67711097909563003399071203293654909244735459519561246144664768566612029202546308760389038038790661412078936611567061527752843866673871533", "0.0000000250914595238219383127319568059987481594970145735261435136883603429568", "1.1931039593784471503157310210681907892950978516052505236994695043296e-8"); + mod_test ("942307044555108835920493820461160734540503253601173239.92559776036964181595894387449189836528222244015903442453788542293705358104537", "-341315427404722210577937787468731.95", "4.792118403841194654638154768215812559776036964181595894387449189836528222244015903442453788542293705358104537e+31"); + mod_test ("-94130661760152187286400649382778774100247360104073487553172289492592909079685814047724040987.545360", "582.270609307311781203990506333968732999092917722", "-429.29359293653441023844377749905124203115916886"); + mod_test ("3313638785820621590180176562638.00992668522579291400041235393589181972606810182197653338554677836315505146", "90527335216395767852035210539.14", "5.465471803037394750690898322896992668522579291400041235393589181972606810182197653338554677836315505146e+28"); + mod_test ("-0.306955389372676043580907106603221153651127238512560719", "66.904579801977727781298", "-0.306955389372676043580907106603221153651127238512560719"); + mod_test ("141390900187450346.4446228025914244", "-255850256279441962530367023331027625163686895444551579538905939296353570502455036176395785785059148507467346341628419844281564795408561", "141390900187450346.4446228025914244"); + mod_test ("-31281694978574998092.32325767151", "-1542462855.73276869937293894166028800355184049470473", "-519767223.60416992161136296357867627633975428783569"); + mod_test ("0.00000000465065764192519767209223768411174160970559048882576195807880851927339930867660413363177803", "695983282190820825900286910552083743912340874031142607911981006600892487992712378.27501435873441215408642204715421306049", "4.65065764192519767209223768411174160970559048882576195807880851927339930867660413363177803e-9"); + mod_test ("0.000002299699", "105", "0.000002299699"); + mod_test ("-751157538.56375056723760379542086174039490718435868835658852", "-0.000000281235130627575144572363209737439923", "-2.4952865744315606513538295859410866335658852e-7"); + mod_test ("-1492151820229229.7080972636031810741838557504286290118227845200639080208767965213313891261997405771908981", "518534900915966328248424169467.8926376495890764066267652", "-1492151820229229.7080972636031810741838557504286290118227845200639080208767965213313891261997405771908981"); + mod_test ("477573736732380117689005270695410306243996300502014352674644518059825662478485969426161545468188704450446835856", "-44107433160804154887771872206618010747863690779283512394813143542934429409262133052168377457307.7801829320544", "4.26587795612760356325706643922768450442822164299827765862986444105362242670998534111196655345782505509351168e+94"); + mod_test ("-1708419546267714621908304198526.86627770247445328880", "-6561936.23828726436959004970934079513865615878124751998092886724055429258975571944079950471550813589210381712752008129366876", "-3255473.411304257056507423459569857877329230063250469248244750150261213529383645499126139366386431281819493395691345793149"); + mod_test ("0.0000000000000004527321152996104608068898547927166509996670208320178171898523653701667544358478578289218730097763063669131852", "0.000000000000011707656496202100248575019665652640050450842478555351860415163190039866", "4.527321152996104608068898547927166509996670208320178171898523653701667544358478578289218730097763063669131852e-16"); + mod_test ("-404484", "-85217.71121979405", "-63613.1551208238"); + mod_test ("-18533", "8494505138020021210045546239850616033745106209211751083199296574492725741699134845133691829140.5819", "-18533"); + mod_test ("14584780882835094104107586638253636777793348510840823526783209012506801757754406089008052927648564160645244670", "-21080989782.41894706651964371557621722316246417", "17111578889.18009353060098900510442621989297665"); + mod_test ("-18850349239022849269493437768828110069.075", "-266968030820801670345292489489385463532596835667614989691512484830998922088460557950927724249457393516001647830350289181903170.7820256518", "-1.8850349239022849269493437768828110069075e+37"); + mod_test ("-19610683914857783540233383.2728721254117951549911093483423563874335264906700610318012707642300033397357755301605728080", "-13420179588.2352455625807856166075321914322366264262368350508886102902970310625894710130400", "-7601279880.505746566871435903625090660503811218236450145616817130204180995181500543203615530160572808"); + mod_test ("-124398303.94329995879106090298579425682430326155902347006975479300049695495574497472662209495203134041033423161", "-37909502210888557786693637049239639643429705500565493503854388407978303534883740337011543195819593982677420420894837793713.5474583522280847996415528834", "-124398303.94329995879106090298579425682430326155902347006975479300049695495574497472662209495203134041033423161"); + mod_test ("-481349016.43741541655560095983436187596328463184925547241485317034574087191806756468994011864", "-0.000000115888750399354267961415724244044331087", "-8.505867489584104076963971731986268339341485317034574087191806756468994011864e-8"); + mod_test ("4253613611868.577209622157479284930905750102791384", "-43984324685835869000303697875967.082217047029855677646732359601172199279", "4253613611868.577209622157479284930905750102791384"); + mod_test ("-121720240860962699516920276862045784990182862", "1391.961143", "-606.43001"); + mod_test ("-536976703647420516808876195121833670717045212754909788504401613131.09832340493070", "-0.19", "-0.1083234049307"); + mod_test ("-153530020474096871971881884794986454397802757290849940749180641455669", "17505687549970976977562427455563558027158236049114219594525022835524956857408951202033619176205709302677596086790722061676556549481353529948", "-1.53530020474096871971881884794986454397802757290849940749180641455669e+68"); + mod_test ("-68463793074671329", "526225751933655101274278816933572067012685551994.60347692993", "-68463793074671329"); + mod_test ("928", "-0.0265270808592803498688377952309584753581754116559858632164273181218506763174144086", "0.0031302997955205384474094353796565449495740386465470997231301432977903878917439462"); + mod_test ("-5145804390488853836236431219.38753169290767614", "-644164778290743967724692154273953884635573804098220159016", "-5.14580439048885383623643121938753169290767614e+27"); + mod_test ("-48662.5540827771318125347572899275647466291424610808453885768596532572841012738459644479349273928355994065901331259154173718078854995422986659565794", "30351303292454515546174815773976.50499295966113", "-48662.5540827771318125347572899275647466291424610808453885768596532572841012738459644479349273928355994065901331259154173718078854995422986659565794"); + mod_test ("-3764151.657035364928443897184118536717270878944518929297476941743265064271975725529716777507698244379183234036", "0.00000000000000092398996106085832046054510220753163692327079109794497033611990981439273055580421698549040809961268572", "-1.1361392097591721210516136641195398063669177345191861811669379578999595682832164502803562581741006244e-16"); + mod_test ("-4.9187386", "-65979133267007831443913.4285", "-4.9187386"); + mod_test ("-2941173670207131755888751957586931136097649817241", "-0.0000004814846478935692967474817070197814917779433964", "-4.143231488767554469914989546635670710760768348e-7"); + mod_test ("504086121738234114557048964595466438854236194.1238871658511576861524800891", "0.00000000129609070", "6.848482861524800891e-10"); + mod_test ("195880.545202875997253", "0.0000000000629389391841695155107474938177568932398308312865", "6.2576456087309632014641966027161174341134495538e-11"); + mod_test ("177588678283865131748445.20341144781962491999105521", "17633411549371694148601456488804240695997368248839673881068256513149766988205700935004.46173570", "1.7758867828386513174844520341144781962491999105521e+23"); + mod_test ("2996061752747054491320141560401547784315542844732729476182822177717526975778111415770939188808229.09633410131208348150766825247507152776287", "-16624186814169509834280278960.382105391846684300669229217099456249591810668575643552119700009655524933947866332356", "1.814501977947587086559582750402803833652237808310528352266882376452699987265363325517337507007541497009363881064e+27"); + mod_test ("-0.00000000323462065679722578298211032318052426076792102642153162888985566640317479966266628791447782540983746324805874876", "-9760478555851830779132259667610197027614293415305346099207953950643351758497122945313648929352", "-3.23462065679722578298211032318052426076792102642153162888985566640317479966266628791447782540983746324805874876e-9"); + mod_test ("-4425946782408559872230702296548525017691907874768090.842721989595157930188728939976", "-20910144556974972002031925667197905782.3842669103600658807854243828908705698618611597944713721513", "-8.1174842407036734952567527185747399937378885936959608945880838786170489622477090755781556136846e+36"); + mod_test ("-0.0000000915636502802479794654280073153529001575316015250756659772393754338719833895732465666755842320466463187168294526995626879755559065", "-3893976987070430373575695657419905796411.063325237201233825164129403122912495195291694115473863", "-9.15636502802479794654280073153529001575316015250756659772393754338719833895732465666755842320466463187168294526995626879755559065e-8"); + mod_test ("-1361794.7698127968", "62068.38928754185504150471180387153", "-58358.59477441784412840105211869787"); + mod_test ("56946343438026239453088.035469510090959501909086942675972", "0.00000000000175389432812412891469059096827552600092473688468378873071", "9.3971542153953297729457229138638683477757090580201369713e-13"); + mod_test ("-216423551430826376828740104992259241726966617148112640804095596112778449.41524", "0.4617285434914380589707413098498642094246733418452292890078428014343835392766", "-0.405084120420214123348047058484819751957998976642922377415700300110247041758"); + mod_test ("-609540688948287254916667914127779172583532177977109039873.52", "59942.85701", "-2421.80657"); + mod_test ("209146818192414024940477485662106872447921248923844.06942710", "194887998177776027858422538823791035671522302666816586057503286336727561981.277418658314883331800489638082180", "2.091468181924140249404774856621068724479212489238440694271e+50"); + mod_test ("-0.000000000383471293733892695539029352514599525885254801315847674728451500273625909999928055692998459043656614805973747464908442983325518554611862099", "1436914643087593231998188537.43007915688640422462805553206387040332979752282514782607648003897995312517526015858941762085280", "-3.83471293733892695539029352514599525885254801315847674728451500273625909999928055692998459043656614805973747464908442983325518554611862099e-10"); + mod_test ("10973736.04887910157362615080", "-1914749385959783542863340891438235602833614861656892143731096463693925359032389835949786237963580576640993170", "10973736.0488791015736261508"); + mod_test ("760745776921863883695925202158755621973717376920162944676687742379357095109520213981477435495396177945964651.782946554742559101819380914", "-69587305864702662068384544.416103380560483738456", "5.8598017452652424661892011091840662374011392595380914e+25"); + mod_test ("16517561.49886168205217694542953018253109738947136601119171501851647671572730355", "884446285891886647986941885828001196309147.2792", "16517561.49886168205217694542953018253109738947136601119171501851647671572730355"); + mod_test ("-126432585406331428026504773834234402700464127021090.294922390288914827690266641336640485828519895540001279706441657289346676025896", "-93341638437704.72913174198140578585969178589732172645484624397170924423918151900900579966645769211771726282849407857845312304820605914315", "-75654522250027.80364908433251628732320633450589708873254066633079438869841763142004458404461623673413329149660061709636674643820441363495"); + mod_test ("14047.80", "-231827244539352913982806428147776204855673320603750218551746829240475.071834413853548835", "14047.8"); + mod_test ("765290437.4274705525375273645201254509124811109914652423385744196687082906715458538518828538063", "-170265424568071609492595764439416049305779878526025255248414508", "765290437.4274705525375273645201254509124811109914652423385744196687082906715458538518828538063"); + mod_test ("3311720.61", "-404471983513006673196933.1466618881459376508409282781068373319987742328030853185755897212344359", "3311720.61"); + mod_test ("45991089210393111564308702224024179778983272166206394790320.6444639679813430135956296", "221492062325759306969421300129294571085950901905658970894066426987989464689596714996882711.33527373477304903881568245457206872272357", "4.59910892103931115643087022240241797789832721662063947903206444639679813430135956296e+58"); + mod_test ("-2676337743.2669218950557047383697749234730579636349195010443938930301809798701005736724197628525", "-0.0000000050641988267157160357685504958602", "-3.7830662640990149837887633696455195010443938930301809798701005736724197628525e-9"); + mod_test ("-0.00000000380228587817867341197616338523104640068872756692679613177059750823089", "-4137484037122167456128781504273195141726445714.987850478841723411486102808695385497342585068965", "-3.80228587817867341197616338523104640068872756692679613177059750823089e-9"); + mod_test ("17754236857117435132308613993859837766610271655972290799038080", "1704833941929076220640814071735309403232964483307878895509518095943568281423168227984718596.14467827501524520840433884710", "1.775423685711743513230861399385983776661027165597229079903808e+61"); + mod_test ("10027836760407284995344.880831", "-3855354419049536789489248488666738929318752483890215632137859537808426365760274903064967999211093775524598713395085010.359171925318425848171423905809", "1.0027836760407284995344880831e+22"); + mod_test ("22202026217695996204973556985884720436842373263831402061744953156987742182762967091937136", "43185871335981070591623795158076323942623952636793.0437867028967265139844569485433664719704674775842634206503820291927569963965227634755940752", "3.26504703695283949129971347692208384440451033569938192969127171775632235348169726099152160569117154517580009333832314710480195174528249498288e+49"); + mod_test ("0.0000000000000002128976517031894937726394149810371372904281093627057948171053965578050857567259999271356289456690", "1638227219164.830694905159101117562037676449467894880755446732079715327877", "2.12897651703189493772639414981037137290428109362705794817105396557805085756725999927135628945669e-16"); + mod_test ("4814208595346449.043008706195329135991290736899", "-42226706042290308331808643328.1624582074527758568288134403184705773169740487518531767292082378956608507002902325", "4814208595346449.043008706195329135991290736899"); + mod_test ("3038935470646078516363834582672813654955.584857107298587208166650999390267178660250688913496749522905532796141150317042799346138826323656895204692822688", "141878380568380505848720966069502343909172636", "3.038935470646078516363834582672813654955584857107298587208166650999390267178660250688913496749522905532796141150317042799346138826323656895204692822688e+39"); + mod_test ("-6169003413317472256185593952980507739590492599058739528722582082779602743497784.3427049376611779107", "-31.42072280707122325885993720075056590730611405102283453158861014159701198218841889427", "-22.19776446374536431053795008714160003252266054630255634003844573319866809719521193069"); + mod_test ("-0.000024509540379901693081094681822253648979115777140798043255679480624", "-0.0000760", "-0.000024509540379901693081094681822253648979115777140798043255679480624"); + mod_test ("724279904087095753394226280693707412319943662527127531541790583722341314962022986924003081613987164108631904455425855235377854", "6273776855104234371654058867999.169516300774", "1.476368318259034422871338396645233240954186e+30"); + mod_test ("-18588676215231158085.946211173603363600678120130466593615153207303801832898083927420536813131520643032959684506944922819431821478386072330111143921503", "2387112710.1232817341660077099628961860306411347682458219818878317649399403544141963545255184471115705860288103752677826329794816", "-1517183187.470515201152916387886061279636026354398496623478118729449319473763829860908182395451873749194364531069367833125880637311143921503"); + mod_test ("0.0000000131867789180977263531745735221989806107871520141527201347496177906746916558678489315586403635471727664914100888", "-0.000000000000114689475499172124081924590658780042763626380186641948", "1.24041539138704830479374337688539109180730530022376056177906746916558678489315586403635471727664914100888e-14"); + mod_test ("4311427478.283637806857955975409340894341757614838371194103474257204535", "-649782518102516258848559576865098567584081840293172629619735846503681807002436279687009986", "4311427478.283637806857955975409340894341757614838371194103474257204535"); + mod_test ("1084223088975587942008961639610672564432452165063129695399364194.7724214344063983401791208462284827932750", "-84781318440.755680735460810732984305718976302629343574203", "76961803391.186713545521492205652920042921934475118638462"); + mod_test ("-0.000000061", "8786983807198223058379063246618879186867662783902087862998860315406531227728533477069121826634550907069994890047651666829499803810", "-6.1e-8"); + mod_test ("100528259107227.081922566140125579756940512053795436712849097175289286237932581152", "942713200517839530382833024395280742818911844807588995366076616161481.3198459965316435128156454232997381607367702732751935460", "100528259107227.081922566140125579756940512053795436712849097175289286237932581152"); + mod_test ("-27531354435.67909536742252514929056355009540359368305025535772692824010557599100912735927621003", "11000389644039856717798395867260.389464825121873765842743496221295063610909330014396388749003477966675244072", "-27531354435.67909536742252514929056355009540359368305025535772692824010557599100912735927621003"); + mod_test ("1241134823.82242025576415", "-2436983229830352502914812262238245631.638630950318028", "1241134823.82242025576415"); + mod_test ("-144010855465.52294929635059866397929363679648857972113703", "-0.000000000000000000016080987773993260753935707240", "-1.063553116788584594723506728e-20"); + mod_test ("-0.00004038256977505864160533312084023171599294433697748308177067704771939462", "-2155348555606824361074827496727023440.727544202034420464676729642053697349860774140137856318160073308875496365295680765947736972447496259", "-0.00004038256977505864160533312084023171599294433697748308177067704771939462"); + mod_test ("562656152020791212164121284176482277264519513933510410360247916921555.021006097720457824068898265551508", "269214854076690329599299119058534607707434613306556247775662477434328445134773154913640995897232700833.3509809427607", "5.62656152020791212164121284176482277264519513933510410360247916921555021006097720457824068898265551508e+68"); + mod_test ("-0.00000000538631554992448118188735718881805592894263653000803275203171961114344766766783936939408658883502898545560241278071", "0.00000000000052", "-1.5554992448118188735718881805592894263653000803275203171961114344766766783936939408658883502898545560241278071e-13"); + mod_test ("-420165011302009959726745508121475336218614630482602804564105573952263470925277981868876777955931.586980555730131401861", "-0.00000002570711692260590889431201869485340369724462830564055937185895849465134", "-1.195661613348988387547281332958532992374725080459688873047446880846196e-8"); + mod_test ("206614495821030856258957814325343392659221587476465034962662750862453963123443714469071555929832788665781745529.367727", "-0.0000000001661160112583532898587677052979754226652657040117961034695013256023840810657258489771022699005804343245729475750048", "1.0429548835437312814921716318665620042989758877917059041179013022218706823693124370915675661873453951861654108688e-11"); + mod_test ("2.129629456244559693351889093283039010248199571059181269533286862278672114837554726244186016512512923248786195784306579695279176870950", "167942663220994525565277036378341943077.97", "2.12962945624455969335188909328303901024819957105918126953328686227867211483755472624418601651251292324878619578430657969527917687095"); + mod_test ("12176138559764154534976504354019977304742047856939022090614225781269098414670923528582943.10977195914", "-583632504653.317910211697569945462945466919", "159535682461.909372767660403987685629831037"); + mod_test ("26801.70776", "-1839840489500540849073275119242455920755679371644846892291102931868727750660630725018122594847841701320602357870867176213530.54397", "26801.70776"); + mod_test ("-337515772588445810907775628658674617832446340456706715404089682413724911029602181006534947673106470310169888744481390287932929420452374671107329763", "747003702426526.08588776581732211783056883055836800674965151006190388206832049147104586571457728195327987825881461665724657243756841", "-447197560243704.27747928725749075767284852291932690545433431257640274850422177065998793355714235779800038252557174834517670442529162"); + mod_test ("0.00000006362058132140170298", "0.00000000000001458044816", "5.95243898298e-15"); + mod_test ("-3594215153876751761296964832202126901729901462252166973917215.57369585920992111877692697850590420143534264638009736180", "-0.00000000000535939139326835434743507032712041831099958079045601050357452232464286959087518022443128930720117303095792238065043970685201723040458303209993", "-1.06066578271026895852431656785059635221975944055981884000221087847830772261936494977835528139047391689269307714517916852256490493941403060644e-12"); + mod_test ("0.03040477493704564561379391504523657646163165", "-3829968110375376699653656403680127708.96", "0.03040477493704564561379391504523657646163165"); + mod_test ("143839023389620287917080598136939204834211679465632489449268587070547858891919951735433984918754860511172087386798608655301168386080537222501170274566", "0.000000000000000000050904519883269410714066625387981521860251471402534287519580544338323972447562512119520450981009639220992736058455654970440678522343564343711", "6.947705519998581358090053013911144054426549810249668609792468243672747095472094889504331332164049453364474197265004105580867309484110017621e-21"); + mod_test ("-358101998722704280658404123884651237259779040468133477835791002975414884911463470305794344", "339013470613986503939750434731451482.80428540724852964369292178705210529584067980487", "-9.197311229967124089066230086719075507485006197972684367837222888572478434033179797e+34"); + mod_test ("319046228556.957337976107234589381614513669506109842572986792638453", "25341573899216649823607289015612827072.54559124982886262122240971817339", "319046228556.957337976107234589381614513669506109842572986792638453"); + mod_test ("0.0000000000000000006665605465014236098898571199127258214891647138029333052871478626750277409", "9.2994763002872765347756456272", "6.665605465014236098898571199127258214891647138029333052871478626750277409e-19"); + mod_test ("-8597100765432", "1.4061930205430936722438880987030631627463886746451173645000969851082153846054399284881", "-0.7694289567800680544500753441563271099198878457218307264536433333802305802000687849826"); + mod_test ("-0.0000000000000000071063790240674330676736540699556204549815235157130766649", "-15261432741466337551829351259412618954339608783801902625.23542905091", "-7.1063790240674330676736540699556204549815235157130766649e-18"); + mod_test ("24597860958863607.704638609505578054232793927642701487793854676929560010244268672980", "1802481949139187718903504517799237488488797785109994700474213611312061877322390386.5344597552", "24597860958863607.70463860950557805423279392764270148779385467692956001024426867298"); + mod_test ("-844517336468436751756396415750.8694448224004606845713303248407308924369", "-6675658540060519673536104856700279546693289387521217726077810.838663278894308972962912969825", "-8.445173364684367517563964157508694448224004606845713303248407308924369e+29"); + mod_test ("297434395027988881726438857041249149217423028818746940800314053389411843447774222656867639852014201825402955.835636255767352939888666344841", "-1165785127343555259111383115954948069159135335071767276621771249681211270602118289526766642905999531428644272986091711103938455034315028421", "2.97434395027988881726438857041249149217423028818746940800314053389411843447774222656867639852014201825402955835636255767352939888666344841e+107"); + mod_test ("0.0000000000000004255616740012919799050699535141777230034734861498243296211362650503864808633010961169436418851564388251642437913320231793888336551754996718520300", "-1651576988821130188451193720811416856607234210129237.883909970833794549608325237454309557258670200886", "4.2556167400129197990506995351417772300347348614982432962113626505038648086330109611694364188515643882516424379133202317938883365517549967185203e-16"); + mod_test ("0.0000000044147096298613431712166079076764897780999854959248060119312935665040776072223628259716132024850399516711414810843280407052112788935682838888941697129", "-54936210850503.113414", "4.4147096298613431712166079076764897780999854959248060119312935665040776072223628259716132024850399516711414810843280407052112788935682838888941697129e-9"); + mod_test ("-0.4323857463176142463414675213681184495653706035704024732142", "0.0000000001609886172491629520941112538601281073954128848183360", "-8.6849995449369811756464752459042905872384200820824e-11"); + mod_test ("202209.7253876600644276744210492692", "-0.00000000000000000338892963079640180409274746855742569075588575425187261714270297603518981332021947785032402317811726294429963236196669448038", "2.48774060567808536908087435166803363667804416042024979495412690793460127819789298078609537589467861727739804721043627194686e-18"); + mod_test ("0.00000000000009465531808110383618357128551578926701934798401879351466017414251990316347221304454773710889175218068990694997919702598", "-15569690510391365108565127049060079732945584147892308249635814990299790974106289975322836618585675485711", "9.465531808110383618357128551578926701934798401879351466017414251990316347221304454773710889175218068990694997919702598e-14"); + mod_test ("-906454225978706010766508621855689367113309691338376322545315495042716078153614424771069415704594308824862632391131402393608738253280649702961.6641981", "11660199610678028374818731841856.7121334882150901542261870618813695156", "-7.528070467742355916798912382526137282899052453804150111657562206506e+30"); + mod_test ("-0.0000000000004101322450307718410872494863474574665562369115054909734079224620478881782969556316998111941117895920501524161853814989807532", "423210910279868701995463018234848119188756375891085182100812368574543773666", "-4.101322450307718410872494863474574665562369115054909734079224620478881782969556316998111941117895920501524161853814989807532e-13"); + mod_test ("-470158060793806640223969538148754202660458782.612615684822290245236803305653425956424810905330203916882572522005759948", "-0.152695767111052424631688337299212951189573836707404959632830139430511960774250914378066254704926391912654597758822835198889", "-0.073651654118155896924523703948320110247909645704509802452201735369382844041627083824661314684771341842243469753325238257779"); + mod_test ("9.994426780915974145347014135575893960205706681677054334376705730901774629743310179236", "-7", "2.994426780915974145347014135575893960205706681677054334376705730901774629743310179236"); + mod_test ("-39230663720925065911.709", "-0.0010728700907817921430794540906048057564326188014160081208465534724741317514197503024274778176377553223843602448853719066858744960609415784093590679", "-0.0001564596298149334550945778894989078903899810456404686403803445329346353151049500880628673488460793553585288642059251153644557695926708694554291526"); + mod_test ("-9075671784025800106573820389326423822119789380499", "438119.273000651189410948408459618402001563677344624063470699316786673102238473929433190146989564587119083078896154298057276810", "-78320.54798431882932621652203547903308024478004733552908568056196964210261306773644726193677870886973142528414057490679038002"); + mod_test ("1079464599531882583207284547902100846423694366679824675144404048.87000005666550200", "0.000000017634963780257411646578062463223304619646810432414929790810861732698710183011522017480097941669752799780304922650857504090532971627", "1.3442627394777667466341237152453278981336433385361428945890803207704744384963683817727469649088690273630173830384666866982410070125e-8"); + mod_test ("-1377931339724154311913175642590.56223327166804475379410759818086421", "-7343859629910618280997050209823875113651629358554", "-1.37793133972415431191317564259056223327166804475379410759818086421e+30"); + mod_test ("1802318417733734399696737845540821628492664765097395909955021748011122554913873397", "-8.79", "1.97"); + mod_test ("0.0020082022907469851361342734885482", "17100037717357489922255553618227047318529253455381725674352785.849074888", "0.0020082022907469851361342734885482"); + mod_test ("-0.000000000000000201309146027982061988473635139635744221112298825585606183375367564795322337419170860", "112.510399403346289716543031187076", "-2.0130914602798206198847363513963574422111229882558560618337536756479532233741917086e-16"); + mod_test ("5143252640334.9471010534789709623389109664", "-12505822857859299547007903357.4580719301", "5143252640334.9471010534789709623389109664"); + mod_test ("-310614518267845321018804317663129885461172347268277845899925992136506193955.6878276728370903441307046405502757962598225976", "828661056524342624928394882871650012268186140555930515187891793804915086043336905141599671004678775857.154200318917132520559533243825", "-3.106145182678453210188043176631298854611723472682778458999259921365061939556878276728370903441307046405502757962598225976e+74"); + mod_test ("-1929389822669343098632227827981105567.947555377437838103088250130930057647071898153543733069402740720937034698316740", "-307415836138079404706197455082684322873455098421189046955.7609473524278956753826621443402955422788867828551884929404606716804681", "-1.92938982266934309863222782798110556794755537743783810308825013093005764707189815354373306940274072093703469831674e+36"); + mod_test ("-11914253674.453144069362", "-0.00000000000000640136130420098419950776623218693603250164367282493846395409073044734225569347829418824701162864570620545495518155534050427613", "-4.8273343562972522020998663785108839173049437316343375965321326163190438505924066772178429290654069832627450922751727028332871e-16"); + mod_test ("-0.15173695389851714323653081625731481081839738235113367548743715930033221373451204809777430598802691008061", "-691161057878002558587.1381127439742482649867259644071300276564300364420601832039698998854339739003491064795364533103890488", "-0.15173695389851714323653081625731481081839738235113367548743715930033221373451204809777430598802691008061"); + mod_test ("-3838177724.07192160266376738721758615938561957533876517355792902066836939676750568185", "-117267768035354.5367107462355928310645", "-3838177724.07192160266376738721758615938561957533876517355792902066836939676750568185"); + mod_test ("47087514451451061936440267540468779859177214505564890370985541624177363716426632243202744881820164276529614848", "-1172054812668893105303.109439", "456515720116084107668.775007"); + mod_test ("11.3734955974031313554231883290508217719632632214092285252072004770873986564338", "0.0000000882199238947298298119767888364932094713663602767583773895510", "4.07724040263961106723900703199982684406983245152715796283133986564338e-8"); + mod_test ("113112144333915213154140879978802.056322513047654529205838659001489881104759568822806", "-1070387536549080109047458692952163930429421126062620116475206035463717082814252900889701717285876343686799120756181867129129332436.65606609657679300632", "1.13112144333915213154140879978802056322513047654529205838659001489881104759568822806e+32"); + mod_test ("3375429238215022669388.0525445329603537774437395034276346136375188392713458484753507732527974095303619960839673965312316444565719192307138736", "-15283720773236316823.1386624805243134789068589159295817320630835525511329", "13010668103032968297.5467988176113884179347779989196535597591372780221078484753507732527974095303619960839673965312316444565719192307138736"); + mod_test ("546144540025218603622035747267.184599682578", "-1960769463.9717088415363003312719807015447675844185997229455947383216237877444003008215006845488457016693384374828878563804", "444038342.3009350705462712125797459325898357133660731360753819139185958293625962717311560001031089517417729661706079253452"); + mod_test ("-9560649763280410877866958.6894727605272476369381283550793302379468448211577761", "-23461693036891534270.66763", "-9850747110662569899.4644727605272476369381283550793302379468448211577761"); + mod_test ("-7.556218606", "0.394476467282531274033012749331622902099878763812408645207952399507467807592020641605998980948602455345622981947021804677652524", "-0.061165727631905793372757762699164860102303487564235741048904409358111655751607809486019361976553348433163343006585711124602044"); + mod_test ("-58056996634143665360898635240765086115939487200129800582322012124896427026358562634.523876053912312753303154016822967233902154761507412776886982546", "-0.00000000000570977225444819760113544221498368980194767956186945188399903686296", "-2.45163677721343452196746595282018225334170521591501642928558451408e-12"); + mod_test ("18782896745334687682661478191340244563495.026805139784759687443039109825113018630522104252165496195754", "-9359445141829484597852388054639726608853279955027525490131658108964763122303352.11139858", "1.8782896745334687682661478191340244563495026805139784759687443039109825113018630522104252165496195754e+40"); + mod_test ("8", "3900985326526441441709979123557070376512415196847270644745821164883858274100930336537915531", "8"); + mod_test ("4.77286747468879908670114975931", "-3524175598424140013239.80796623070242774065271011395748053461", "4.77286747468879908670114975931"); + mod_test ("0.0000012222802813622598440592629347721226314717119700537496676757382132", "0.3110009405107017209802725018936257999673470989741925009496294357363888407985893667857735227882746384521443945285824197537397541092276675845639132411538", "0.0000012222802813622598440592629347721226314717119700537496676757382132"); + mod_test ("0.00000000000018384088619365879016178677544274849275468587911722905323257047268461042780866", "-74691051227281886487283380566166059678639451432198951288186231108115005924732001159134690543080138545.89943551", "1.8384088619365879016178677544274849275468587911722905323257047268461042780866e-13"); + mod_test ("-0.0000000000000000143373721383179309670662810405823454166842726925", "-4713427367869967855559206933578165851630208266683044", "-1.43373721383179309670662810405823454166842726925e-17"); + mod_test ("279088431668978817721818400435457144048964563707000478127542007364526390756155888729758450016626555984216682907494069.3863391561390029008", "183068579713138743128987913913465863438011702698993606515690229413.9450791032516285344867478204174704882799732", "1.15006278031659660278253789496724532897780093575043549889457711140788489320423312230736014908551612694280186e+65"); + mod_test ("-16267494087786592277827896738531922083730", "0.000000000000000000088706162618472944512399910698929840282305406666674993734458901273843764276", "-2.5909627800753460482545058108789409575362212803250623497766964477362719992e-20"); + mod_test ("-44.24084992", "68339625270.168878456952498", "-44.24084992"); + mod_test ("-56857196985399826069072678731164191368337062143007401708", "-592412264968673971778440741608484470265561140708351266072976205766765457328334968787621711087457877572916180459788168624044681603157772.513540649385856", "-5.6857196985399826069072678731164191368337062143007401708e+55"); + mod_test ("1104996654.18304259798965034573324286", "2510117408561620824893581029911555831891170476567955656689227848034987920.73715648491088584003908515877296524588851119764300771", "1104996654.18304259798965034573324286"); + mod_test ("48029.5677151", "39713342481092.2036831420612922", "48029.5677151"); + mod_test ("-2677.39369111834569676567245932", "-2034534263100368999018977132035007334300490999268060730506703.57", "-2677.39369111834569676567245932"); + mod_test ("6075972262973206757621791006694737099204289938612010291817208034207716598155036627342694635533302369062510053834294276312030673359251989177221", "-4216877637213071624668885955274710017470051201390436656203.3175514798774907157554310607394066223414256256857538268149428", "3.4548483050634980937680079005687259547830032613011978548019536253507542566475495763279403287594055753811530981533191188e+57"); + mod_test ("-39778415088348582474737099860821880822219551752035911412802038639306564534087888730860157447303578769441574808129741.7837578735678589361592672812", "-438147577016143338832668633949246668826241701286508135724906278119313424092726.09783913373814771620054174557624677579917", "-1.2108902975451343030038388997376413494545893581949027873931312889359460168754039828862401872164621816124117110545720507e+77"); + mod_test ("115429370.636804045497572883414508754301504446475", "0.000000000000058502293269352180410451175558983836676566315944378566117451162832925169472129608582", "4.904729335492343815789815485351399819289163720633876216160558528963863725402504712e-15"); + mod_test ("1866863299414485869402976070337638006397265759003452910.410739287460164932952655292210247956540858637537378190", "13247512825788295255972523418673482573223602517867812976052652428259865841176971399205990505517917171898503843932790970.39116746434798125080894456", "1.86686329941448586940297607033763800639726575900345291041073928746016493295265529221024795654085863753737819e+54"); + mod_test ("-7434850786753.20616600514461", "0.0000000001503863022082014768371050790030147497084483425232971401283357127842725596313687", "-1.119036084550700826530363097548971535460013328630270913936600073612544699109413e-10"); + mod_test ("-0.000000000000004381873159982123279917425506558261522812871473725919073758015893922809957534001480944265329307788953888508410293960888807232862971987255245464", "8109725899091573689402454319931.18350836066336534830831850485049011849459896265310046326036965005589194064300915126620", "-4.381873159982123279917425506558261522812871473725919073758015893922809957534001480944265329307788953888508410293960888807232862971987255245464e-15"); + mod_test ("73314226283.9570", "0.00000000000002960597549365951830985161616855027789228405534080693647514805969585779006342966275284091628479572363547635870715940487197244239361", "2.924235162215933531454887853805516514067221019818723756217344334797277757263190674533556736476951724389592416040236618857138094942e-14"); + mod_test ("1429287903385", "0.0000000000000000026227169585162217601788967257094420724372717782024286696197384612049185", "2.1241263611786451580084403357462126454870868777472160598748154573957925e-18"); + mod_test ("-1399843654872820025220110414591055060649943.5381869", "-233177597420892.6290391881528712", "-56301841991516.0574900024787824"); + mod_test ("0.00009781914227799259379359855012042142895087114611171661229344677069", "-21540700792390405728340.4941249102647270294567971", "0.00009781914227799259379359855012042142895087114611171661229344677069"); + mod_test ("-0.00000001302596750035354750648883838249600391852130416107", "-2.4", "-1.302596750035354750648883838249600391852130416107e-8"); + mod_test ("-2539711480375833.8787680706295245", "-10090855425.2645916699959021555055665745313421124618054996540701587614046326913632297741", "-4623523540.3888968219914182369822556536917671629446250650061622946364257069368775354156"); + mod_test ("7345.4230955739343601041285338890479611692071680966332935062378031079686398419251932", "10343720308772182919388574543611215023360174132529300268435042772499308507904636046339051573", "7345.4230955739343601041285338890479611692071680966332935062378031079686398419251932"); + mod_test ("532915932842606535532293569407035699330783484419226736382170882419377135.138557713281159484931821544535832004298377411148874", "0.000000000000000097120843870050544930766762870205724485889381952725697657146115928483473606129290764002", "1.71016654827126847483437088121564862848406256560494847328799197734413796459426367264e-18"); + mod_test ("2786090273650860122222172462282569662586653226066049425730478407697344778285269847718642316826852059959216286066975560496533.825834439051898", "-5380036545379490040214706947292642792370009348813692.063289320229799931446171213951400074916491", "1.781447213237295796176679883614734919384147627324841950220937474739207582830548622084657210704e+51"); + mod_test ("-716.7348911856148935007182289841612962001831614930661016798201260045476506309090856624487785381070365022326338215134362779468515437452558", "-0.0000000306560034406942657956579747805603108115582439761037677331584709683937577229617811570358119993112158520602288036719", "-2.19481002399560872732138539978666667251957992848584452120211572484597113365001309147957304008789361389740924421480515437452558e-8"); + mod_test ("-336717351299839216882509548843025942568273773003071.497660", "-0.0000000000000000031038145656560174696376744", "-2.2939638463514411725670632e-18"); + mod_test ("-0.00000000088871076289105659831158653574816303487230", "5925437964261078438361385421140", "-8.887107628910565983115865357481630348723e-10"); + mod_test ("0.48996271173862812059175117673224279978397098563975331374734405038121210035666997472343508724564255860333", "-981298146452103756333.6485476848759145496522568968470756059845109847612507162899799", "0.48996271173862812059175117673224279978397098563975331374734405038121210035666997472343508724564255860333"); + mod_test ("-0.00000000000018739622832508484881716365605238857842994033219621274071493422768019281918672926632721149273548760595828153562533317", "0.00000106753414191503143009924816334903", "-1.8739622832508484881716365605238857842994033219621274071493422768019281918672926632721149273548760595828153562533317e-13"); + mod_test ("-3724.961037270823216784122123949498899097506867404482079742878", "42728642472000954973441392924603786297505608884064716022000636585801915420974504713108514988096981528010203", "-3724.961037270823216784122123949498899097506867404482079742878"); + mod_test ("14978135246.4293498541153489397855384604096560034577747263780459028396569631858547180442863807949567", "828303155938367860166633696033166352096650401684421199987339292282009346446", "14978135246.4293498541153489397855384604096560034577747263780459028396569631858547180442863807949567"); + mod_test ("-0.047628555773786673881971100151948530011265912029463606745633469100975125377519599189", "528778913516649959178290334959803065311351416856125792866633653171089280622199248330023808917526801982365664091823181214120997718352635826074081634962", "-0.047628555773786673881971100151948530011265912029463606745633469100975125377519599189"); + mod_test ("-14939980526.554849200622465480029433340799030707", "-4277663.20464126532165338128222730657269719173360820748109791236846681210102912850976196526639900951364332750470003", "-2380615.94755069740885804249167878894043717324013947600609000931389214320628324391121728973465877835750035358749524"); + mod_test ("2254531950203810106512216769432345108091659826174197419189904121779.389571456070872185209145597270163484908459842159938150", "351324574544938907598852971025447067037136331.482475343426592007773285255333055388053662880975118962130456971569884230555", "3.8576251388287727477083730712363952890778696110331013414195946435626943548779101574535478551480436462182350780178784985e+43"); + mod_test ("-908518.75611434289871133928585849050982371141988492763900495559", "-2779194162891933223959992755504791535540247332661669041569801472568536678056446261493500597102205548860753869532010745212712506064454.783702", "-908518.75611434289871133928585849050982371141988492763900495559"); + mod_test ("-9751937701702146526197396852280722495497246508393405343698179859443679270762240734774756447384850662119283788899226828510395349600364", "0.0002072564098631731321614418369973126331436239029891982973755759590617485920152211028657689658898215", "-0.000065268138309116378751853481282714106859124860733683378586695149698540722854723270248930520518111"); + mod_test ("-57002171357681472900693.4729019652902136412209956798425272", "42968990107768657015543291491936311784108036470373857830494358", "-5.70021713576814729006934729019652902136412209956798425272e+22"); + mod_test ("-779.38806641", "-276143375215931856852117654482995176051154954022602259784790966214726724258520671956887000901811473384735495734582327432375381533", "-779.38806641"); + mod_test ("41533880399742218630278604056671763202881405110846632341263992670456086753127.62137428620211383152736798612114176", "-5742400619641926749269144425184140455944367080.9420632770462859801809027506509", "3.39721948198633333959235038541298988556228578133396634945632115085817616022404176e+45"); + mod_test ("-0.15640159643564267665063068794647422832178482162992118215600544420009053201945", "-172445117372769.48208", "-0.15640159643564267665063068794647422832178482162992118215600544420009053201945"); + mod_test ("-0.0112275442296349836418573333090591", "-2255922450411587809292229473263097797796627000972898359618569482413455833816036469768975961421349683187.94437348566944556679726583316945094", "-0.0112275442296349836418573333090591"); + mod_test ("-3368.00", "-345972426936711495192918207758303734495983755979074790217123728465.80047743465885662352027565018300048657834525845654295443495093971910868969090063171", "-3368"); + mod_test ("117.5750947029273379673675410632947676619639847307327388", "-70731203121207004885270875832693445747215727294572904020461929095227705068450.50513528539516122022720282675281", "117.5750947029273379673675410632947676619639847307327388"); + mod_test ("-138977748373044113.3788174734339534653", "-0.000000001480926486083", "-3.3086978011e-11"); + mod_test ("1179292018572.9841303121610809323250406574524443113684922518685441369442051369712691843553144676353714219768250", "0.0000000000000001266875917107419", "1.2238670441939944311368492251868544136944205136971269184355314467635371421976825e-17"); + mod_test ("-14538354899514474066263227062556630420353609726008", "2842.054050193988254028322928854402650042920389288352515795", "-787.841734262540552719016400749913558239542081451238833495"); + mod_test ("-515534361438701466202657012041091704270306493888955748464478928404889500948.6256180199199867611", "-0.000000000000000009203", "-8.732e-18"); + mod_test ("-0.00000000000000002436967040184567917080710249017189150294192", "537233794697555587617971898562122287499751326330104438900861362285369159209579.20894448555179628336166706113083738", "-2.436967040184567917080710249017189150294192e-17"); + mod_test ("-10973344995231896444164895312752280156537575740345780145078213554021817209401278502799260096810348280045597821463610756008906936006453379225098199184", "66541527624892473810370053621624002938324370658164532933374927090501743364535993599537688484603548966183655370713388789701765327723856591.969224975", "-1.450342823427219830229311998566498376289753623139511311534558115476690478306521429471030288042940332558759442503472209827991313811102369736966505e+136"); + mod_test ("-0.4316267645066591176857475783149345786635888459807302418058772908006064030240231203951076853432363297761508", "-55028014026.1557830721022778741606190299296", "-0.4316267645066591176857475783149345786635888459807302418058772908006064030240231203951076853432363297761508"); + mod_test ("-2909306841301704095060647742525040306501994081937165245987916403783220066141979481349904813308176225805597723367483244491162516969865072625547738", "-4233.78204828611709673177663912398115727530134420059828072548075540672034293877636097492224160666425080181579999527423978551885309647443462307117921121", "-988.81224272086075541367603049719895260811349125347394416104634518954247717715773679094698039335395189402484412782423394374527794816743393185901317177"); + mod_test ("-6548887805272011465.323257524030453759629949332296153558585801121085431308130680538770399260078998930389034743598626100088171804960350705360197054", "-12080564112679438322760485786027548072559769334761890502356163626145033668765598657336384176583391733506824623", "-6548887805272011465.323257524030453759629949332296153558585801121085431308130680538770399260078998930389034743598626100088171804960350705360197054"); + mod_test ("-17825205605614995267760724571708651253966055640698821354906323632546554721347699817715902863307436433504779452592432809608477.333181451786", "30680736166916309201884925906.6012446662423515442058844013145290522721220129756414013822170839078121709611675310", "-1.476583352405265718076287125956418384435618608746712341181884632993097339340803769809278074193221038608038868e+28"); + mod_test ("0.00000000912468064832360078329428188145559810429725609376050682286774993859391174656196966186924848665919094718780", "21914190263.100035808759435146366532139123334498047338566", "9.1246806483236007832942818814555981042972560937605068228677499385939117465619696618692484866591909471878e-9"); + mod_test ("-20606794163218373220385623629829988033.57174497128", "0.0000000000000921595473430223940199410848478707835684064295358119717430281404961143732177360181223932368247886620954", "-8.55963065519011748284526920363755341557853021589815372874944759648859916695380966744766940378956445724e-14"); + mod_test ("-0.00116515061047312393907595074853372157514235898351272755761457983036507134829330366786074496438528935230083275916775473045004", "-410007620964954722625074616747232948064935562193648550794528374214082044.695992770579155345699714674119972463090345", "-0.00116515061047312393907595074853372157514235898351272755761457983036507134829330366786074496438528935230083275916775473045004"); + mod_test ("0.000000000000000002866262471198013003247450550898087733157498823752490067442065500489968029757441844010991443903735220764", "-2387063555802958241360682309588269568721119805287196269429670036507643298607.716703434577233592987993414932", "2.866262471198013003247450550898087733157498823752490067442065500489968029757441844010991443903735220764e-18"); + mod_test ("383137082334366134473626747321368129198523267298422116111379309501154", "7792834478569981342900412293473610112927620218475883827152315031697511988080100013693178713319824297431492360416857", "3.83137082334366134473626747321368129198523267298422116111379309501154e+68"); + mod_test ("-5192609399231404787818967904763339039804702106.2642098584571392384864215", "11995.0", "-8751.2642098584571392384864215"); + mod_test ("0.0001613753330983460459597", "1343718759722202811633465441653970587609134570741564553699639538938957247416670787866631449", "0.0001613753330983460459597"); + mod_test ("18625.82", "-108460234364121807955833.501117158", "18625.82"); + mod_test ("0.0000000086960654123918299935978162138867774634877845457981404751377524026363658271257851070628323331401981944601936516808916534072490865752", "8049043891570.20498300587421", "8.6960654123918299935978162138867774634877845457981404751377524026363658271257851070628323331401981944601936516808916534072490865752e-9"); + mod_test ("92177258893168796369930099881793244231828885.994885469150932397211053118484704286168", "0.001697557910838632235527648236671741804284351643458802110983125809001092966432046553593908808466256476", "0.001048051559814391786998156983752684121311392378515748632423171613713154633150574252483089353288542512"); + mod_test ("0.000000000000000000135340591193604907157819487179265603170243663378275824462740462", "-3538552385863005446402997819693840644728948859866382289131015243925156152538296009253.88595397921380748370626209756254143", "1.35340591193604907157819487179265603170243663378275824462740462e-19"); + mod_test ("-8942810941342318692131683034298222491.298966162751297487298160818082351741848617", "81468788300903008016446735094927250.9025421163811657618870083563515329169085218713537560955357573689069255755678460294064978585998748322865700882101945", "-6.27130165438908183389889089511521429218754772042294416142499757652637988197330224405855866024467891451122631047827946917334126136432807638603850887995e+34"); + mod_test ("4112.5", "16501231733092448026854714811537782791022.61367458788581352140616404436355216872103784298148436462627878442916700470", "4112.5"); + mod_test ("-0.000000000000000100039272920978804953224514434658947574659086841906774034035770202605930568482069278916", "8360130279092670037383877853101379752066508243.7914548725194425829919568", "-1.00039272920978804953224514434658947574659086841906774034035770202605930568482069278916e-16"); + mod_test ("-0.55733808633010832738832311322243", "-30341809.7768885100044771345", "-0.55733808633010832738832311322243"); + mod_test ("106317245251707976645199.36121706418143436338271", "-0.59881135427287180381497846634181133656689910033999166", "0.32560278164243629083243463276569802027691289241346654"); + mod_test ("-5809879419309871900248097028036783697200487662.72078280568345188008643358457456973", "97479961515864803630625758944755018442629963763620", "-5.80987941930987190024809702803678369720048766272078280568345188008643358457456973e+45"); + mod_test ("-0.0000002582736304792493854476455750807714448789871391914969265606245281578616804637963665810949001173698932167004137735325550552542025992276", "121930479865943189690176599713519584015951299852971842228.150293808603", "-2.582736304792493854476455750807714448789871391914969265606245281578616804637963665810949001173698932167004137735325550552542025992276e-7"); + mod_test ("-141", "-1.290460", "-0.33986"); + mod_test ("-1672922546593.31971778277173", "-24004744487670982178071549599909616293578410420429907254240481309690669724949467538663.43257166059", "-1672922546593.31971778277173"); + mod_test ("-0.000000000000000000096506747661828537633255606033313182920993286310754098242241527192506663129986680230116508640760013474440576093964790427764", "-0.00000010591032418873774305782488821422031008159269224396547763341455910365931704698604755331650104205032352591665834970710247264938146932851", "-9.6506747661828537633255606033313182920993286310754098242241527192506663129986680230116508640760013474440576093964790427764e-20"); + mod_test ("-13827401304111289312736198643718536550239860723009716248160536677", "-0.0000039286228820013610690203711803131600098718683633", "-0.0000018687648571863700673078239442130544157030166194"); + mod_test ("-42.4692049472839584484885223292994575479989813667615626032513742843562250259364746786558133445767723482540247", "-0.00000000000000000819275717705512539909834846743982191143678579675280080605996356880686842267", "-6.4653951124095444397419580073920159575587091030342708998343881853687266199867723482540247e-18"); + mod_test ("-2466733580603659963575534598558841787749140591761688146584246949860119069729862200150585805915812920870610199177565657789103756293844601451975927", "0.00000000000000000001220964545466869353977", "-1.73255416774937445048e-21"); + mod_test ("-15028378815304663676509006037945962004972477648490101799915638280371939420560.0041911393147636614007445", "50622452443346007758014952215939952642084376096904097662205047592117731694004927204947361193840079003397393315495612132043954828016869740815677950", "-1.50283788153046636765090060379459620049724776484901017999156382803719394205600041911393147636614007445e+76"); + mod_test ("142588144195311580010051.5364511066747054069508651215066362734114680562635989353532168705092760233791521149157821867553492562330410494546864139650", "-14503165820788.7989118526503493452200602820958797693990568472997380353527541143720627492477025", "2915050714654.819054833603896590465362673501332752905041274459514111791099261470796120059809614915782186755349256233041049454686413965"); + mod_test ("-969615612019600562266997847", "0.000000191644650609545820597008991399827106864514006", "-1.231577096546224847608911542095213749611614e-7"); + mod_test ("2256513056638995361107016553105302955081979298952482814125065516118737356068145.82", "-158065108111543929811518473313411.60992867508424058272054757815774769019280374359986010771", "1.2747118706198757060172327002063737680496619401702267612146633003684640606557668930745563e+32"); + mod_test ("0.0000000009237134280775239488177645583957175262248471518379247948959", "-0.0000000000000001658030328961634", "2.71610961190711645583957175262248471518379247948959e-17"); + mod_test ("-29037971633171746964110337225165989562263266513890039145139101509478815612783351650243947553265889073155208935272292022915303266220845856601847833", "0.0002291490081859774827", "-0.0000175625699645664842"); + mod_test ("-7419630363912248895351350605409627746954992624899840002172405589436855414.53245142763", "548.8847974769155367539649264103154853090755290", "-311.331663008566145443936338341729777410460137"); + mod_test ("-31531682519443763389714.61342909941642731349791408998579283062988631957213607", "-0.0049509892638980905715921538869775154076564720153", "-0.00240704556517700786995420557935621901418625076453607"); + mod_test ("10.199939958363750394845392764", "-938958758058.7364", "10.199939958363750394845392764"); + mod_test ("0.00000000000000000547428861001874500", "8542.618867822931747906923388", "5.474288610018745e-18"); + mod_test ("0.00000000000605257123060057047947264779334280422324573184783056036871244530739641764616333500517830537807440912208", "-7720892347085081968920717984388501900819875846611343246381710158287747831369369498946504999.69677595776775728276345177652950285580722556865359060", "6.05257123060057047947264779334280422324573184783056036871244530739641764616333500517830537807440912208e-12"); + mod_test ("5197872005452089687845492226606310126958533004786.01262820209011362035440472786789414494121891863808333760222524857381721029192192394837170796", "-1553107578156990684479674739994879909980690781747809215157294762487391417358259.146954264798337814197978", "5.19787200545208968784549222660631012695853300478601262820209011362035440472786789414494121891863808333760222524857381721029192192394837170796e+48"); + mod_test ("-0.000010459044875719686467201064277204760401116231048766758416108501254604582446941866638877706771900478867008604302", "4570483969034967530134798231269839607555086988204402691978.0846842677197598069225306405016", "-0.000010459044875719686467201064277204760401116231048766758416108501254604582446941866638877706771900478867008604302"); + mod_test ("34950082865877722140999896945527676095434244644489049.47442671960077158711230616940136639915609220577207968", "379002403.050778311803417819043114867", "283625356.05019950260262830045876010540136639915609220577207968"); + mod_test ("-0.0031090306995447730433562939728182473162977550600870500009238934708225472008899875393691975288926245842294981202786862852967148112", "-179021575013512153729485967283056990.1980994548847179904114211031571610186752960630950031860150656109870473715205099194325984", "-0.0031090306995447730433562939728182473162977550600870500009238934708225472008899875393691975288926245842294981202786862852967148112"); + mod_test ("350213646089009419745026624604797595763993333334620301840610383877418878521099968820864105567.6181312666", "0.00000324117432025964624180746008701209658337644053764142142257723637790781637027233123642211394947389418444055224", "5.7055181542801922990712697286936826369136399715709266248399293604043992259309658307682824893308496146676808e-7"); + mod_test ("3328107.8494", "418714348020467109958856616981538014194347311895744037569297648600727758725623", "3328107.8494"); + mod_test ("-551844215309008408275168733.623176966939595953994851048267562459636894172209764669184645704359671910176962904921966067381393678263185580431892958828100", "52489.2323", "-38379.2058769669395959539948510482675624596368941722097646691846457043596719101769629049219660673813936782631855804318929588281"); + mod_test ("-9161822288156514844155956374210640490022366908510", "1389019572848235000704785709077750964197706899388709294785368095533089044973589", "-9.16182228815651484415595637421064049002236690851e+48"); + mod_test ("91056139545088458766054934573084198168.5710642286038189576393294864960", "-4517685791348280307925690612882502300237833708968552977972888084474038473.394339218360256523962637702858180915401362080730", "9.1056139545088458766054934573084198168571064228603818957639329486496e+37"); + mod_test ("390029336502365918513931.130015474228581793566056937195029617483963133928361072920643966836693549318455838606", "-677948403080048563372.836374", "209004731337994574550.214965474228581793566056937195029617483963133928361072920643966836693549318455838606"); + mod_test ("-402587804331.52384475209667561672439292038632064986705375834023160394", "22953293360768232064948813431816046275755734572489568108170437942795164066617787530406717846925329560915859870010112631465336783868468156816495", "-402587804331.52384475209667561672439292038632064986705375834023160394"); + mod_test ("-625315195115297944213401252771807597994808320636040980", "1245525668172581544516010393636352381040839194590487646892457620457541581549954855850913555273127518858.5699453665074315653164442153272409410", "-6.2531519511529794421340125277180759799480832063604098e+53"); + mod_test ("0.00000000000000000106014797651953270761670971091554825136816009688246397263410062266680994943", "-2837919311814592501835.894615149733052873373862623419869", "1.06014797651953270761670971091554825136816009688246397263410062266680994943e-18"); + mod_test ("237381233514476032201357341.4041", "-0.065815324672679848778208005159859", "0.049044652806221841033273417056172"); + mod_test ("-0.0000000000000005144544006903982929329271186335022979326957607423453760483024388746093708635051243834072032", "53859.824448316", "-5.144544006903982929329271186335022979326957607423453760483024388746093708635051243834072032e-16"); + mod_test ("9.465307046802752058394916832226320349420927855272418", "3177012152819988337055628473453787701666615", "9.465307046802752058394916832226320349420927855272418"); + mod_test ("9573738794726021107.734106032", "-185794949125622556219134912729610938207753649877619366539537127820541141774242915", "9573738794726021107.734106032"); + mod_test ("-234.492043915944790198500267399199969588539805", "-0.0000000000000000070050048053389237694672406069762", "-1.7957735143268502710881087411774e-18"); + mod_test ("257434448562147186372612642412.726354747500293136781463967693646812824724851090463016", "10376593029095719663406559308.704088391790279215064412899034913970170280677326597734060879629830748435773301327", "8.396215863849914450855219003828233344533591975235554390855711528737988595252117398538888884062037541440768152e+27"); + mod_test ("12285490012463121838351929674277761291240995729813968431132385721778827202446854153384062524345407227973315579239229493694920.48275614705", "-197015608939.8609489308", "196270462249.41659606705"); + mod_test ("0.000000000002240974449242592254790173835564041606148621842662292012652507440629547097709122038267701655839515607132861720217869106265565545", "-23335987271047953972812286009148867302941199929709819822218.47662872390777570098607457661024567895703928912305401676859", "2.240974449242592254790173835564041606148621842662292012652507440629547097709122038267701655839515607132861720217869106265565545e-12"); + mod_test ("165366904096962525782012054078987504568761069721.4060389256731697873983611830230858921671529412698579846557699", "3444399121879479169341765797909079931147798377878056422577985615184975145614404658705092317852628448.8200951", "1.653669040969625257820120540789875045687610697214060389256731697873983611830230858921671529412698579846557699e+47"); + mod_test ("2705886232366102755195760426990938611198454960222419636993746631582409715337015469937064177880977434.52524166361088019858326697993", "-153335210993719572189122942382836225292613994436997443668536033261124985431110232311472271345055289442071134321117800654483720838841", "2.70588623236610275519576042699093861119845496022241963699374663158240971533701546993706417788097743452524166361088019858326697993e+99"); + mod_test ("-2.131", "81.141175482525877411234926403452", "-2.131"); + mod_test ("36280697805.456872085448120623178135789191532017507413855482045239572847567984946", "-0.003264019500578350726232120923403720087351790298292836973891286679030626156471457", "0.000840690677320778506160517859695422697759302805218793948421046952872287436211442"); + mod_test ("-0.0000000000000000383294424564471974556118502909006204805914338360402016898543", "189834035009171131324219625463596327097619764552465816576075046748053426206833060327761155383041718993336", "-3.83294424564471974556118502909006204805914338360402016898543e-17"); + mod_test ("10640490.5446167580829516100444812115028794128019", "-3356962116245265447.78909316730481260744693416477010628711925187303", "10640490.5446167580829516100444812115028794128019"); + mod_test ("66770.3424620469504716946257076842243098386178403211027502322850765242199540112623715366358838507920992543105400494508613543146408231317", "12.513626579144904009386433045173431405442032767743437096384724485707600961521450554612546096", "10.1446623088875816180054116839677618053730244098658410197799452741688242943236626787024616907920992543105400494508613543146408231317"); + mod_test ("2006898576304765006614781291454031779440425434725470591551164794.861776715854234923976439", "6.073", "1.986776715854234923976439"); + mod_test ("1659509756014472961738450001016716874178644554.45519598", "35836996.118873689899485945983497236111", "33163606.3246718766078753085595268271"); + mod_test ("-6249029048938249062243170609092474550191037331.385626639511695286190999439371", "-108733052645.39651948756068195820182", "-49787722470.154741457236628551037439439371"); + mod_test ("3229906275442392424418195788904419876739.198022479413785727883243013449038330977486395796373161974679847911", "0.398968452931", "0.076770579754785727883243013449038330977486395796373161974679847911"); + mod_test ("-68.48010837866100691663949964911341141391335", "-431347497460708500535477713.921644368607", "-68.48010837866100691663949964911341141391335"); + mod_test ("-0.0000000000042873818496651474800023665212086183152315505087", "-0.0004833294030302505015641228567431906450483537828093124623545261018465548063776320121938591921894456004211776094377978846", "-4.2873818496651474800023665212086183152315505087e-12"); + mod_test ("-16963834223166719706079539302.342838131750515721187172994523", "5062538155437557.3543319054238404926367207556617251997556392366074322977693815298577958036063656158349192791752169723637271257149", "-4653064987731577.213544580641442966920884382870283356443820101043539787185918274106379472389554877383448200968409644573003915622"); + mod_test ("27752292382966155484621019967155951075006009060959254418846816259283474988719280207751032859907637274084223944989149146855286224303", "7999040368028070748765438.41605114691880938406", "9.2270733244135400413176158796214648476494776e+23"); + mod_test ("-0.0000000220775496923969762820783886936932950453320119723971850235755245075630658843057584853140734663613038065152584371146863744860271944228900", "278937252004422983259089672008219526227049167", "-2.207754969239697628207838869369329504533201197239718502357552450756306588430575848531407346636130380651525843711468637448602719442289e-8"); + mod_test ("4088817811601835043414165021549173.34648405001199965780370323214083852306094738315385019245330167477793092158413628", "3872463786824467850519422587588270837871264684182279002671582068189548558089190.6338668856949165", "4.08881781160183504341416502154917334648405001199965780370323214083852306094738315385019245330167477793092158413628e+33"); + mod_test ("243322131742241598643288437886384992875664969619768995471553676078266766770945268905658381465660972347322840413666337352", "-520908752399942059927.489465648336426083977336790367066585385183838514818914251238668315053257532155725", "336517846493051868082.5236480255207660421751407980256923055283675410001569182573777995089783207908381"); + mod_test ("0.000001076734879087", "259571475955474", "0.000001076734879087"); + mod_test ("-0.0000000000000000001708230742803565810750173450663838191720653599608146843168311123", "443087835486092973824776431839302000581260502094303047590360860043969772847300210", "-1.708230742803565810750173450663838191720653599608146843168311123e-19"); + mod_test ("-10116828102714929396303805403687032885954344533722862963220965618949477520274569058488672373457467461916061160346468283787006793", "993946132322903524101486258672429377833245402642388403366584727501532708958381633056725438997379324147994463788158057061040895860915826346549.0421", "-1.0116828102714929396303805403687032885954344533722862963220965618949477520274569058488672373457467461916061160346468283787006793e+127"); + mod_test ("-389784540685386262354634876838022505911248721618526216253571784.633075923", "14179193090251546307844809845741115123.68591663451283228630854744359859823006233091006350233571476950897344052975285852270872779781057686080568", "-7.1414462195758796324750930879094812700989420115077711452950042736953900296594912665141710395533192640587241839627883909055803037985187199944e+35"); + mod_test ("-45984185801341303910880240243.76714118367503791509966241100863013219378666011186705299", "0.0000000051570812174238260137276061944120837059018185942344919696042121715357536276082362935247589887241145383799", "-2.8738700535334248371703727635151089062632056136632218642673399518792415040952650429114119520426674977435e-9"); + mod_test ("-14905432087844530139366283324831046272631676943288697485416020309138739737561809233765151341023796257375655678814935895432051879324532", "94242798089904800354993279286346515", "-6.8721799631260899670134950264021572e+34"); + mod_test ("1289853511883958265825415665788637565052635440054342593643104070764287224769.93948274270941526387678146636906574620943512848445780376", "87.9539218424403804769323138636392398940152461892195350593552856971443615078621862619014423", "72.2591398780413624803529381690619313389774065636772867904263511510258955159663755970342588"); + mod_test ("53465238938510497274637223297650593182339185202252203083.1774604451123035468314690671136303407336840099522332334123316657221949276993", "-21334279.8165058978", "2832435.5604826875123035468314690671136303407336840099522332334123316657221949276993"); + mod_test ("-3108015.3661", "61126330169820996757526065.416264018282776618615327293283282822614202595204241400248642232068625532106", "-3108015.3661"); + mod_test ("-1275542230072231958406146247425815282449610680324545602271.8884038039259", "-243043979558321439267025469546543715381639907851772902031.084835381233691203862582992711992315936833776447731819010", "-6.032233228062476207101889969309670554141114106568109211646422689775744398068708503644003842031583111776134090495e+55"); + mod_test ("-0.000000000000000214815544265849149385478069939689813189252105406530375164638737376691673594643332117128360303977189949176016884413230594676158437978215", "-51027595198082649357603319772041435902079915041106170467.57451940249204354029924413238799739283659245365065632265429523372460397305377634", "-2.14815544265849149385478069939689813189252105406530375164638737376691673594643332117128360303977189949176016884413230594676158437978215e-16"); + mod_test ("-111350.754570123005196804918034331227325061895360176437728709656573510003457243639517558983859956764977218771481494447793", "0.00000000000034514677625704452", "-2.04176719106943547325061895360176437728709656573510003457243639517558983859956764977218771481494447793e-13"); + mod_test ("0.0000000000000596075948515369263847934641280425766058217698627698921776443246618249228249287653194626588231171757500449899328884288", "0.00015836637201409230200", "5.96075948515369263847934641280425766058217698627698921776443246618249228249287653194626588231171757500449899328884288e-14"); + mod_test ("2350976577509944947853224866479625205856731752244171284555163774825992062785340964744094088086550435965919613918802628710407949945051994", "2863077556.17572911282887032307292811887736", "1969784678.28266366932123519437643424462424"); + mod_test ("-109420981536615914626321665928421681390611584416442196835511987438396387.3285665769331549736310", "-0.707107", "-0.147319576933154973631"); + mod_test ("-155772215583445307101973376728964254746022086862918345349651130316968950879085903647.4700888378639266", "-0.00000000156250631895772405757624035051977475", "-2.005231219066573949078690311357765e-10"); + mod_test ("0.0000001837341912533402186255699654239577837158324509985744336931487388729640675913909", "-0.1644732520351148576255123808206799034683336488831104519232031408287760056008", "1.837341912533402186255699654239577837158324509985744336931487388729640675913909e-7"); + mod_test ("-0.000000000000001833320027801786983664774213824269815", "-32078261563376466267956235494913303920.158358109032084353548239902600710775887991985", "-1.833320027801786983664774213824269815e-15"); + mod_test ("-39.6", "-84001578606.1", "-39.6"); + mod_test ("-29724877149747295025888412038962646.2553837903819421016896996057751232598092947824478468469244594", "0.010594787103499106023921039896104036529348362781865379404768004199946120463319843372131130828257677", "-0.010560411121165907362703538197379906418141401977625517318897269171797412206019222827160029917370617"); + mod_test ("0.0000000297371329456338047054799880006249839037726", "-0.0000000000000000399", "2.08338047054799880006249839037726e-17"); + mod_test ("3510347687348.9918310", "0.000000000535137751617828949087071435929520771260034369415874463215729", "4.3970413363665598746475030544260422065911721854665904296016e-11"); + mod_test ("1172939419948541405468859374692318735483069696661.0016798921467104516384190202866844256851817314237012552533419694922981805635888196421299458565", "836225885046.0339803680834170441728042601393459064753318767659265177747", "489848285142.9652308075799720859670922143649859637996694219485574044875419694922981805635888196421299458565"); + mod_test ("3304012503481.86462667433235823859144825699221873", "-6331887562487821340332306152704795208243157181038687350549806653670754776238030105276438.1", "3304012503481.86462667433235823859144825699221873"); + mod_test ("-150211288508225998712214977612499531708.2501845877268623292755528138", "-12205845572868490041320605820426679815.764517713", "-3.7411416338041182163677077673793739190759720317268623292755528138e+36"); + mod_test ("0.000000011094742677563476721248293381876559856937729234232159020961832701368001460631326", "-6221917952403340240791870643787532087969062682748828170364381367809149895647888374041427464551506847.51299431101992176148174207489487663558", "1.1094742677563476721248293381876559856937729234232159020961832701368001460631326e-8"); + mod_test ("326721863970144140942581356605337628165729694455912.5775012098511224625843", "-5268757703002526369983689288253", "1.3801824327726670886183774879205775012098511224625843e+30"); + mod_test ("-165640236596750856195.895988", "11701057069048906945118088505193697795574", "-165640236596750856195.895988"); + mod_test ("-46180228389542924839944399544341711000150191241548446973614685877508179228647290933889351181899671153310459870760689493.0640313663321381860", "-13302007.25660543726751034427143226054726399423446928373342294891495068748409491646", "-8810440.01892587916183525077832797812112229177221241364171480643762179372031812578"); + mod_test ("647315854763046741826812737683933902168764597679636554385105093993558679.47", "-4490828077170522297233893004993.13249786", "2.82037423805486254216576591662663109074e+30"); + mod_test ("1599377725182495758517742498272843305960693020206048973447583115243269.1410087798545951915296847822871200148003875672207221059954691330107473", "5088063662255167160094549907732541865919416012140789.267488408929408273548538461707216938135207", "2.1844508625218647076211356222081320411196598385437706721627302640180596421073005329651875848335672207221059954691330107473e+51"); + mod_test ("0.00000000000000000091951455826031110073950473421217054945023004137", "880047376210923670087515320566136957381678956755035166368292510311615040924779967631184922.514417518390289574344", "9.1951455826031110073950473421217054945023004137e-19"); + mod_test ("-347310950900872385776467889423388243805166699963730339415360267534470.83828754168432611788446288344053", "-268630368745759667653.586235048837", "-254067255574127219771.59303783483232611788446288344053"); + mod_test ("186870193173432148130646645388.879740942923234926201708997173946572", "-30134593142508069785581273.715295334882352524247146983041708195688381392356164514745081831753250268038414517", "5.581096739607390257167080333369337455232069643267155541425108346985999423844065747561298095087893791580083e+24"); + mod_test ("-0.1807674864812454987374199", "-4469727073230097681266362826888054961977099149359.0374588261941846339229668347809983286076968459321981644745510609932772908293349139744841118084627847", "-0.1807674864812454987374199"); + mod_test ("-609942528111000950646441027284423914421676073338789300919146249735345832203325180490401721.169829288886540318797384013020069162311817163984967658940423", "0.00000000000491817438446678148457562512594581494844507213406015271765904587", "-8.43098438842919315107982234851497412708959280904973168566191e-13"); + mod_test ("9224445890397894331131171246915533737228450834032414548525009296813800.6194126855929999859102381839862079418242513149339463", "0.00200244838742528040113150017076386237193859471381402369402196727101743578532914482170210335402189674320", "0.0013517807556936445819076570223433161315655337951471334183465116029136530599646156000418832705275726904"); + mod_test ("-48683037685508014142805509729454.7708328664705019554487311077038575660905772924", "-3009.86809", "-2773.5774628664705019554487311077038575660905772924"); + mod_test ("-45.40878406155210820981388806994", "17322674941061069468.90696296162077004226138639510007304608119673036621826170347783883962799199837139339763365258311616188171455884", "-45.40878406155210820981388806994"); + mod_test ("-0.00000045798269200527002110503804633046978211168710862544855", "-0.0332022903595637863650592445124818543441138270869626594601406767165779904542946340747", "-4.5798269200527002110503804633046978211168710862544855e-7"); + mod_test ("-0.0263593463400", "16431622834110668320883651807426049458531131391388126888382321455092604238225568419342828987836945825243059", "-0.02635934634"); + mod_test ("146967376566418942423384976079370477844114594100864341309675391342034713364.6833806684984731707692088346576", "-0.013333681564204393251252427627958", "0.005064205951219194772596398940182"); + mod_test ("211754646034325622462.5754245", "0.00000000000160680374735486298985", "2.036680263359390281e-13"); + mod_test ("51605045186016481873235601735007249791991888297129512533440103662214424121299.1344940307379598284739161103280966", "0.000000000000000000011786218512737462780105791891803245937674332997646395012525762681", "2.588799129973576402223004629808690177116789885879883368785248142e-21"); + mod_test ("-617.554294656699194846345554", "-4.010908756729124879238839707729807689382950249519874348632636426606498742511278085488539497726029165636382561543373147540415292914484080714369027", "-3.885254877143088322803078717339423524408611823459224659206626729205692395774452920253456847917537657633468083863908426316460184083935650701538869"); + mod_test ("-0.000099945023165063334867500208938018190178130741558039812499297741499312773735009571", "-6722316615037541443129.257975301497143186395975837045082051651840624355546256470906712376653728222403894020565138962973624024728169204846444569100775", "-0.000099945023165063334867500208938018190178130741558039812499297741499312773735009571"); + mod_test ("1.47399214966951503197706669234", "-0.0000000001840478582583371644381", "5.02470037070635715408e-11"); + mod_test ("-3418446258", "-3958503176047281021850594866790858400.121417849614913", "-3418446258"); + mod_test ("-12686959556778981227071587746211507082286108179183876439271646348604072647005650127081913277412890.87493710443296410449", "75268789302897574467144387179003360679990148424", "-6.783811385634916183071487831399702281781586685087493710443296410449e+46"); + mod_test ("-13107.4826208600544806407030932767550902829117391520", "-0.0000000000000000037384466887246671347259264227228597229847149881116611194168157515133538054652289640187466938841", "-2.0126616347799094847193752802827297838499598456064986684374889162126566609421987606571510583884e-18"); + mod_test ("35404712862830131528829951583097767175730528979755821351149896205565020402884938392577568669927538981512991749406271", "-1031829364936517351885757530329733298799430897476255354154166810707348414663475611609730484965498257348081066493148106978487899", "3.5404712862830131528829951583097767175730528979755821351149896205565020402884938392577568669927538981512991749406271e+115"); + mod_test ("100539201018290722728826872367457614631333", "-1045913633296200056145880201567560454793511080052389543593290266185071912897427558382653862152861912376736712460547.2617511718", "1.00539201018290722728826872367457614631333e+41"); + mod_test ("5900417857967.684122320330266311315988571303719434583688056", "8470102.1", "743371.984122320330266311315988571303719434583688056"); + mod_test ("-0.0000000000000162275925487344742900779431398339947832550078717275513304235810620", "-98527398065181443.95890070566948299821236792792", "-1.6227592548734474290077943139833994783255007871727551330423581062e-14"); + mod_test ("673799374274922.944483940435547205550045463560294607616912043082182683195821140728435", "-0.000000000000000016485778560418899864685352845577378671092383279170185079302767621027277318696115879445674705947984124222523466771393786233625", "7.82834750139086490154197864647850303623771092697051197255144188339215023494951403366683672964266180245577656923491776051375e-19"); + mod_test ("-359760700574909877872.1893981874549355621361385437217", "-0.0000000000000012525895046273044615704543219559935320885590084464816796118205647431065997743952", "-5.273873466758084448309839663582338093952872688281491316326187652956128120625712e-16"); + mod_test ("-0.00000000000000000344", "-278600563952441146592998231079910916344907758061277029729847723704754927633299267404490050381652171978731152168944.3624353", "-3.44e-18"); + mod_test ("-19885391235.72444811560527014674591026983", "-0.0000000000000001210077665069172292508225410469346919696252649033898358285924802170280105173635047594325479625128232032868344035725367034768312666555169667118", "-3.27041730165540323618629447140644363558794072504731638157226990591284204649561893100263048858295969889235470457661290945938793086438381112962e-17"); + mod_test ("-4388062185.483", "-39594387554948541710295853541397266260999826140754757455063575150482412990992087849313100923544071923172382024125465206259558449365491157951841915852", "-4388062185.483"); + mod_test ("1.27", "21551626592.4081971013247452256236019543192696982517035660906335460694567861697569727904693502", "1.27"); + mod_test ("0.00000001329440489079501558889737803395626", "-1309144737900.376642959151800307497717804787800342628351", "1.329440489079501558889737803395626e-8"); + mod_test ("-156180543107.87592902679287176867109874431", "-4686280179444986299955463199189.092904143822557816915953501163200171428106923307793221186641484591113126104675812379227570402", "-156180543107.87592902679287176867109874431"); + mod_test ("4295520.77026900841676666457392998671922680353168654102503126542727033", "-38.020", "21.17026900841676666457392998671922680353168654102503126542727033"); + mod_test ("3756201184729.353948914504331418531", "98764.22688418263420", "9105.893120837470131418531"); + mod_test ("-183445480599552748298061627642.054002297", "-0.0000107", "-0.000007397"); + mod_test ("0.000000000000909591216320809881489928409865189195215922428863268009816135413196049055956596319025228879647140264146595335905308933772188246737897", "-12795.4852229887102245317", "9.09591216320809881489928409865189195215922428863268009816135413196049055956596319025228879647140264146595335905308933772188246737897e-13"); + mod_test ("-398115161708797899244094", "-0.00000190822", "-2.2942e-7"); + mod_test ("-848992173816.728883939845041393969214986771465330815208069567930789668049373073351425877934822175812944020178983059783798362", "58562228020085626501399449892933178818812686495472026995354960915893982723005540323314902834042032988.31762122657557564887837408661222893484485", "-848992173816.728883939845041393969214986771465330815208069567930789668049373073351425877934822175812944020178983059783798362"); + mod_test ("170689702928493785198704770480731726844384694228880632000086674248431636854235360847784394580.85956251018513598050194639733320", "0.00000000000000003249511361722935184708182221178448630186575980523410123888723074013021153647708920596380343297194452156472646750", "1.32996935134055436147559167404493656358621211234030812331554355557884963071617424821454322841322328537630845975e-17"); + mod_test ("1321696536903060333507124214923130056533062275039547547929702694853188954923451499474519149", "-0.00000000000000025469171278", "1.218603981e-16"); + mod_test ("1519725031000099259255503608727143117600103.950594546108601767133460279781", "36369953008089867650245915598882421133753955282.449761084477781573225146186400665554685339940078210117714275205598825657812211050146", "1.519725031000099259255503608727143117600103950594546108601767133460279781e+42"); + mod_test ("-83497099821374016986286773.646990311001433716310815087541958164127982967474303128253316028", "34.885503706835596", "-31.096961763167985716310815087541958164127982967474303128253316028"); + mod_test ("-281551500617863299353204258388337646826959732785417359702291456810294245173", "-680761080887665089.960819023854303651778569787", "-75711260041960558.526892392939593150576805521"); + mod_test ("-1.15721309733221526556327685277570425765587629667165133407328940007759291237969184088163508432164257007784170132569200710694878", "-3218490902199503763628322542391806103361580787103.2620354099117464128382431498128680419559189", "-1.15721309733221526556327685277570425765587629667165133407328940007759291237969184088163508432164257007784170132569200710694878"); + mod_test ("72685543", "-501466282854557781199312940523192072364105342282967607632661628.19377138387", "72685543"); + mod_test ("245721737418068480302255303255239643597822590292208445238466792403750601113775053588192850226", "3386598210277254485823559672192", "7.42596358685217392305157389746e+29"); + mod_test ("-2659239972.775732441119988378284430845255754722338730479949959770532563552221440837219977492287", "-366766093425414896727693582201631208201498739206701475487999587.04784925264477357068332", "-2659239972.775732441119988378284430845255754722338730479949959770532563552221440837219977492287"); + mod_test ("-202937664456304.89555195325400615051606086193279", "367508289819471739156301421289081005042399.214321331102128714358354131581972689141507241561", "-202937664456304.89555195325400615051606086193279"); + mod_test ("-272399937191.733", "-33398478226504197401967686042303959950770799816157551894222273006.68924", "-272399937191.733"); + mod_test ("0.0087589373702205672661687978512384214861196280910391339165", "-373449691484745421909661659779737619793741839646928018592372485434538362245960211318420579829536.7917148942879686985463255295177053873", "0.0087589373702205672661687978512384214861196280910391339165"); + mod_test ("-0.0000000003525427146401188285154486", "894317500882.51091293970592971909046143867805856323040", "-3.525427146401188285154486e-10"); + mod_test ("-91451509534712961197767251912.12413503036698723430206046435825379830131588169", "175966443745543358277161986311916627186504872290571423072359410287954017058417918465262148785893573180476929551596101110996620722038220", "-9.145150953471296119776725191212413503036698723430206046435825379830131588169e+28"); + mod_test ("5239772947176538407844432421154043692127337338786315971056005937511720316060149414713137609138942592364274998260.3914418522", "-0.000351999447227731010425590682", "0.000220009266937371477472993074"); + mod_test ("0.0000000000000000119885361224350878697901381513746669638803014061044667195642049359814289191991814187212222202848050879631237494325242872", "-78535546704.5392511810713502849597204629156277123901805", "1.19885361224350878697901381513746669638803014061044667195642049359814289191991814187212222202848050879631237494325242872e-17"); + mod_test ("-39212530235163840641.889", "0.0000153516323003372462432711273284710", "-9.9431734462012600433819830344e-8"); + mod_test ("0.00000000003095857781498", "101110441905084702.0357403762824", "3.095857781498e-11"); + mod_test ("-10334049534629711384154568939144539037486810844012775904747573760967321021577642786297034994468008867806308331807710193171907638257163287742135", "7", "-4"); + mod_test ("-15218677194629873309845552539810909.24144546875160065973098514044701774323707782894779555789259131657466804", "-34518535980025586317185189406244975538787915397779.23976886730365452862236233621200723924917399966293372039141790286540026470", "-1.521867719462987330984555253981090924144546875160065973098514044701774323707782894779555789259131657466804e+34"); + mod_test ("1140580.761784", "5541289870140054.14605122999270451642719393072416088141141309658972740905789791956116896048544622227464211", "1140580.761784"); + mod_test ("-19230493275938204954207576965451693824417167596.852559467", "1772734380358953111610301912647488842242624961779873682671334193795568636568468773326514107362478536842717561130919918", "-1.9230493275938204954207576965451693824417167596852559467e+46"); + mod_test ("599.7", "-1619645435801723194772984.179363365313908446470145035129596757155977", "599.7"); + mod_test ("0.00000003527897184750897367124288669208530527416142299801842725622500628314084302757630841538287485331290943712878461770448393129110928068601146662", "-78850.70929109605094", "3.527897184750897367124288669208530527416142299801842725622500628314084302757630841538287485331290943712878461770448393129110928068601146662e-8"); + mod_test ("176028.398859288392592242830374424713538809024937584968933934", "-55388056.672", "176028.398859288392592242830374424713538809024937584968933934"); + mod_test ("-3687887449589971447806306109197252366886458742730568279682018480906663049444897395704418760650684470725759432270992", "-3.7420395715065178572722", "-1.37688512348852048922"); + mod_test ("0.00000000000000000005256579563216950668763224444694962365341802542", "8723053021165901635236330129212563.3636641322636657590577963894918834488095316505676835145660950358", "5.256579563216950668763224444694962365341802542e-20"); + mod_test ("-0.00000000031", "-40709625512787616635932401858411015489778633837395274172588092946942501539158146828356731279975556752797552634865553259851", "-3.1e-10"); + mod_test ("-149135372988628919970496739114893960253872819.29190786741735400203191111811808959575782606817793421565345731848675379351509", "-27246318921164548382835661684073753930547046090475812149871172745414922", "-1.4913537298862891997049673911489396025387281929190786741735400203191111811808959575782606817793421565345731848675379351509e+44"); + mod_test ("-24363147306500486229311532771740994620057318471544291974564601298526862244753274543680731501921598200150080347486100220249.95", "155112283879060815501594513038826638314014.151622292976655", "-6.0684495386164490837630162468104486251948666896636943585e+40"); + mod_test ("-21581136768145783809281720761.44048211993924021469354146024085251250876602551196346646616560379632610", "3976135041682843254167378300.9535996945876700278842158983543387014253903902294", "-1.7004615597315675384448292566724836470008900752724619684691590053818140743649634664661656037963261e+27"); + mod_test ("0.0000040326918148754448903294471525102", "-47372770302411027590776261462082130188562141598263.7", "0.0000040326918148754448903294471525102"); + mod_test ("-0.000207149307738031286357317412628083411158171708095191007176464575073542347747004508854126911118", "4571168574.53730007", "-0.000207149307738031286357317412628083411158171708095191007176464575073542347747004508854126911118"); + mod_test ("-97509529222819532741120.7501430099139821788", "413204.03894124413846481557841831902206393440828094465180414091136336556519710979330", "-225763.5035665848727274739410862425313052713554127953879950852567857905478666569684"); + mod_test ("-2.00", "-27821012567074003433639721305709103428961197219622539.5685794624070639394524366200311619036627965777978152267632220", "-2"); + mod_test ("-0.0000000000000000294734806609719368469844343453588795984107909582873623530491162658480309441610559248449712368676186348212527994", "125.2766533052382457665605834964486208493706839813580506", "-2.94734806609719368469844343453588795984107909582873623530491162658480309441610559248449712368676186348212527994e-17"); + mod_test ("-0.001633958178625393150319605773581603368794536210123014338662866483443630520788262608537108853222673749309263319138110819633916150775", "984041712528385604819023678382822872190082698761085069290999301227.7932731339787355560947196826063289233812103279464", "-0.001633958178625393150319605773581603368794536210123014338662866483443630520788262608537108853222673749309263319138110819633916150775"); + mod_test ("-647590209400834319944871139406631294085860629844127321070709716929419594078771338864670085558591972653967722448703626313095422674915141792986000", "0.1598243963757636855858934473058567117813241414088147740804621207975238365569266130451403849392927831342716601396536406385033", "-0.1044367829611085137461733259113676442705082608844196425772771026984610209105052891722465431157849664696915079658107241925781"); + mod_test ("-25494638.01708", "53771122205901307230592753088190036050267061395902109215165014594840247575345774715515212", "-25494638.01708"); + mod_test ("3699534688828621863573818255225145699064136663560216492004997448846", "-9352801580752779322144587524942771278907911645795358120645130483618643349473297562259322949157930678655.0985025", "3.699534688828621863573818255225145699064136663560216492004997448846e+66"); + mod_test ("85032671555909805603615516661404.435251", "-731048436229736323522.991409687588012443676785142131368263222377948374546633511253019699058056630484634450274338643065674171", "313431824866633070885.329503399810155585075007013107299041216892826957929258111083849330121077202750028714374886317572152301"); + mod_test ("-209945559192857.1946165", "-27531413554176324889547266436322269.24", "-209945559192857.1946165"); + mod_test ("-295428170594032684107120468868902197984687862352304428967023482208137265881.1518679174044920", "8841356497728907803087292.54", "-6.173111942792252980851311451867917404492e+24"); + mod_test ("-24870862326767803723609181211951886785506016576823555683020976203476199.6383226631946206831968357575", "39.0192876", "-36.8342102631946206831968357575"); + mod_test ("0.00000000000104093732456948791535660490005579952856632590144252349583941188680067059085582490969", "-0.000000000001845", "1.04093732456948791535660490005579952856632590144252349583941188680067059085582490969e-12"); + mod_test ("-110171543516072519154077470043041622245899518010724357.97", "-215985365493128751969338708436174659881146326.47130407981449301251477", "-1.8642809482641267496491145390027069075248347603428080841787298772523e+44"); + mod_test ("-5897509163.33237929190342310229239099251637748593970183365297489393099622646591458028949809204", "-0.00000000000000001049808087192732915451590248336583114743497320652254457639908692412845756123814307660410407578158294", "-8.86866462108221132146017741372701042754803104583264417668482799703357268955774117913535569071970096e-18"); + mod_test ("1947618330530090666893298405354739308961415698078028620052704641974391377424081.4370720895447112874307354517864830938810415902572192711612629905619", "35798247027.429407843795", "17046145447.5748487031747112874307354517864830938810415902572192711612629905619"); + mod_test ("1452534530844578587286793835405885853021971526781401425425378487935294373177736296627509724.7721554655330008757886130352256", "-2230097289481941875743.70308986073045123685990370268605393875797132020959914189", "1.533131766810854713997740773599277043497855099271539159216055642143596393742e+21"); + mod_test ("128826616832138303811999586234163151680224444940", "-0.00000000001208356353496390300985175475564359178694913852139721834444645980664649972867877606030662673387062705957528277363458571248", "6.69584035445008621624129454859440871477459703283008018887200388923227463902698155614027423236686957320538416711587060032e-12"); + mod_test ("274755781466764052656410387030227146979693383969398878026929839099188933143187954.316630799958652729870465414351983831108637697738523329171365404311371", "5027580651709666928642445905700005774592840179967656101.79182444554585905527707052212762780497609", "5.48687928393824668751094954125758077209867579670314978177150003853834520394957509967430136734987697738523329171365404311371e+53"); + mod_test ("-2406059574284703894148440688533903170413209795439273014905177947511690472468600917700926344523744291780294283495749086476739113840212", "-203.98100910360", "-185.5516256192"); + mod_test ("0.000000000000000003179154784807166104910307727154315003026622310376783873362697561702481688909293567273102622264690939490656665370251098076", "-5350134300750700517120759400898359875793", "3.179154784807166104910307727154315003026622310376783873362697561702481688909293567273102622264690939490656665370251098076e-18"); + mod_test ("0.00012091743522867814073847484062603275868239331576857596900007215494716545366688505334", "-10378723922985921543083277863626740941254369901608094932235751553750705682535457043031.41378179327287353", "0.00012091743522867814073847484062603275868239331576857596900007215494716545366688505334"); + mod_test ("-1660767751.4", "2459907786914500616387727754259763565894446392427524988.3089887", "-1660767751.4"); + mod_test ("-0.000000000000000000033631822597167449133998986776130306365257623634866807914936753769658125021314951009961432799089", "797319763411607221.38591797885093271728899657566132838267977116823008412182171464", "-3.3631822597167449133998986776130306365257623634866807914936753769658125021314951009961432799089e-20"); + mod_test ("0.00000000000000007281386061841728062540615021553752512420210250015235565748841313988186929535298959795327001", "-0.000000000000018307307966434251165", "7.281386061841728062540615021553752512420210250015235565748841313988186929535298959795327001e-17"); + mod_test ("12297805724713550651709585300138356133248943868", "-163701508250759793576897510100944.363665567661696351838785854587582512790473802696800243554593953318621704650392740611277466227704883765281194971", "3.1332237910487269499049391286794358622794996271733943713726789898996217900759489344672017564153060898774887549719068362196506671085592851829665e+31"); + mod_test ("17961425562245817409581216294804746.065661120381362624317312407718862471407015786507000357168717692371625586", "9046942197910576941857651741.55434563534612137400298066696827535805595960684000066125477228083537184278377", "6.49408647019344859254849589352376161554251481462630160649054320755389913647417290498278294020058008596034e+27"); + mod_test ("-3360310711195664412184900840786504257661992132828215038244142041.22859603911690657528947205783809347874816594", "-5735628655860989.451138", "-3519456098473580.96254003911690657528947205783809347874816594"); + mod_test ("-0.00000000000000001469591999823677591002239452537827102191452346037061990719157543642750620200165386046868332215843328867721811877823863271769224341852627352", "-52861761302592655772535505924331973233.9199278286451051457115517367966126642231724169207509694259781203858104417456554118076000749697086", "-1.469591999823677591002239452537827102191452346037061990719157543642750620200165386046868332215843328867721811877823863271769224341852627352e-17"); + mod_test ("263428047166492021214430897.349", "-935321863128449821208776543.4661", "2.63428047166492021214430897349e+26"); + mod_test ("-64.23084746043437274748289661517354551174901810407232904876189241671863464191391813766386551115089149323979310399810268895863595", "19838093993118866366953732423596875847833914", "-64.23084746043437274748289661517354551174901810407232904876189241671863464191391813766386551115089149323979310399810268895863595"); + mod_test ("0.00000001042725590087839885246040660938289118002692929859", "1895509692.418538195", "1.042725590087839885246040660938289118002692929859e-8"); + mod_test ("-108703266290337059775.6444368018636935234787428949076436661761248981668101717329076241048414498", "-2258330970500035491281882848071727906499835424315004637497720003971765589145517945042230744562306208501662783826524402", "-108703266290337059775.6444368018636935234787428949076436661761248981668101717329076241048414498"); + mod_test ("19785588947095741.16", "-209378513090293702090937928908481270047755761853726892468236568171933572299844184320681716923601277379094105477", "19785588947095741.16"); + mod_test ("6.5627", "-24491197303184669250685680749224554131071232120525816290954743983460746359901828278732159826845479302974005432248.98478397721775763807590701860762", "6.5627"); + mod_test ("98040252941.5584387068346031648", "5799356330802.26678574689410221475982263208559136859429961045221424410142780663576353327734590059939940621596297615", "98040252941.5584387068346031648"); + mod_test ("116459945", "285087451924", "116459945"); + mod_test ("-0.000000000000024977925576784464857382157052766774720130135842951378009457010637198779202473727325439", "382620017160416816899117416971.937114437851011757205933117037959418794157533127476013068487945074162512915274505494963681134423226214835793018854460", "-2.4977925576784464857382157052766774720130135842951378009457010637198779202473727325439e-14"); + mod_test ("15693959990166898467530406779039841070032574908199729638250529357153104897", "-0.0000000000002824974164922651345048893785611071689041377509099951591709879707481443285597447959", "1.171281807977374285869977160622664270509881729566135484299178262958875818964075864e-13"); + mod_test ("38848812619964290843361545253566362214", "0.0000000000000058425180574815230559485050316708859218673791077977584355914797766947281173401829358941785694963992", "3.1516654254079360183309571610860641637778291889893615348383342541484388461460984134093274298941168e-15"); + mod_test ("1747169015246368594998.464722228648492098168730638104125762700809327003329875209", "0.0000000000000000000284393447186198269469304488191298546623882877275494399348981067472547693385217621583802872048566279451580304473660909939163358", "1.51262832017785291204651557051891862995924391738284925362711136214365955363154169051468433756051932474065931228616555991508102e-20"); + mod_test ("1431452840526919937933101541902740083072.42410139031811129499443", "-37469198013000024864225724154390.5943722958", "2.035118407303377297932806595854716825940131811129499443e+31"); + mod_test ("15195.99", "6038496355477993856241855699590649428405756", "15195.99"); + mod_test ("-2041396228526158683078620920473339987062472388906811556.219705106443467336064724639399525662209445478538446773454254723160644110", "-9896112700699691291.92454132620577755838251", "-437387204257609623.94163554707241697768552463939952566220944547853844677345425472316064411"); + mod_test ("0.0000000001675722009116506345401287561663653181456651402449423225303665889095", "2318773737623386732448176059369887376294723563923814698031839194174397762959815701", "1.675722009116506345401287561663653181456651402449423225303665889095e-10"); + mod_test ("-0.001277093413988786193792338596676914602745937422", "-9054497669216982378641234353912833868366784112824225472373455575687.06067706432215821280", "-0.001277093413988786193792338596676914602745937422"); + mod_test ("-7586359.946325387213858428685527361653731476271038018930272114935277172424094509714364626279197619817316315689963471346611526175969", "0.0000000000000000430136274016202618412879577873962429424232143628863509810616167892960358806475007016344779281704267625230587638895190481865206340", "-1.7310828493766802121394011969560202470214375466524665165343928089767553023528999738804774624545501070324448831891021818491806068e-17"); + mod_test ("-103412754444480069058780993539472717862718628742017032622717305153554156500660602780.3951870520597328029305", "0.00000000000020266200284082826503473600665777073078290305445466856192999389981999174414790577002212363701234328068734339302422794462188621520017527973975244678966", "-1.1778610247698432518015282589512280988772755012414363311971091185982964630918238442878242291061344089450155031117839124238643126352705822770745553166e-13"); + mod_test ("-4649840103983286431118728885.5686899779272666748077658422319061095341256831328876230", "-0.000018283271700643090900759826621345966959563090797", "-0.000012253346082427405840049943876343545027546355616623"); + mod_test ("11177150046419761513519128718157640126", "411523640124736736627670200725572416567962335255822909421", "1.1177150046419761513519128718157640126e+37"); + mod_test ("1096935867719575049333091824804333510580945589.83824692435717061889762037572296699239931905470583854219762636627842602007335719758", "191153987761529206300925.3273", "1.2912957009764464951516411274692435717061889762037572296699239931905470583854219762636627842602007335719758e+23"); + mod_test ("281098490751309919781.837846365353940940012601874942516251228270125", "-0.00000025737546499923055582341344593708193968274528519657943958684105481278501660321915687980677654353727621750", "1.513406720586607228234865179218366144830241157041834126753669969930905426261187858947727786029406807325e-7"); + mod_test ("35010488237245036697520709084885266506843.425268", "5352655279155382458162.94330921", "3.34054595183665523603034231901e+21"); + mod_test ("31145808975597255138857994779920960247290282089774585062872200414184550100684.303586528813", "18.3819835858", "11.042075433813"); + mod_test ("356018189420944082693927775557.325504971417155535076952686936532414415559512252384067063438680483994312420857090610153342560066768401075", "-8727338718894573084672497563561164796452986318031589007265947314318840375612702741093080619723378442544516952773104113190035800", "3.56018189420944082693927775557325504971417155535076952686936532414415559512252384067063438680483994312420857090610153342560066768401075e+29"); + mod_test ("131429872161991712843260938039674340723308898895521699771855.024419884969996712236865308648727765263561351531", "24712061.01438024179678320259", "3429325.950976494326109883486865308648727765263561351531"); + mod_test ("-34341392.101415133561441008979017430685687626916432806544362758", "-1799749026300082270308704328638985.5768", "-34341392.101415133561441008979017430685687626916432806544362758"); + mod_test ("-8413086128647.685221", "1606998396292485000476010332910518280001488901905838129531.210325550440342452530296261171681625711233494822776448488394", "-8413086128647.685221"); + mod_test ("-3.0", "-3139", "-3"); + mod_test ("153157.73428689664192233409327048703188379081578410604659706896677053628345674074129524175863661791683502264736428459474866594560693363338143", "-750845024214409.258", "153157.73428689664192233409327048703188379081578410604659706896677053628345674074129524175863661791683502264736428459474866594560693363338143"); + mod_test ("0.0000000000079148423562335767793913910035210781639819699467034642740182963781086448957016588218561890889449126109310405024351752573234749277921432649542353715", "20.00", "7.9148423562335767793913910035210781639819699467034642740182963781086448957016588218561890889449126109310405024351752573234749277921432649542353715e-12"); + mod_test ("11859857545035115534901402622688845103.26562817190421979271737710348373108096466579924379735578113634951611925484107971222", "1851265684423437968651977889678101896760692374632438502425532634360068350.385560161140916692762655434938124023616766184141", "1.185985754503511553490140262268884510326562817190421979271737710348373108096466579924379735578113634951611925484107971222e+37"); + mod_test ("48109224570352158844369436263326645.893373810649056419300323575418280726520558310461296", "997.098677101792499906198905275633517346903196994899968608672152519988658750302936220222619145776458182531806754907465557169", "935.865574632282320424247042476598393609973055983379471096359067799052781834688483510305261831102736621823846394515810747161"); + mod_test ("288352547873858.5", "0.00000000054104505228159386805524414898723018589882606496349575056289472447535373273397426133779673431360860889934275", "8.2673783217939116398724200124183517796838889199181998847282343820866487394178542482519715167131249859192e-11"); + mod_test ("0.01383525030381675505711753283705031809489417131896036954963744982627869295128813174764504280572980911841888", "367605263666452149870730318125641658304719350393018537475278503369754165680652067258735", "0.01383525030381675505711753283705031809489417131896036954963744982627869295128813174764504280572980911841888"); + mod_test ("-3505042194759758434255338972290034512117930395098910381818797807.88446", "-3902404098859498614003813210221299711513544600259011148097595421079608627612964369831566426492055190022939.50548422319511214", "-3.50504219475975843425533897229003451211793039509891038181879780788446e+63"); + mod_test ("-36026.8915685144533733380523666761979285283755516228130824117905334817989501255635498677420902031957643520214809171824", "-114223033898589812722834379611264506788064644828093.94800173309118106933782098399593703341461245", "-36026.8915685144533733380523666761979285283755516228130824117905334817989501255635498677420902031957643520214809171824"); + mod_test ("0.00000000000000013809121", "-0.0000000749288", "1.3809121e-16"); + mod_test ("20724213487987.4778151388942299169660827860781497232254137576387255648682698796172600059231860766018620789364227232170076071666458413", "0.0000001505314883568650229916354199483681188910572425586579937337120672732036834724306361544492395168511705791", "2.29883655297313793669989172506206203246334456768066197147148446745240375475037698012664723934396524013666458413e-8"); + mod_test ("-153138392170770562583816571476981650458239771831947250.84840860593737927903083269", "-308451953716202377192878310778513020451424572722485447176140047813202767698204721821724806119.758161292949455744622007277884667216068789328280721", "-1.5313839217077056258381657147698165045823977183194725084840860593737927903083269e+53"); + mod_test ("2024889826013722491642109209599457879536241401674305584888599322154577560286041916004095464239039183545712355073451878243704708180367087", "4683338288486975605179756026626993457497864317101799400353744322277088843093746348285508196719464116323961318584747939876770.2", "4.2624056691905146720562441944677299974218341770933920083702456621928076177796341929265641218876544182677248833016820278781996e+123"); + mod_test ("28313589531.63989269287899646520", "-9540641513056039416103997609028907233031199495306430017143", "28313589531.6398926928789964652"); + mod_test ("-2641228946549921949803625465.800690017957640611162874431878273597335326201803", "-2.04", "-1.280690017957640611162874431878273597335326201803"); + mod_test ("3804757657533490618037113031910761806055921644578987055.96708854321879766867635040692197", "-56283755203464428334670377565843348841905251379123127204289309457333750328700.80439297", "3.80475765753349061803711303191076180605592164457898705596708854321879766867635040692197e+54"); + mod_test ("-0.000003122558770454963876212", "-39544839986003369027933892780750841310717452858887832507369587012.160870183482262070063337198049486352931637085710934033181", "-0.000003122558770454963876212"); + mod_test ("5392479076929588293587612879284527077531852805129124829184368274349602728517523896911896867945402316135762773529299018121736199918072580", "0.0000000000031117750112617018767807786730379346274843985783", "1.4353640854938664984508258039534714987084307583e-12"); + mod_test ("0.0000006215288163619792375122235621598208666024377435574215852804775078406912545206606730739256331954317406302758639949372100097183229", "-1700271804304.2321825527640867380703229974396263910191256790985519859411209446664490975402918158602308456057531026581023238119814318747861781914", "6.215288163619792375122235621598208666024377435574215852804775078406912545206606730739256331954317406302758639949372100097183229e-7"); + mod_test ("0.00000000000000000001395090317654918659456545517103197123320734631379609159286124417697908168852487462191684425104983578404131395432", "-36360831023.627373636", "1.395090317654918659456545517103197123320734631379609159286124417697908168852487462191684425104983578404131395432e-20"); + mod_test ("-0.029041934347034050874280668604145494973712402916841954749197882673846083921928051487", "-24321172024135194808.395261648243950525857", "-0.029041934347034050874280668604145494973712402916841954749197882673846083921928051487"); + mod_test ("-1195623993147803871345536056905699481677978210464192436338258797046728634803018357673228508044459476891363148600.9832229463899180212881047872", "74333560130107705155367279487127775431014050908659963244531.63816885515954178693780861744425312763135160774863427607199163982187", "-3.086071550827133408617073704504470924384848699160039276410221417738588615789646409686448568270317981309079754174890980893975151e+58"); + mod_test ("0.00000000000000056280331289271771568763154768933854147024773200443808381650318222961243204491709538", "114.456600080136471439211636731189295907102935969767768173395401795448559059693594476527026886599808770208262292019087718144844542649882", "5.6280331289271771568763154768933854147024773200443808381650318222961243204491709538e-16"); + mod_test ("6349098329627676906649327567422334464124358967178664653673220067.12545346036152018429985973661814570758371069143", "-40.149580757418441824336470759561465678877107568894320488314323759826632493055455043642548602102537942593850156261255887938596477", "35.559837216237967922905742415355706498518504880575653814975327971087870426830614164516845532783586654567238760012791188596876952"); + mod_test ("0.000000000000000000134958665891757075394771428809225066409494541557306409079645322067754548797099784994774515332106618219339715207891623", "0.014098046208108624476748153262771647868771485742957685480766065052014710323", "1.34958665891757075394771428809225066409494541557306409079645322067754548797099784994774515332106618219339715207891623e-19"); + mod_test ("-0.0000000001198616208882375095568849612873993998239584002760230102327127648031323996108632845557417295759919543714234552132382176739713", "268502661662756835424685753368073720149943858868258883021295906122336165047282467800229455912077913155968019665198341299031672675184802671292795982", "-1.198616208882375095568849612873993998239584002760230102327127648031323996108632845557417295759919543714234552132382176739713e-10"); + mod_test ("11076417241349251662298800548993053870489927630158", "2688.3", "838.5"); + mod_test ("234.1833389564397314620433643408344637353276768649544802303136396105002821774541067155967638799471344828367", "-812930653675251477172818677593163802475335395321516392160988863518282232027.9562556743336062078852192049177044015303006113839518790342145303511416", "234.1833389564397314620433643408344637353276768649544802303136396105002821774541067155967638799471344828367"); + mod_test ("-140875446895336688695775538626569168776437615910859.266762102378021102701836180989625107023822491824898835037416036752", "-0.0000000008120648359026855681066672", "-7.04899443282288314693761107023822491824898835037416036752e-10"); + mod_test ("47302831592291859921582694268176274322977565414806988738441.7361304674456421666929415117545213713741289186588622962427363296591821124", "-4883810167764887872263063592054042463186129668615153318291940325670910399840788193978235038.40572599417807", "4.73028315922918599215826942681762743229775654148069887384417361304674456421666929415117545213713741289186588622962427363296591821124e+58"); + mod_test ("-0.0000013500524235084418996188348105405437586078275799625742804819565981475194354476354686524527", "-0.000000002779302718018358208070594207983495336655239720268299505135366323424005449637210093828893056230701144", "-2.09060526953816870459661966854852033003631563244902049130393128687679237358857314543956772810994516e-9"); + mod_test ("-8856430201.81983563385", "-938319623036559525783829785765639.1967490372320401152237017199929134065194059252249435216165450476221132716254629851825940147", "-8856430201.81983563385"); + mod_test ("-294598922189601641529872833094268363637995845166.9646336278254278800792178104215750273817481774076459356025057202968", "-10223015027442426717349749487745963093309181008.205638767965256198287559296860180242914602395642001035903820036797933102584301654148", "-8.354501421213693444079847437381397025338776937206748124798254328027557498336528225772881099431616930295544689954673127639553683856e+45"); + mod_test ("-134482328774078327.78079185017538184873315143896148192681352250548636020696397", "0.0000000000002450342135144683141905584800341536509151970912600522688818921301", "-1.60073903831321955625426419137488883923201731240764068955671173e-14"); + mod_test ("-78800324525137220517451995171180995756206048564118678612521109029482402593085439.179075675835830559536829101701753174835", "0.0000000000019610051403211771404265319419334586289897793595385183097754722977683927786401175145119430883943240234469175280289689345365813902443272222", "-6.535925793221845660690544723959477724568508804990257790953954534740872982749100270224419170325353310184590062864940380043185153774656484e-13"); + mod_test ("-0.000000000274926667753556399411968202786585104173511", "50122654291684689961017965995633281037050370088364056805776193660843878710891076787.95089764411489192357442121111434586112155176770186465", "-2.74926667753556399411968202786585104173511e-10"); + mod_test ("0.00001541285093466595032153714556336460183444913540837825470619197642409009049424847511805411133860049617440", "7665422149126503228084815387690205422619171304204357008349412728229292.3453547259", "0.0000154128509346659503215371455633646018344491354083782547061919764240900904942484751180541113386004961744"); + mod_test ("431221936", "0.000000000000000033002980288810278906842632506499735728904330341685973153145895066915569913336407191052426472565118072610", "9.10099606819992067300761400250765866243445746733753730198731073886381276861851209124916361256120258093e-18"); + mod_test ("4666715111789921577904245361334034970447224117169861897028729415807979546253890966745728334297280769367.70886147058269253176521844671243912148148079", "6.8", "3.70886147058269253176521844671243912148148079"); + mod_test ("2197002885429890116954900514249548697857546929350020990766722904092684082.2392268693970414838", "0.0000000000000332559964853018317783655876966402252962358315523892307692184125776284852387347864848368445935612207352750309642788316", "9.3491979527670904641879713520022687811716489510692050229377615200828160049260989946844066618421874281834484917990608e-15"); + mod_test ("111094585048273140985385584415256560233393427038902518.784369340636556911255874165728", "1132940880188177667933583369443202220027425411297999020483308891037542098", "1.11094585048273140985385584415256560233393427038902518784369340636556911255874165728e+53"); + mod_test ("520386", "91455585201495693176033076068679833231426120905022134379404266046062624029800133847471370511643609325721500716912256.984", "520386"); + mod_test ("459661201486307760729688778845476517533962920316992893663687352420276986833260305315498074609385953532821599018231099", "-270279027874029833827081796161869449847637992962004968243052096882327994299.79117493308674063254110578511458305133003811803355185433888227224", "2.424027017863735990977800631861728865952035304743598958695126250204835032809271219019609279133635203601969578977452650333362539299232143024e+74"); + + mod_test ("-4.785068183e+1", "4.100602340813778290214569907944153985840287e+41", "-47.85068183"); + mod_test ("2.80464647349124269012895506839600253935327310965e+18", "-9.5524432014496391100798143628e+26", "2804646473491242690.12895506839600253935327310965"); + mod_test ("-2.8475390576301982648821864330615e+1", "2.699279786373606e-17", "-2.6651296488681e-17"); + mod_test ("-2.9148775309735883444412038961e+12", "-3.7791910283459953859509024618806015827414491747e-14", "-1.2484519780688810034904273898769796515468689534e-14"); + mod_test ("4.75952e+1", "-9.2480596298788483952588449013e+15", "47.5952"); + mod_test ("-1.059098439e-6", "-2.61519835738114698145e+4", "-0.000001059098439"); + mod_test ("2.0737545782540501468649951383811505929864648e-11", "8.001141125055718003273562341771790690597363615833e+48", "2.0737545782540501468649951383811505929864648e-11"); + mod_test ("-1.22658750490728083398e+13", "1.8753238083480045539938865768259755398e+8", "-132148191.84975394758545561202438438412"); + mod_test ("3.0610455075185277682819215983121128590345078192561e+45", "-7.2132877592078603887799551646099823518259e+16", "61373855855082630.483565489609741494295639"); + mod_test ("9.0188012787220251521914339e+21", "7.34972521506799782052e+20", "199131020640427767567.4339"); + mod_test ("2.732276e+6", "-2.155e+2", "167"); + mod_test ("1.81970803337505025123814446711e+19", "1.552273391587321102352777093263e+8", "121079294.0355602541613892510099"); + mod_test ("5.29521849750516603814171596807e-3", "-1.186023062792866863315593132074754530817309278318e-16", "9.65458477943067357182194529851732179008303939488e-17"); + mod_test ("4.17590665394570316906941267960925070278431e-5", "9.049524633791428612160450019368774628e+0", "0.0000417590665394570316906941267960925070278431"); + mod_test ("-3.349078310428002e+5", "-1.6540638667696404135343644190345e+18", "-334907.8310428002"); + mod_test ("3.1992755000743044238501551275241732747e+28", "6.7694639443884902632801069e+19", "58012283694485729642.404216747"); + mod_test ("7.824216663065598374539197703051941e+7", "2.8264285749437427237554422632944775049521496e+41", "78242166.63065598374539197703051941"); + mod_test ("-1.67058990412026696591650976e+2", "4.22502522584451063700771426002353559984275436807335e+7", "-167.058990412026696591650976"); + mod_test ("-2.45635416234991644154081e+10", "1.6511720053714564535061012818217797956053950352564e+3", "-169.9750792296892367202705840388216243464507038608"); + mod_test ("-1.234302917437106938892e+6", "-4.66222869142052358935242282170391162075612576838441480514e-11", "-1.16831454856809476137891894092632703280451615639647891166e-11"); + mod_test ("1.839710778457895734645309275939324e+23", "-1.16318585777868797619955e+17", "90437897170854441.0401789324"); + mod_test ("4.31278525467628823588407602838382746643207760247774704277223e+9", "2.23171038985847514593e+20", "4312785254.67628823588407602838382746643207760247774704277223"); + mod_test ("3.0774747e+7", "-1.292178569466e+6", "1054639.902282"); + mod_test ("7.1986256721501851444121681387782246892728127232221676165644e+45", "-1.13782811077947907584409056830168328555517006340535538318684e+28", "2.4664369028970742315721904655905118416446174179007597618692e+27"); + mod_test ("-5e+0", "1.8187074446258529890089548133661805568989582581e+46", "-5"); + mod_test ("2.90713213183891582843410750914399986513758162e-3", "-2.63153627e+1", "0.00290713213183891582843410750914399986513758162"); + mod_test ("-1.1994289233986543701822561078984450080807572663172692845e+26", "1.3308098373134e+12", "-1101301973800.58984450080807572663172692845"); + mod_test ("3.80222940163e+10", "-1.86439621006147e+8", "175050952.052159"); + mod_test ("-1.0589771547255325020757865564001533466983148718e+46", "-4.66653476326811630302573645173380627372e+30", "-1.34743461530630312563356791528734704544e+30"); + mod_test ("0e+0", "-5.8555382904168e+10", "0"); + mod_test ("-3.877410561846137535676828506580217538851e+39", "1.8546585782329946703671500695022434e+25", "-8.304732800863368666145000987852196e+24"); + mod_test ("-1.163627582049e+10", "-1.190310616961783801595291761751e+7", "-6941092.77337225841399948769273"); + mod_test ("5.50922178592853292e+8", "2.7726691028626755345614e+1", "9.067016077612284334026"); + mod_test ("4.585813032273175774206281699078636679246584e+2", "-1e+0", "0.5813032273175774206281699078636679246584"); + mod_test ("2.143209743784799995437859351e+27", "7.89686033593298254046863395059167e-18", "6.81868949928986360863748711628261e-18"); + mod_test ("-2.2928677299898057914670255997347455786e+11", "1.43685706448112139571439918598028632e+6", "-306934.405632425577309870670368346"); + mod_test ("4.354911010988471845818170482045217459828e-19", "-3.4255381103210061953947764102346444839325208e+5", "4.354911010988471845818170482045217459828e-19"); + mod_test ("7.6205756951722652979726396821744395258e-11", "-2.469701682300246385132843673488255945931294e+23", "7.6205756951722652979726396821744395258e-11"); + mod_test ("-3.0414336636936289483194714509757754918625515721268383983891e+22", "4.536514951e+9", "-2390201439.714509757754918625515721268383983891"); + mod_test ("6.1950756263395220720928988581672084e+12", "5.50299097228515217025542686233486e+6", "994424.9277391452982364908047321"); + mod_test ("1.5592703628193685590607028031257876838163995140476313e+52", "4.644158636847e+12", "1438695302628"); + mod_test ("-8.321953e-20", "3.425924048971005175376011737e-6", "-8.321953e-20"); + mod_test ("2.50545873839057298343115607524742030919655663396773e-12", "-3.81e-9", "2.50545873839057298343115607524742030919655663396773e-12"); + mod_test ("-6.626563801610720283429069e+24", "-7.318668911456127669428074219e+27", "-6.626563801610720283429069e+24"); + mod_test ("6.579221387782276980734304828884120337616419799251099653496e-1", "-3.8969000319182257446208467342247396396093882352e-15", "1.9767722676183043776377919004479568382127247136e-15"); + mod_test ("3.1401513e+2", "1.237032386460703e+15", "314.01513"); + mod_test ("4.232794809535764324617667621124324483982653495945584e+6", "7.3809184815598732203484798105535965548268885342e+0", "0.4405677713499586621163276690389136391131296364"); + mod_test ("-2.54046333929067768396256156730192176704492639570003e+1", "-1.43509613727037812846035760529266475517733244287446e+5", "-25.4046333929067768396256156730192176704492639570003"); + mod_test ("-1.7784812894976825e+5", "1.348176239051319766183648668812555533668836074076e+47", "-177848.12894976825"); + mod_test ("-1.34525103103779e+8", "-2.1e+0", "-1.903779"); + mod_test ("-7.5e+0", "1.1485396369968399088809663888589e-8", "-2.897466364518558819119797833239e-9"); + mod_test ("1.02502826667e+1", "9.3481096028282686300763053917132870455928e-15", "7.7634911550320902212280587730161073680336e-15"); + mod_test ("9.56858647594739448303715711e+11", "-4.2315e+2", "168.239448303715711"); + mod_test ("-1.121662781899762e+3", "-1.153e+3", "-1121.662781899762"); + mod_test ("-1.1987521321e+0", "3.3717546189279471902193720771211135e-6", "-0.0000023276964037193028773035373618806855"); + mod_test ("-3.96409663517864928212668914312890035732488673186557035e+16", "-3.503768915124379422490579250903005526551657e+9", "-1073469883.0404370184683678233259100444904567035"); + mod_test ("-9.780642443954005196506214589e+15", "-9.0202154557465647565999764323022181914347547218716e+44", "-9780642443954005.196506214589"); + mod_test ("6.22723611860453496632948443539098691396413e-10", "-2.77824094902753769648885834726391520861911e+5", "6.22723611860453496632948443539098691396413e-10"); + mod_test ("-4.7319718694e+5", "6.8346446241247783161447574947601984306026821486383635e+33", "-473197.18694"); + mod_test ("-6.1933379823501920314298624358203814e+30", "-8.089868231074264910103113854481018685411838271163628e+0", "-8.004699925089141256941499632457605509538837084388632"); + mod_test ("1.5e-3", "7.82546748299781600669e+20", "0.0015"); + mod_test ("-6.7242596508788e-7", "1.3806352e+7", "-6.7242596508788e-7"); + mod_test ("1.9762609860647814575863656621674468865989380864741e+45", "6.51277646556899014436272323991705259786529655e-5", "0.000014790203177222374955576884258500785345510175"); + mod_test ("7.004000748022736e-8", "4.736649441368895442161035451e+22", "7.004000748022736e-8"); + mod_test ("-4.29285701374473103585848390846585847338e-20", "-1.39970996245e+6", "-4.29285701374473103585848390846585847338e-20"); + mod_test ("1.44068396723397585225000633824556784092935879966094079042e+14", "-1.85739402953385383572444765551721122270675395703645487708e-6", "2.2082902769721875195705810453565730977529281295245227248e-7"); + mod_test ("-1.90763083929612502667113570129e-17", "-2.989745679222607307608195e+24", "-1.90763083929612502667113570129e-17"); + mod_test ("-1.8008915784029129140878223332849e+15", "1.2709184544773109938594286324169565032629e-8", "-8.198978038773931537165401098330611286589e-9"); + mod_test ("2.5283393571163e+11", "1.42605397244976960657e+16", "252833935711.63"); + mod_test ("-1.07482517991266460493961480563252855043997503069929863e+53", "4.0293147259356676513464190395e+2", "-327.97566262501963085789832435"); + mod_test ("-1.791459937048480305498333255301e-17", "-3.60140444532360031210882850839206992361061e+32", "-1.791459937048480305498333255301e-17"); + mod_test ("-3.7973618905e+4", "2.076660739009108092554128277835978289058948608e+27", "-37973.618905"); + mod_test ("4.296835337235213305241997742797979761241859185e+32", "1.016128323816741556885745789299051e+30", "8.773810728563935184150511955984541241859185e+29"); + mod_test ("-3.3476803669790089330287396786213536648e-19", "-1.0485228843496121655433179024642877076320529176e-16", "-3.3476803669790089330287396786213536648e-19"); + mod_test ("-9.265001828356e-19", "5.82146621596502038608123809e+5", "-9.265001828356e-19"); + mod_test ("1.6574237778185417162412521417931606051387220789593e+6", "4.3416420707553748006564234818e+29", "1657423.7778185417162412521417931606051387220789593"); + mod_test ("-9.774062277712948833378e-13", "3.080037033054419810654271948e-15", "-1.034488293043803360395792484e-15"); + mod_test ("1.0480042083686042910696085478682293620068215e+43", "-9.1636346772043682784439956904897547881091051932e+20", "711021412902451879505.0635467550321309923369716"); + mod_test ("-3.40923816647136940940085344632137226188233200061358e+20", "1.6073165168980479523827835495337e+31", "-340923816647136940940.085344632137226188233200061358"); + mod_test ("-8.7800373379e+9", "1.589967630656932636460925283862063976207125245919e-11", "-2.20858757786189096197325170019616955392212367465e-12"); + mod_test ("-1.508492483290420652523454481016576379245159230227181384539e+43", "9.65407339051e-1", "-0.95207917271339"); + mod_test ("1.70797882e-17", "-1.221287649130143636399302725332474299568133811751e+13", "1.70797882e-17"); + mod_test ("2.25e+0", "7.2018713275608502122703864334941124435400603003965e+49", "2.25"); + mod_test ("3.66e+3", "-2.00125759501079698887197092755e+20", "3660"); + mod_test ("1.074410572430091406447031457374002693e+8", "1.14072231468921335177378921904e+16", "107441057.2430091406447031457374002693"); + mod_test ("-3.8968391781145045605e+7", "3.823518283e-1", "-0.379345773205"); + mod_test ("3.8807293359084454309373e-14", "-6.54951383e-4", "3.8807293359084454309373e-14"); + mod_test ("8.3790348726489133341557987289125627922491641304972332e+10", "1.88761931097750519978e+9", "735099043.478904551237987289125627922491641304972332"); + mod_test ("1.5282357157991306e+9", "9.951e+0", "4.4051306"); + mod_test ("1.1776422045e-12", "1.94520506072334528824768019674726837220814205e+44", "1.1776422045e-12"); + mod_test ("-5.738265352165406462762631804597466473267412948e+18", "-1.5172659934372962e+16", "-2999896972426826.762631804597466473267412948"); + mod_test ("1.021717777232460732646336675651455853866e-8", "-1.31332207597e+9", "1.021717777232460732646336675651455853866e-8"); + mod_test ("6e+0", "9.3047796711618934817610173062034274e+10", "6"); + mod_test ("-1.182956037757676026896657463893805186423539855204970266169e-13", "1.7827584304157093780925160931953100051299721649998e-2", "-1.182956037757676026896657463893805186423539855204970266169e-13"); + mod_test ("2.2104533461720397849851124115599254191623707092353e-11", "-4.0310943429346438323447892668604172339295221650618858e+41", "2.2104533461720397849851124115599254191623707092353e-11"); + mod_test ("1.722426520663101950880778227697e+10", "-2.69592201025681600543464676120992735285696714886632140343386e-2", "0.0223237854099389241141349574091483444628934259089076259401818"); + mod_test ("-3.25603413629979799893671467886183127646824550309804207e+34", "1.47161894610216114600651e+17", "-34172500003558300.1070534550309804207"); + mod_test ("-1.08739354e+2", "2.9193728838924110750652340949692628787e+16", "-108.739354"); + mod_test ("3.206759288064547512180035e+2", "4.35800600237216221853047563599293340753408e+23", "320.6759288064547512180035"); + mod_test ("-2.21248e+1", "-2.6325594996226359777509157939720585725219065458496707707e+52", "-22.1248"); + mod_test ("7.073189319e+2", "1.08209742786e+6", "707.3189319"); + mod_test ("-2.1907210461355111297041e+18", "-9.2745316314605247152343780428919501619175952441700562494e+16", "-57578770899590445.200193050134851462758953093840887062638"); + mod_test ("-5.16796251732448951395790039385689407742691059264573e+50", "1.6780101630562e+12", "-1253088706638"); + mod_test ("3.51223602606475213080940254052176926846990239224958899e+38", "-1.63965e+2", "137.150239224958899"); + mod_test ("8.1882456091960208142365059003084619285549256998568554e+32", "4.64295172738148816415249852304269862921945245047076609476e-12", "1.24381368401600627920725181533134960575834680987278935368e-12"); + mod_test ("1.5813114524781473056173591272288745672e+30", "2.42e+0", "1.9745672"); + mod_test ("7.454553e+7", "1.538906639e+1", "15.23005577"); + mod_test ("1.51240970967848419751948592395604701e+29", "6.5611662e-15", "2.51558e-17"); + mod_test ("8.27911469397271464898e+18", "-1.2068203240037786014348e+22", "8279114693972714648.98"); + mod_test ("-3.20852252575e-6", "2.775014697501612276189583840612e+24", "-0.00000320852252575"); + mod_test ("-1.170515851548909718864331941709405324e+36", "7.57552e+1", "-34.552"); + mod_test ("-3.84525210626e-14", "1.010105187954696781e-14", "-8.14936542395909657e-15"); + mod_test ("-1.77609228049985890329999e+23", "-6.46964642626693630854488379333298772649377016e+44", "-1.77609228049985890329999e+23"); + mod_test ("-2.6073763079e+3", "-1.0248349080124110516237552578873628724235803267839057233638e+47", "-2607.3763079"); + mod_test ("-1.3843135851252423514202512138558e+2", "6.264100013e+5", "-138.43135851252423514202512138558"); + mod_test ("1.737e+1", "-8.726745986924851889490167717196421297465059646521e-5", "0.00002298524516705360208547066072715688662132777520597"); + mod_test ("-1.841251966e+6", "-4.01007093384313393333803996623363e+3", "-629.40736600152459783965549876383"); + mod_test ("-7.9035320783720205756630542761451846e+28", "-2.599e-14", "-7.27e-15"); + mod_test ("8.04680904556172181303021860819810222422429215449526e-9", "6.067916963498582356994976035938910323855806689699e+7", "8.04680904556172181303021860819810222422429215449526e-9"); + mod_test ("-3.2591991380971738720016943747147239739143e+31", "-1.73144320279140892221728899407693684286357446057721685e-18", "-1.27592813736665621853520468633947214694438394987425995e-18"); + mod_test ("-1.2588878e-17", "3.261793e+3", "-1.2588878e-17"); + mod_test ("5.43e+1", "1.052831202498586189323776187910882192514844872077623859821e+39", "54.3"); + mod_test ("4.06387835714e+8", "2.33202324535463287957487622607173811837788707819610667687974e+21", "406387835.714"); + mod_test ("5.67752073680296031467842e-19", "-8.601036147246856e-8", "5.67752073680296031467842e-19"); + mod_test ("-5.6e+0", "-1.8453950994974064478634206768933065169074111213e-6", "-9.38967160341442620882313109909923108359525446e-7"); + mod_test ("-2.401261282811e-19", "2.056364582076044663398637567011867699558230779795276645e-10", "-2.401261282811e-19"); + mod_test ("1.0071885115326611960091167358045295888291572049818e+17", "-1.155335154293012676567e+5", "25104.02532384871469245888291572049818"); + mod_test ("1.014158574325029197139040004809e+30", "1.232019764151304366892839731605883657742763048324806262665e+25", "9.1852662414944875300513403008082924671691409524768246786e+24"); + mod_test ("-1.2960509353603657966595552033959658985645676032863193e+52", "7.312148044790448624282108771e+15", "-3433711470718028.563736068134"); + mod_test ("3.01768950813493722706548378704076026752577936470035725e+18", "1.9656153202749223229990334e-3", "0.00073182798214321319862218230035725"); + mod_test ("1.138167248709526636888918903478056867722716985003746e+26", "3.6048159266517496763778284439e+18", "719311038898532672.7955886026722716985003746"); + mod_test ("1.8330798601350027076470730268735578842175174524571662455e+23", "5.956531185e+5", "15372.61868735578842175174524571662455"); + mod_test ("5.64642126873494799157e+20", "-8.4189838723261978274550066411375501139050432727008990287e+35", "564642126873494799157"); + mod_test ("-3.35038698584922285256354681261850266025e+11", "-4.971223451368832884824701430128927927628669283992608676e+11", "-335038698584.922285256354681261850266025"); + mod_test ("-2.18228628448939641477994931560863e+14", "-1.9848009280011383843320378679218954e+17", "-218228628448939.641477994931560863"); + mod_test ("-7.9673369189287490637419160450685121345328702274551959142e+1", "-4.36967584013770925112063732602257274835575300806170773838e+56", "-79.673369189287490637419160450685121345328702274551959142"); + mod_test ("-6e+0", "-1.355953074987858129012845374276873617e+9", "-6"); + mod_test ("2.8980599713949417129214483614111169203417835e+30", "2.09234393781487031432546596319751546520229578e-7", "3.5199820166059069684596128491376185333182764e-8"); + mod_test ("-1.05885215e+2", "6.96134e+3", "-105.885215"); + mod_test ("-6.63850464900027698e-11", "1.47441847556286416976794431734798800248343e+1", "-6.63850464900027698e-11"); + mod_test ("5.329e+0", "-4.2052296626044402413438748554367560246832050927e+46", "5.329"); + mod_test ("-3e+0", "6.310795365619607762092711e+14", "-3"); + mod_test ("-1e+0", "-6.151436486161577e+1", "-1"); + mod_test ("1.27372286268e+5", "1.4369236059213560786734339762024606028559549e-11", "1.1838867423641287048289062782741685583483082e-11"); + mod_test ("-2.47796406858881525393148342132e-19", "-1.114448296870693752476671e+24", "-2.47796406858881525393148342132e-19"); + mod_test ("3.31716916602e-3", "2.18973397623066249876504033115990763189329335e-11", "3.5801106985221822189595541951629188768773145e-12"); + mod_test ("3.36130377710864393490577917996361199494e+23", "-6.01033888502758381063377894374191325727e+38", "3.36130377710864393490577917996361199494e+23"); + mod_test ("-4.05078537570850079118549718e+24", "5.77875486336186078309057e+19", "-51579137737238062500.3271"); + mod_test ("-3.882925224099795993538502419426e+9", "1.77e+2", "-114.099795993538502419426"); + mod_test ("-3.1151827562342815382088011269e-4", "-9.5939986106878750496332e+22", "-0.00031151827562342815382088011269"); + mod_test ("1.263515691650061656757086438088937011975691e-9", "-7.548241773275363671025372541e+26", "1.263515691650061656757086438088937011975691e-9"); + mod_test ("-2.54581764865280637563363587278172942730649726409174798929e-16", "9.70709912979e+3", "-2.54581764865280637563363587278172942730649726409174798929e-16"); + mod_test ("4.544262038438149962548431721262064539926203e+22", "-3e+0", "0.31721262064539926203"); + mod_test ("6.7686482995324e-8", "3.57628817229923120251439846315e+11", "6.7686482995324e-8"); + mod_test ("-2.5837243515207675215858826036e+0", "4e+0", "-2.5837243515207675215858826036"); + mod_test ("3.5866287777543048262613523108599769647097333e-12", "6e+0", "3.5866287777543048262613523108599769647097333e-12"); + mod_test ("-1.12950543165722419512831984028282909551894468294664944607538e+48", "-8.8994740827559322848961144561345767240206011017e+24", "-4.3060230186943786250552209277543855025500782967e+24"); + mod_test ("1.32629615572864315471240257652101515250879349726101e+50", "1.24518406684607715300780841979783985e+7", "11819939.0138645251983859235118410325"); + mod_test ("-1.790115489391445059426395198670071179664972568459e+32", "-1.6684469764e+8", "-13018319.8379664972568459"); + mod_test ("-4.043663364e+4", "-2.201805700480933156346652411e-3", "-0.000764247759663998270288369046"); + mod_test ("1e+0", "-1.21869963007789517796039072048232e+19", "1"); + mod_test ("2.569643022111077e+3", "7.5897425087682454375918533810051138006394242e+43", "2569.643022111077"); + mod_test ("5.462e+2", "1.185649353252424966708806431224964085816087803853753518e+25", "546.2"); + mod_test ("1.77779806e+1", "1.884041077778132016302158377e-11", "3.69280262144004372920946142e-12"); + mod_test ("-4.30600314463832449294350446141214505790227492e+37", "3.62303831544018299428603870984582744317996855543826e+50", "-4.30600314463832449294350446141214505790227492e+37"); + mod_test ("1.46820318075561560819e-20", "-9.2923470300743146049252849193885672e-19", "1.46820318075561560819e-20"); + mod_test ("2.62e-8", "-2.272918110884608589603164353380779123924726e+42", "2.62e-8"); + mod_test ("-4.946872029105116445758491681281820008627914126e+12", "3.553464565566610158e+4", "-18242.079207968012581281820008627914126"); + mod_test ("-5.444799946684106145173105e+19", "3.2264562027032003440966e-1", "-0.29741218915109159338806"); + mod_test ("-6.6641862567771859738211631116152852541e-10", "4.53837850928448871996774473572127726597085345e+2", "-6.6641862567771859738211631116152852541e-10"); + mod_test ("2.04412473664652568585117378133e+21", "7.17977970071262225892475320830525724040709899422645111e+7", "6850552.6641959495615784496161192519568752280008915477"); + mod_test ("1.90389879643445938760898252e+18", "-2.820723572209116115220857118861930149808002989789986560298e+16", "14014003054351590.41100825036250679962863799684070900460034"); + mod_test ("3.54399572690074523717477041687706132576531580993088737845e+56", "3.86305546858881436338415083054757481145199924812285238142249e-8", "9.0010818560321987858218342657711149479512082543264309237906e-9"); + mod_test ("-2.81021903922014238242334e+23", "-3.81351478552287812572563406e+26", "-2.81021903922014238242334e+23"); + mod_test ("-6.6613160898e-13", "-1.35501662654877262254698379956968e+8", "-6.6613160898e-13"); + mod_test ("-1.37322505522894140472667261498601533454460065766486158656811e+56", "-6.101994414072054045611858917329e+20", "-111378121206362165144.3203824528"); + mod_test ("-7.174927106677644467861669419e+23", "7.3781216744e-6", "-0.0000029266955552"); + mod_test ("-2.6550841471735130755928352857461281e-13", "2.29146598195364764153947e+4", "-2.6550841471735130755928352857461281e-13"); + mod_test ("-1.98282995527163119617853095482026820489347564940576571365074e+44", "-6.7343972311468478371503508710588269021e+22", "-1.8425585476108166553720676776558276153e+22"); + mod_test ("3.45510770293428430743226307247e-10", "-3.453355686854751488683981e-4", "3.45510770293428430743226307247e-10"); + mod_test ("3.0940169147998267e+16", "-5.1679827115186675000881679620188097860809e-4", "0.00045494105050079175531229543905152624215823"); + mod_test ("-5.683707359160590767482385181054893368911539362771215016167e-10", "8.86164094021739567981e+19", "-5.683707359160590767482385181054893368911539362771215016167e-10"); + mod_test ("-5.1599750984803110105e+16", "-3.5042033e+8", "-313986840.105"); + mod_test ("-6.648136108552158227395470978468104077135e+30", "-7.670622e+6", "-1963500.104077135"); + mod_test ("5.7863814022935592013463113844081501644834124668e+33", "2.927394204321791269473573349413773145813098792e+20", "144279721918792318844.9709640995481667887767448"); + mod_test ("1.846283862301720586500752e+20", "-2.76680920710526658074e+14", "37882799751297.269222"); + mod_test ("-4.074907e+6", "1.2292e-10", "-1.156e-11"); + mod_test ("-2.4670327357021349034013736e+26", "-2.247694648202153e+3", "-1262.063905639966"); + mod_test ("4.5429277175861978297034645864160147622314348499084882862362e-18", "2.7386e-2", "4.5429277175861978297034645864160147622314348499084882862362e-18"); + mod_test ("2.157162452863075302863915e+18", "-3.60299993558464831757535049083884559e+35", "2157162452863075302.863915"); + mod_test ("7.7382289705506563990171491235511002471989281027800113e+22", "2.48970493035763788684e-5", "0.000011085865185482489695400113"); + mod_test ("-1.9064913834485914061878309425875120670837105e+5", "-3e+0", "-2.13834485914061878309425875120670837105"); + mod_test ("-5.48175104358179142491638230233e+25", "-1.52434523822871140847e-11", "-8.8309288545189098888e-12"); + mod_test ("1.07984359784457855e+6", "2.92533631912192887348822954567386e+32", "1079843.59784457855"); + mod_test ("-5.343344296409307514661858172266262866671109159598323e+9", "2.3273061846552018803169584402231121660442419923712e+8", "-223270690.167863377964549603775416101373776776381683"); + ) diff --git a/drafts/bs-big/__tests__/plus_test.ml b/drafts/bs-big/__tests__/plus_test.ml new file mode 100644 index 0000000..f713dc6 --- /dev/null +++ b/drafts/bs-big/__tests__/plus_test.ml @@ -0,0 +1,1812 @@ +open Jest + +let () = + describe "plus_tests" (fun () -> + let open Expect in + + let plus_test = + let count = ref 0 in + fun (a, b, exp) -> + count := !count + 1; + let v = Big.plus (Big.fromString a) (Big.fromString b) |. Big.toString in + test ("div_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("div_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + plus_test ("1", "0", "1"); + plus_test ("1", "-0", "1"); + plus_test ("-1", "0", "-1"); + plus_test ("-1", "-0", "-1"); + plus_test ("0", "1", "1"); + plus_test ("0", "-1", "-1"); + plus_test ("-0", "1", "1"); + plus_test ("-0", "-1", "-1"); + + bool_test false (Big.plus (Big.fromInt 0) (Big.fromInt 0) |> is_minus_zero); + bool_test false (Big.plus (Big.fromInt 0) (Big.fromString "-0") |> is_minus_zero); + bool_test false (Big.plus (Big.fromString "-0") (Big.fromInt 0) |> is_minus_zero); + bool_test true (Big.plus (Big.fromString "-0") (Big.fromString "-0") |> is_minus_zero); + bool_test false (Big.plus (Big.fromInt 1) (Big.fromInt (-1)) |> is_minus_zero); + bool_test false (Big.plus (Big.fromInt (-1)) (Big.fromInt (1)) |> is_minus_zero); + + plus_test ("0", "-5.1", "-5.1"); + plus_test ("1.3", "2", "3.3"); + plus_test ("1.02", "1.2", "2.22"); + plus_test ("3.0", "0", "3"); + plus_test ("3", "31.9", "34.9"); + plus_test ("0", "-0.0000000000000712", "-7.12e-14"); + plus_test ("1.10", "5", "6.1"); + plus_test ("4.2", "-0.000000062", "4.199999938"); + plus_test ("1", "0", "1"); + plus_test ("-5.1", "1", "-4.1"); + plus_test ("0", "-1", "-1"); + plus_test ("699", "-4", "695"); + plus_test ("0", "-1", "-1"); + plus_test ("1.6", "-27.2", "-25.6"); + plus_test ("0", "-7", "-7"); + plus_test ("3.0", "-4", "-1"); + plus_test ("0", "-2.0", "-2"); + plus_test ("0", "-3", "-3"); + plus_test ("-2", "1", "-1"); + plus_test ("-9", "-1", "-10"); + plus_test ("2", "-1.1", "0.9"); + plus_test ("-5", "-3", "-8"); + plus_test ("7", "-37", "-30"); + plus_test ("-3", "-5.0", "-8"); + plus_test ("1.2", "-0.0000194", "1.1999806"); + plus_test ("0", "5", "5"); + plus_test ("0", "1", "1"); + plus_test ("-0.000000000000214", "0", "-2.14e-13"); + plus_test ("0", "0", "0"); + plus_test ("0", "-1", "-1"); + plus_test ("-3", "156", "153"); + plus_test ("231", "0.00000000408", "231.00000000408"); + plus_test ("0", "-1.7", "-1.7"); + plus_test ("-4.16", "0", "-4.16"); + plus_test ("0", "5.8", "5.8"); + plus_test ("1.5", "5", "6.5"); + plus_test ("4.0", "-6.19", "-2.19"); + plus_test ("-1.46", "-5.04", "-6.5"); + plus_test ("5.11", "6", "11.11"); + plus_test ("-2.11", "0", "-2.11"); + plus_test ("0.0067", "-5", "-4.9933"); + plus_test ("0", "2", "2"); + plus_test ("1.0", "-24.4", "-23.4"); + plus_test ("-0.000015", "-6", "-6.000015"); + plus_test ("1.5", "0", "1.5"); + plus_test ("4.1", "-3", "1.1"); + plus_test ("-2", "-1", "-3"); + plus_test ("3", "1.5", "4.5"); + plus_test ("-7.8", "-3", "-10.8"); + plus_test ("-32", "17.6", "-14.4"); + plus_test ("0", "0", "0"); + plus_test ("-47.4", "-1", "-48.4"); + plus_test ("15.4", "0.000014", "15.400014"); + plus_test ("7.2", "2.9", "10.1"); + plus_test ("-86.5", "-47.2", "-133.7"); + plus_test ("1.1", "-31.4", "-30.3"); + plus_test ("-121", "3", "-118"); + plus_test ("-4", "3", "-1"); + plus_test ("-3.98", "1.2", "-2.78"); + plus_test ("-4.90", "0", "-4.9"); + plus_test ("2.28", "0", "2.28"); + plus_test ("-0.0000000000051", "-0.0000000000000000236", "-5.1000236e-12"); + plus_test ("1", "-28", "-27"); + plus_test ("0", "-3.12", "-3.12"); + plus_test ("7", "24.9", "31.9"); + plus_test ("-7.8", "17", "9.2"); + plus_test ("1", "1", "2"); + plus_test ("0.00000000000000000016", "-2", "-1.99999999999999999984"); + plus_test ("6", "8.5", "14.5"); + plus_test ("1.10", "-1", "0.1"); + plus_test ("-1", "3.3", "2.3"); + plus_test ("4", "-1.3", "2.7"); + plus_test ("0", "2.09", "2.09"); + plus_test ("-1", "0", "-1"); + plus_test ("-1", "0", "-1"); + plus_test ("0", "8.1", "8.1"); + plus_test ("-3", "-4.96", "-7.96"); + plus_test ("9.73", "0", "9.73"); + plus_test ("1", "0", "1"); + plus_test ("-1", "-3", "-4"); + plus_test ("3", "-3.0", "0"); + plus_test ("-2.78", "-403", "-405.78"); + plus_test ("1", "-0.00063", "0.99937"); + plus_test ("2", "0", "2"); + plus_test ("3", "7", "10"); + plus_test ("-1", "0", "-1"); + plus_test ("-4.1", "-4", "-8.1"); + plus_test ("-5", "7", "2"); + plus_test ("-7", "-0.00000000000000000511", "-7.00000000000000000511"); + plus_test ("0", "0.000000000000000000233", "2.33e-19"); + plus_test ("1.2", "-8.5", "-7.3"); + plus_test ("2", "-2", "0"); + plus_test ("-24", "-5", "-29"); + plus_test ("-2.1", "0.0114", "-2.0886"); + plus_test ("8", "-5", "3"); + plus_test ("0.061", "12.1", "12.161"); + plus_test ("0", "2.7", "2.7"); + plus_test ("-0.00000871", "0", "-0.00000871"); + plus_test ("0", "0", "0"); + plus_test ("2", "-6.0", "-4"); + plus_test ("9", "-1.2", "7.8"); + plus_test ("7", "0", "7"); + plus_test ("0", "0.000000000000000213", "2.13e-16"); + plus_test ("2.5", "0", "2.5"); + plus_test ("0", "0.00211", "0.00211"); + plus_test ("6.4", "-15.7", "-9.3"); + plus_test ("1.5", "0", "1.5"); + plus_test ("-41", "0.113", "-40.887"); + plus_test ("-7.1", "2", "-5.1"); + plus_test ("6", "-1.6", "4.4"); + plus_test ("-1.2", "0", "-1.2"); + plus_test ("-3", "13.3", "10.3"); + plus_test ("0", "0", "0"); + plus_test ("0", "-105", "-105"); + plus_test ("-0.52", "-40.9", "-41.42"); + plus_test ("1", "0", "1"); + plus_test ("0", "0", "0"); + plus_test ("-5.1", "-0.00024", "-5.10024"); + plus_test ("-0.000000000000027", "6", "5.999999999999973"); + plus_test ("125", "-2", "123"); + plus_test ("2", "-365", "-363"); + plus_test ("6.2", "-55.1", "-48.9"); + plus_test ("4.9", "-6", "-1.1"); + plus_test ("0.0000000482", "0.0000000019", "5.01e-8"); + plus_test ("0", "1.7", "1.7"); + plus_test ("78.3", "2.2", "80.5"); + plus_test ("-53.9", "4.0", "-49.9"); + plus_test ("0", "2.1", "2.1"); + plus_test ("-1.0", "-143", "-144"); + plus_test ("-1", "2.2", "1.2"); + plus_test ("1", "84.9", "85.9"); + plus_test ("0", "26", "26"); + plus_test ("51", "0.000000000000000757", "51.000000000000000757"); + plus_test ("1.1", "-3.67", "-2.57"); + plus_test ("-1.2", "1.30", "0.1"); + plus_test ("-0.00000000000021", "0.0000000013", "1.29979e-9"); + plus_test ("-1.6", "-1", "-2.6"); + plus_test ("-2.0", "63", "61"); + plus_test ("-3", "7", "4"); + plus_test ("-221", "38", "-183"); + plus_test ("-1", "0", "-1"); + plus_test ("46.4", "2", "48.4"); + plus_test ("0", "0", "0"); + plus_test ("-1", "-0.0000000853", "-1.0000000853"); + plus_test ("79", "0.000190", "79.00019"); + plus_test ("0", "-8.59", "-8.59"); + plus_test ("1", "-1", "0"); + plus_test ("0.000000000000000000110", "-5.8", "-5.79999999999999999989"); + plus_test ("6", "3.86", "9.86"); + plus_test ("-9", "8", "-1"); + plus_test ("-1.0", "-45.9", "-46.9"); + plus_test ("-2", "1", "-1"); + plus_test ("17.3", "1", "18.3"); + plus_test ("0", "0.23", "0.23"); + plus_test ("1.14", "0", "1.14"); + plus_test ("-1.99", "-1", "-2.99"); + plus_test ("9", "0.0000000000000000000157", "9.0000000000000000000157"); + plus_test ("-11", "89", "78"); + plus_test ("0", "-13.9", "-13.9"); + plus_test ("0.00000000000015", "86", "86.00000000000015"); + plus_test ("278", "-2", "276"); + plus_test ("0", "-2.18", "-2.18"); + plus_test ("0", "-0.000000029", "-2.9e-8"); + plus_test ("-6", "-0.0000000045", "-6.0000000045"); + plus_test ("0", "-24.7", "-24.7"); + plus_test ("6.0", "124", "130"); + plus_test ("0.00089", "-0.117", "-0.11611"); + plus_test ("-0.94", "44", "43.06"); + plus_test ("52.1", "-4", "48.1"); + plus_test ("0", "-0.00000062", "-6.2e-7"); + plus_test ("2", "-0.000000000242", "1.999999999758"); + plus_test ("-6.2", "1", "-5.2"); + plus_test ("3.4", "1", "4.4"); + plus_test ("-1.5", "3.8", "2.3"); + plus_test ("3", "-1.27", "1.73"); + plus_test ("-1", "7", "6"); + plus_test ("-2.29", "-4.8", "-7.09"); + plus_test ("0", "0", "0"); + plus_test ("-5", "-0.0000000000000016", "-5.0000000000000016"); + plus_test ("2.0", "-1.5", "0.5"); + plus_test ("94.2", "-1.4", "92.8"); + plus_test ("37", "-0.000000000000000000028", "36.999999999999999999972"); + plus_test ("-0.00000000000000000750", "1", "0.9999999999999999925"); + plus_test ("1.5", "-1.7", "-0.2"); + plus_test ("-1", "20.0", "19"); + plus_test ("2.6", "0", "2.6"); + plus_test ("0", "-28.4", "-28.4"); + plus_test ("-12.1", "-14", "-26.1"); + plus_test ("1.7", "0.000000041", "1.700000041"); + plus_test ("9.5", "4", "13.5"); + plus_test ("2.8", "101", "103.8"); + plus_test ("0.000000022", "0", "2.2e-8"); + plus_test ("6", "28", "34"); + plus_test ("7", "-97", "-90"); + plus_test ("-1.7", "-3", "-4.7"); + plus_test ("107", "6.2", "113.2"); + plus_test ("-0.000000000000000118", "-2", "-2.000000000000000118"); + plus_test ("-0.000000000000000451", "-5.3", "-5.300000000000000451"); + plus_test ("0", "-1", "-1"); + plus_test ("0.0000055", "145", "145.0000055"); + plus_test ("0", "-8", "-8"); + plus_test ("0", "-2.7", "-2.7"); + plus_test ("-3", "0", "-3"); + plus_test ("-7", "7", "0"); + plus_test ("-1.1", "0", "-1.1"); + plus_test ("-92", "-1.4", "-93.4"); + plus_test ("-2.7", "-3.25", "-5.95"); + plus_test ("68.5", "509", "577.5"); + plus_test ("0", "0", "0"); + plus_test ("22.6", "-1", "21.6"); + plus_test ("373", "0", "373"); + plus_test ("0", "-5", "-5"); + plus_test ("32.2", "-7", "25.2"); + plus_test ("-1", "-1.7", "-2.7"); + plus_test ("-1.3", "0.0000000048", "-1.2999999952"); + plus_test ("5", "-5", "0"); + plus_test ("0", "11.9", "11.9"); + plus_test ("-0.82", "25", "24.18"); + plus_test ("0", "3.1", "3.1"); + plus_test ("0.000024", "6", "6.000024"); + plus_test ("10", "-0.000000116", "9.999999884"); + plus_test ("977", "0", "977"); + plus_test ("13", "-0.00000205", "12.99999795"); + plus_test ("-7", "-9.0", "-16"); + plus_test ("0", "1.05", "1.05"); + plus_test ("1", "0", "1"); + plus_test ("-10.1", "0", "-10.1"); + plus_test ("2.2", "-0.000000000000061", "2.199999999999939"); + plus_test ("0", "-0.0000085", "-0.0000085"); + plus_test ("3", "3.5", "6.5"); + plus_test ("1", "2.8", "3.8"); + plus_test ("-2", "-8.60", "-10.6"); + plus_test ("223", "9", "232"); + plus_test ("-20.4", "-213", "-233.4"); + plus_test ("0", "2", "2"); + plus_test ("-2.9", "-1.3", "-4.2"); + plus_test ("3.0", "0", "3"); + plus_test ("-5", "0.00000000000000000011", "-4.99999999999999999989"); + plus_test ("-0.000088", "70.4", "70.399912"); + plus_test ("-1", "-505", "-506"); + plus_test ("0", "-4", "-4"); + plus_test ("768", "1.1", "769.1"); + plus_test ("2", "0", "2"); + plus_test ("88", "1.4", "89.4"); + plus_test ("7.8", "0.0000000000000025", "7.8000000000000025"); + plus_test ("2.6", "-3.20", "-0.6"); + plus_test ("-24", "-2.6", "-26.6"); + plus_test ("0", "-1", "-1"); + plus_test ("-6", "0.00059", "-5.99941"); + plus_test ("14", "4.1", "18.1"); + plus_test ("-30.5", "1.48", "-29.02"); + plus_test ("-509", "5", "-504"); + plus_test ("-1", "3", "2"); + plus_test ("1.3", "0.000103", "1.300103"); + plus_test ("-2.8", "19.1", "16.3"); + plus_test ("10.07", "0.581", "10.651"); + plus_test ("3", "-2", "1"); + plus_test ("-29", "4", "-25"); + plus_test ("-3.80", "-48.2", "-52"); + plus_test ("6", "-21.3", "-15.3"); + plus_test ("3", "-1.7", "1.3"); + plus_test ("0", "0.00000000033", "3.3e-10"); + plus_test ("0.49", "0", "0.49"); + plus_test ("7", "1.1", "8.1"); + plus_test ("1", "-2.73", "-1.73"); + plus_test ("0", "-3.89", "-3.89"); + plus_test ("1.27", "9", "10.27"); + plus_test ("-0.00000000151", "-25", "-25.00000000151"); + plus_test ("-11.7", "0.000000000000014", "-11.699999999999986"); + + plus_test ("3", "-7292337998569017257242651.028572395143563730317242", "-7.292337998569017257242648028572395143563730317242e+24"); + plus_test ("-340867371992331.2987436", "337.06898", "-340867371991994.2297636"); + plus_test ("10.55995846458487041359", "-11363016227498211122402159.8244", "-1.136301622749821112240214926444153541512958641e+25"); + plus_test ("-2493625481630720848504.2253423230119762824868856426", "-2.5572303947825744924097699541922801", "-2.4936254816307208485067825727177945507748966555967922801e+21"); + plus_test ("0.000000000000019478219401872667571256888553179333787767", "172.34675119", "172.346751190000019478219401872667571256888553179333787767"); + plus_test ("-34", "1679140391.9", "1679140357.9"); + plus_test ("-80049928601879665221091.2", "-422696.2614386", "-8.00499286018796656437874614386e+22"); + plus_test ("-2807730637205.01726166308462171615083", "0.0000000000000000000622355365575749096529347607937593112149767278", "-2807730637205.0172616630846217160885944634424250903470652392062406887850232722"); + plus_test ("2011299643403413077489630775210103349137877109", "-163066968.786271125332323161612905", "2.011299643403413077489630775210103348974810140213728874667676838387095e+45"); + plus_test ("-0.00000083671937317281562083962202394322135659", "7878332.295282735111804499965213784837870", "7878332.29528189839243132714959294521584605677864341"); + plus_test ("0.000000188701196610233915664001509614338431694523153", "-23707678356144422298078574459450831700.985", "-2.3707678356144422298078574459450831700984999811298803389766084335998490385661568305476847e+37"); + plus_test ("26203291462.747893543000897830970817", "2.39160879274042658647090", "26203291465.139502335741324417441717"); + plus_test ("-13.731026951", "0.000000000000519065974912984366352959010635376943677199693101323558", "-13.731026950999480934025087015633647040989364623056322800306898676442"); + plus_test ("42946999115270631061563709594990331564869354319610", "-689518233710514.17779877383431696209686368332723612515969802", "4.294699911527063106156370959499033087535112060909582220122616568303790313631667276387484030198e+49"); + plus_test ("-316537.13", "5.849231740", "-316531.28076826"); + plus_test ("-4483733651090758635203278665262327.55342", "0", "-4.48373365109075863520327866526232755342e+33"); + plus_test ("0", "-2599", "-2599"); + plus_test ("-5148.92870373", "-0.0000000000003511413413454972", "-5148.9287037300003511413413454972"); + plus_test ("-134406704543039418795782131496347812", "39838386849529610034769612280421774691.6785604641098", "3.97039801449865706159738301489254268796785604641098e+37"); + plus_test ("1.084309017285818872", "0.0000000000004353337515049604976685056082181", "1.0843090172862542057515049604976685056082181"); + plus_test ("81757261120729.3998391292", "0.00793", "81757261120729.4077691292"); + plus_test ("305717993676885329951937476257830866546431763156719336807", "-0.00000000000000000001482815967", "3.0571799367688532995193747625783086654643176315671933680699999999999999999998517184033e+56"); + plus_test ("203522961261530443.917820906776579027929", "-9185.139979750596690606", "203522961261521258.777841156179888421929"); + plus_test ("58302388.37179491476", "9936044410052508775.881727897883802", "9936044410110811164.253522812643802"); + plus_test ("0.00000000000000000005248972194638156020825779794502284697376", "-0.0388379024820383074988759583112", "-0.03883790248203830744638623636481843979174220205497715302624"); + plus_test ("0.000000001932861108418416669193839546006791915101090", "-0.000000000000103564871", "1.93275754354741666919383954600679191510109e-9"); + plus_test ("-97.5", "-3.1", "-100.6"); + plus_test ("-3644798362098266765793", "-11528555350.16536616701926798156538624434748578548375", "-3.64479836210979532114316536616701926798156538624434748578548375e+21"); + plus_test ("-371577606534.62392858950803524930468", "-0.00000000269386577418846418", "-371577606534.62392859220190102349314418"); + plus_test ("-691678464095856590.95634633025558439435402102", "0.000000030539948265", "-691678464095856590.95634629971563612935402102"); + plus_test ("0.000000003928034045864", "-39380632121496755483.22", "-39380632121496755483.219999996071965954136"); + plus_test ("-795.89085780158799717759425220514961346582715", "0.000706564963643740242942689304765914029848878612899171", "-795.890151236624353437351309515844847551797301121387100829"); + plus_test ("157678510.5484789671095156751921759005061", "0.0000003723795", "157678510.5484793394890156751921759005061"); + plus_test ("-1307.3", "2", "-1305.3"); + plus_test ("2952858872457.929554397223499", "13455320760120.8707665014", "16408179632578.800320898623499"); + plus_test ("-255588821522540889862114962636995141.122", "0.00000326851523835", "-2.5558882152254088986211496263699514112199673148476165e+35"); + plus_test ("0.00000000000014406509", "-560153923805366388086033", "-5.6015392380536638808603299999999999985593491e+23"); + plus_test ("-6.099826371", "28726540983564666452792216637044.9356006234", "2.87265409835646664527922166370388357742524e+31"); + plus_test ("8636541368105344305914147830.15649125124", "0.0000000000049754", "8.6365413681053443059141478301564912512449754e+27"); + plus_test ("-755310742571241039658903028788091708555.4969131794", "99330105954469.4", "-7.553107425712410396589029294579857540860969131794e+38"); + plus_test ("4020318299.7", "-670276060499479628473243989367746661643882288", "-6.702760604994796284732439893677466576235639883e+44"); + plus_test ("5095849414624671459392138104904515509922724138164588773.042", "149494908418030920.00255211471236475197791306529", "5.09584941462467145939213810490451551007221904658261969304455211471236475197791306529e+54"); + plus_test ("138761505665961028617702243300", "9857942288.8", "1.387615056659610286275601855888e+29"); + plus_test ("3804404287.52574", "16416902504", "20221306791.52574"); + plus_test ("-2055.8130", "0.00218842416232671530104849459457718", "-2055.81081157583767328469895150540542282"); + plus_test ("0.000000000000989697422064467113678", "0.697065625725549", "0.697065625726538697422064467113678"); + plus_test ("-30288347947284335685837645153586172422797922983.37915571667", "-1335.069192", "-3.028834794728433568583764515358617242279792431844834771667e+46"); + plus_test ("0.00054054406579017", "0.0020445688232423225788738738557412646944032455769768734602", "0.0025851128890324925788738738557412646944032455769768734602"); + plus_test ("-68994411860.328728", "48816504201613414531319144006465274996081421325116090708", "4.8816504201613414531319144006465274996081421256121678847671272e+55"); + plus_test ("-809830632609724847526268.50966586512675871946995", "45805247683771870541946686267298071051761.71368629398645", "4.580524768377186973211605365757322352549320402042885969128053005e+40"); + plus_test ("12.244685335891505325017912752605737279289", "-1953.157", "-1940.912314664108494674982087247394262720711"); + plus_test ("0.00000000000000012201816814103574356713495876418475275883288964", "-14514327327765802694345312637.28121049209345627407", "-1.451432732776580269434531263728121049209345615205183185896425643286504123581524724116711036e+28"); + plus_test ("-35760010680713914665457.416640208061422564137087770", "237677.40440", "-3.576001068071391442778001224020806142256413708777e+22"); + plus_test ("0.213764724863667178076578241157520057358951", "-195.381", "-195.167235275136332821923421758842479942641049"); + plus_test ("-4", "-20479253407195868023.7190887", "-20479253407195868027.7190887"); + plus_test ("-2636506939789983.9517900975", "7166515142782230578873295164.094395142727", "7.166515142779594071933505180142605045227e+27"); + plus_test ("0.00001177737517372381877477801315318", "90325802810983024805454390865176398367442693156.692576771", "9.032580281098302480545439086517639836744269315669258854837517372381877477801315318e+46"); + plus_test ("0.0000000000000006940972689786006700192372751360485539314987602213580801251", "-321024060655325518945438734389309904797132969999", "-3.210240606553255189454387343893099047971329699989999999999999993059027310213993299807627248639514460685012397786419198749e+47"); + plus_test ("-0.0000000000000000014803670473728307445", "-0.72148924607942442354320737482582513411299162884", "-0.72148924607942442502357442219865587861299162884"); + plus_test ("0.0000000000000001043810048169882311646196761962068118", "0.00000000000008989735712546153946422343611927620630428259597102874", "9.000173813027852769538805579547241311608259597102874e-14"); + plus_test ("0.0000000856354489413072352886007888280862870145666795091412287", "124165153666113222225049048396538922054986467641", "1.241651536661132222250490483965389220549864676410000000856354489413072352886007888280862870145666795091412287e+47"); + plus_test ("-0.0000000000000320757814372847561957016", "-81190157394157.37730", "-81190157394157.3773000000000320757814372847561957016"); + plus_test ("-4334587898155190922720532.94504694431", "85522.93", "-4.33458789815519092263501001504694431e+24"); + plus_test ("657.44690790930416714587", "-0.000000000000000000046335131044673181381027", "657.446907909304167145823664868955326818618973"); + plus_test ("29982214095954021.68565215319585", "-44628768214034.30768386111941549271096", "29937585327739987.37796829207643450728904"); + plus_test ("0.00000227708329764590268495570108111", "188682548499636418836270555181954622706559207", "1.8868254849963641883627055518195462270655920700000227708329764590268495570108111e+44"); + plus_test ("-105740086870.87902330897898941693939252887655925", "-0.00902789833804655794", "-105740086870.88805120731703597487939252887655925"); + plus_test ("5321976.194462", "0.00000000062660860859824908696344225671974056962030135135", "5321976.19446200062660860859824908696344225671974056962030135135"); + plus_test ("1400649337343672602231550299981618481761671319", "-109314621074190268.0231", "1.4006493373436726022315502998723038606874810509769e+45"); + plus_test ("2057998276732722646423663", "22081288", "2.057998276732722668504951e+24"); + plus_test ("0.0000000000000000017861940166096730915828677929399660926585274067", "19858.316504586", "19858.3165045860000000017861940166096730915828677929399660926585274067"); + plus_test ("-22618978889574488865872.1936326217809072732", "84743644438924408560024120708247557837387061303912", "8.47436444389244085600241206856285789478125724380398063673782190927268e+49"); + plus_test ("16899677", "0.0000000000000006200595313980106282035", "16899677.0000000000000006200595313980106282035"); + plus_test ("84223630138728231319265207385866523.7037949685268627985151", "98049376624950796086168448377.9", "8.42237281881048562700612935543149016037949685268627985151e+34"); + plus_test ("-23139798585733154920035503271.3293705839340975", "-203534508453530507372.39865759096937", "-2.31397987892676633735660106437280281749034675e+28"); + plus_test ("2132422616", "313.8131489937516147609", "2132422929.8131489937516147609"); + plus_test ("0.00000000031757080246638721492851445443", "3794846068194592901324442.377", "3.79484606819459290132444237700000031757080246638721492851445443e+24"); + plus_test ("-720523766692302305335100081586272082042593510557835022", "-48655616939922.2105", "-7.205237666923023053351000815862720820426421661747749442105e+53"); + plus_test ("-0.000000000000681090019432916245992942611570731948008", "-78075676178", "-78075676178.000000000000681090019432916245992942611570731948008"); + plus_test ("0.0000000000000000000326999427026228462203921452389557015799356287967578926", "-0.0000000000010075912482623982890", "-1.0075912155624555863771537796078547610442984200643712032421074e-12"); + plus_test ("-0.000001663549464265503879091759952912765557", "-2288485846519565.90882", "-2288485846519565.908821663549464265503879091759952912765557"); + plus_test ("15283021016799660238790294783012978152064246848.302809", "-255.33064438", "1.528302101679966023879029478301297815206424659297216462e+46"); + plus_test ("-2141275004855302313", "-14324404392255657678513289015273", "-1.4324404392257798953518144317586e+31"); + plus_test ("-0.000000000000000010204742781305685387176792401033809", "-1797802696763189176117325682047878480266832090717009269338", "-1.797802696763189176117325682047878480266832090717009269338000000000000000010204742781305685387176792401033809e+57"); + plus_test ("18393642772198629.04467960835946581820412498120401305795", "0.001275506381558716433091344352361195683041600198429562", "18393642772198629.045955114741024534637216325556374253633041600198429562"); + plus_test ("-1985677.0479797102021852689", "3421136183.732859", "3419150506.6848792897978147311"); + plus_test ("0.0000000000048772038513856900253878297299144253261148646117991377226", "-0.000000000000000000633993968849724597473885254797830639072", "4.8772032173917211756632322560291705282842255397991377226e-12"); + plus_test ("44812645985.34921549502557530796823798603", "-3581800787100727450085636788", "-3.58180078710072740527299080265078450497442469203176201397e+27"); + plus_test ("1079812992968985436999219069272969", "2", "1.079812992968985436999219069272971e+33"); + plus_test ("-1753778882883960239.7357211808838917234439093151132461", "-675.03089678041125557523363798883874525571164770741", "-1753778882883960914.76661796129514729867754730395199135571164770741"); + plus_test ("2.5", "79808580452454570.6021583877", "79808580452454573.1021583877"); + plus_test ("-2318172325.38510421", "1", "-2318172324.38510421"); + plus_test ("1374939.4348", "5.6626826003903229567653167590578", "1374945.0974826003903229567653167590578"); + plus_test ("-1433073.1818631797258961330292384136", "121881788197.262469654057", "121880355124.0806064743311038669707615864"); + plus_test ("2.494544723114530285809", "3576653", "3576655.494544723114530285809"); + plus_test ("7938514604943790100.9276107434535811520579868735844807580453", "20401419259674024936996903873847920688818394344", "2.04014192596740249369969038817864352937621844449276107434535811520579868735844807580453e+46"); + plus_test ("-0.00000000000000000659293074407431751262", "26538.5176499542676", "26538.51764995426759999340706925592568248738"); + plus_test ("171650791296", "207021136095822862734047.67963169458559659", "2.0702113609599451352534367963169458559659e+23"); + plus_test ("111202958445.9250724298025103213740842327570768605596136302", "1.537803126215", "111202958447.4628755560175103213740842327570768605596136302"); + plus_test ("-66398807.32298869", "-6090756873.58292331915049610499833418951253059357", "-6157155680.90591200915049610499833418951253059357"); + plus_test ("2353147.270338458726403618253", "0.021384377221532", "2353147.291722835947935618253"); + plus_test ("-148563993416893680237652940993302142753.35541587", "64239.868", "-1.4856399341689368023765294099330207851348741587e+38"); + plus_test ("0.00000000000000952989372890150229168153411", "0.000000001089981372067260502063827792831910332175826", "1.089990901960989403566119474366020332175826e-9"); + plus_test ("-0.000095942657103193473656868628869530806593380", "2056191383129368498489079272615326194", "2.05619138312936849848907927261532619399990405734289680652634313137113046919340662e+36"); + plus_test ("-322696702507520517171977833895787676173146086137211", "-2440854162625.37382074757014", "-3.2269670250752051717197783389578767617558694029983637382074757014e+50"); + plus_test ("-1211219183955140821584", "-5210569206996623901353622002846939989302.92283", "-5.21056920699662390256484118680208081088692283e+39"); + plus_test ("-0.0000000000000079666993349250232202", "489285196659741383.006297750838528045433123", "489285196659741383.0062977508385200787337880749767798"); + plus_test ("0.00000000077141109510594202471060992900492", "3208.3347", "3208.33470000077141109510594202471060992900492"); + plus_test ("-68024506176127817746586754376221734884", "0.15464521042533657299008608160", "-6.80245061761278177465867543762217348838453547895746634270099139184e+37"); + plus_test ("-145880984716.215", "2337129866657263570", "2337129720776278853.785"); + plus_test ("188974623061492483.142804194521468235379066778", "-0.00000038525080631123327317383933592", "188974623061492483.14280380927066192414579360416066408"); + plus_test ("-16356113742963595266465952932662", "-125355883826.39416781321896", "-1.635611374296359526659130881648839416781321896e+31"); + plus_test ("-6055715.8736074588411038198577757669624785013783338", "314649408270458779064780.10", "3.146494082704587730090642263925411588961801422242330375214986216662e+23"); + plus_test ("115404161731.4660458068936241750308873387559102", "-22544800348.350741696032151441813827609476762", "92859361383.1153041108614727332170597292791482"); + plus_test ("-15403035163985572960537283993932052281699167401054521716", "-4.51871358", "-1.540303516398557296053728399393205228169916740105452172051871358e+55"); + plus_test ("494.839191894412897545883335718", "-6838.818196825251112157347", "-6343.979004930838214611463664282"); + plus_test ("12.6", "0.00000023237282267118", "12.60000023237282267118"); + plus_test ("80998.93", "-0.000000000000000006657264362722375638995179208931019910", "80998.92999999999999999334273563727762436100482079106898009"); + plus_test ("24311907546797437.192938", "33293941690", "24311940840739127.192938"); + plus_test ("-2439553576035597703284083776782658338714854480.76670", "-552371860516159411553653432588968147375569940274.6", "-5.548114140921950092569375163657508057142847947553667e+47"); + plus_test ("-2", "267.41036926198544821143", "265.41036926198544821143"); + plus_test ("-221185414.39378617220971422653741297827696718276", "147716681512356798558369414201759187083768076717531.7", "1.4771668151235679855836941420175918708376785553211730621382779028577346258702172303281724e+50"); + plus_test ("27782844063780674567856973058456377099880", "0.42833855291455356", "2.778284406378067456785697305845637709988042833855291455356e+40"); + plus_test ("-6779946038658269907151725830212.3231241258972158956574549786", "-59152624443548.397860097634612838089", "-6.7799460386582699663043502737607209842235318287337464549786e+30"); + plus_test ("5583728", "-12088255617331322291590332122631397105695", "-1.2088255617331322291590332122631391521967e+40"); + plus_test ("-122.55488541428134", "-1849241463858352827933557649058195369965078195", "-1.84924146385835282793355764905819536996507831755488541428134e+45"); + plus_test ("-5.40620", "-7926553114777.34793", "-7926553114782.75413"); + plus_test ("-0.000253850655677758430078658974284641259587365835647", "9712716976.55714607561630095490035500071", "9712716976.556892224960623196470276341735715358740412634164353"); + plus_test ("168095465368167755.20132", "-0.000000000000100770026067662522650967001796393", "168095465368167755.201319999999899229973932337477349032998203607"); + plus_test ("-23084021.1912", "-0.0000000002552886320752142", "-23084021.1912000002552886320752142"); + plus_test ("-0.00000034692938443702777764811193148332", "-2291330567445.020091462", "-2291330567445.02009180892938443702777764811193148332"); + plus_test ("-0.000000000000000000500", "-3638839062523.16788353204231378745138113805005277262", "-3638839062523.16788353204231378795138113805005277262"); + plus_test ("-21291430264059347596", "-278661231050935040505252800716670488924003.0", "-2.78661231050935040505274092146934548271599e+41"); + plus_test ("-3937382504232.4631934324802032008", "-12670428.0658912205267960601919307115632", "-3937395174660.5290846530069992609919307115632"); + plus_test ("-146982.22450149250", "623504303083058604561989109312642337", "6.235043030830586045619891093124953547754985075e+35"); + plus_test ("253.01", "802625930614062.9705947195646834588541152620643", "802625930614315.9805947195646834588541152620643"); + plus_test ("115359268370848989850854005321447663172886737834785520883", "458.4807", "1.153592683708489898508540053214476631728867378347855213414807e+56"); + plus_test ("163.09176", "0.00000000000000001823481782581109744", "163.09176000000000001823481782581109744"); + plus_test ("-2213687948.07450556690935288", "21871988945935811925735.3643007186962826339", "2.18719889459335982377872897951517869297539e+22"); + plus_test ("-13600.9931855956842627546715", "137199858862267.530744593929324697303900300812048", "137199858848666.537558998245061942632400300812048"); + plus_test ("64302.84879", "-0.00000000000000000031884862211764", "64302.84878999999999999968115137788236"); + plus_test ("-21.0343150", "0.00003762594931905088097193777529518846", "-21.03427737405068094911902806222470481154"); + plus_test ("-43.2", "0.0000000000000000088209059726558824954701945990768141500402895240582621", "-43.1999999999999999911790940273441175045298054009231858499597104759417379"); + plus_test ("-21.716", "0.00010435033062418396646761217", "-21.71589564966937581603353238783"); + plus_test ("-14349223886609.8996911241", "591424", "-14349223295185.8996911241"); + plus_test ("387.146464770977292777877373605881", "0.000000000748129478828479148973975406341232062736061643261337037", "387.146464771725422256705852754854975406341232062736061643261337037"); + plus_test ("-5400652.348672", "-272186438747803380.1804043255", "-272186438753204032.5290763255"); + plus_test ("-21.3", "6.8", "-14.5"); + plus_test ("0.00000000103600815339389940326020721966409", "29645237.7502768697756870856787621204", "29645237.75027687081169523907266152366020721966409"); + plus_test ("-534005184647169042.131454403358674522", "0.005694323359477401172045805857601828035888769857500968445222", "-534005184647169042.125760079999197120827954194142398171964111230142499031554778"); + plus_test ("1862736418", "1", "1862736419"); + plus_test ("351490387188996259", "62.100460124428609287573", "351490387188996321.100460124428609287573"); + plus_test ("169499641692977052216453491793.9787615383724028133893", "0.00000000000000006361911", "1.6949964169297705221645349179397876153837240287700841e+29"); + plus_test ("-8", "3417322569.4831394174", "3417322561.4831394174"); + plus_test ("-838501752798.326614960580367718115", "-2022114720338558.047757485234", "-2022953222091356.374372445814367718115"); + plus_test ("-1549912.8026532077081092082547", "-45506131.43371799701886630176768733952185393859212", "-47056044.23637120472697551002238733952185393859212"); + plus_test ("-2183663034044253888858323830694952562946010.782", "1354851.73581347266611421085387946798291", "-2.18366303404425388885832383069495256159115904618652733388578914612053201709e+42"); + plus_test ("-0.0000000000046712261814706680606784284472438172230285748063131539", "918514605286328938996265974.307597316850270", "9.185146052863289389962659743075973168455987738185293319393215715527561827769714251936868461e+26"); + plus_test ("-0.0301991824416038881101099", "-4464346608", "-4464346608.0301991824416038881101099"); + plus_test ("3.98", "5218371.49516", "5218375.47516"); + plus_test ("4832441872354802689671", "-0.0000000000213837", "4.8324418723548026896709999999999786163e+21"); + plus_test ("0.000000000000000016298281", "-0.00000000348998960378566871408591706715068151875573445053079845095", "-3.48998958748738771408591706715068151875573445053079845095e-9"); + plus_test ("-2059458247822896700102858412401366415.403909858", "30110.7306736165788262027129954556", "-2.0594582478228967001028584124013363046732362414211737972870045444e+36"); + plus_test ("-106653", "-6554779180145425976", "-6554779180145532629"); + plus_test ("0", "-12771592550606134879262234468876731140678883443896", "-1.2771592550606134879262234468876731140678883443896e+49"); + plus_test ("-141742173848073082.100575461779634531", "-7", "-141742173848073089.100575461779634531"); + plus_test ("245.6735", "-3537763728425648898.536045229", "-3537763728425648652.862545229"); + plus_test ("23.71866884462009661132193", "48487130568434204612649872032673642473034", "4.848713056843420461264987203267364247305771866884462009661132193e+40"); + plus_test ("79401597909529525308.48420609229175", "2591403158790529529573511201.19", "2.59140323819212743910303650967420609229175e+27"); + plus_test ("284576176526552350", "-10", "284576176526552340"); + plus_test ("1.0682", "7861.283121183677379038987", "7862.351321183677379038987"); + plus_test ("-1.60444805", "0.0000028847098483848786064787560152209651320682639", "-1.6044451652901516151213935212439847790348679317361"); + plus_test ("-0.0000000018996053506896890911603732691263731955475477051763872", "-57581.875373867812973783", "-57581.8753738697125791336896890911603732691263731955475477051763872"); + plus_test ("0.00000000000000000012392510786805471753525331968033845561363410307741609902317", "0.000004349947715706492223712976943980034293671355123", "0.00000434994771570661614882084499869756954699103546145561363410307741609902317"); + plus_test ("128907.8518369701779", "-1", "128906.8518369701779"); + plus_test ("-21.35510004122675870004717674727620213", "0.00000000000000000001009606209896423416929193498290467", "-21.35510004122675870003708068517723789583070806501709533"); + plus_test ("-1036072.70", "30288483890840.7644829772783388118", "30288482854768.0644829772783388118"); + plus_test ("1", "0.00000000108663482163751960896", "1.00000000108663482163751960896"); + plus_test ("196690688540287471600138402631254097", "-1296924088245887989211255853", "1.96690687243363383354250413419998244e+35"); + plus_test ("1791156.834533749567213189130", "173011022354550416183638753635.63334944502450395340681", "1.7301102235455041618364054479246788319459171714253681e+29"); + plus_test ("1861430347575777575680356960079436184499.919613", "-612614849498276685996593027243", "1.861430346963162726182080274082843157256919613e+39"); + plus_test ("-7758655923622034030955.9291230128", "0.00594001420381222017096211329", "-7.75865592362203403095592318299859618777982903788671e+21"); + plus_test ("-5459.708512054323229825378150954057236451373947101", "0.00000000000000010467896268967026375601267236689054126519", "-5459.70851205432322972069918826438697269536127473410945873481"); + plus_test ("1.5357640654914", "26484040831501596185144229855201045526.8772", "2.64840408315015961851442298552010455284129640654914e+37"); + plus_test ("0.000000000000000000551032982567013358317393735391", "3951981877.70635", "3951981877.706350000000000000551032982567013358317393735391"); + plus_test ("19966337.40327464680217082908346850752429077", "0.0000000694117823464637414804852860124695677260107514259062814196", "19966337.4032747162139531755472099880095767824695677260107514259062814196"); + plus_test ("0.000000000000114387", "26.0780", "26.078000000000114387"); + plus_test ("-0.000000000000058566632687", "154445365803820719089161481686648591330608966505075815231", "1.54445365803820719089161481686648591330608966505075815230999999999999941433367313e+56"); + plus_test ("-81.9", "-290987195118120910.650828527355125621", "-290987195118120992.550828527355125621"); + plus_test ("0.0000000000129766844476802102046046856035673832204965536", "-15.50195731", "-15.5019573099870233155523197897953953143964326167795034464"); + plus_test ("5081846528", "22.8724", "5081846550.8724"); + plus_test ("-85904518857594634808347910122940606952070250543093.244309866", "87863849.691319671938088226", "-8.5904518857594634808347910122940606952070162679243552990194061911774e+49"); + plus_test ("-170442726618237824341261070261982330084077537445839818", "0.000000000000000780053862947758376946726067312229726087592094", "-1.70442726618237824341261070261982330084077537445839817999999999999999219946137052241623053273932687770273912407906e+53"); + plus_test ("413.7126477448411377495505703", "-316329.243682", "-315915.5310342551588622504494297"); + plus_test ("-0.00000000000000483378251152198797664837453061179141660023", "4083329356329023991816392216832315734019339465889233737667", "4.08332935632902399181639221683231573401933946588923373766699999999999999516621748847801202335162546938820858339977e+57"); + plus_test ("0.000000000004945130554715279352", "20393092845", "20393092845.000000000004945130554715279352"); + plus_test ("66.60837", "28592560366063.746528", "28592560366130.354898"); + plus_test ("-10824143490362152769146.8628434597262310327475178771", "-6.442", "-1.08241434903621527691533048434597262310327475178771e+22"); + plus_test ("-17.63", "-0.000000000000000012319", "-17.630000000000000012319"); + plus_test ("-134.1362825800766312455", "17351.358339090284637450403853", "17217.222056510208006204903853"); + plus_test ("0.000000000001327776", "-0.00005717732", "-0.000057177318672224"); + plus_test ("0.000081202465051128565", "9.25", "9.250081202465051128565"); + plus_test ("-49969297933006175912135", "201", "-4.9969297933006175911934e+22"); + plus_test ("-0.0000000000000000000351971832201257343216570588903268", "-614730534926067941867", "-614730534926067941867.0000000000000000000351971832201257343216570588903268"); + plus_test ("-4699376204284239198897468324308327.578823266", "0.01240127407873530917", "-4.69937620428423919889746832430832756642199192126469083e+33"); + plus_test ("-166859773331579667092627457017924681891", "1.177", "-1.66859773331579667092627457017924681889823e+38"); + plus_test ("297611546807476.7389967424", "517878390231.954956053920806357536", "298129425197708.693952796320806357536"); + plus_test ("2.26", "476121878051171262698479334452067496570446544422226", "4.7612187805117126269847933445206749657044654442222826e+50"); + plus_test ("0.000000000348934602334173547747920539533095838627739", "-0.000000000000827121544297495855005100518267691068913070523148", "3.48107480789876051892915439014828147558825929476852e-10"); + plus_test ("0.0000000016630321489412099873134278851", "33382216672582.0742647965724", "33382216672582.0742647982354321489412099873134278851"); + plus_test ("-19.715751399", "1455362393129824490954487356267083.8186754959749850983", "1.4553623931298244909544873562670641029240969749850983e+33"); + plus_test ("11152141361730026829285665961687.3139561070881149371766", "2.76963401441423333517597101345", "1.115214136173002682928566596169008359012150234827235257101345e+31"); + plus_test ("-44836120135503200078585015978983219367221886861731704", "-2", "-4.4836120135503200078585015978983219367221886861731706e+52"); + plus_test ("16.02069381131", "0.0000000000000042", "16.0206938113100042"); + plus_test ("-329678350725130.3958196996612366385400490474513156349559", "-3467", "-329678350728597.3958196996612366385400490474513156349559"); + plus_test ("-4182765105477793237555.273265434", "56254364076240107601891319154234794697144.298685574", "5.625436407624010759770855404875700145958902542014e+40"); + plus_test ("98796860384198464024305164555588491131671343895593228060535", "-1405573031776506147878053891673759594011202270592763", "9.8796858978625432247799016677534599457911749884390957467772e+58"); + plus_test ("1092363940258060395083098718642956733485643364", "-10598809886235236342944197021319583170547674110389928477485", "-1.0598809886234143979003938960924500071829031153656442834121e+58"); + plus_test ("37586361614.095", "-3148149077577", "-3110562715962.905"); + plus_test ("-254953108518285985", "-1.07910144271207423934923587934451351214", "-254953108518285986.07910144271207423934923587934451351214"); + plus_test ("2442.32751", "43535097.033480512037", "43537539.360990512037"); + plus_test ("91995040568885362527648040727723", "0.4786144932196936758637061866474810131052563763028", "9.19950405688853625276480407277234786144932196936758637061866474810131052563763028e+31"); + plus_test ("-23863678424756722926637928011000581.244001324799381062566619", "96688.916787457820799184195711813964401021274965053735523", "-2.3863678424756722926637928010903892327213866978581878370907186035598978725034946264477e+34"); + plus_test ("0", "-0.00000000000027852776765692", "-2.7852776765692e-13"); + plus_test ("-1623378710787743245737360669094938021186.3532080061729827", "0", "-1.6233787107877432457373606690949380211863532080061729827e+39"); + plus_test ("0", "0.000000049048339295559358355126332957758142200703099", "4.9048339295559358355126332957758142200703099e-8"); + plus_test ("6192378510550191959653347.846386529481410301978431652948347", "-0.38294548165530032173705676329607616564872132520398", "6.19237851055019195965334746344104782610998024137488965227083435127867479602e+24"); + plus_test ("-24283320565469963929558662982.9349694043", "2673821469225170314390", "-2.42833178916484947043883485929349694043e+28"); + plus_test ("218.110682218445321922075046444527", "0.01497687885540092217834", "218.125659097300722844253386444527"); + plus_test ("-150034638.4607772346143954532", "-20008571757063313138", "-20008571757213347776.4607772346143954532"); + plus_test ("-2971683662963108664767", "19264012460036395799353855810042830620021", "1.9264012460036395796382172147079721955254e+40"); + plus_test ("-5252175.40891737279869057", "-2027371894615285196604888264930073402643.5207", "-2.02737189461528519660488826493007865481892961737279869057e+39"); + plus_test ("-20871238425800671889182.829701547250", "-76082554384456.3158288776570471938928399650934647043692665519", "-2.08712385018832262736391455304249070471938928399650934647043692665519e+22"); + plus_test ("0", "-6932.702341315865", "-6932.702341315865"); + plus_test ("0.0000000000000000005738499200802402637492440447802302210350633678412977240457", "31318.68", "31318.6800000000000000005738499200802402637492440447802302210350633678412977240457"); + plus_test ("-934961659015198853393126550.25200823467372663246334", "74878058.044873358837373372754304", "-9.34961659015198853318248492207134875836353259709036e+26"); + plus_test ("150.22669", "3684561512708165421004.40592369696065395561261265524", "3.68456151270816542115463261369696065395561261265524e+21"); + plus_test ("-0.0000000000000015", "0.0001183766448622143702316173650526018028825820894748606870475", "0.0001183766448607143702316173650526018028825820894748606870475"); + plus_test ("-2.8", "-0.000000000001829913701194321808657770171290559944848203", "-2.800000000001829913701194321808657770171290559944848203"); + plus_test ("0.000018752442721586663741713313007598397434839252", "-396673155594371.6367526145400674503928659772089760230841322", "-396673155594371.636733862097345863729124263895968424686697360748"); + plus_test ("-13096091967075751663002949891851210", "-1477304896251731689853.4603171477120194670", "-1.3096091967077228967899201623541063460317147712019467e+34"); + plus_test ("-740512796205842509947742580189685788668.411", "-2824022128765.93600320598135905249475748957", "-7.4051279620584250994774258301370791743434700320598135905249475748957e+38"); + plus_test ("-0.00000000000000000007489577842583193917", "1.663748696735089", "1.66374869673508899992510422157416806083"); + plus_test ("-358935750965455.3592219004802490902523174719", "43371.1", "-358935750922084.2592219004802490902523174719"); + plus_test ("9667988395245566159878.653259", "0.000000000116385624231571218", "9.667988395245566159878653259000116385624231571218e+21"); + plus_test ("2758033402.5184130", "661106474725.93", "663864508128.448413"); + plus_test ("999070419142037555127.53", "-381460743151065544049291431867372559397611945291347286", "-3.8146074315106554404929143186737156032719280325379215847e+53"); + plus_test ("-92699966163766696.7490442006", "-1915615.8916014755799758113439947795642627", "-92699966165682312.6406456761799758113439947795642627"); + plus_test ("489937.3780742473458733440028228509907624", "-1", "489936.3780742473458733440028228509907624"); + plus_test ("-0.000000000000754489936", "-0.00000000000036618270314381889826166978763226", "-1.12067263914381889826166978763226e-12"); + plus_test ("390379828579195857322601563326484972906745.91988878145980541", "704108103.1382116", "3.9037982857919585732260156332648567701484905810038145980541e+41"); + plus_test ("-26.87", "2353822.691199775358305790461", "2353795.821199775358305790461"); + plus_test ("-1587155103407939753589555224978500385.2263024764001305020", "0.0000000000011377959206097569335266885356013552156589880648", "-1.5871551034079397535895552249785003852263024763989927060793902430664733114643986447843410119352e+36"); + plus_test ("-5708346691.2506", "-2970137689.07191265257072771", "-8678484380.32251265257072771"); + plus_test ("0.0000000000000002334849322956799148269551416529021258", "51972.5801195102957735093196127055803694295535", "51972.5801195102957737428045450012602842565086416529021258"); + plus_test ("-104080.3162441765370132760114", "0.000000390882311111306995576914162226185882353716", "-104080.316243785654702164704404423085837773814117646284"); + plus_test ("-1923634420932885580541323911945854", "-5442.2", "-1.9236344209328855805413239119512962e+33"); + plus_test ("269402746056235370532350773376.6611241372196686370390", "-2.398", "2.69402746056235370532350773374263124137219668637039e+29"); + plus_test ("4.6142", "-91954290028090809.5727705166649650", "-91954290028090804.958570516664965"); + plus_test ("0.0000000038792075674539308578456", "-0.00000000799999446190038", "-4.1207868944464491421544e-9"); + plus_test ("86889265743549292727829232652504603134424", "3966264277627964.8584259691377065", "8.68892657435492927278292366187688807623888584259691377065e+40"); + plus_test ("-0.01849718975477457", "42293783764.387302167416177115129958269578", "42293783764.368804977661402545129958269578"); + plus_test ("229183.9324129997835780196022124839", "-180.13280", "229003.7996129997835780196022124839"); + plus_test ("0.0000000000000004071", "-6632946124.9569670001116089493461386479567752", "-6632946124.9569670001116085422461386479567752"); + plus_test ("-79368388.12060961147325951196402", "-8818967839841756190843118.1854748170628718251708829084816359", "-8.8189678398417562702115063060844285361313371349029084816359e+24"); + plus_test ("-96.8977819169541179624268824", "-110441943210894571.8830072797816067381187179609278660643", "-110441943210894668.7807891967357247005456003609278660643"); + plus_test ("-36873417583534015.45598304691218697443", "1060166.917377718838271", "-36873417582473848.53860532807391597443"); + plus_test ("0.000000000000002700871444392", "-0.0605349026669693089396005912402318", "-0.0605349026669666080681561992402318"); + plus_test ("-0.000000000000053692523", "-0.00000137254604803", "-0.000001372546101722523"); + plus_test ("1074227134372692301132209354432413147.1963324", "0.000000000000003598619851546479146545077911695828898095102737795956459", "1.074227134372692301132209354432413147196332400000003598619851546479146545077911695828898095102737795956459e+36"); + plus_test ("-1017687657058637575723357458862923106911128795220693738771601", "4258563010.69702", "-1.01768765705863757572335745886292310691112879522068948020859030298e+60"); + plus_test ("15695318372.722371", "-7262689556596731591510081797054945.08235892482", "-7.26268955659673159151006610173657235998792482e+33"); + plus_test ("-0.184121579717", "-0.00000000000032197634799642162905185759509417879", "-0.18412157971732197634799642162905185759509417879"); + plus_test ("496711464563303349082978268361607314429719423836547893298", "0.00780349823846259456540557", "4.9671146456330334908297826836160731442971942383654789329800780349823846259456540557e+56"); + plus_test ("-303514.82542426177461216895784715957208157971", "-0.0000000000000010372854153009492220571724887918212517847890822413245347", "-303514.8254242617746132062432624605213036368824887918212517847890822413245347"); + plus_test ("-34126709757832", "-1034.8105337", "-34126709758866.8105337"); + plus_test ("-557553079116126732746.60346222066", "-194401.4", "-557553079116126927148.00346222066"); + plus_test ("5", "13969995", "13970000"); + plus_test ("0.000000000024420167617316425311147207326564663249988502924425073", "58388856055235574885008260342295638772198164.947520", "5.8388856055235574885008260342295638772198164947520000024420167617316425311147207326564663249988502924425073e+43"); + plus_test ("-1952712333.155776956436338241", "-0.000000000000001787", "-1952712333.155776956436340028"); + plus_test ("0.000000000000000000442399285756922519285614916177278059874646382070215708393687", "-0.0000000000007944556433362323923998778322490216082668198093259", "-7.94455200936946635477358546634105430988759934679517929784291606313e-13"); + plus_test ("-17.91", "1176950886190171466875.8668061191330515772843337822020031191", "1.1769508861901714668579568061191330515772843337822020031191e+21"); + plus_test ("157077985623370359640124976052501925", "28604427989766282.76371", "1.5707798562337035966872940404226820776371e+35"); + plus_test ("7453449.6233221933856360936994951958191632578932339027257", "7220.0", "7460669.6233221933856360936994951958191632578932339027257"); + plus_test ("19787312872.5997045141158923178398412505666161654557403133090", "-37306481586787392775866703659600367821024385.6498012", "-3.7306481586787392775866703659600348033711513050096685884107682160158749433383834544259686691e+43"); + plus_test ("0.0036377269513631890696573602180806431948860786178658756", "2028146793266265751425109925774562808347846641", "2.0281467932662657514251099257745628083478466410036377269513631890696573602180806431948860786178658756e+45"); + plus_test ("-69329355007729552.734184155872579911364124970", "49428086084838561002968128.908102465415944072794710779766855", "4.9428086015509205995238576173918309543364161430585809766855e+25"); + plus_test ("5.236129243946948546627393853048424524035753709977", "1458.28382091564243822112", "1463.519950159589386767747393853048424524035753709977"); + plus_test ("-125770.7986824578099574150670482067998529", "-54536494221899508990432759126.5854", "-5.45364942218995089904328848973840824578099574150670482067998529e+28"); + plus_test ("0.0000000000000000040282063397187671534478", "42.9342796393702", "42.9342796393702000040282063397187671534478"); + plus_test ("112255.6473762401", "625578631883141131859950104709.402446232383239610277", "6.25578631883141131859950216965049822472483239610277e+29"); + plus_test ("0.0000000000008204051137050998759261498906577146164344577915568026", "-914503544747584022218019464876", "-9.145035447475840222180194648759999999999991795948862949001240738501093422853835655422084431974e+29"); + plus_test ("0.000000000000032086696834814061554271827918462166063", "-7", "-6.999999999999967913303165185938445728172081537833937"); + plus_test ("-16102511193600.208625575", "0.0000000005921920429652733476192339", "-16102511193600.2086255744078079570347266523807661"); + plus_test ("0.05330917360748068", "-1387662245.82971965501508", "-1387662245.77641048140759932"); + plus_test ("332566083814742507.4381", "50225079040717.5", "332616308893783224.9381"); + plus_test ("0.0535616342876656884145", "40.302980205257854", "40.3565418395455196884145"); + plus_test ("2.095810329351761236733504648511", "1291032886241879180795380.39652395418615", "1.291032886241879180795382492334283537911236733504648511e+24"); + plus_test ("76.93666308278743385854202793941924424687995851136", "-0.0000031951856193404", "76.93665988760181451814202793941924424687995851136"); + plus_test ("-4089192.401545276102326047095158140681", "0.0000000000294587249643456047378078626482043840305033", "-4089192.4015452760728673221308125359431921373517956159694967"); + plus_test ("-0.0000000026917607386", "-0.000000001463738085548829246226730", "-4.15549882414882924622673e-9"); + plus_test ("5997.3860262975745", "-9.2570184551997909", "5988.1290078423747091"); + plus_test ("-0.0000001736810132395059213491577845055187737", "-16125521840386.2", "-16125521840386.2000001736810132395059213491577845055187737"); + plus_test ("-12.393", "-959175810182.97", "-959175810195.363"); + plus_test ("0.000000000000000012703677534683229539552879126254493256638930817", "-162613165341774647773791411159812774229455.506", "-1.62613165341774647773791411159812774229455505999999999999987296322465316770460447120873745506743361069183e+41"); + plus_test ("5765801580384047256456488623813074.84286854632242004465357", "165435022359303094.00576799365464765649", "5.76580158038404742189151098311616884863653997706770114357e+33"); + plus_test ("0.000024851933157201952923401889849591044056443558822429", "-19872544695921164383628718578914483460945374183201070203", "-1.9872544695921164383628718578914483460945374183201070202999975148066842798047076598110150408955943556441177571e+55"); + plus_test ("15967162444205725.5835876977581985895876178", "-22.09383479755539543658379", "15967162444205703.4897529002028031530038278"); + plus_test ("-1895.5870000978149", "158456457583275411.151255931089745677273050725", "158456457583273515.564255833274845677273050725"); + plus_test ("0.00000000000000006613200838614468668274572771438132", "0.000000000000009799052946232089973195569084478957663245622", "9.865184954618234659878314812193338983245622e-15"); + plus_test ("-0.00007217386", "-30380533.92750742177144456679338699", "-30380533.92757959563144456679338699"); + plus_test ("49321761839.8798408956884550", "104924407952098597601614114560902417392737539279.14066", "1.04924407952098597601614114560902417442059301119020500895688455e+47"); + plus_test ("-1691047173618367369.8797144744337845447480409090470639328", "-10750", "-1691047173618378119.8797144744337845447480409090470639328"); + plus_test ("-16791796.527002378128880210996658740114552744738867694", "115759936860192797305173026", "1.15759936860192797288381229472997621871119789003341259885447255261132306e+26"); + plus_test ("-1029316.894", "261548573279697971.910", "261548573278668655.016"); + plus_test ("0.0001296647057215427680944560864883468441013790931695", "-1054.824421", "-1054.8242913352942784572319055439135116531558986209068305"); + plus_test ("-46699431235320232532.67509849580", "0.000008979993955818623", "-46699431235320232532.675089515806044181377"); + plus_test ("-6298558991125571.36653922609195960880571", "-4113889298860378827260223247091017172.9329596", "-4.11388929886037882726652180608214274429949882609195960880571e+36"); + plus_test ("-2336086975140170284498.42499016188003935830", "1457086105105141790243380324424465.1603058805177211619", "1.4570861051028057032682401541399667353157186376818036e+33"); + plus_test ("13584368794590929.65056685978986415743426966", "1.22576526919", "13584368794590930.87633212897986415743426966"); + plus_test ("-1327351.46438658329883133911209577075273465014", "0.000000000005775966498832314718", "-1327351.46438658329305537261326345603473465014"); + plus_test ("-516531363720634698623139507801786560806", "-137346717602427886117612615306931.7600975293129786", "-5.165315010673523010510256254144018677377600975293129786e+38"); + plus_test ("-497191321049479298.6006597", "-1047994963280.836414", "-497192369044442579.4370737"); + plus_test ("-0.0000000000000002185586000243939351096925920847", "-0.0000000000009048521726041772916157", "-9.050707312042016855508096925920847e-13"); + plus_test ("6016595778895316729168438939349.8686687192", "5526181676412323789926982786789.74580518160", "1.15427774553076405190954217261396144739008e+31"); + plus_test ("3.0095", "-0.0000000000005426618174200484334", "3.0094999999994573381825799515666"); + plus_test ("-68807659807110289490038532736.1520217818672205564919342", "-523349129605691396252486008533.3780711514", "-5.921567894128016857425245412695300929332672205564919342e+29"); + plus_test ("-113364492557824.61981595", "-4469693.046218916056590", "-113364497027517.66603486605659"); + plus_test ("-0.00000000000164215561823273145124136513441258", "-4973023665107453759495929363162.8237739698", "-4.97302366510745375949592936316282377396980164215561823273145124136513441258e+30"); + plus_test ("35.9888417583081351968218538", "-14915.870931400193663433176830", "-14879.8820896418855282363549762"); + plus_test ("-2331.988493276549717942", "0.00000000000141823854809196715", "-2331.98849327654829970345190803285"); + plus_test ("-11371.3496728385913350997078680648168992940913566777190", "-2397016.60966829969942721806170794681095113", "-2408387.959341138290762317769576011627850424091356677719"); + plus_test ("3383157742756319045795578039331661679255299628783006818", "112.431", "3.383157742756319045795578039331661679255299628783006930431e+54"); + plus_test ("0.1199645670415880693938857655777249", "-44832078259011.6759", "-44832078259011.5559354329584119306061142344222751"); + plus_test ("-0.000074515", "0.000000000000822522086975415741166136452344243213662423269", "-0.000074514999177477913024584258833863547655756786337576731"); + plus_test ("-316363904412657873.82463253361", "6029091127919181004154328007134773005154138.82694336", "6.02909112791918100415432769077086859249626500231082639e+42"); + plus_test ("-2948135076910640.90049", "5761548892564240496281853871829076765874909400", "5.76154889256424049628185387182612863079799875909951e+45"); + plus_test ("58372178458636173167435580966904.9", "-0.0000000000000000069124", "5.83721784586361731674355809669048999999999999999930876e+31"); + plus_test ("-1030343159494169", "1.17687493992567335710622120899406991559327721710205732290350", "-1030343159494167.8231250600743266428937787910059300844067227828979426770965"); + plus_test ("-364369717.74", "1051.2619702659448865", "-364368666.4780297340551135"); + plus_test ("-14700708312683508124053613483934", "169203221928.16495122822999668712809968967", "-1.470070831268350812388441026200583504877177000331287190031033e+31"); + plus_test ("-7136587497.6210794583359262865362602", "0.000000000000000943850201474525427491095625665832833080048218", "-7136587497.621079458335925342686058725474572508904374334167166919951782"); + plus_test ("543052781691689788023396133911013281045", "-0.14820404005794765846900406675812481", "5.4305278169168978802339613391101328104485179595994205234153099593324187519e+38"); + plus_test ("110663366765368921.0866334279485908190131223654028", "36120532541712948438741340607422573739675370", "3.61205325417129484387413407180859405050442910866334279485908190131223654028e+43"); + plus_test ("380658.3", "-2065165618.375157186233", "-2064784960.075157186233"); + plus_test ("-17457782.9819883601", "942920318414698402627635914937488163385896", "9.429203184146984026276359149374881459281130180116399e+41"); + plus_test ("8629631914097.8362771910", "-4.034", "8629631914093.802277191"); + plus_test ("288071238497.1261824965452941330232", "1052", "288071239549.1261824965452941330232"); + plus_test ("78997931984403436704001039530.3024629578317209", "0.000343258751917970970676216110596811", "7.8997931984403436704001039530302806216583638870970676216110596811e+28"); + plus_test ("-2.25", "111337103342848345761099521859657477916973094722775.5951", "1.113371033428483457610995218596574779169730947227733451e+50"); + plus_test ("-1", "0.00000332919915648989163252787357017400732468280", "-0.9999966708008435101083674721264298259926753172"); + plus_test ("-16445332684883.22825", "-0.00000000000000012333460118914012271577551957339747141406", "-16445332684883.22825000000000012333460118914012271577551957339747141406"); + plus_test ("-31175222200344385644218736866483.2725089", "-3327088982173967964155665008077925357598", "-3.3270890133491901645000506522966622240812725089e+39"); + plus_test ("-1252051655804", "0.00000000264882354935793977626553543541414436396686075411715667541", "-1252051655803.99999999735117645064206022373446456458585563603313924588284332459"); + plus_test ("-0.0000000000000000000158865062136901543406179703019550687767953302019945978597", "1020942680079952748611824.185392743482507618487632660693", "1.0209426800799527486118241853927434825076184717461544793098456593820296980449312232046697980054021403e+24"); + plus_test ("-35898806424024840518", "1209273562014126837", "-34689532862010713681"); + plus_test ("0.00000000000000000063529152935584224393904", "0.000019230208356140680362397434569942324862475539", "0.000019230208356141315653926790412186263902475539"); + plus_test ("-33441632499.7607713725472193611665003418", "106413", "-33441526086.7607713725472193611665003418"); + plus_test ("-4.75634838524050727239455330", "0.00000222716225977301166476", "-4.75634615807824749938288854"); + plus_test ("-852521157106518977717317.959654055992630233016032351392", "-0.0000000000000000017823481878995487452645517241108404", "-8.525211571065189777173179596540559926302347983805392915487452645517241108404e+23"); + plus_test ("161134348969753.7818551261464", "14778587228410.68", "175912936198164.4618551261464"); + plus_test ("-369981.81", "434675717524696906710428616481.721", "4.34675717524696906710428246499911e+29"); + plus_test ("-2332861219206834364527.48368", "19149287947261990184026730628.5871", "1.914928561440077097719236610110342e+28"); + plus_test ("-0.00000000000000116369456154760102530923593100791059354951050808242146", "-81782712838440550651059561384159250420604069689985758.44650", "-8.178271283844055065105956138415925042060406968998575844650000000000116369456154760102530923593100791059354951050808242146e+52"); + plus_test ("-351.475892554479058", "-447032714556907039546625862961730678.7", "-4.47032714556907039546625862961731030175892554479058e+35"); + plus_test ("-0.0000000000005359206060244700158823650", "-0.0000000000000000003863162428565", "-5.35920992340712872382365e-13"); + plus_test ("2", "-0.00000000000000005866552459931", "1.99999999999999994133447540069"); + plus_test ("639324673786985183757123973071419.69", "0.000000000000000105695777609583429374882466829273", "6.39324673786985183757123973071419690000000000000105695777609583429374882466829273e+32"); + plus_test ("4294088930905823047177509660568176369997.858000657", "0.00000000190441051986057354054684652513790", "4.2940889309058230471775096605681763699978580006589044105198605735405468465251379e+39"); + plus_test ("81952.93187082317", "-3354935.93728410227615128341536014594398120471", "-3272983.00541327910615128341536014594398120471"); + plus_test ("22.4490", "-60024492865596734181918135790584892061552368", "-6.0024492865596734181918135790584892061552345551e+43"); + plus_test ("82042481481926776214220048262853946881327742847", "-8538522144679468521.62573001550037", "8.204248148192677621422004825431542473664827432537426998449963e+46"); + plus_test ("-4821483203793.49440644526137664", "-0.000004487693742178692907867", "-4821483203793.494410932955118818692907867"); + plus_test ("6.110882058707251378846629539352045716", "-418562303949284087382062254279932829.02", "-4.18562303949284087382062254279932822909117941292748621153370460647954284e+35"); + plus_test ("-0.00000000000000003499186801952540123648020382", "-65374665927301037435189057407673135706346962", "-6.537466592730103743518905740767313570634696200000000000000003499186801952540123648020382e+43"); + plus_test ("-117.491", "-35267005558911708.73667772625498979866", "-35267005558911826.22767772625498979866"); + plus_test ("-1305188291195132404665648036283152", "-48817.0270426507883050419161", "-1.3051882911951324046656480363319690270426507883050419161e+33"); + plus_test ("-332959.31909282242075209", "-0.031741578746012412923914", "-332959.350834401166764502923914"); + plus_test ("-17.1394344634", "-0.00000229726550687811210739718966133", "-17.13943676066550687811210739718966133"); + plus_test ("810780860238944784555214657769411196386947.54", "4.92693024082761080", "8.107808602389447845552146577694111963869524669302408276108e+41"); + plus_test ("-1048758998827591442543266558.0106480081485758097", "-94.076883827230674850527236", "-1.048758998827591442543266652087531835379250660227236e+27"); + plus_test ("704447412485396882279061367382703398302182548530873140734.6", "6.1441561936492973077606028", "7.044474124853968822790613673827033983021825485308731407407441561936492973077606028e+56"); + plus_test ("-9", "14240110.34382757891637692908119148", "14240101.34382757891637692908119148"); + plus_test ("-2.17399974", "-7.782135494523838665700444005467417478", "-9.956135234523838665700444005467417478"); + plus_test ("423939022366100.1303605421315647706922839530", "-148861179543023924.831222210", "-148437240520657824.700861667868435229307716047"); + plus_test ("-524884.99509383", "-8951228003529351713733925073.1782", "-8.95122800352935171373444995817329383e+27"); + plus_test ("-0.020796655578405", "368497345356.14", "368497345356.119203344421595"); + plus_test ("-1963433333827228036507.697737169766323166530902591", "-957846652507696110363", "-2.921279986334924146870697737169766323166530902591e+21"); + plus_test ("0.000001311", "-3369850772751642763158244569.8616096", "-3.369850772751642763158244569861608289e+27"); + plus_test ("4794.0", "-1192644326919702801393470130877439453668.01186106844617097", "-1.19264432691970280139347013087743944887401186106844617097e+39"); + plus_test ("-1021147107953300067786801337030572.294185965004276223", "-39540941781.309992029344807273", "-1.021147107953300067786840877972353604177994349083496e+33"); + plus_test ("-7044613941200081350320568560980315.797014086930", "-22.98", "-7.04461394120008135032056856098033877701408693e+33"); + plus_test ("0.0000090121286833758732990328348454967225169260742236026", "990483291162514723456237581.12", "9.904832911625147234562375811200090121286833758732990328348454967225169260742236026e+26"); + plus_test ("-26.736", "-50947076888389365.5543516223716887", "-50947076888389392.2903516223716887"); + plus_test ("0.00000000019379047403352963512763584433797131380295276579883848", "351648601080041724641347981598154974909945367236167357297", "3.5164860108004172464134798159815497490994536723616735729700000000019379047403352963512763584433797131380295276579883848e+56"); + plus_test ("-13975.741", "373024094875867055483269157586785.905835293458170355", "3.73024094875867055483269157572810164835293458170355e+32"); + plus_test ("-299.92", "-11054263.84681950544", "-11054563.76681950544"); + plus_test ("-1406576080.91", "-11.8662", "-1406576092.7762"); + plus_test ("0.00000000001874641346", "0.00000000000000486443153897052258296310659171509120488311396238084788", "1.875127789153897052258296310659171509120488311396238084788e-11"); + plus_test ("1205.34627565144026871663097", "1249.7837058417060142511952909501288363112688", "2455.1299814931462829678262609501288363112688"); + plus_test ("-4.39", "545534", "545529.61"); + plus_test ("-2916468.72915302357477562892725843748", "-78412.481653315", "-2994881.21080633857477562892725843748"); + plus_test ("1", "1157759807263227857254563934897", "1.157759807263227857254563934898e+30"); + plus_test ("-104251055525855379611.30896754", "-16664469.85", "-104251055525872044081.15896754"); + plus_test ("0.00000000000261749383970", "-11939719.526854341", "-11939719.5268543409973825061603"); + plus_test ("-0.0000000090677528576752114233457187000354303371555029332226226", "-0.0000054807823719971287602588898631186660", "-0.0000054898501248548039716822355818187014303371555029332226226"); + plus_test ("-116485999654579416404.1770995047267", "-1056453978415557512986444149851256428790784", "-1.0564539784155575129865606358509110082071881770995047267e+42"); + plus_test ("129605008229833515.738549411440577906", "-2966237394191984.299672767366997401377001384652892925560", "126638770835641531.43887664407358050462299861534710707444"); + plus_test ("38233691542980267658744125", "22629558718.76465481003636074", "3.823369154298029028830284376465481003636074e+25"); + plus_test ("-8533862254008034912764735.004170692", "0.00000000000002245605992555542408030328467190", "-8.5338622540080349127647350041706919999775439400744445759196967153281e+24"); + plus_test ("10553.65", "-0.00000049686576247164541003858453804", "10553.64999950313423752835458996141546196"); + plus_test ("-51954241699518441712828334574084047.068703826124873318564", "395669535095772787686098943620277851996703327535", "3.95669535095720833444399425178565023662129243487931296173875126681436e+47"); + plus_test ("-23122182991889866069296720914272472", "58837368013.02465555264983929119523508427711325303360206", "-2.312218299188986606929666207690445897534444735016070880476491572288674696639794e+34"); + plus_test ("0.00000000397559426", "-371081877267739.52921835969493214299461", "-371081877267739.52921835571933788299461"); + plus_test ("-1318006475307606890136618572999490756076602355.97", "632863313713664.4745327432714901307248136075", "-1.3180064753076068901366185729988578927628886914954672567285098692751863925e+45"); + plus_test ("-23439088778534600.8640688389613841", "16", "-23439088778534584.8640688389613841"); + plus_test ("21557692582940554231371458355850911425", "54.498980233719", "2.1557692582940554231371458355850911479498980233719e+37"); + plus_test ("-15841465782.23786068092567135289691949618", "-0.06849728241", "-15841465782.30635796333567135289691949618"); + plus_test ("0.0000000001081504196289698603171046129405333329174", "-1442109.88437873202181493001814004974080724589", "-1442109.8843787319136645103891701894237026329494666670826"); + plus_test ("-0.00000000001647", "282001122341733786209765075874760.2208698094645570", "2.82001122341733786209765075874760220869809448087e+32"); + plus_test ("99430939117933248217120.374139300891394898188889827982140", "0.00000000000000029379095872418716620806971498023154656656222336363941", "9.943093911793324821712037413930089139519197984855216930620806971498023154656656222336363941e+22"); + plus_test ("32.0", "-27722898.863296087173", "-27722866.863296087173"); + plus_test ("156106106814604967305174465335864706671583.70259565626257897", "-13917199525611", "1.5610610681460496730517446532194750714597270259565626257897e+41"); + plus_test ("0.000000000000012756394816575404961299", "7517.05", "7517.050000000000012756394816575404961299"); + plus_test ("16.12", "-420571324087664540438479.845", "-4.20571324087664540438463725e+23"); + plus_test ("2418460022267862452.4", "41.457986607816857109", "2418460022267862493.857986607816857109"); + plus_test ("148234016059793326337.640", "11.03882097673491443395332118707526905738860", "148234016059793326348.6788209767349144339533211870752690573886"); + plus_test ("590735628836667929357165331457381099840530274992323824", "-35.537", "5.90735628836667929357165331457381099840530274992323788463e+53"); + plus_test ("-91.305944234004155285775629491875981263029245580213970209", "-0.10312097106790790600287727466092359571108", "-91.409065205072063191778506766536904858740325580213970209"); + plus_test ("351474.4", "-409.9417808528084374954481354713200702998578", "351064.4582191471915625045518645286799297001422"); + plus_test ("0.00000000000000000268393845813954", "232389665408735", "232389665408735.00000000000000000268393845813954"); + plus_test ("0.000085437842245145501815518395009858127503498", "-228105253425581861", "-228105253425581860.999914562157754854498184481604990141872496502"); + plus_test ("113814704131627223061784854080682", "-0.00000000000000495917538613516689674", "1.1381470413162722306178485408068199999999999999504082461386483310326e+32"); + plus_test ("-104597143810254066499700", "-1320192161655050.18", "-1.0459714513044622815475018e+23"); + plus_test ("-808665613705806138579.9252448473426840", "-0.000000000463", "-808665613705806138579.925244847805684"); + plus_test ("-10652723155657612558630867.3337753966347961185835734448179360", "-1074473046919580926107363821097544239456092192199611", "-1.074473046919580926107363831750267395113704750830478333775396634796118583573444817936e+51"); + plus_test ("30.873", "-2877.8117541278", "-2846.9387541278"); + plus_test ("280550729.708", "15.0", "280550744.708"); + plus_test ("-165734300554398023710.52770", "44297520438", "-165734300510100503272.5277"); + plus_test ("0.00543767539426789750178885690131013907", "9444317260148.44999438456024566306", "9444317260148.45543205995451356056178885690131013907"); + plus_test ("3.906258287", "-101756814758789018743117855884.8664231869", "-1.017568147587890187431178558809601648999e+29"); + plus_test ("0.0000000000466441425", "-7925237.129420", "-7925237.1294199999533558575"); + plus_test ("-8793636.6549628644427603574935", "-168717.26735969139", "-8962353.9223225558327603574935"); + plus_test ("16229113210072", "-1.66", "16229113210070.34"); + plus_test ("-274", "5543767652349683046313915.6084123313153941360541851", "5.5437676523496830463136416084123313153941360541851e+24"); + plus_test ("697036466897177207083246447.2299025435243117175710148553", "0", "6.970364668971772070832464472299025435243117175710148553e+26"); + plus_test ("-46.3370059936", "10533716878.34472089", "10533716832.0077148964"); + plus_test ("10374324.55170082277424656551004841876", "27751581009979569031375460467333.939804424", "2.775158100997956903137547084165849150524677424656551004841876e+31"); + plus_test ("-26.207", "-0.0000000000000031037896000885366", "-26.2070000000000031037896000885366"); + plus_test ("0.00000008010", "18.21", "18.2100000801"); + plus_test ("4842596615336.5226989764856168408", "693189245669296426406216", "6.931892456741390230215525226989764856168408e+23"); + plus_test ("-0.0000000000000851077176424519554600753331960725209384331282631736", "-0.00000000032044460270651016683689341535385222681285333039475669967745", "-3.2052971042415261879235349068704829933379176352301987327745e-10"); + plus_test ("-45733275107439777530880615832524693352357490.41665", "-9002296385923358097661509924413196524814431890711992169", "-9.00229638596909137276894970194407714064695658406434965941665e+54"); + plus_test ("-0.00000000000000000156439224707874070263669523081315808081534434429692222172674", "0.00000000000000000004291737953641998", "-1.52147486754232072263669523081315808081534434429692222172674e-18"); + plus_test ("0.00000000198897553988595375857564654222391162510361117709636863903", "-10.007927501632868864725076236004253517352", "-10.00792749964389332483912247742860697512808837489638882290363136097"); + plus_test ("-0.0000000000000000823558627325", "0.000000118691410206725495", "1.186914101243696322675e-7"); + plus_test ("-6276754.7824301277909646649809", "-2300076804510676.99579229048", "-2300076810787431.7782224182709646649809"); + plus_test ("-1477245255838368818869339352082881086281616770202", "260.2", "-1.4772452558383688188693393520828810862816167699418e+48"); + plus_test ("-69931380572295540885943992404507908544953094482.1746111", "6493037948200.611359", "-6.99313805722955408859439924045079020519151462815632521e+46"); + plus_test ("-32658268317284858182413184281435089775970459834815.66170", "-0.000000000000342812261960547876364567574654890642067512409498", "-3.2658268317284858182413184281435089775970459834815661700000000342812261960547876364567574654890642067512409498e+49"); + plus_test ("-226963.2043", "-496091", "-723054.2043"); + plus_test ("-103912.138149562507", "-62.4", "-103974.538149562507"); + plus_test ("-2.2", "-192.817990", "-195.01799"); + plus_test ("222123997760197158313997248315192554300081415.469", "0.000000000012667203104882341577765952699206164", "2.22123997760197158313997248315192554300081415469000000012667203104882341577765952699206164e+44"); + plus_test ("131249246364141493511095170397038.4", "12005458301968.10861506047414540", "1.312492463641414935231006286990065086150604741454e+32"); + plus_test ("-6103920949696.969088220006245342108451032227019740900968", "-8610778484315116167388258277248987747817680", "-8.610778484315116167388258277255091668767376969088220006245342108451032227019740900968e+42"); + plus_test ("10233395574.3608814100201268800987627468958287183008442076", "2066089654793590701954", "2.0660896548038240975283608814100201268800987627468958287183008442076e+21"); + plus_test ("1054800822950425857387.3975342786210238442171979019733049494", "268210275857404541391650497878689.609927", "2.682102758584593422146009237360770074612786210238442171979019733049494e+32"); + plus_test ("0.0000000000000000005358606622145297463680878712323075380428171088961554207868", "21625227877279.763", "21625227877279.7630000000000000005358606622145297463680878712323075380428171088961554207868"); + plus_test ("0.0000000000000000038580163605093667407219262159717409196345947134", "26563841772035062352711123348805920.54972", "2.65638417720350623527111233488059205497200000000000038580163605093667407219262159717409196345947134e+34"); + plus_test ("0.0040413342647577519898276000725944344977704", "56147277645684.4193402", "56147277645684.4233815342647577519898276000725944344977704"); + plus_test ("4364458714.2682", "316321.1973", "4364775035.4655"); + plus_test ("-3442146624234450575848597310365404902.6280403978894069", "9600031560472464093658037177768209030975667.931701", "9.6000281183258398592074613291708986655707653036606021105931e+42"); + plus_test ("0", "-549407495633380422499474.55571333", "-5.4940749563338042249947455571333e+23"); + plus_test ("-37479660228.14714", "-1.75484", "-37479660229.90198"); + plus_test ("-26584742.26667643650870662855172761916351306", "-0.00000000000000187865453650020", "-26584742.26667643650870850720626411936351306"); + plus_test ("-58.001178998055584357671459355923764911439509141805", "-50935290675172160.97675237172778455", "-50935290675172218.977931369783368907671459355923764911439509141805"); + plus_test ("-0.00000000000000000034052335201240933961815921", "0.025619781818507958387831333698180", "0.02561978181850795804730798168577066038184079"); + plus_test ("-0.00000000000000008274050377833639593377852710426025817", "242065602.8095741290098057721936971088", "242065602.80957412900980568945319333046360406622147289573974183"); + plus_test ("-221524.27663105095567467682134", "-2258391802026441769618755584758918156197711875845897035768", "-2.25839180202644176961875558475891815619771187584589725729227663105095567467682134e+57"); + plus_test ("-0.0000000017893705878914010575881803996966689837370969008155370432", "-0.00000297259632962708146112815320511201052652", "-0.0000029743857002149728621857413855117071955037370969008155370432"); + plus_test ("-0.00000000000406710488085149344523", "-278522.037156181204952078706297015294979477127184963777538", "-278522.037156181209019183587148508740209477127184963777538"); + plus_test ("11973889508.580802", "1871682273132124693", "1871682285106014201.580802"); + plus_test ("0.0000000000000000033353113686655236115870191745605104608147650", "11625246.252195", "11625246.252195000000000003335311368665523611587019174560510460814765"); + plus_test ("-5318806059561785713953", "-0.0000000000000012146467404768921900862164865027461683067265853186116641", "-5.3188060595617857139530000000000000012146467404768921900862164865027461683067265853186116641e+21"); + plus_test ("-309.3", "-0.00000000000006218919975652358743864716", "-309.30000000000006218919975652358743864716"); + plus_test ("-1874575484506897571974850167460839993082172311.68616497703", "-0.0000000942559460072629437399413345982786975068449962297", "-1.8745754845068975719748501674608399930821723116861650712859460072629437399413345982786975068449962297e+45"); + plus_test ("-21", "-0.0000000000000397635708714407055658459", "-21.0000000000000397635708714407055658459"); + plus_test ("-1302141913979670987068496048", "-0.0000002335314231823837373064", "-1.3021419139796709870684960480000002335314231823837373064e+27"); + plus_test ("-8663116.663729764613058828364567651431", "609.8", "-8662506.863729764613058828364567651431"); + plus_test ("122805001870129.621993", "546.98190600859999", "122805001870676.60389900859999"); + plus_test ("132753213.74892150691420521615", "-2356523694.1", "-2223770480.35107849308579478385"); + plus_test ("-255163.150", "-22815991158761.86650580", "-22815991413925.0165058"); + plus_test ("0.00000000000000009834358", "27695886984688431669.7", "27695886984688431669.70000000000000009834358"); + plus_test ("0.000000000018235737891993707047558745084", "-0.0000027294384492006549909198104817456693956836003182", "-0.0000027294202134627629972127629230005853956836003182"); + plus_test ("-13126.0", "0.0000616967410806266771382642088892371968", "-13125.9999383032589193733228617357911107628032"); + plus_test ("720874433286547149.29011960", "-0.0000000000175150100264717579452770317006888697250136125181729", "720874433286547149.2901195999824849899735282420547229682993111302749863874818271"); + plus_test ("2905655849177158035847281414357098453.291834904651188", "-3", "2.905655849177158035847281414357098450291834904651188e+36"); + plus_test ("0", "-1475966921783333685644104279864374261258954134383883947232", "-1.475966921783333685644104279864374261258954134383883947232e+57"); + plus_test ("472816652216998927468244178551354910167729088.966726827004415", "177527765826935.24974826329344", "4.72816652216998927468244178551532437933556024216475090297855e+44"); + + plus_test ("-274.5620579869", "78329265787241405566496082713913236369654243529457197134761863524633387852302663270044189362081880226597475301.025458805177854094773", "7.8329265787241405566496082713913236369654243529457197134761863524633387852302663270044189362081880226597475026463400818277854094773e+109"); + plus_test ("133883508068780764759485.5683529446087107456184862039990020823869300840561329290914475177233060368335", "-14.11123105188787211647630936581927502853383341149933197", "1.338835080687807647594714571218927208386291421768381797270538530966725568009590914475177233060368335e+23"); + plus_test ("-3199032706015694214818.7992938105687331661", "-7.87195", "-3.1990327060156942148266712438105687331661e+21"); + plus_test ("0.0000000000002295193152912890007348152875969581183350688584884783586480814376317641609774249", "11968142585488462774385062859935899134826448280897530108166161884029199683990896601020507477.320319", "1.19681425854884627743850628599358991348264482808975301081661618840291996839908966010205074773203190000002295193152912890007348152875969581183350688584884783586480814376317641609774249e+91"); + plus_test ("429850894793934827539600845168772.8751965913520453918272995739036873865390677578368381581396285338126446790691976041147571854", "-0.00000022801170604582813255353545523124229818428689101495876171494691321154484217536764378725027141584278379447842816929409", "4.2985089479393482753960084516877287519636334033934599916702036823215529676957354994714318086681886573146752435542874711339814972858415721620552157183070591e+32"); + plus_test ("0.12630479339914084342606977043625120835780195245007714525361728866248064543254204354136033894", "-57300622033341549450152055498951631223725420435.499102954248138500376888848777133938393663605560964812373961734244028047764768563", "-5.730062203334154945015205549895163122372542043537279816084899765695081907834088273003586165311088766712034444558154740233222651945863966106e+46"); + plus_test ("-0.000000000106720353331827", "4068913567129614779805806799030791537958519754660357531521550859320707940360600331986.6231458520200147185933974407694787756642025356767729344", "4.0689135671296147798058067990307915379585197546603575315215508593207079403606003319866231458519132943652615704407694787756642025356767729344e+84"); + plus_test ("1481.538992", "69979426854562140198395309", "6.9979426854562140198396790538992e+25"); + plus_test ("-481304712134904590633063526049619366756244902183946511856972789126658742068757286270722005910044731533367098.3473844315585478022917336214585042983934", "-9035651250061107335979601717303646.90745896455428", "-4.813047121349045906330635260496193667562449021839465118569727891266587420777929375207831132460243332506707452548433961128278022917336214585042983934e+107"); + plus_test ("5998474356563587104327566.3263164708068830115821012882772814947553985814910059469343679580428581460206", "-18057674949163421506117960386922177149977514555439908.159223871467357039682517588208442666597309817931705956866923", "-1.80576749491634215061179603809237027934139274511123418329074006604740281004162999311611718419112364407000099325550419571418539794e+52"); + plus_test ("641786663107582574187375964645432626362556087596248087198360354.064673626930039", "106200869851859350.797479350269434371025574271015473262363560762378677", "6.41786663107582574187375964645432626362556087702448957050219704862152977199473371025574271015473262363560762378677e+62"); + plus_test ("5280129522068699720461117125312358415979019162822.4201114673061632909516268898605984", "-205756343429440469562776948821275114561497830505910222682069.31376408871563202774509593696096457576461665289977493017361973671523262", "-2.0575634342416034004070824910081399743618547208993120351924689365262140946873679346904710036617576461665289977493017361973671523262e+59"); + plus_test ("-0.0000913314112194237567199921654806413644776347028968332389534560276307374133431440995704693847453686", "1.1", "1.0999086685887805762432800078345193586355223652971031667610465439723692625866568559004295306152546314"); + plus_test ("-2207121715490045.58", "-3295992738515109953967433108145888727360416859361202947062658620012196801551806622678192.686847483520554027598236734312161", "-3.295992738515109953967433108145888727360416859361202947062658620012196803758928338168238266847483520554027598236734312161e+87"); + plus_test ("61759391974251637508280834914990322126219035347147", "64943964591891233846314007885335.444346971691325618829", "6.1759391974251637573224799506881555972533043232482444346971691325618829e+49"); + plus_test ("-5540305476191589915887668399303961108947288288224548320", "0.0000294476901910227000564933914711035233697829465135452464583418791303186801762813", "-5.5403054761915899158876683993039611089472882882245483199999705523098089772999435066085288964766302170534864547535416581208696813198237187e+54"); + plus_test ("181474807531688120166683732972009536.64969213", "-3175669398983347716917468673419554.2177188765670101302869684383001638592478444069723506434104220110726821325272", "1.782991381327047724497662642985899824319732534329898697130315616998361407521555930276493565895779889273178674728e+35"); + plus_test ("-12493662650.119745851863596480945654415210619543132", "399561145206467750513891779469494975331120274361101613876792177943730662310953547064702574.65756653452860298452313916684555", "3.99561145206467750513891779469494975331120274361101613876792177943730662310953534571039924537820682665006503577484751634930456868e+89"); + plus_test ("-2166.664029173675712500257", "-0.00000000000067461152096758750665879707326349452924143528959808406172771844392251655077273026039982145730838447563291749346650348630096104418925967461686234281319", "-2166.66402917367638711177796758750665879707326349452924143528959808406172771844392251655077273026039982145730838447563291749346650348630096104418925967461686234281319"); + plus_test ("-55126691014038404667432234769742600667346582750812.76081290000540326323203936990298784699977785727177293701354598905047747033", "230955903911091180768255072886786497585594803905488997.065428", "2.3090077722007714236358764065201675498492745732273818430461509999459673676796063009701215300022214272822706298645401094952252967e+53"); + plus_test ("-12239899294934406744794741209740399921097535320596.080402725637531427417", "0.000000000000007975735707900012257888169944647551205385287889146629466680800976795", "-1.2239899294934406744794741209740399921097535320596080402725637523451681292099987742111830055352448794614712110853370533319199023205e+49"); + plus_test ("-0.00000000000000912462079748634949064954444536474698633137152955660092121181721134185040726847080723736415320180821995", "-28192491050430", "-28192491050430.00000000000000912462079748634949064954444536474698633137152955660092121181721134185040726847080723736415320180821995"); + plus_test ("5365712579646207337626428460702379954655063519", "-171091164429397358988968907423411173590072414448497446341010313844726796866187751610819558166794791576734732137347669225657216896755433103171081237", "-1.71091164429397358988968907423411173590072414448497446341010313844726796866187751610819558166794791571369019557701461888030788436053053148516017718e+146"); + plus_test ("-1981290034036713612.3587708893531360121978707494237", "438761731488571.030446306123818027751940714135233838", "-1980851272305225041.328324583229317984445930035288466162"); + plus_test ("-2755875412874743140386728151346", "2.8472810", "-2.755875412874743140386728151343152719e+30"); + plus_test ("-157.549092251345721782955172995326812019919432214305439543", "142439127771945282929407965570725127160359050662864293026220308331445962610.79480267325422", "1.42439127771945282929407965570725127160359050662864293026220308331445962453245710421908498217044827004673187980080567785694560457e+74"); + plus_test ("0.3491333927087766478511955867195720082891559879520214956234991486163801992970042826730252168795279033184196910108870648", "-756356333951812709085600894164769015473490895.271157080699", "-7.563563339518127090856008941647690154734908949220236879902233521488044132804279917108440120479785043765008513836198007029957173269747831204720966815803089891129352e+44"); + plus_test ("63261615358197872923073425992.67414929587646886049878412684052256635783684", "32232093735028677679866848653553607775797749686636316132824223211080228103818061093254438705652919", "3.223209373502867767986684865355360777579774968663631613282422321108029136543341929112736177907891167414929587646886049878412684052256635783684e+97"); + plus_test ("-0.0000000000000009295380014651692075387777504579033936499297749005685897989061480633040541931247624617087077690289771853068486993070710805656", "-74240982721590027061065744723039918113222511184444001668610337943", "-7.42409827215900270610657447230399181132225111844440016686103379430000000000000009295380014651692075387777504579033936499297749005685897989061480633040541931247624617087077690289771853068486993070710805656e+64"); + plus_test ("-38662088769617027684868436557208874287.531787", "-0.00000000000000000004404702485696046546186749454135837739919620970432790136280242735880480845505606335438999503830238610", "-3.86620887696170276848684365572088742875317870000000000000440470248569604654618674945413583773991962097043279013628024273588048084550560633543899950383023861e+37"); + plus_test ("0.0000005919093535654695188705799210533565699038", "-1050230870542550895325305037586388557344285623573695378599872476398998237594436121662.36921877939195132369", "-1.0502308705425508953253050375863885573442856235736953785998724763989982375944361216623692181874825977582204811294200789466434300962e+84"); + plus_test ("8531356548289.68", "0.0000000000010663385403102579270265567147867424805920", "8531356548289.680000000001066338540310257927026556714786742480592"); + plus_test ("-77352959873895499881.6761162233029992762254367454845614002262158269218399300505823906248006070788666306", "-0.000000763350249168968817759292626920653670602769749623937342230173000", "-77352959873895499881.6761169866532484451942545047771883208798864296915895539879246207978006070788666306"); + plus_test ("0.04585173770263682911835172946483907318715956718860423056098335799507649567731835", "-545336428117302.06514791235190", "-545336428117302.01929617464926317088164827053516092681284043281139576943901664200492350432268165"); + plus_test ("-2000777096546022469363680806530511943528746650101273997534.242598610793331542113919999385909", "-0.000000012960554065829921984561617848403788685435712387766345566655415445798299917451084000", "-2.000777096546022469363680806530511943528746650101273997534242598623753885607943841983947526848403788685435712387766345566655415445798299917451084e+57"); + plus_test ("-4637067617611402422338031964698807990446537844332708147280649406995000008716", "-3099749512371613407546572880261013353834801183114544503924317759.7679498142950006458622486041325542794064397790374869775038357487455568411693227469", "-4.6370676176145021718504035781063545633267988576865429484637639514989243264757679498142950006458622486041325542794064397790374869775038357487455568411693227469e+75"); + plus_test ("270678062855542005084307870824127678467656.762955855629442335926610514941014722825992247041", "282974792.523705817808", "2.70678062855542005084307870824127961442449286661673437442335926610514941014722825992247041e+41"); + plus_test ("-0.00000003225236579904856895487056015821433730938371824218643897684349658964835496773420825844721647906790768973764870027244455", "-0.004924810165331790880550482628308491946560589374047905819960040503118511618345", "-0.00492484241769758992911943749886865016089789875776614800639901734661510126669996773420825844721647906790768973764870027244455"); + plus_test ("-2873277.7031566090883", "369526947446567818357.08166567158618885089868282383289", "369526947446564945079.37850906249788885089868282383289"); + plus_test ("-2178986538025.6281171045", "-0.90007456268766834245637565755250114155754042861579405494550640641064108080486501982231697766610369506873393983", "-2178986538026.52819166718766834245637565755250114155754042861579405494550640641064108080486501982231697766610369506873393983"); + plus_test ("-12610827849005379185996946898193295000242048930.3057", "-50566291142615310315.413773094", "-1.2610827849005379185996946948759586142857359245719473094e+46"); + plus_test ("-0.72263391095435659584498561750405291423", "1.6716", "0.94896608904564340415501438249594708577"); + plus_test ("-0.00002308861674194925960442185653345749705673163043872636646918599512354359169533298098626366738286911364737665763586940744987791360736201819133314717054", "450814153774.5", "450814153774.49997691138325805074039557814346654250294326836956127363353081400487645640830466701901373633261713088635262334236413059255012208639263798180866685282946"); + plus_test ("-0.000000000000042613856152865288514141630996935837135169348614328862241783421937354219792185365968886244399960104759290619174907", "0.0000000000000000974480182403539706738405642564651574120855033994898433979613263953303312911354243605961011258564221775753219595811881303591336456508263682734", "-4.25164081346249345434677904326793719777572631109293723983854606109588894608942305445256482988342483371130438529474188118696408663543491736317266e-14"); + plus_test ("134411245152521998394744941365564060927709793292932748805716150.96086322753", "163717756163587942012853208387334527056988170322687172258242323330600618595724408258555875633809739823926575887736071927568012683", "1.6371775616358794201285320838733452705698817032268717225824232333073502984087693025695062057517530388485428568102900467637372883396086322753e+128"); + plus_test ("-1135858630959255507879446", "0.0000008656110212823553443864329542508631", "-1.1358586309592555078794459999991343889787176446556135670457491369e+24"); + plus_test ("-0.0000000003175675944478684925401856872596765776036876508094511873354931239253559389081387285155438349993170191128163568912691363523242026430941295514496034087951", "13806374012994737257255.1886211194405", "1.38063740129947372572551886211191229324055521315074598143127403234223963123491905488126645068760746440610918612714844561650006829808871836431087308636476757973569058704485503965912049e+22"); + plus_test ("-27708159800573272.0883231101900212685541939067996078907774725322218231069648770193298081146113593454964992974439864811", "1069672.96681867083", "-27708159799503599.1215044393600212685541939067996078907774725322218231069648770193298081146113593454964992974439864811"); + plus_test ("0.00000429880802966674008131137959417215280776628630203493369987886551523668068778978", "0.00000000077008967289490676642801409841947753617266544157841315779815188796831111777973779955219440658094362925853693153209608918067", "0.00000429957811933963498807780760827057228530245896747651211303666366712464899890755973779955219440658094362925853693153209608918067"); + plus_test ("0.0000000000000000000299565", "-73131153293465264.481", "-73131153293465264.4809999999999999999700435"); + plus_test ("133297778031366687408810593803463309652201134859997.4758048870790461770038771730220839594432975561216897245860371442353803167578892021729425784575887741", "2364940340353511166077790398873799899.851022395047720", "1.332977780313690523491509473146293874426000086598973268272821267661770038771730220839594432975561216897245860371442353803167578892021729425784575887741e+50"); + plus_test ("233341303466412748783092751385962706054310564979814063054720210979264.76320976947", "373546701810748884756.35246337986916104538633936243091901195", "2.3334130346641274878309275138596270605431056498018760975653095986402111567314933916104538633936243091901195e+68"); + plus_test ("-0.00000000000001298143460683533187542098532057471443650131347027927061505315402201377004104838055385241660827862931318282364149013913156553270415", "-3144.73816785889762413352612917538951639565049692192872179639873257494799763607259781490677831922245389370215618142714372657806598580728875889749", "-3144.73816785889763711496073601072139181663581749664315829771220285421861268922661982867681936760300774611876446005645690940170747594642032443019415"); + plus_test ("83823188981575692224309101153864758580078.5955259490170379255716122945113031579157318931038231", "-40028920687917.16848969", "8.38231889815756922243091011138358378921614270362590170379255716122945113031579157318931038231e+40"); + plus_test ("2808691776034467055726891904371173436595982589447978253042154698627671398488784", "9812791602520619.597754130838314809582665890845794489994575586", "2.808691776034467055726891904371173436595982589447978253042154708440463001009403597754130838314809582665890845794489994575586e+78"); + plus_test ("348504897735551663451493471155931032198603500912341395392663329685030763642073580083352277207617381115118735257611119505096273334530366023", "3012062864730334700837949872371998966828679.4047646544156150438268952921094746263", "3.485048977355516634514934711559310321986035009123413953926633296850307636420735800833522772076203931779834655923119574549686453334971947024047646544156150438268952921094746263e+137"); + plus_test ("93548859880851212916468686274573175909", "-75118428101074788562.506120603990328548341139932377168056", "9.3548859880851212841350258173498387346493879396009671451658860067622831944e+37"); + plus_test ("0.000000000000000000194012323991964077673853360201053367800566124970905963785098877971072180640313745271154543409391042526877924567117182739810", "0.0000000236189282059323667779215335", "2.361892820612637910191349757767385336020105336780056612497090596378509887797107218064031374527115454340939104252687792456711718273981e-8"); + plus_test ("-389202042550335503825154365205711290405537538112817615439726097659782032124231125784313789925", "0.00000003186474240443828135635273567868516420016402055460073651185", "-3.8920204255033550382515436520571129040553753811281761543972609765978203212423112578431378992499999996813525759556171864364726432131483579983597944539926348815e+92"); + plus_test ("175494756398169060188389869312520635210512554543656594330140", "-411530581933818049374887440657899352512027.09153247186642746768921170931268854307755443936717", "1.7549475639816905977685928737870258583562511388575724181811290846752813357253231078829068731145692244556063283e+59"); + plus_test ("4598950112574467183729719937465962791614617983103965921055089220439607671.599007540382070086491128969863554413197224811888258922835", "-26938781266346831074998405687771608325810543240305.7378923235384660560482541777264792878816806719888726231", "4.598950112574467183729692998684696444783542984698278149446763409896367365861115216843604030442874792137075125315544139899386299735e+72"); + plus_test ("57361809317883677060860671734348051270932088942529602386581.68900107141758948907", "-295802867132191509532524058", "5.736180931788367706086067173434775546806495675102006986252368900107141758948907e+58"); + plus_test ("-0.0000125601146369033513236980781240144461675622310937097773", "311729685945211093658295182", "3.117296859452110936582951819999874398853630966486763019218759855538324377689062902227e+26"); + plus_test ("-0.000000000000017031301308338958768641001044966021634165409838760713", "7354226011798172001332233249137409933327535976109274125337", "7.354226011798172001332233249137409933327535976109274125336999999999999982968698691661041231358998955033978365834590161239287e+57"); + plus_test ("-3.6", "-2815836861296137045153782405432811863217898809.59007", "-2.81583686129613704515378240543281186321789881319007e+45"); + plus_test ("1883757916919577797545040700765718683892962925168476980916591444220044498023865115.414486424", "-20632263651557034535417971371523039152817223695099485637652293509653426916474374628814088965383.41423390427269280942433875156452181764219", "-2.063226365155515077750105179372549411211645797641559267472712503267251032503015458431606510026799974748027269280942433875156452181764219e+94"); + plus_test ("0.0000000098475053710376389804550097928552217095921881011378913867422148039984790157547999437804576731605639912393200622917271102003", "-53035373614.717805924235005616321273", "-53035373614.7178059143875002452836340195449902071447782904078118988621086132577851960015209842452000562195423268394360087606799377082728897997"); + plus_test ("-0.0000811390350949663620350120726675225941477085450778", "-655.20852663603498591718010139782212", "-655.2086077750700808835421364098947875225941477085450778"); + plus_test ("2426894083677867432345228015404", "-101468490319724506034682885345783370059542917.575868248657413589", "-1.01468490319722079140599207478351024831527513575868248657413589e+44"); + plus_test ("0.30280", "0.000000000000000000254561077129670600967185643", "0.302800000000000000254561077129670600967185643"); + plus_test ("2460767093793617543980763007583218463976172951977824518682800860159902541914492786569.988063268009300275066475501733486973382818662", "33247165254498490053797.4453", "2.460767093793617543980763007583218463976172951977824518682800893407067796412982840367433363268009300275066475501733486973382818662e+84"); + plus_test ("0.00000000000297623885327264628872813944566975202437690710653591748231030925179641495339618475769115114527914606543143194147848430495597", "120677689870942459137299176289089761143754326820862009921425274349213001568104474801947554427316998849125038885919", "1.2067768987094245913729917628908976114375432682086200992142527434921300156810447480194755442731699884912503888591900000000000297623885327264628872813944566975202437690710653591748231030925179641495339618475769115114527914606543143194147848430495597e+113"); + plus_test ("0.00000000000000140253681305432813286110569633536186290552984308384603424304253311258844823992792716702555859199219343153509752", "0.00000000000680532732610522954462416342609639850515130341357440142880229", "6.80672986291828387275702453179273386701420894341748527483653304253311258844823992792716702555859199219343153509752e-12"); + plus_test ("-62741750762018440848873834757672851831867995632459744339895230073473.21603443732", "-874741125356670695571041484420725542382859690979070399875164371412.46", "-6.361649188737511154444487624209357737425085532343881473977039444488567603443732e+67"); + plus_test ("0.00000000000021176414395474510305287866523610550765676408675802", "256510633937671286139867882266916007823374156029717017148", "2.5651063393767128613986788226691600782337415602971701714800000000000021176414395474510305287866523610550765676408675802e+56"); + plus_test ("0.0000000000000000664215993897397955795237104020638588228731275806541568161715250236709545538098694857746988330740", "0.0000000000000072103606167686672117631228552986024686236649558161717746101379938704517818104841311722678845013668413146919184762655", "7.2767822161584070073426465657006663274465380833968259314263095188941227363642940006580425833344408413146919184762655e-15"); + plus_test ("-7562874182.83873823754546340019820202614555774800566970410202356651856", "-391433409037814397456500851811078785870089119160317598515862901999756095733578802714504574456.70518495722", "-3.9143340903781439745650085181107878587008911916031759851586290199975609573357880272206744863954392319476546340019820202614555774800566970410202356651856e+92"); + plus_test ("-0.0310379152847371895860555796583283692667844392505377548276647230042445", "0.00000082283513482603951054300917006814118588679056861856581955986306659552380016853864396371024709306483760781400794588331", "-0.03103709244960236354654503664915830112559855245996913626184516314117790447619983146135603628975290693516239218599205411669"); + plus_test ("87994958901421.56173641605454399949453740849330489135088167019977159972118641759021121261627327050792415022189885286236293442163107348031602461", "-100300365307636143430499359339922108619124158914798.44948", "-1.0030036530763614343049935933992210853112920001337688774358394545600050546259150669510864911832980022840027881358240978878738372672949207584977810114713763706557836892651968397539e+50"); + plus_test ("-1550007004.74515351306585502801", "57296100584443643484072467509091114834539973592176211806934477387549446567272546346798", "5.729610058444364348407246750909111483453997359217621180693447738754944656727099633979325484648693414497199e+85"); + plus_test ("19679349947742.994127711806874970698304897", "-8.6373642811", "19679349947734.356763430706874970698304897"); + plus_test ("54030292.9001", "0", "54030292.9001"); + plus_test ("651054592756506304745571531773834326.83644", "-13757776534587654.0116063063442543177687640729791412475434103606212206897637619312584893291977232262578", "6.510545927565063047318137552392466728248336936557456822312359270208587524565896393787793102362380687415106708022767737422e+35"); + plus_test ("-508728777596140418455412767451446817854358041268106849523.35989817998722029624762450551681595146802924988664", "-50262054005503525686132151227512844312491027044172912.40", "-5.0877903965014592198109889960267433069867053229515102243575989817998722029624762450551681595146802924988664e+56"); + plus_test ("-28915075134892302952316258686216304990690277355", "12.6179700286426790566", "-2.89150751348923029523162586862163049906902773423820299713573209434e+46"); + plus_test ("-0.000000000000000204506794915221132784856197218478429446796657919285394521228788556955524", "-86151293785140264277.3878186179195", "-86151293785140264277.387818617919500204506794915221132784856197218478429446796657919285394521228788556955524"); + plus_test ("42235147499429175944266679795088142906175521777163730652253755746712473163633468251357976", "-0.0023908655154", "4.22351474994291759442666797950881429061755217771637306522537557467124731636334682513579759976091344846e+88"); + plus_test ("591589.86", "0.00000000000000000001860329292788516991407643664465772674133322798829000748004481876019355253701810078529570613237182776549094598706836269877507206606048", "591589.86000000000000000001860329292788516991407643664465772674133322798829000748004481876019355253701810078529570613237182776549094598706836269877507206606048"); + plus_test ("-350651107084655269140529689112278274003508608230449884077441.95115833128262389", "0.000000000001117808991674427079320983053134086985164", "-3.50651107084655269140529689112278274003508608230449884077441951158331281506081008325572920679016946865913014836e+59"); + plus_test ("-39134659750772.877480206401712009933563545303653", "166958406518764640192354635927301907690317389127470622845773787156043063093969532575030322149816302478163328082727649181925765.252883933714", "1.66958406518764640192354635927301907690317389127470622845773787156043063093969532575030322149816302478163328082688514522174992375403727312287990066436454696347e+125"); + plus_test ("-172056481099057625655452551706739628179114255612273491148921284864736703885146667722.8388377144520839161622951529099672906561615777554908439149426", "-53188016746661398958851588477178244943851165029295827.73281273540583347372612339273431422", "-1.720564810990576256554525517067928161958609170112323427373984631096805550501759635505716504498579173898884185456442815106561615777554908439149426e+83"); + plus_test ("-101.2715534026922239603773241958969231368570306133332758128133966689708114732", "-0.0000000000069524253857033293796239251561117850631416003514681200491262005294123143215554850258908298728505228195487713881587714484422961615066116684637", "-101.2715534026991763857630275252765470620131423983964174131648647890199376737294123143215554850258908298728505228195487713881587714484422961615066116684637"); + plus_test ("-25333165941026", "-6.96905", "-25333165941032.96905"); + plus_test ("-23159930599967762034619306845640878338289007418537140350162347387358954515654697539296", "-0.0000000000025055077873630358869224326917384442359589577625318652368309033754969806200104209411667012418713252227441129227486821508788141961", "-2.31599305999677620346193068456408783382890074185371403501623473873589545156546975392960000000000025055077873630358869224326917384442359589577625318652368309033754969806200104209411667012418713252227441129227486821508788141961e+85"); + plus_test ("-272690054326355360717463915920945.79117473701250126513511144304624422023780335575219366", "-0.04646617289953036368927399160045218571026521306334789242996846430687659493840681112221758307480649419116688540343801556", "-2.7269005432635536071746391592094583764090991203162882438543464669640594806856881554155242996846430687659493840681112221758307480649419116688540343801556e+32"); + plus_test ("-0.000000000000000000824794592791708470343498439383184471216678775736929136783274734656085", "-15464590993770169004834442995125190019352837990780198498620045480008050531227509554782670484128441573926502719591921520634735942184", "-1.5464590993770169004834442995125190019352837990780198498620045480008050531227509554782670484128441573926502719591921520634735942184000000000000000000824794592791708470343498439383184471216678775736929136783274734656085e+130"); + plus_test ("-0.000025886438630912380429166846355627957951159888724105900108725398458013138566376225646226120608061663021", "-0.00000000000000000922559195021433452347561162265923135770528238859359860082308634808051034873284365047902141945318959511946199226", "-0.00002588643863092160602111706069015143356278254795546360539111399205661396165272430615657485345171214204241945318959511946199226"); + plus_test ("4208526064828419952094154623926319503361267122786727994718336255550699863529999970816217779807244768234375837054150463771544173571075249738067912741", "0.00000000000098970610", "4.2085260648284199520941546239263195033612671227867279947183362555506998635299999708162177798072447682343758370541504637715441735710752497380679127410000000000009897061e+147"); + plus_test ("782154833767130832317687050316770373560511399580384993381585732162357039470401244281856195.066130334377022511400443485932219487910616611626636101", "-0.00074331374743997058610568400177871943926460185889915970549597536944046651458673936138785020737671331878048877509692365190559231823", "7.8215483376713083231768705031677037356051139958038499338158573216235703947040124428185619506538702062958254081433780193044076847135200976773694129450402463055953348541326063861214979262328668121951122490307634809440768177e+89"); + plus_test ("42247383.064", "-0.0937875210571846395102908228397490109201012337594873628817471460764217967528951691863690241707606495782508382461321094202624928680498275", "42247382.9702124789428153604897091771602509890798987662405126371182528539235782032471048308136309758292393504217491617538678905797375071319501725"); + plus_test ("2576315957194062278091487692155019635858438293549959035082229215955048823715650588390178638212566542.511871428870771408965933726237972177952115", "14221275732102839762375835558162468599546489504738010046753467831312431.748866797310416772779810575075035266788827703", "2.576315957194062278091487692169240911590541133312334870640391684554595313220388598436932106043878974260738226181188181745744301313007444740942703e+99"); + plus_test ("-182341620.75963819", "0.000998366694277196028537550780159837727537078256289848938775652509142720967559421265698965121960614893238144882990784373782561165842054284561355", "-182341620.758639823305722803971462449219840162272462921743710151061224347490857279032440578734301034878039385106761855117009215626217438834157945715438645"); + plus_test ("842047793825512583448880280167368274851233502546714872003645854281826035260762377793954087704796997.25746974352168013713893221905548161407096643850", "-879630826.1", "8.420477938255125834488802801673682748512335025467148720036458542818260352607623777939540868251661711574697435216801371389322190554816140709664385e+98"); + plus_test ("-554969229244174864065407853658438.853", "0.000000000000000046413279985045478767808596461145151129534715272056", "-5.54969229244174864065407853658438852999999999999953586720014954521232191403538854848870465284727944e+32"); + plus_test ("0.0000004594903425141532404871962049647498137", "-932661375466478095759388985035813536638008334074283723919735.05355344249627897324401366029784201920498102254155227173893629037627164808010183", "-9.3266137546647809575938898503581353663800833407428372391973505355298300593645909077317310163705445516732254155227173893629037627164808010183e+59"); + plus_test ("55622408985624324409029884623142142230.3564337866286742532877692296727906360723088525106961633413366259718859274228008870960807098", "15964242335991562370631446343520536873365067961244.3048166767601763969347103883920143084337317316579770484121318738881953338102", "1.59642423360471847796170706679295667579882101034746612504633888506502224796180648049445060405841686732117534684998600812612330008870960807098e+49"); + plus_test ("4116.6343", "-13125881395295867999756142722598662945291700853448430819633768649050051199293316003551472339311180106761185979863040509.660957581", "-1.3125881395295867999756142722598662945291700853448430819633768649050051199293316003551472339311180106761185979863036393026657581e+118"); + plus_test ("-185.999886254076738335134043252415796249753374218519734071455", "-0.000000000000000001138037685382195961414405158218078543316186398616143756105152301597533", "-185.999886254076738336272080937797992211167779376737812614771186398616143756105152301597533"); + plus_test ("-198.9786279245", "1746794213.948368961266", "1746794014.969741036766"); + plus_test ("15874309893574389.8", "0", "15874309893574389.8"); + plus_test ("16588576987819.81660754169192038181188060714025162116858077319124964265625043196845919043822440466", "-89246600501318562304915309660228383388276620845488564802.496235049288379013778246594577495893634435949828063691098972563490365127", "-8.924660050131856230491530966022838338827660425691157698267962750759645863196636598743724427246585517663681404844272213152190593656177559534e+55"); + plus_test ("-127347284441930400932829141510983278557342554346089741297398296382897208587382099.5435745742690549551823615645727067", "-23318951044403467148495997370.7883388335", "-1.273472844419304009328291415109832785573425543460897646163493407863643570833794703319134077690549551823615645727067e+80"); + plus_test ("-5077543273110250868221405268190259167.97565436390533404678643216521675105958934642804771", "26014332970671415773600104084765496839411707080753222580030511682112031082495461045172183069324313539709881831959", "2.601433297067141577360010408476549683941170708075322258003051168211203108249038350189907281845609213444169157279102434563609466595321356783478324894041065357195229e+112"); + plus_test ("0.00000000725881132557751716179805811333894302315168261762649561806817469605831550855169620175635494174620728378066598111147687734973630755961025899", "434515885287.45022424035155504385780922882248468547935186640429869578572525153830676791908425738454517466", "434515885287.45022424761036636943532639062054279881829488955598131341222086960648146397739976593624137641635494174620728378066598111147687734973630755961025899"); + plus_test ("-0.000000000000005190715334165879366906953397614175481033368428717937549118481651827304967814441188123242137007460", "-25.81020207", "-25.81020207000000519071533416587936690695339761417548103336842871793754911848165182730496781444118812324213700746"); + plus_test ("-5250099.76439982", "1", "-5250098.76439982"); + plus_test ("1196038410000291625428567.6600927087933557619055721061645233907526288367", "274708477195241356599569", "1.4707468871955329820281366600927087933557619055721061645233907526288367e+24"); + plus_test ("1193283202443516969171199.42749207631310978334573154570736931304683327423627434514888492883630124033894042566872", "-2705842436304954369628829105664616526636750473333202873059187377027354726150010013782785345680025581966172299828118.857377088370514", "-2.70584243630495436962882910566461652663675047333320287305918737702735472615001001378278534448674237952265533065691942988501205740421665426845429263068695316672576372565485111507116369875966105957433128e+114"); + plus_test ("-100501387373.2156506022473571945511270816570649486799902805849591635129761139096179741555986743162675121226826359781143695356560", "-617089847302145796251638901404458614481659.476726016550865549", "-6.17089847302145796251638901404559115869032692376618798222743551127081657064948679990280584959163512976113909617974155598674316267512122682635978114369535656e+41"); + plus_test ("16333090935253715.586262", "-0.99663564938317815363068300949250859179309525545225", "16333090935253714.58962635061682184636931699050749140820690474454775"); + plus_test ("321070028467230447383995878020953.3888568546912021134358772343603579280658629722635803579108", "28832623126702540650471917064799132201501970153523973751436115142706664061743228360740052.89377744216939547659256989919800076278264836074", "2.88326231267025406504719170647991322015019701535239737517571851711738945091272242387610062826342968605975900284471335583586908485113330035803579108e+88"); + plus_test ("-0.00000000000000000003787025783187787162540090434491007131260214791563020212712224638154647089519712810087585510020487818551239718654495070616103779447174795619", "5152327951088416826370.49800740890621823749333954384917083961142478820631626896455924008645842950035037082504155566540807507", "5.15232795108841682637049800740890621823745546928601729296798602388386140619765195709217082822737322812444349508477021094696912414489979512181448760281345504929383896220552825204381e+21"); + plus_test ("-3781578965051244011802834529658700587745611157492889345003479370244990285997045726143735238169075073132478791.794030078", "-398406181131828029423189359168774589795627542.69216955808205240294903823537210247931306802", "-3.78157896505124401180283452965870058774561115749288934500347937064339646712887375556692459733784966292810633448619963608205240294903823537210247931306802e+108"); + plus_test ("-857281769723716632426451761545805487782866662040001135988125619524781917496404046.907015785954", "-0.00000000000073616976036884849929013414437985061753356336526778613936461244959197744911962137302874551", "-8.5728176972371663242645176154580548778286666204000113598812561952478191749640404690701578595473616976036884849929013414437985061753356336526778613936461244959197744911962137302874551e+80"); + plus_test ("3089627721247383947360751941786039174000627343590658682240341607417650", "-5343911762378383789737796312183683590895032635513074691383250730453", "3.084283809485005563571014145473855490409732310955145607548958356687197e+69"); + plus_test ("178191.66604428931197081347222738459872958", "-0.00000000457431668529", "178191.66604428473765412818222738459872958"); + plus_test ("-0.00000059402965420877250077049277056387386461138162956320009201234837822718242249019319520691853", "-85966889247898245.45722015", "-85966889247898245.45722074402965420877250077049277056387386461138162956320009201234837822718242249019319520691853"); + plus_test ("0.00000000000036703131", "-1690706009848928777.495021644332320103184605016856460586815056781662", "-1690706009848928777.495021644331953071874605016856460586815056781662"); + plus_test ("-1201941125816287616412820133589940378119107883736149474619667856427578308106640475701376366656637044297989392894431464368963531768836140765436577394", "30399.3500425", "-1.2019411258162876164128201335899403781191078837361494746196678564275783081066404757013763666566370442979893928944314643689635317688361407654365469946499575e+147"); + plus_test ("-5911232068256006917083493799668612278296458371177903401236223682450786815464114645404870555701", "-3666175952907291515352144888988964318204590.50095772343418568691895368", "-5.91123206825600691708349379966861227829645837117790706741217658974230216760900363436918876029150095772343418568691895368e+93"); + plus_test ("-2459545344690.7997076213355757525315040568953385869184764316593583226907", "4164315079449261632762812204636584837224819345915404704039302166.1662755649220", "4.1643150794492616327628122046365848372248193459154022444939574753665679435864242474684959431046614130815235683406416773093e+63"); + plus_test ("717000944256731362781243642636076865324406926670042", "-15881954495698535614971299471328513969444270448080565895751331092451780915657006942144214705830428876978218653.40439815564850025319446970516", "-1.588195449569853561497129947132851396944427044808056589575061409150752418429422569850157862896510447005154861140439815564850025319446970516e+109"); + plus_test ("2135955.98546847496701957917801628765161676501430902420565334363847226731093782482383515268139253106808269937151040195861", "-0.00000186143738178071752355591997816736943677781854280530890582737750128944", "2135955.98546661352963779846049273173163859764487224638711053832956643993343653538383515268139253106808269937151040195861"); + plus_test ("-2753001186629.1654476569387069958961438785379535103689665000111045009651593729849009490188549152460050154549811339425832561", "2994415432463123195.83557", "2994412679461936566.6701223430612930041038561214620464896310334999888954990348406270150990509811450847539949845450188660574167439"); + plus_test ("0.000000000000000018408379822942006989333252748149670155210581048845628953786929400969225780392593930060103", "-350080792300.4", "-350080792300.399999999999999981591620177057993010666747251850329844789418951154371046213070599030774219607406069939897"); + plus_test ("5854211899389381506945331507818660152894470704.9769422579022684177921767417413505638887249265068371213031063935537133330368277125538929754", "-6238089", "5.8542118993893815069453315078186601528882326159769422579022684177921767417413505638887249265068371213031063935537133330368277125538929754e+45"); + plus_test ("0.000000000000009383448945864756120696895884403358543889635556010530179055321923499853947812003801655721924", "-19052898127325499710380.9743286252434506021419112451035829611583", "-1.9052898127325499710380974328625243441218692965380347462264262415596641456110364443989469820944678076500146052187996198344278076e+22"); + plus_test ("-17256820969785465284434808952852690245011499274233791647620649273158761764638386391819039.862028829339196251615676315363239", "13.156452841246543538", "-1.7256820969785465284434808952852690245011499274233791647620649273158761764638386391819026705575988092652713615676315363239e+88"); + plus_test ("-665097561.949707", "-2162357984514826.9250074134451642962816183", "-2162358649612388.8747144134451642962816183"); + plus_test ("-1787583563218949877447505176411981054278266273447362590023794164049587059.8952802595404997239841103802373009222385203752749", "0.00000000000000000760974939459", "-1.7875835632189498774475051764119810542782662734473625900237941640495870598952802595404997163743609856473009222385203752749e+72"); + plus_test ("-97829644134932448583893137101111730259820.05765691989", "-0.00008062307539130036460992642410736502245711006627314391776591134965421657938611242879211258420030106690367460157448425", "-9.782964413493244858389313710111173025982005773754296539130036460992642410736502245711006627314391776591134965421657938611242879211258420030106690367460157448425e+40"); + plus_test ("176.49118337833630469590257828139881196863600409523", "35933.6589226268793460337176730393325086784341893690115486029833220604354746534", "36110.1501060052156507296202513207313206470701934642415486029833220604354746534"); + plus_test ("2317.37783", "-33432.9207570414", "-31115.5429270414"); + plus_test ("6637712385532453617053848832374521936910779.70621790725066804869722068097", "-2227675488368.765036410422350452356577021856408570307494950931297002601448393249899536", "6.637712385532453617053848832372294261422410941181496828317596340643659113591429692505049068702997398551606750100464e+42"); + plus_test ("-29796953630.4913026375328064186913399668764", "183881988687448174550.05812049319254873917759915275571715311496797038130265358357168647155176800096292869421", "183881988657651220919.56681785565974232048625918587931715311496797038130265358357168647155176800096292869421"); + plus_test ("13199507764.3046118900484236", "2889.225410430843647396962046960496506372239727670782057756607", "13199510653.530022320892070996962046960496506372239727670782057756607"); + plus_test ("21296975756.7155683578416319475809678174056385498809428133837225514886696657380", "-12089429986715170910650388697796567002415981764555993502477488839251139863938357832329451138126477861065923975862099475655105604012728", "-1.2089429986715170910650388697796567002415981764555993502477488839251139863938357832329451138126477861065923975862099475655084307036971284431642158368052419032182594361450119057186616277448511330334262e+133"); + plus_test ("-10171266580517816.0917067510409", "315013465687559910813490005858570828704.32710226291611151322994451850467532608107794030518681711210056375276848", "3.1501346568755991081347983459199031088823539551187521151322994451850467532608107794030518681711210056375276848e+38"); + plus_test ("-104378676461688732476982045085768915711531135396792471359807651838019425066099516.3887940021256850", "-0.0000000075463669108526190909746406521772574", "-1.043786764616887324769820450857689157115311353967924713598076518380194250660995163887940096720519108526190909746406521772574e+80"); + plus_test ("-554004567.5248864688113348892343007508509027941489605", "24036.8693849642440730", "-553980530.6555015045672618892343007508509027941489605"); + plus_test ("-0.13862781295596173373834834617362885552230456574647246122144469327684018389680003345722428926923436849384730389514581111500008577", "999130309696269960369411189504977138022060325178635804383777964396643757881930599444544232699066835337985580790738", "9.9913030969626996036941118950497713802206032517863580438377796439664375788193059944454423269906683533798558079073786137218704403826626165165382637114447769543425352753877855530672315981610319996654277571073076563150615269610485418888499991423e+113"); + plus_test ("111333740621290857055005859873614448428448428149963.63294760371993029666150267467043126547986051822019939851697686673961129595", "4999995459444511596846816663006330762507788928567760", "5.11132920006580245390182252287994521093623735671772363294760371993029666150267467043126547986051822019939851697686673961129595e+51"); + plus_test ("0.3638494649282355263819067061458269397737971067286076619347353611281169315189527491523244687688286", "-1790006094624306575957063565992185307582798107924013187.71", "-1.7900060946243065759570635659921853075827981079240131873461505350717644736180932938541730602262028932713923380652646388718830684810472508476755312311714e+54"); + plus_test ("-505517596445.1482", "13658590629245746", "13658085111649300.8518"); + plus_test ("-0.0000000000000000003526114927031853853794194624925423016782264", "-3648850034079477562581394480009152297642761812144625299013120030846235.2420343951205906", "-3.6488500340794775625813944800091522976427618121446252990131200308462352420343951205906003526114927031853853794194624925423016782264e+69"); + plus_test ("11151882673607076860108980480685547378102216722783817.5164597052664085858745970369334", "75.19", "1.11518826736070768601089804806855473781022167227838927064597052664085858745970369334e+52"); + plus_test ("721971138118087482240206073369515811598326847978080496736102280373630157207437819185711943223296522977798907649465741783364603042045658293259.583212980", "-140176921692721492746085636102764157797617196402727800746784082298282387.90860726314021850408568982802", "7.2197113811808748224020607336951581159832684797808049673610228037363001703051612646421919713766042021364111003226933905556385625796336001087167460571685978149591431017198e+140"); + plus_test ("-1.4681874863", "-3367963466800407715599.44244519159656022505642088971735092327417182287381", "-3.36796346680040771560091063267789656022505642088971735092327417182287381e+21"); + plus_test ("-0.0000000000000004372619977839161258710643393271233757307937114407266184997518559013565243060131612462006611450037791975727499469", "-0.000557380206825781899", "-0.0005573802068262191609977839161258710643393271233757307937114407266184997518559013565243060131612462006611450037791975727499469"); + plus_test ("889975261077.730985", "-444512813658612993665287376887226223666949336282284327.65111812283484181956398112803471368231154715336519231346350829789199178743774349985755167017", "-4.4451281365861299366528737688722622366694844630702324992013312283484181956398112803471368231154715336519231346350829789199178743774349985755167017e+53"); + plus_test ("4228.494108579658047102292", "0.000000000000000037431967516705914275", "4228.494108579658047139723967516705914275"); + plus_test ("5081895821751331032957687842323663780819055.0589539655583256", "3045235045891993287321120869322585059630654297351523276745951018307395.66088948484478706336724055686328883825124984361740259408994712721", "3.04523504589199328732112087440448088138198533030921111906961479912645071984345040311266336724055686328883825124984361740259408994712721e+69"); + plus_test ("0", "0.0014970897348316271399696665513926791886689361148588977237211047578120594034554421644608967215193", "0.0014970897348316271399696665513926791886689361148588977237211047578120594034554421644608967215193"); + plus_test ("-38086604857440351908282393909820732805333576481045075753031751734398766308", "-8466726560595694017777483540348440264157355649896385800844069368330876512659274241703013842599067504442486011483149390298", "-8.466726560595694017777483540348440264157355649934472405701509720239158906569094974508347419080112580195517763217548156606e+120"); + plus_test ("3.606", "-0.00000000226457426250954670156179129629125380257442683372667979", "3.60599999773542573749045329843820870370874619742557316627332021"); + plus_test ("0.00000000002432", "-2721049388922460690679999802237503439420773586591695831186196683218833781609933786136614218796838155186664711199485697050894450944907939921399737566841", "-2.72104938892246069067999980223750343942077358659169583118619668321883378160993378613661421879683815518666471119948569705089445094490793992139973756684099999999997568e+150"); + plus_test ("3419034647852504243.4", "0.00000000000000000001109196145046743", "3419034647852504243.40000000000000000001109196145046743"); + plus_test ("0.00000000000000001986294624152158258216394967520873041627413436833216557224760286108648966762394958388810402835384523225417563557", "-3796809284763021958367848219266230972066614510710559054.1146025612649983495607541466475364622687018577099048021869", "-3.79680928476302195836784821926623097206661451071055905411460256126499832969780790512595388010475218250117438591276563166783442775239713891351033237605041611189597164615476774582436443e+54"); + plus_test ("-204798018073795.6529529448002736801844846511974520623046560206000445277488879317921030460527861542787789702381941427349799245079342628083413", "-0.000079632857050636167683223005840115134570250229161360215975374259917315308577662215961670005725116845981841223176067219103818019091320131665778", "-204798018073795.653032577657324316352167874203292177439226270829205887964863306052020361361363816494740640243919259580961765731110330027445118019091320131665778"); + plus_test ("50550.28", "2121486761751437744953605262799815319.26905", "2.12148676175143774495360526279986586954905e+36"); + plus_test ("-889419638834002225522284149508929700476.172650890", "-424305840473677688810924633337769721763339720196709604554205748170445987058261155373223662505888873.82144770710851718819750629065194", "-4.2430584047367768881092463333776972176333972019670960455420663759008482106048667765737317143558934999409859710851718819750629065194e+98"); + plus_test ("-40760.965467", "-18942690834.2607446380197806", "-18942731595.2262116380197806"); + plus_test ("-21150396424144685285717528391770170039197157268878001492574230326386339596909894.1137843235394802222980337381818083735", "-6846760956505006842349358088765499381514.63658", "-2.11503964241446852857175283917701700392040040298345064994165796844751050962914087503643235394802222980337381818083735e+79"); + plus_test ("-5", "0.07853343679663140617550934559203677556312857282298714862538145367932278351423091814533627541733407490114923772813040559584747319434161156", "-4.92146656320336859382449065440796322443687142717701285137461854632067721648576908185466372458266592509885076227186959440415252680565838844"); + plus_test ("-1298989.19", "12967839159417800347248402834223327087001590.131521073718772815256761575699", "1.2967839159417800347248402834223327085702600941521073718772815256761575699e+43"); + plus_test ("-413624643703430579993792415.246", "-25047788866699.6065823802634", "-4.136246437034556277826591148525823802634e+26"); + plus_test ("-17002802435731054578579213050913648941015840438503895311063267366815.4760438", "0", "-1.70028024357310545785792130509136489410158404385038953110632673668154760438e+67"); + plus_test ("-0.0217487468807944116026287464540188864099826755097763413913523783549695801368408124880816141876938600", "-267928116215095659487396148857045537314243422826493604265786416560942224473274359760818137268229757952314852408659289722", "-2.6792811621509565948739614885704553731424342282649360426578641656094222447327435976081813726822975795231485240865928972202174874688079441160262874645401888640998267550977634139135237835496958013684081248808161418769386e+119"); + plus_test ("0.00000206058115026074270537347836316498830244149457757397506761076895276562936750930508221328", "-1156.25131151512762526101028", "-1156.25130945454647500026757462652163683501169755850542242602493238923104723437063249069491778672"); + plus_test ("8.52146", "8138996167927465829623641115119430224272617006293469478795384788419955586210311969.0911005211", "8.1389961679274658296236411151194302242726170062934694787953847884199555862103119776125605211e+81"); + plus_test ("-606792703514189222432342591095705024217062979215281726656222323623605437267298163559450093248410482334853425555387131742072494232274", "0.0000000000000075030205599538617170140424842633341870457951188905504524861678938064353730637261119815417488091644638014246916703266791", "-6.067927035141892224323425910957050242170629792152817266562223236236054372672981635594500932484104823348534255553871317420724942322739999999999999924969794400461382829859575157366658129542048811094495475138321061935646269362738880184582511908355361985753083296733209e+131"); + plus_test ("-1117646260533756972074615305111827894317502144279827222046925514965408293805196205607164567542139844488130299", "-8950710397293888186512785146937760727214387326213534247514635587853382873562774281822836130052011695722019446354140619086496577801", "-8.9507103972938881865139027931982944841864619415186460754089530899976627007848212073378015383458168919276266109216827589309847081e+129"); + plus_test ("17828132133.73128014639", "0.772844155917667013531128306734169323", "17828132134.504124302307667013531128306734169323"); + plus_test ("12409597293458966562697810991027046599347924039429686698803091382", "-127221396169370244097597696512688383579380113278994929674479641504219148260281326655899637.2600931768649107131099205359376530727886079199210691234204076", "-1.272213961693702440975976841030910901204135505811839386474330421562951088305946278528082552600931768649107131099205359376530727886079199210691234204076e+89"); + plus_test ("0.1848091145595494469555974732282088098544574667848", "-136107941934475938.0155896841", "-136107941934475937.8307805695404505530444025267717911901455425332152"); + plus_test ("-248947197724784384796094883777245432118187542578980970162991361.8625105461901333288766567084315189172715325691802", "1377349914239986.46343962270751134940329738658340912130", "-2.489471977247843847960948837772454321181875425776036202487513753990709234826219794733593218481097959715325691802e+62"); + plus_test ("-0.00000112660065275108830213180725478020363833427172529177370245297090375761920", "6361232368958886237.15488020607904", "6361232368958886237.1548790794783872489116978681927452197963616657282747082262975470290962423808"); + plus_test ("168065941825836172215.28538451779543155718349924675090", "-10020380537725454351590492009621817226308186635527799419512419.1501669170488428784662186956119820551", "-1.00203805377254543515904920096218172263080185695859735833402038647823992534113212827194488610820551e+61"); + plus_test ("25062938769541121.630478568522733066136124658086663843828053304849719245047", "2168109004490.945949015343314182595182591703278150478193635235835903", "25065106878545612.576427583866047248731307249789941994306246940085555148047"); + plus_test ("0.0000000127998547493889280163892364925927466380437055151407280212547688372695203587233106472126969776111613683412368835630499322381390265", "-21556437448948972049.5307444304476294707119579088623127759607498145900023581252", "-21556437448948972049.5307444176477747213230298924730762833680031765462968429844719787452311627304796412766893527873030223888386316587631164369500677618609735"); + plus_test ("-537626025690553743403625600240698190650679101924299218506047682820.61793992322367129916021469763743818692611951563337836906205744108", "0.000000000000078704422482734288110772342341176900316159707688584083247052769004920995218116598172244299647861085206345", "-5.37626025690553743403625600240698190650679101924299218506047682820617939923223592594737731963349327414583778338733062209354368856996752947230995079004781883401827755700352138914793655e+65"); + plus_test ("4936866312604172729288711401711374147250", "655874195881897624287118400860713782095501006074749065044610537625092.95069141905913994401259276838353408866", "6.5587419588189762428711840086565064840810517880403777644632191177234295069141905913994401259276838353408866e+68"); + plus_test ("-2382178805319965099104798246704598336951576480741895282006149578757854993414213685118", "-0.00000000000000002613467607235150454275071440605158933185803781754976383299500468377641084642463280487309618916557583346059257437473874331", "-2.38217880531996509910479824670459833695157648074189528200614957875785499341421368511800000000000000002613467607235150454275071440605158933185803781754976383299500468377641084642463280487309618916557583346059257437473874331e+84"); + plus_test ("-15946824.09950277073438320718451422330046117375794902861875105613916239700142602", "-0.00000000000010267855303483749668481765879881882622179514", "-15946824.09950277073448588573754906079714599141674784744497285127916239700142602"); + plus_test ("-581425628881991347289393948535594023431644044950894384975254331720033.7644030704523982311900267238328134677", "-999805005439068442805051046377911526225724977745109030159313147640897377464.83555602537429836574687154635825719", "-9.998055868646973247963983357718600618197484093891539810536981228952290974985999590958266965969368982701910706577e+74"); + plus_test ("60413295.642986556398", "-4226075045367317431795623702749235954814399556250656668352316.5728962846147542124931735298180367334281333643494998", "-4.2260750453673174317956237027492359548143995562506566079390209299097282167542124931735298180367334281333643494998e+60"); + plus_test ("-81794690209841974740.53672088428717597735688956390645130995150579644016165479898744379", "-7.88107898048618399872607957392671978662", "-81794690209841974748.41779986477335997608296913783317109657150579644016165479898744379"); + plus_test ("-1997717463163142285894367278389823014470638.3025530535651929616090187971946674805858924875948817390067051806853814519986698027983653385", "6", "-1.9977174631631422858943672783898230144706323025530535651929616090187971946674805858924875948817390067051806853814519986698027983653385e+42"); + plus_test ("-304875626379421812877053824267.89813338244318006612477499081284272413190571121891074444720931096507130284584180247091056", "-0.000000000000000010980103787919551156900136233767434931235794906561314315549096503926892808208116475271649840370149590820545219560834375927", "-3.04875626379421812877053824267898133382443180077104878778732393881032041944986345675683004217526385618394938306397803368208116475271649840370149590820545219560834375927e+29"); + plus_test ("-88815210861255646356014368338106338503849425126132.285406775673561905065", "0.000000000000000034992420410611731246495160913", "-8.8815210861255646356014368338106338503849425126132285406775673561870072579589388268753504839087e+49"); + plus_test ("-0.00000000000000237643259847411171950841188633341948147021355426920101030032158183296245118336593123026984501161674321953387313970740020", "-0.0000000874212145702142670184949308326411041422527293858413318840288404463319361607051392899032509388086790", "-8.74212169466468654926066503410529904756722108560548861532298507466535179936675904732691821690785240116167432195338731397074002e-8"); + plus_test ("-0.006555884028715480652", "6930118317156.576980190277", "6930118317156.570424306248284519348"); + plus_test ("39.384744166791242957726294455842839425402642808858550449900179430725398075422668018325305226767828926369540183994331444452642090521391283", "3260986081387.207629495556353019281390351729387452232726", "3260986081426.592373662347595977007684807572226877635368808858550449900179430725398075422668018325305226767828926369540183994331444452642090521391283"); + plus_test ("3908267232516297546694850213843945511916410859719238136818722842077.27108076292427902546404238314424734106746892397683459219351842029663495194", "-0.00000000000372286358808905369841368779659136965109619662993128616667816952276941560286526066255037987308726016479323693533782656017305522143883165700131792", "3.90826723251629754669485021384394551191641085971923813681872284207727108076292055616187595332944583365327087755432573839556358713412995678241723058439713473933744962012691273983520676306466217343982694477856116834299868208e+66"); + plus_test ("-0.00001556397239423792402602941437191887477933365239361893990546595775376870987107277583", "-1732082517354208969230613795180012699705122410188783671659220771290170536520910", "-1.73208251735420896923061379518001269970512241018878367165922077129017053652091000001556397239423792402602941437191887477933365239361893990546595775376870987107277583e+78"); + plus_test ("20451329027854657865397803520110269731953546381423082243753661273233534094096458728774066484280346143633534282606929883", "1.37062391834155371473359912213772362707849619840251030918103616690753987794703765279270817110400101918287849263050336091", "2.045132902785465786539780352011026973195354638142308224375366127323353409409645872877406648428034614363353428260692988437062391834155371473359912213772362707849619840251030918103616690753987794703765279270817110400101918287849263050336091e+118"); + plus_test ("-9873613763574093.9169949677113266651552362204071722363114406302496589482078244525416517", "-546631047066885391316821969502606459323760036081517906369260562129.5282969018129257869570273191088510708842914399537183835952083014376", "-5.466310470668853913168219695026064593237600360815277799830241362234452918695242524521122635395160233071957320702033773318030327539792517e+65"); + plus_test ("-720103743977684216550279573635737782.371525679181701893280139772", "0.00000000047196", "-7.20103743977684216550279573635737782371525678709741893280139772e+35"); + plus_test ("-124523382475.065647339231367286548664060598351481238512537358040678937053065205", "267195207211327546143.99593799833381494", "267195207086804163668.930290659102447653451335939401648518761487462641959321062946934795"); + plus_test ("-669248421565027510098621757579904855957549198616536004694615.801532771296796860509827700071860799103269705247335116543", "333905925959634844", "-6.69248421565027510098621757579904855957548864710610045059771801532771296796860509827700071860799103269705247335116543e+59"); + plus_test ("74741.757595631932381120479050874298796374442246866101939364", "10920811144639.430670345", "10920811219381.188265976932381120479050874298796374442246866101939364"); + plus_test ("1170639975951201522249787446299288957.534087576257621574901157627904404", "-0.00014785053034279838988159517", "1.170639975951201522249787446299288957533939725727278776511276032734404e+36"); + plus_test ("240641615318369852633021813201283453473338354696847465428407816540707799946328465329158700582983365200972956128970708198340862470221701303619", "-0.0000000000000000069337247648616552808723398415008620822832893391786175057036755718378355", "2.406416153183698526330218132012834534733383546968474654284078165407077999463284653291587005829833652009729561289707081983408624702217013036189999999999999999930662752351383447191276601584991379177167106608213824942963244281621645e+140"); + plus_test ("111714245279259151600970278454866645262571826000337873347902770371946919658476476.581635152136516883108103196", "-145713944701659169049317661586406655886350.64439112401759220725326887023191998402271373838960301529", "1.1171424527925915160097027845486664526242611205563621417885345271036051300259012593724402811892467585483432576808001597728626161039698471e+80"); + plus_test ("0.00000000000000000011659916431504181998777280021990151674872574004317563534059818105024140361220410041950905384756907730822832402571557634171797064450234198869785", "0.0000000000000034973095978104435865425237181247213055722049975492", "3.49742619697475862836251149092494120708895372328924317563534059818105024140361220410041950905384756907730822832402571557634171797064450234198869785e-15"); + plus_test ("5208299735981215934383073700988540115", "0.00000000008193999192179", "5.20829973598121593438307370098854011500000000008193999192179e+36"); + plus_test ("-0.000000000000287395113688235501898364131112180654248398999683488052724240112623987258282732482937", "-0.000000000005224156433448505010390917879000913540363966165400734673984060714544377832355795421", "-5.511551547136740512289282010113094194612365165084222726708300827168365090638527903937e-12"); + plus_test ("251290.029", "0.0000000408265742458950413927784669187015196483849964746", "251290.0290000408265742458950413927784669187015196483849964746"); + plus_test ("-0.002069526456699789023016398781994820749838585707371628", "-208989.20687136738198249707358292330050304648320312788", "-208989.208940893838682286096599322082497867233041713587371628"); + plus_test ("136830053104872291586007040221524635644507855229364036.990085839244669865877563203743313609845467275010746564518697656354953714652400", "12996360060717584879190082832087158897977012928919981.1724803374445157382323851607362941658942137", "1.498264131655898764651971230536117945424848681582840181625661766891856041099483644796077757396809750107465645186976563549537146524e+53"); + plus_test ("349923146008625248221940071805133632424745448085367309153304.41451", "1.279845995348543772724126048570984529358929917199046395358884958125978504501534072647803741667566840006664141118201898026492588582829", "3.49923146008625248221940071805133632424745448085367309153305694355995348543772724126048570984529358929917199046395358884958125978504501534072647803741667566840006664141118201898026492588582829e+59"); + plus_test ("-0.00002588190901774483141446130106109665568218409839877790718167670204180165388892638488618624373249215908731", "-0.000000000000000998380445484244673146797637364810042331013877503942848237747500650941845596181353662072946500712838803596129029770361640568986086478118", "-0.000025881909018743211859945545734243453319548908441108921059180644890039401389577326731782425086154232033810712838803596129029770361640568986086478118"); + plus_test ("0.000002397702115545082706325", "-0.86184468879219410762921439972937635313400330685547662030210928411728749240902108881486043419424702673819765398803611924680684916244185716500", "-0.861842291090078562546508074729376353134003306855476620302109284117287492409021088814860434194247026738197653988036119246806849162441857165"); + plus_test ("739247350528774318310976592372378823989.9340970329512293", "0.16461323830286423518914252503718472208992620706491311143767005406182583700046088073642382183228439964918345692170788", "7.3924735052877431831097659237237882399009871027125409353518914252503718472208992620706491311143767005406182583700046088073642382183228439964918345692170788e+38"); + plus_test ("20138770597416725450254724328732818742267620348802456988572150217738319484193183724229804103329780221759485486678", "-789269493613323078997155252278243776415270697547093524400899466707939123164245744251", "2.0138770597416725450254724327943549248654297269805301736293906441323048786646090199828904636621841098595239742427e+112"); + plus_test ("0.00000000000000000077718007226574178859573156113273718366023940333047610", "0.00000793842663906287702694882951591808277980436371652228248293328108479174722056639404425886138539535746075798843345", "0.00000793842663906365420702109525770667851136549645370594272233661156089174722056639404425886138539535746075798843345"); + plus_test ("-0.00073004266755307447297787100885736643137065171791847775170199", "533767943554264575564059388781105481229849071443170662645468384072829601890382711597239.43317227373401753588313752941835310264692801", "5.3376794355426457556405938878110548122984907144317066264546838407282960189038271159723943244223106646446141015965840949573621555735828208152224829801e+86"); + plus_test ("203795797050226528701909939354095.74227652473566285394054153851636316880904908195101127405638217584507290263629702856344914721596751573682519", "1048176497643", "2.0379579705022652870295811585173874227652473566285394054153851636316880904908195101127405638217584507290263629702856344914721596751573682519e+32"); + plus_test ("-88244004722847480146822008275080880695915873140049053843555316989873895145229459150435483330020885756477515260816717989568792030863738799712004", "0.0222020450217264733443", "-8.82440047228474801468220082750808806959158731400490538435553169898738951452294591504354833300208857564775152608167179895687920308637387997120039777979549782735266557e+142"); + plus_test ("-245.330813553080793", "-139455315144533860778775215600928891795189892914202233172560603256768538146961881693882554366322835347536572308601", "-1.39455315144533860778775215600928891795189892914202233172560603256768538146961881693882554366322835347536572308846330813553080793e+113"); + plus_test ("1312620952926614444601139109837919862847383911012476338291408744344284710456350.61901295", "0.000000005001841441858025051749066429", "1.312620952926614444601139109837919862847383911012476338291408744344284710456350619012955001841441858025051749066429e+78"); + plus_test ("-0.00000002568121501817024789950645", "0.00000152064801516710974357034365714164447372286990018294642975122815566995939556502510124016256086916899095831799319898986550479847", "0.00000149496680014893949567083720714164447372286990018294642975122815566995939556502510124016256086916899095831799319898986550479847"); + plus_test ("-50146741.71136917438523439037364041570643531039880309166796", "721.58", "-50146020.13136917438523439037364041570643531039880309166796"); + plus_test ("-0.000000000031373829058590280763397830914839643150936549070276134150319113360057425916282823335964570132205357792953166020744035018731306854352936", "1209934516502680876038974890161267538909081686211586564144614326182360480572106031540130067011132046106334621001880794855659284874", "1.209934516502680876038974890161267538909081686211586564144614326182360480572106031540130067011132046106334621001880794855659284873999999999968626170941409719236602169085160356849063450929723865849680886639942574083717176664035429867794642207046833979255964981268693145647064e+129"); + plus_test ("-13404342125936188871742118602022353067169949299128900358060758959144.618999657876884344030397439486785962997196322120897869261859638385586348924333", "-168915526978312.650128129957132282649873584573819887866036969239069391528581261172175429771", "-1.3404342125936188871742118602022353067169949299128900526976285937457269127787834016626680271024060605850863233291359967260790440899557761778695333e+67"); + plus_test ("1806842795835990618047801.084576277957835712505618234152320757352128501462413034062746347", "-50734288417028257924421286860848404602443885854272475391326979005189668017648768244414775061314743386961522762.585374718651305701111", "-5.0734288417028257924421286860848404602443885854272475391326979005189668017648768244412968218518907396343474961500798440693469988605381765847679242647871498537586965937253653e+109"); + plus_test ("-116120201222725247610527954599536747256108402740643449687724143269086567616449171607864628957429974416", "1148190510672125444192340349744778820699595561256574541295058422369656677509037208045122028374935585403541656043987495821745", "1.148190510672125444192224229543556095451985033301975004547802313966916034059349483901852941807319136231933791415030065847329e+123"); + plus_test ("-665059516301467503087062204795807129205981985820520012687625179.56870702735969931519884226663966750454", "293092076876324270859.1678050313417760917885816996452", "-6.6505951630146750308706220479580712920598169272844313636335432040090199601792322341026056699446750454e+62"); + plus_test ("-151941033837572720599600925337962250720110163460498264898016203736097072978877965550197312865391818", "275519398845322762752039373616165590950134853231913357677442.98089023579266433338582691582272222226713269975686273608935285642960", "-1.519410338375727205996009253379622507198346440616529421352641643624809073879278306969653995077143750191097642073356666141730841772777777328673002431372639106471435704e+98"); + plus_test ("774.27298241935872782935734853935110700980034942643", "-2335613505940656938918706780962782666653609805431040481805.54016", "-2.33561350594065693891870678096278266665360980543104048103126717758064127217064265146064889299019965057357e+57"); + plus_test ("-0.0000000000000000003606517118223376107369897317076138705797620611885910564859903965167670077845554058709312065326542523687696158170393314", "-1057235201.5625889131220869434", "-1057235201.5625889131220869437606517118223376107369897317076138705797620611885910564859903965167670077845554058709312065326542523687696158170393314"); + plus_test ("673588976883236537490.1143689352121199626156550908385672312863492899095087287923630764608919202964646650938598591666124915", "810684376454419924392927167848507180923498918725351613660889567923.47605095181300135828", "8.106843764544199243929271678485071809234989193989405905441261054135904198870251213208956550908385672312863492899095087287923630764608919202964646650938598591666124915e+65"); + plus_test ("-3430020671178955527172622925417363583260241197.62027095120829845", "-2697651899209144982439207207158758256041163754489319553122389855760271821650344473467567943237904607070691739749282365941241955206", "-2.69765189920914498243920720715875825604116375448931955312238985576027182165034447347099796390908356259786436267469972952450219640362027095120829845e+129"); + plus_test ("0.000000000000000000386684190", "-0.00000000000000593500383841354", "-5.93461715422354e-15"); + plus_test ("-229553467063496173115623569488071051955397518369782894211290517387417359092419.21316953918885760546743923347047910041156791448271162", "128761823394.73391412805150185026077404187271056727840511587820472574863102356882320762518910948767394645397112340047229286811934703310025622306", "-2.2955346706349617311562356948807105195539751836978289421129051738728859726902447925541113735575520666519159776853313316279860450689425136897643117679237481089051232605354602887659952770713188065296689974377694e+77"); + plus_test ("752803651337807242880562206786.554894468", "-0.000000000000000001071337", "7.52803651337807242880562206786554894467999999998928663e+29"); + plus_test ("1327499528941.259705731396165260452862352568124098842440934493864336643088192293192971501913307764464886787116200010928852119632015468364", "-0.0000013012400459295541997244614408586478387764368200", "1327499528941.259704430156119330898662628106683240194602158057044336643088192293192971501913307764464886787116200010928852119632015468364"); + plus_test ("-42732826522401556404680286738458727450161584.56982929732944313055951751542753245303762787700081314483", "-0.048575929228921161125311723255416867769014200391591416962565880220141310", "-4.273282652240155640468028673845872745016158461840522655836429168482923868294932080664207739240456179256588022014131e+43"); + plus_test ("-134317115975228516279277369440412329142525813492681218176.452257906478095711445159604268249481814005710", "878.87016124066018104272829846171161822902416", "-1.3431711597522851627927736944041232914252581349268121729758209666581791466871686114255663125278984571e+56"); + plus_test ("-67249264605177190041089081168585468792215793614566298512516668756953699746352828585714616446517294544062645676845293.91", "11785.189223441658736456882609485294922576241169", "-6.7249264605177190041089081168585468792215793614566298512516668756953699746352828585714616446517294544062645676833508720776558341263543117390514705077423758831e+115"); + plus_test ("473845447573029801116507496764870227913948278575637638312271.6929093", "220256599636715846396470132047447071430762023364054132738307.92410966839175642212437153019718871180", "6.941020472097456475129776288123172993447103019396917710505796170189683917564221243715301971887118e+59"); + plus_test ("61663987226727831177358451280.1273785663169955851813593", "7750.4529567880816153892714518857989477603684894511929835815714039337396479", "6.16639872267278311773584590305803353543986109744528111857989477603684894511929835815714039337396479e+28"); + plus_test ("1114249782085628259131.6300784647405324495788", "-75441254269515041497240125862191629.18821756865035216838014718712510162118417621758193335236088548825411631090241783", "-7.544125426951392724745804023393249755813910390981971880134718712510162118417621758193335236088548825411631090241783e+34"); + plus_test ("-47284766640683124441541777476988779051324489666892557826451642191773394572968326419750395845015488519009501143710.226604466706051616676759471", "-178533979356035013007.0486021615920523090681110580689173330395242698234732472413898657172920542549863", "-4.72847666406831244415417774769887790513244896668925578264516421917733945729683264197503958451940224983655361567172752066282981039257448705290689173330395242698234732472413898657172920542549863e+112"); + plus_test ("86971785918916738535599981140236508672686072922404606596498347463786815664561636214", "-38790942580106273917029.8616351336817911518100068189254182509141591442742642", "8.69717859189167385355999811402365086726860729224046065964983086728442355582877191841383648663182088481899931810745817490858408557257358e+82"); + plus_test ("229890914939905533517994656115939439222611214166185047720.6737", "-16450908510999308489324339587686508934693633813727800191296126619327316733314370883200772189175967292716357616129.25956476613892564270457543510303499", "-1.645090851099930848932433958768650893469363381372780019106623570438741119979637622708483274995335607855017256840858586476613892564270457543510303499e+112"); + plus_test ("8624299879022265728690568197694576473349674764163914006555775202613.80066", "-1951918312957524571038442996130836809607213863913860985460832910117284832599299718784244014.9462", "-1.95191831295752457103843437183095778734148517334566329088435956044252066868529316300904140114554e+90"); + plus_test ("0.000000000001791442922101442150265", "-176219478666778.39032", "-176219478666778.390319999998208557077898557849735"); + plus_test ("-0.0000000000000000000450909281658069443034906463413806497945746964537569542795485785087816", "20059612657232793812777346178916639350613903200274271932748642060630002343102688319925466687857659887751178879826484844955146.4794139791133416216349437", "2.00596126572327938127773461789166393506139032002742719327486420606300023431026883199254666878576598877511788798264848449551464794139791133416215898527718341930556965093536586193502054253035462430457204514214912184e+124"); + plus_test ("-6787468140564734605294950923721904660396026978942519331890016886817683748193913278435340067132052148355490986326961525834411933314297910293075891258", "299875808414865644293530981481903399783597394891051377970871372993113352087", "-6.787468140564734605294950923721904660396026978942519331890016886817683747894037470020474422838521166873587586543364130943360555343426537299962539171e+147"); + plus_test ("-2985845195375048154175460145131625566631330811.0698198381350592343482301558903611521655008133682589725943686764286694288782", "0.0000000000003440896409210193126584537498187185057931457434599306493995078695234961055215715664902", "-2.9858451953750481541754601451316255666313308110698198381347151447073091365777026984156820948624658268509087457792699210086765038944784284335098e+45"); + plus_test ("54523776480140693828539812402923.03280118600797412859863998481055730526509253892247361691821925554", "-3018017693744641785170272539537468727331662967020516461365187921.622252481531570142507295", "-3.01801769374464178517027253953741420355518282632668792155278499858945129552359601390865501518944269473490746107752638308178074446e+63"); + plus_test ("-148950590810862085091278929767052107224.8773813216218095795711623868958220961874", "1.75192", "-1.489505908108620850912789297670521072231254613216218095795711623868958220961874e+38"); + plus_test ("194487565128888901387639549948511413965636783508366826662059481869489007007469884500747433533356290730733602216171", "0.000000000000000000012232074647167060238846099337052578273155522711981842441546203086466766954706886327921", "1.94487565128888901387639549948511413965636783508366826662059481869489007007469884500747433533356290730733602216171000000000000000000012232074647167060238846099337052578273155522711981842441546203086466766954706886327921e+113"); + plus_test ("125779680121395715709804872384269463897503936971384019.82361436591484229964552907887172032", "-10705813706184352649413600364408885130948697893", "1.2577966941558200952545222297066909948861880602268612682361436591484229964552907887172032e+53"); + plus_test ("-2218129701029502833268536.3661385527823829459113120296928740", "25227558478464802399374718020711143953033396", "2.5227558478464802397156588319681641119764859633861447217617054088687970307126e+43"); + plus_test ("15922278874844168795624334393750706784541723182329429804868920436645833815588763261631529887040208280", "-26296.887413892620188356349250229", "1.5922278874844168795624334393750706784541723182329429804868920436645833815588763261631529887040181983112586107379811643650749771e+100"); + plus_test ("1869337163952851887099278621758788.4912775488811143022866151909022695202327782530199655924124637283188619937985055306138431", "25.12", "1.8693371639528518870992786217588136112775488811143022866151909022695202327782530199655924124637283188619937985055306138431e+33"); + plus_test ("-0.063341123812589258651794426063119957591863528264980035743077602252627967706982211651872386199270743459561294", "-0.000000000068714090541923937797208713394623709878340222046720399207", "-0.063341123881303349193718363860328670986487238143320257789798001459627967706982211651872386199270743459561294"); + plus_test ("-123065986062521895461889579855429054876.865438792794260927192006", "7084594017255215876752497968505767888079486468316419822128516563096248999466202123.38787540885020434", "7.084594017255215876752497968505767888079486345250433759606621101206669144037147246522436616055943412807994e+81"); + plus_test ("179397967161885408347722783468000236145781976956498009525966031884761882791548055245739198861467543753736467441189809830950974868855035870976.038552", "-6573750410552527157063328131505255371227573474471234861827269.61525370370996879661223", "1.7939796716188540834772278346800023614578197695649800952596603188476188279154804867198878830894038669040833593593443860337750039762017404370642329829629003120338777e+140"); + plus_test ("-139353860859081662533478815947566213452966893244463520929326236932221117460953128298317531935014131121470.4619756268309", "169812848393858427202383142897502241915472009842575593156979023589.9908950026432880351156036902370299251473942264824787465775921562579669735", "-1.393538608590816625334788159475662134527970803960696625021238537893236152190376562884749563418571520978804710806241876119648843963097629700748526057735175212534224078437420330265e+104"); + plus_test ("-0.00000000056135129922386681", "-595119376867293381235464924", "-5.9511937686729338123546492400000000056135129922386681e+26"); + plus_test ("9999400699648583439.910165407231452805204397263", "-239336712014958618084045176038.81761359335921757157899131356", "-2.3933671200495921738439659259890744818612776476637459405056e+29"); + plus_test ("0.000002623585411494924528522745861928371567645115623878", "-5636993000244072951029.8588310419570237", "-5.636993000244072951029858828418371612205075471477254138071628432354884376122e+21"); + plus_test ("-16469.08018532953044652581289843852712919053726120839851886233541371893823", "6420210.71382431387667941690927", "6403741.63363898434623289109637156147287080946273879160148113766458628106177"); + plus_test ("0.0000000001500611664251128666574118039477481282151196384889645376085403596652469864102626694482747", "263135384759861159877959298119330040825421757978037356875485701572152302094162243110", "2.631353847598611598779592981193300408254217579780373568754857015721523020941622431100000000001500611664251128666574118039477481282151196384889645376085403596652469864102626694482747e+83"); + plus_test ("-12317435659483.46", "-238178727623943.57770836536163790335018945716578328065826254", "-250496163283427.03770836536163790335018945716578328065826254"); + plus_test ("705138698371479924718654705441277066425", "-264458728957414529691672105440971342620756281273769616148413659.83139211549669420724473557409844984235683219270687462430060909545589521338825", "-2.6445872895741452969167140030227297114083156261906417487134723483139211549669420724473557409844984235683219270687462430060909545589521338825e+62"); + plus_test ("26845297854.21830300459071341439856406557876499767147640691523616826235445154220875683891282566002689437474534485000263914", "-787376261006598490249180340720309857956285707959849.0204685624653359640496048535548108297789532801386418120", "-7.8737626100659849024918034072030985795625886266199480216555787462254965104078797604583210747687322340564373764554845779124316108717433997310562525465514999736086e+50"); + plus_test ("55036049768.146079287001237352665049000674092", "-22143566056427860768945972894580679205849885116613091602005627.33897358443738987438843476838059361711849053157259882779343", "-2.214356605642786076894597289458067920584988511661303656595585919289429743615252172338576770650161711849053157259882779343e+61"); + plus_test ("-299420594788150782543317652372306174815941523345478009592090041773731019434882.753119389560259765940107169762142160679052728098688521999921", "-12453366463782072599491184208879912917463798673347144858330325.3505439835880291946926163036554982195666987139373567106718470730123422", "-2.994205947881507949966841161543787743071257322253909270558887151208758777652081036633731482889606327234734176403802457514420360452326717680730123422e+77"); + plus_test ("-256022815746044576351192361407997374095362780421849294332421070473692422546466754095230.656295542710250921847773406", "2439108134.33476347036328940422149059899605979832", "-2.5602281574604457635119236140799737409536278042184929433242107047369242254646431498709632153207234696151762628280700394020168e+86"); + plus_test ("-137304230559003045184479307675479065631585995407517838007075545485391216662724836", "-1173188488432045163948013790.3943256082040520817421175529478290364828174703361614075880892748696574370905742309087558", "-1.373042305590030451844793076754790656315859954075178391802640339174363806107386263943256082040520817421175529478290364828174703361614075880892748696574370905742309087558e+80"); + plus_test ("520707804236215170390228230926413098433541569396930548508375720908453157589569499547054273496534756616492929935502789", "275182891299865137595.3277925634463705149893539835817542834549123082412850143300233066529878447078650880805064450173373918062760558", "5.207078042362151703902282309264130984335415693969305485083757209084531575895694995470542734965350317993842298006403843277925634463705149893539835817542834549123082412850143300233066529878447078650880805064450173373918062760558e+116"); + plus_test ("2960407629256095014394492264783919104375530133643554797532898.80192159867955337779238068661889924", "276684036811079285530960359872097261579493580.0498287546202754687941154667048", "2.96040762925609529107852907586320463533589000574081637702647885175035329982884658649615332369924e+60"); + plus_test ("-5517355901446910.93833484348629903096547", "-642213064278646161225254.78548483470", "-6.4221306979600206267216572381967818629903096547e+23"); + plus_test ("152801618545615441308342159364435799274895358751942316139180186", "-44665364463201090323324.0002892895", "1.528016185456154413083421593644357992748506933874791150488568619997107105e+62"); + plus_test ("-42990335950341162574017016", "-155734841164152934379337800729168607491698641563818839018593201886.9108295077085945123926518226547", "-1.557348411641529343793378007291686074917416318997691801811672189029108295077085945123926518226547e+65"); + plus_test ("42132979000424460466648083857741221621925059", "230035200616600947476235404386815897149843926902113349799669418017872910933828", "2.30035200616600947476235404386815939282822927326573816447753275759094532858887e+77"); + plus_test ("-13721903019805428754977193786.436261994441376688889424250392449552098872713999965025277", "10194877.68498209368023", "-1.3721903019805428754966998908751279900761146688889424250392449552098872713999965025277e+28"); + plus_test ("0.0000000000000000000124951715848249957980344035116", "265848190673836152145387.561232311400411988900021332089088465444147046461212646850", "2.6584819067383615214538756123231140041198891251650367391346124218144997281264685e+23"); + plus_test ("-2478.622067383552773557059143603127982", "0.32513599534141365489000782897237000600555505333921918961022131484515789518698137637587", "-2478.29693138821135990216913577415561199399444494666078081038977868515484210481301862362413"); + plus_test ("1279542454.892945577837995361708396", "-135890698074837524994261181604433.067602982488449328126084049766962", "-1.35890698074837524994259902061978174657404650453966417688049766962e+32"); + plus_test ("0.00000011558150572741272723618033490943108053756815783338338515794075800230701762335698251644854707498749273387290233658497030939253228419", "10177968039270056306413680.184343176766129455291207155884626542169167703074423510915329626878514", "1.017796803927005630641368018434329234763518270393439206496145160024824064258134429871478481927200230701762335698251644854707498749273387290233658497030939253228419e+25"); + plus_test ("-1435068.618647657046101438708930395218818069312124176746881282174539906140539486722465500068653075714727202174518522871035823011751", "17.77", "-1435050.848647657046101438708930395218818069312124176746881282174539906140539486722465500068653075714727202174518522871035823011751"); + plus_test ("1133468285512298621716517199739886057755521547545846865283277167663070426262818957724352964984613242138379271360556", "-141537307411.00826429536495677705445", "1.13346828551229862171651719973988605775552154754584686528327716766307042626281895772435296498461324213823773405314499173570463504322294555e+114"); + plus_test ("-3578677705738240793482085438614614551372365641536961576081303950220125233969517175095644.5329094147681", "6370326210773977367247462308.43303220494101174275111504449143", "-3.57867770573824079348208543861461455137236564153696157608129757989391445999214992763333609987720982708825724888495550857e+87"); + plus_test ("4539369410251014415308963272777018911975282268127892682157655.2687008509", "0.000000000000000001809319965416452365878526603785327342157425587339349", "4.539369410251014415308963272777018911975282268127892682157655268700850900000001809319965416452365878526603785327342157425587339349e+60"); + plus_test ("-11612662163115798192491748988208694545917762161675688590981743152130989015346035128837953127650326301679404956035505966175985535696091516284466656479", "-129128951232580369482047739685813992608602054001765557698178402197589395906493483213995", "-1.1612662163115798192491748988208694545917762161675688590981743281259940247926404610885692813464318910281458957801063664354387733285487422777949870474e+148"); + plus_test ("0.0000720244123748728799957336555523697", "71791325249354506431814914086989", "7.17913252493545064318149140869890000720244123748728799957336555523697e+31"); + plus_test ("-133560.04", "0.0364781487240002253276365093066436254283459521449826381477605260349961957510696178085420533616152821352777161063017", "-133560.0035218512759997746723634906933563745716540478550173618522394739650038042489303821914579466383847178647222838936983"); + plus_test ("224439133349456441836858561541114452976410738191588.76028", "7143422387100306585012321998.95338744534500001350", "2.244391333494564418368657049635015532829957505135877136674453450000135e+50"); + plus_test ("0.000000000098363222378328329588864342385890675532349142951521770288606050467173967001464527333472294637844", "0.000005565523790105586010252525454", "0.000005565622153327964338582114318342385890675532349142951521770288606050467173967001464527333472294637844"); + plus_test ("-19302672950888869853468603175885975100580447783425209560751846890885724469162939072204904025589809680230949.15", "-5221907579579195185631992055573", "-1.930267295088886985346860317588597510058044778342520956075184689088572446916816097978448322077544167228652215e+106"); + plus_test ("446571007966420189521982224619283959966447939678911167542457919503539937579809547715586812124362669", "-0.000000001532941453246004602861225513798223406668763246640071116663063458244535088282298106516453270820501460262785607", "4.46571007966420189521982224619283959966447939678911167542457919503539937579809547715586812124362668999999998467058546753995397138774486201776593331236753359928883336936541755464911717701893483546729179498539737214393e+98"); + plus_test ("162256387512654913999487367376656275516", "-16092263592753754060348826948877883484399357352376898503109928037035273000095267537045095647020.9340480402341251915539575258", "-1.60922635927537540603488269488778834843993573523768985029476716495226180860957801696684393715049340480402341251915539575258e+94"); + plus_test ("-86.282711884059841689767705467465544410310216259432751729", "-92429065419108217418705866104650901.759952292192027196592545226813152124130603195434172370", "-9.2429065419108217418705866104650988042664176251868886360250694278696534440819454866924099e+34"); + plus_test ("-75868293.338801243263000230664880224491442311102621282662689408530004543", "2944972.7213068711096384504382609733072677", "-72923320.617494372153361780226619251184174611102621282662689408530004543"); + plus_test ("-238444972635059326925252856448297027255504596325494840989337749695326400426034906266359680165724.6162269656460992471659583387303201989744940449", "-63316025717469", "-2.384449726350593269252528564482970272555045963254948409893377496953264004260349063296757058831936162269656460992471659583387303201989744940449e+95"); + plus_test ("-0.00000000000000000002628376740857869992666514908906633928490609752241821541445544366572977726597123951321896262451176771066761534225489543173636033414059", "-0.00001057742323776455463981263889953456044073157406788745965110714274589491766184028326935", "-0.00001057742323776458092358004747823448710588066313422674455720466516411033211728394899912726597123951321896262451176771066761534225489543173636033414059"); + plus_test ("-0.00000000000003565805735839291765636742503", "0.000000000000000989774781039626", "-3.466828257735329165636742503e-14"); + plus_test ("0.00000000000000375655426038511007746679974331400659776884912884102085329769227537463698444", "546526458201961217312998279716410991.2240626147007447545948388", "5.4652645820196121731299827971641099122406261470074851114909918511007746679974331400659776884912884102085329769227537463698444e+35"); + plus_test ("-14278318423785251476284397565212.1237964463782332", "-37174052283987138.47044217178181655468224887601671623199409260448279688190513294184710815453374043139975669500607120979735080911231772347", "-1.427831842378528865033668155235059423861816004975468224887601671623199409260448279688190513294184710815453374043139975669500607120979735080911231772347e+31"); + plus_test ("-17330.438895896038328483940004", "8350320541724405487824535323446674.061386758095913411145749626626909634263800865346657", "8.350320541724405487824535323429343622490862057584927205745626626909634263800865346657e+33"); + plus_test ("-0.0000000000003788156589604414602956818964327013143296398421560231778437969245", "1634246393878053828481992729777312078472156.145364321882169640446334568077598604110397446683352082023376014305304686515469544910814539917743927216291855", "1.634246393878053828481992729777312078472156145364321881790824787374126617302922213964745369022442181219991127460889590969544910814539917743927216291855e+42"); + plus_test ("408110915553257916118522792717017858639986473034925463411181033631049938756007592", "-4438008.684761039161", "4.08110915553257916118522792717017858639986473034925463411181033631049938751569583315238960839e+80"); + plus_test ("-204903173380829791053251747", "-191455970489532344774803952466.94684645095468153608792233241808335603853244943133837112979971481605", "-1.9166087366291317456585720421394684645095468153608792233241808335603853244943133837112979971481605e+29"); + plus_test ("132721140690308763835711368030783660696277559510011717622014.3314196", "0.00554064704637147709273658476408607464726088564072789893070411751226529035714577466777850716116505710506906049773777298273003529699", "1.3272114069030876383571136803078366069627755951001171762201433696024704637147709273658476408607464726088564072789893070411751226529035714577466777850716116505710506906049773777298273003529699e+59"); + plus_test ("0.0000000000000000265193728860055071583880736", "-0.0000000000000000011892979550800567635892667658882072063", "2.53300749309254503947988068341117927937e-17"); + plus_test ("1924004.96231", "-7445082351600096.3980954490079933041653479391080501268670868688846572103759932357179141189615092741415678649052246409361594010562380231156977081147310", "-7445082349676091.435785449007993304165347939108050126867086868884657210375993235717914118961509274141567864905224640936159401056238023115697708114731"); + plus_test ("0.000000000000000000013903352680411740283535242027183387301940111406117407562975303647341986279", "0.000000193241459485855551124461468088220083733257451375352357494658457700846322832086915983440402233205", "1.93241459485869454477141879828503618975284634762654297606064575108409298135734257969719402233205e-7"); + plus_test ("-0.000000000003326499271235431532653228418183469394009927691863875127864766277232493921924691425777066908583580479571", "38538.5", "38538.499999999996673500728764568467346771581816530605990072308136124872135233722767506078075308574222933091416419520429"); + plus_test ("-20818471791668358551694729332150711.171307610", "-0.00708772819104515753090752104339593647529198186926535557761440185947368079580", "-2.08184717916683585516947293321507111783953381910451575309075210433959364752919818692653555776144018594736807958e+34"); + plus_test ("-752467347549701119616683978206438108", "0.00000000000000133182829836217784813241401889873", "-7.5246734754970111961668397820643810799999999999999866817170163782215186758598110127e+35"); + plus_test ("-71331.43876400219162800429885965449977637326182916850599237355086577534159328324037916425312333490817913501686724307", "-0.0000032139466257383829211495727047401282848726415697991943119851858819503701337097998682466465136331", "-71331.43876721613825374268178080407248111339011404114756217274517776052747523361051287405299158155469276811686724307"); + plus_test ("0.00000000003870179783985381063243324820910313", "-548412148702636016270138827097973238704618012095820424598631550144908156181914050173920.55528708694731", "-5.4841214870263601627013882709797323870461801209582042459863155014490815618191405017392055528708690860820216014618936756675179089687e+86"); + plus_test ("0.000000000000000159733765895", "2415466722403145928603501563265788955.65674020714185313333653211954046063741077995756304216513522037423497068589560605814929217258491053368146", "2.41546672240314592860350156326578895565674020714185329307029801454046063741077995756304216513522037423497068589560605814929217258491053368146e+36"); + plus_test ("227954506189379566132.3531049565054147523709893227464306251862462550700080825380345883105195752839361334678871895593932042077071912003898512892", "-0.000000000000000243005506005006402417515376832343523332630896909903184829530830475018969291441011676442441851780434411064620687143851249145363683686213768587121", "227954506189379566132.353104956505414509365483317740028207670869422726484749907137678407334745753105658448917898118381527765265339419955440224579312856148750854636316313786231412879"); + plus_test ("7973988940224355015214336919379953485029536", "-46903881814522001507986816.99248409698766603253677611753397276067931254075552578", "7.97398894022435496831045510485795197704271900751590301233396746322388246602723932068745924447422e+42"); + plus_test ("-28179553528461976563", "248852934964030510956645790197846644600695689011471340357218184219306881752129281687476727", "2.48852934964030510956645790197846644600695689011471340357218184219306853572575753225500164e+89"); + plus_test ("-0.00000038749442098332718476018064732023168357745188079514035581267126125927216662843067618614699072618739224559403486391045982462716534370262", "4925006594013147257537583640291677799280156031827105", "4.92500659401314725753758364029167779928015603182710499999961250557901667281523981935267976831642254811920485964418732873874072783337156932381385300927381260775440596513608954017537283465629738e+51"); + plus_test ("15886467257912495.75689320719759657353210920879083109402692609", "-1849440876713050806208487397730416627460.30935631710582208341731553877239172695260308652973787159595347848456382322348819127147788006459039327206090843", "-1.84944087671305080620847151126315871496455246310990822550988520632998156063292567699652973787159595347848456382322348819127147788006459039327206090843e+39"); + plus_test ("-5026233483715918355642138258166736347547068019235638147637409254751306580678549839", "0.00000000000019779052536990808660692", "-5.02623348371591835564213825816673634754706801923563814763740925475130658067854983899999999999980220947463009191339308e+81"); + plus_test ("0.000000000000000000062846132155934866382475838803414329167925640917238247929247187597144605858850", "-28375804842138366819355751075050288391048198685203076654182288294782980828652856275283802825108048295625084622829828083365524827680002246249410431", "-2.837580484213836681935575107505028839104819868520307665418228829478298082865285627528380282510804829562508462282982808336552482768000224624941043099999999999999999993715386784406513361752416119658567083207435908276175207075281240285539414115e+145"); + plus_test ("-48863470201397.143927278109695419367309919023804132", "-168361072783150231412254024286758558795677828805121174243492869928073465709719014.023363549742186056665143055249248475718140936364", "-1.68361072783150231412254024286758558795677828805121174243492869928122329179920411167290827851881476032452974273052607718140936364e+80"); + plus_test ("0.0000000000000018997661230877089423253849452578256073300966468605209561343912897439707821108359408910538145364970969403440848507153309", "-0.000385522197", "-0.0003855221969981002338769122910576746150547421743926699033531394790438656087102560292178891640591089461854635029030596559151492846691"); + plus_test ("865008.237475", "-141572245488815215559.668813721278969595937436750693180747505198056296244191362365981067", "-141572245488814350551.431338721278969595937436750693180747505198056296244191362365981067"); + plus_test ("4531430332.974369182979674290738630476176408845410151617472188112662759", "-0.000000000000002990088033905170812634080622222063618156981784899967819720909679583969232226858480299674669693921077115362022886", "4531430332.974369182979671300650596571005596211329529395408569955680974100032180279090320416030767773141519700325330306078922884637977114"); + plus_test ("1713604693153132011650052009647770010715862661891416010.39872031838645104", "-5209348059320160498592207950890250846.48", "1.71360469315313200644070395032760951212365471100116516391872031838645104e+54"); + plus_test ("298.64569377145669370010760887428305419049211767076463966663182890471105450765507454904166021", "0.0000000513282401911235340888997773718547011660029236548742535384576211684698905846807631716329563685023698", "298.6456938227849338912311429631828315623468188367675633215060824431686756761249651337224233816329563685023698"); + plus_test ("153158125588135275971624448998303827924375983937687494263.6", "522574.2172656390720935407437590923430209583762529523179633299440845173022407980283974345034782042", "1.531581255881352759716244489983038279243759839376880168378172656390720935407437590923430209583762529523179633299440845173022407980283974345034782042e+56"); + plus_test ("-37584369371625804653778917725.04710852052873625022089539878880649643091488064967", "387289160645786908822166966661304359256521.40416120883", "3.8728916064574932445279534085665058033879635705268830126374977910460121119350356908511935033e+41"); + plus_test ("333145493405211943110181488709393444800555889546483.25", "337039689069037487854189149366025543071617091671893617361194217844843723876472794060690078788349535879526770512127905359.772", "3.37039689069037487854189149366025543071617091671893617361194217844844057021966199272633188969838245272971571068017451843022e+119"); + plus_test ("-0.00000000000000000875947840124838794446714154793538138133101442657807977884554262860149896878671504", "6121126413234312706434650834319645665575176210124040301876334782352.2701746892166273345074659234578320327195185867786496894475416", "6.12112641323431270643465083431964566557517621012404030187633478235227017468921662732574798752220944408825237703884326830811652717342192022115445737139850103121328496e+66"); + plus_test ("-27101285266584198282389701705604910688467857152047550105271200946392221564235258269.0800011597617806021545806843947528587392169", "-93984277.78258808561", "-2.71012852665841982823897017056049106884678571520475501052712009463922215643292425468625892453717806021545806843947528587392169e+82"); + plus_test ("-19256051893600692288537586.59353458509306480025521794532051383696889407478585008231545758785", "-8963065351854.7878237484328880211387666531886258820788775118", "-1.925605189360965535388944138135833352595282139398459850913971904777158658585008231545758785e+25"); + plus_test ("11569497283022449921394189469855978299381812519350940701313946487504335257098102797076761168675477401606", "354878912159213729324887521064557506231700037558958924247470744332285142081086865543601683607743.711010177974", "1.1569497637901362080607918794743499363939318751050978260272870734975079589383244878163626712277161009349711010177974e+103"); + plus_test ("31410760334069399540603136630010363.370516", "-0.00000000000000000250028865888009060099213589080181239288708801576170886559433463009608557725740080566463813772802697909277043093845092263791985", "3.141076033406939954060313663001036337051599999999999749971134111990939900786410919818760711291198423829113440566536990391442274259919433536186227197302090722956906154907736208015e+34"); + plus_test ("48450334100677709.292858595098179054162833212046954235133498994154015488631434964418926099", "-5452278790911076.131563791561554078354880486603279", "42998055309766633.161294803536624975807952725443675235133498994154015488631434964418926099"); + plus_test ("-726362472599493167754185550127976323995131102302190474448.022897051088265272546787050801660", "-26697.1300027", "-7.2636247259949316775418555012797632399513110230219050114515289975108826527254678705080166e+56"); + plus_test ("-5169217768018238832429254316846393556631723341237749333387854823.66306235977379827807976904396539087620041043309411525365990764018230223245161", "21048346121126363354727928959697501228648890358940.20948083990111835371727450225140678862878629117909606507623912415702402888341685852", "-5.16921776801821778408313319048303882870276364373652068449749588345358151987267992436249454171398408757162414191501918858366851602527820356819314148e+63"); + plus_test ("0", "3880335331987075756173782777964278144918139052756795465605564193503574084038075", "3.880335331987075756173782777964278144918139052756795465605564193503574084038075e+78"); + plus_test ("1471118130122845147276641392737353012928182703107626659491246625014486338076282524169910132047730182612396587213027711271216.07461", "-9022200078219.61142095898083863316225395343911361206316438521617777", "1.47111813012284514727664139273735301292818270310762665949124662501448633807628252416991013204773018261239658720400551119299646318904101916136683774604656088638793683561478382223e+123"); + plus_test ("1961360640267", "-8237317626242593351740131071931066270126645544302536441310151862831895121602611.6685378785733350998", "-8.2373176262425933517401310719310662701266455443025364413101518628299337609623446685378785733350998e+78"); + plus_test ("250056193902937472244979.030455795040281239421914909457299497068011838527472729233340186411522", "-389637478200780623396903050063520125697228676163384342985662391907774888793755259018717015963204238731047741576614654499.6", "-3.89637478200780623396903050063520125697228676163384342985662391907774888793755259018717015963203988674853838639142409520569544204959718760578085090542700502931988161472527270766659813588478e+119"); + plus_test ("-41.0667685182669426103291702409386770119233174954666626675833072533459819908153", "-24683428468133023718789488350081878137388951325390325606955366999359.7544", "-2.46834284681330237187894883500818781373889513253903256069553669994008211685182669426103291702409386770119233174954666626675833072533459819908153e+67"); + plus_test ("-1465078045399636479827859198546113217231061854355552775", "286781605726130466373594446109778466785174261888370270594913242", "2.86781604261052420973957966281919268239061044657308416239360467e+62"); + plus_test ("-0.00000000000000004372082675620531277773860157001154109814365737979121603370264972266779787151695587487529163780797491077618453622889827822", "0.0000000000000000115010056472096691762701979992534492116764302820728655795640758846469523814776292792892505", "-3.221982110899564360146840357075809188646722709771835045413857383802084549003932659558604113780797491077618453622889827822e-17"); + plus_test ("-5915475824828715769525622713448197545310987686571625215824865265460902144119719.60667712865151405621927923268842958349404793882328736294067066", "8289599618691777653744294128182319598849442999.3869210944639310536363962387071546926", "-5.91547582482871576952562271344818925571136899479397147153073708314130329467672021975603418758300258288299398127489089404793882328736294067066e+78"); + plus_test ("-6781589283952862541042634770259255399053423179553784209358601916774267083862536888853055882080202198759767010533235152604760503522710009", "0.000000000162", "-6.781589283952862541042634770259255399053423179553784209358601916774267083862536888853055882080202198759767010533235152604760503522710008999999999838e+135"); + plus_test ("-7401754762477043478410731850924229267152.1385806493837710954211647499789972995005461407065862284241906466005572091609381993770", "6814772121230277085632920582844817329083526354461024137801607310774405037993936581203797318438915758471288490759159235041741129", "6.814772121230277085632920582844817329083526354461024137801607310774405037993936581203789916684153281427810080027308310812473976861419350616228904578835250021002700499453859293413771575809353399442790839061800623e+126"); + plus_test ("-8", "21559462366454603856476372397626468240404955163730871821082532003169939666641.3471758", "2.15594623664546038564763723976264682404049551637308718210825320031699396666333471758e+76"); + plus_test ("-10740658919737638642657973180452168052201470445", "0.0000000082551674495554316423778277737071293814860377807246652498052504231443776872267372379", "-1.07406589197376386426579731804521680522014704449999999917448325504445683576221722262928706185139622192753347501947495768556223127732627621e+46"); + plus_test ("95996905118671016719266871729.520398129746", "1424664524272137031863748414508.04407607261068488341354804735012808909858790022643537811522935701269430843913849", "1.52066142939080804858301528623756447420235668488341354804735012808909858790022643537811522935701269430843913849e+30"); + plus_test ("7545686522420.04", "-110343136.2377175", "7545576179283.8022825"); + plus_test ("-3778460127635156232285998080.7598066400530666299808051012", "-0.00056022982056213327166370574884842481363234", "-3.77846012763515623228599808076036686987362876325246880694884842481363234e+27"); + plus_test ("-205.787", "40023148.03084250896", "40022942.24384250896"); + plus_test ("-10469.58581784685565292886210019593298608566213", "0.00000000000000055769617173", "-10469.58581784685565237116592846593298608566213"); + plus_test ("-1697421104198498565372", "130856814871284869392577271881365150502943114887052960993846", "1.30856814871284869392577271881365150501245693782854462428474e+59"); + plus_test ("-0.000000414035245121759801970634606896989047228634707532", "-38870447038068433224878605004808090705226214661500574171036129739107587668370820311143094.957", "-3.8870447038068433224878605004808090705226214661500574171036129739107587668370820311143094957000414035245121759801970634606896989047228634707532e+88"); + plus_test ("-2028389003568384286508207197206771601505013066674015630980.40648010665804431311941439248759845544570040200920378245684409301143522362121397976187113415", "-0.00000000000000000001828002844616325557520485512882126384242054987542132167273332845067757", "-2.02838900356838428650820719720677160150501306667401563098040648010665804431313769442093376171102090525713802504629926464288685654529394730821254870415e+57"); + plus_test ("-0.00000188443084941099579692438787131849288418100707817192098239393848434584554053801905703996798261121316300897664557", "-3594409179355959594852497571834744071660256911.32474274552929134136288086348918314067885678172370772397", "-3.59440917935595959485249757183474407166025691132474462996014075235867778787705445917174096273078589589098239393848434584554053801905703996798261121316300897664557e+45"); + plus_test ("-0.85273", "-279017792692170227516916053414297917923905837082261296273831887211350843745548269287411294.07131470147929582735586577119", "-2.7901779269217022751691605341429791792390583708226129627383188721135084374554826928741129492404470147929582735586577119e+89"); + plus_test ("1465314670123686042148720875703178202039648.513007703872541159651633499734046400788", "777575543578333746326.8333028060", "1.465314670123686042149498451246756535785975346310509872541159651633499734046400788e+42"); + plus_test ("-26920347118432602525813368030981387.1405710723", "-9.7088124301334057558783763899332243970338509361338006057662744040169648799290478801660095182592839804430939342926", "-2.69203471184326025258133680309813968493835024334057558783763899332243970338509361338006057662744040169648799290478801660095182592839804430939342926e+34"); + plus_test ("1316027450661167908370945255095582684.489766006179613245381691072", "-27247880103214807605061248065261158542.238847334604", "-2.5931852652553639696690302810165575857749081328424386754618308928e+37"); + plus_test ("0.00000000000000060630789744883065327236848700992137069065181792024986218307439791524854229166347681155", "23583422975999413573947442313781193552150628103226534113902", "2.358342297599941357394744231378119355215062810322653411390200000000000000060630789744883065327236848700992137069065181792024986218307439791524854229166347681155e+58"); + plus_test ("-270309750628324546215936875977251097460648729.2740106846988640562244700895457240150700468834022435265506238503209610561582721812729822740951287073436", "6623510422802645083643613990747833105477640970454392196256901453016184756585217878929893750.897051821348362132957036238424470", "6.6235104228026450836436139907478331054776409701840824456285769068002478806079667814692450216230411366494980767325661488787459849299531165977564734493761496790389438417278187270177259048712926564e+90"); + plus_test ("56833947334627412648354391179890", "-0.00000000000000020974557897099293264846", "5.683394733462741264835439117988999999999999999979025442102900706735154e+31"); + plus_test ("-32374924556195581487094651860979067186648013640229524477572717027565077414917194641088084918165166494.4007630", "0.00000000000494296301119272380546991072751573073742664686905799391552910274849845882330521177213047667", "-3.237492455619558148709465186097906718664801364022952447757271702756507741491719464108808491816516649440076299999505703698880727619453008927248426926257335313094200608447089725150154117669478822786952333e+100"); + plus_test ("-1797058201757575606389544872285070938241126244.769314657904583268612759343503712876640776918509", "-123578693378839714952814254501905650483998928961025522981908260845901294079261880178955413386", "-1.23578693378839714952814254501905650483998928962822581183665836452290838951546951117196539630769314657904583268612759343503712876640776918509e+92"); + plus_test ("-225494018080889118537669713.9577313306531049801615408808777093224321509314", "-682519588810576318453197726941395968412861.368346014111618610229581846002026209517358035441594633629722053374906068945767849660172087", "-6.82519588810576543947215807830514506082575326077344764723590391122726879735531949508966841594633629722053374906068945767849660172087e+41"); + plus_test ("-146483103623737636574187312839618731854", "-164095488530068730324672.278737858685739790237796055945", "-1.46483103623737800669675842908349056526278737858685739790237796055945e+38"); + plus_test ("288065905331021752942013707735111579224784706910.9694544539500946696884975171333618909754943414924752306735638546017809645829364174230805972", "-1879997868031626.13530883243794860502747913408966454", "2.880659053310217529420137077351096992269166752848341456215121460646610183830436973509754943414924752306735638546017809645829364174230805972e+47"); + plus_test ("-30585397102026875650261239591045069897098845982837987425500176089534774480799.196611528585829637554", "-8.2", "-3.0585397102026875650261239591045069897098845982837987425500176089534774480807396611528585829637554e+76"); + plus_test ("0.0032143", "-0.00000327364505987922707888345463293127602039856777788995949286363555265326340970495", "0.00321102635494012077292111654536706872397960143222211004050713636444734673659029505"); + plus_test ("0.0000000000000122089", "-0.00000000009606197314249053393037900593870599194195536081517004235811304298818227827198075675001652859716008205203077623130159549042380478073889176477922188", "-9.604976424249053393037900593870599194195536081517004235811304298818227827198075675001652859716008205203077623130159549042380478073889176477922188e-11"); + plus_test ("-1519120.89697395603485201266905849077718172383773866152054", "-1252690569967.49008", "-1252692089088.38705395603485201266905849077718172383773866152054"); + plus_test ("135272242707147130668128741572727753877823517.5267897682843968097498958339590924822841849811607010672", "5323052067036940514642933493723371314528945383203996481350033868198902738290466758895359108447.5", "5.3230520670369405146429334937233713145289453832041317535927410153295708670320394866492369319650267897682843968097498958339590924822841849811607010672e+93"); + plus_test ("1373517886847509715943778293771477989783556837632514732917942", "-0.0002918853", "1.3735178868475097159437782937714779897835568376325147329179419997081147e+60"); + plus_test ("-7.74", "-0.677942863330392341680315597792114620456629945201714481742115371479319069952739078864753759584", "-8.417942863330392341680315597792114620456629945201714481742115371479319069952739078864753759584"); + plus_test ("0.000000000000020414435064555641261166870351580734289075091673294774203415476224497625497586758753668", "-295256622638190096478809549470566", "-2.95256622638190096478809549470565999999999999979585564935444358738833129648419265710924908326705225796584523775502374502413241246332e+32"); + plus_test ("0.00000000043262197364654223753368765660064439474065876064265664457730559389", "7732179149449785953403196073740747199538706014956074135203031279754730991083612056065.08514009015794758031660841", "7.73217914944978595340319607374074719953870601495607413520303127975473099108361205606508514009059056955396315064753368765660064439474065876064265664457730559389e+84"); + plus_test ("-31545120553641346250429.2041019063650382985", "-0.00000000000000322497856922376578447917222257195", "-3.154512055364134625042920410190636504152347856922376578447917222257195e+22"); + plus_test ("-0.00000001491640137712266436315173456229606458713951581451514404607758964925714049589638484422967721927256", "875664170041898483278650.4", "8.7566417004189848327865039999998508359862287733563684826543770393541286048418548485595392241035074285950410361515577032278072744e+23"); + plus_test ("0.000000014725515297168007", "-0.1721217425079357563094435985505347277188701680317422409696115500647420231", "-0.1721217277824204591414365985505347277188701680317422409696115500647420231"); + plus_test ("-0.0000000000000000074805926405562", "-32346407643566307755196.3614356592764197829600176806496", "-3.23464076435663077551963614356592764197904406103212058e+22"); + plus_test ("-313255500747185422178551717566317427599882739101058623548833613806257.69583741347200945021282349083047007656822121171291826489554745460530313085870235", "-0.0000000000000277730681342000948755480478956572325828011175067392454201615642985418337229601771222072988252633636962852384552843309099649046742455014449802537116792", "-3.132555007471854221785517175663174275998827391010586235488336138062576958374134720372232809576909253456246161168689455010660130541938507232924230008918337229601771222072988252633636962852384552843309099649046742455014449802537116792e+68"); + plus_test ("796875527749558859721941966594505581298971405919740366253609646289883816950441012", "0.000000000000000106051762207090679888452342439518714917029053485988097086863407642961157123252080954014447191265506482837715480", "7.9687552774955885972194196659450558129897140591974036625360964628988381695044101200000000000000010605176220709067988845234243951871491702905348598809708686340764296115712325208095401444719126550648283771548e+80"); + plus_test ("-2799308221255727632154376162818591439464534253442269002690075449594707354769913622", "-2653089999757580649494973458723447833943060689063627290.948", "-2.799308221255727632154376165471681439222114902937242461413523283537768043833540912948e+81"); + plus_test ("5230.6", "-1457159088427391036497085292606459576.080762789887425314064087931228782784478984069210492316", "-1.457159088427391036497085292606454345480762789887425314064087931228782784478984069210492316e+36"); + plus_test ("2265111540331847.44385", "0.0000000000000000026399730647357391221240416795810255729781114791438489591810343937780321771723301295667448186691762052166888791236524529182049438", "2265111540331847.4438500000000000026399730647357391221240416795810255729781114791438489591810343937780321771723301295667448186691762052166888791236524529182049438"); + plus_test ("-0.000000000000000000130351174611495679446350395997550522969873358970359485781", "6837379692457094204055811341371130548614625165355.865146", "6.837379692457094204055811341371130548614625165355865145999999999999869648825388504320553649604002449477030126641029640514219e+48"); + plus_test ("7777457612952579632757962073721379887227173983203369078658939826377158630604554480732826290762", "738745470.90386876186959774624", "7.77745761295257963275796207372137988722717398320336907865893982637715863060455448073356503623290386876186959774624e+93"); + plus_test ("2091587164056284398722371839269632038542800738624345517942031403189897878173896765128677273428424903855243972440613077101074439732042713569", "-4951053013270976201467725287896995979570086801989189606256031245422534338962187224417", "2.091587164056284398722371839269632038542800738624345512990978389918921676706171477231681293858338101866054366184581831678540100769855489152e+138"); + plus_test ("15596526663192771382682194043241293744360284406119405225927225287207668035938290350623.0136029816344460485336790911173723056262086400741246575531343349", "-0.00000929115562", "1.55965266631927713826821940432412937443602844061194052259272252872076680359382903506230135936904788260485336790911173723056262086400741246575531343349e+85"); + plus_test ("-0.143235913932920000943491996904423637", "105465669771635331021255530853326638414654835668447488251.44604956381929966", "1.05465669771635331021255530853326638414654835668447488251302813649886379659056508003095576363e+56"); + plus_test ("-131.66335836273650457236601594959663422039552341367012898208021864544080993", "0.000000000102821561249286522291590439126847620376937400555244959227688218488059751276284980726909295138051809044", "-131.663358362633683011116729427305043781268675793293191581524973686213121711511940248723715019273090704861948190956"); + plus_test ("-8211501623.467468766754729150340637983678978062348865062714034523840862885354594840", "4138.57064149204825240856224917824913", "-8211497484.89682727470647674177838880542984806234886506271403452384086288535459484"); + plus_test ("448392812.1018844354312957", "0.000001316332446359801420119858000840615513663646321599278426150890005786837699907597501844047946311701498712958992807897", "448392812.101885751763742059801420119858000840615513663646321599278426150890005786837699907597501844047946311701498712958992807897"); + plus_test ("-0.0000515081990743416226512970055332416111901", "9721676157492236482889538449332613888622823236564458642190.9068670871984057788931368828097465243944915994782715793742390978277016751898427038", "9.7216761574922364828895384493326138886228232365644586421909068155789993314372704855858042132827833014994782715793742390978277016751898427038e+57"); + plus_test ("0.00000016348993711366066763304174336589379906596596798355118", "27092941593289173149253532518.630793971858294366753", "2.709294159328917314925353251863079413534823148041366763304174336589379906596596798355118e+28"); + plus_test ("1750188741743624090823079726633157080090405425107855229635890.59733375", "0.00000000000000253442", "1.75018874174362409082307972663315708009040542510785522963589059733375000000253442e+60"); + plus_test ("-120.632964973", "5599333570130562863508293629418111213773068135437215884309301113811346990002242140", "5.599333570130562863508293629418111213773068135437215884309301113811346990002242019367035027e+81"); + plus_test ("-12956.8", "-28125616598.519875442790896131080979434706515929141364365696194890485115866976051969974226520962106271082896", "-28125629555.319875442790896131080979434706515929141364365696194890485115866976051969974226520962106271082896"); + plus_test ("0.000000291488949451719436740561621135104503110544381471384117075881655619830678129379740688277538395366270063296614253757547811832765458961027261", "742031645768480260456626682374347039419606586767893047218475327818790868744906.4174591102001653101442893099824528369555", "7.42031645768480260456626682374347039419606586767893047218475327818790868744906417459401689114761863726050544073972060003110544381471384117075881655619830678129379740688277538395366270063296614253757547811832765458961027261e+77"); + plus_test ("-87648513454369557979997099620411798538786483894671.07140", "-1", "-8.76485134543695579799970996204117985387864838946720714e+49"); + plus_test ("11680.216847571", "15545171141903075635187317512728638503.5120154558326692202036513424672740379112385241218565405732440132", "1.55451711419030756351873175127286501837288630268326692202036513424672740379112385241218565405732440132e+37"); + plus_test ("217933206105480443145202005696333545459278284908.49635092233713353554300078449954457018472363340", "851760835565720226699101062761084114408263270495330844773733382141014174507794413266810316.1227643422652856425756237116285709", "8.517608355657202266991010627610841144082634884285369502541765273430198708413398725450952246191152646024191781186244961281154701847236334e+89"); + plus_test ("131096.71", "-92311622283713248650111150643196971194314788501758170221195801273003488.29608754610346056452229667146067507425547000551040945788003726", "-9.231162228371324865011115064319697119431478850175817022119580127287239158608754610346056452229667146067507425547000551040945788003726e+70"); + plus_test ("-7.3", "-0.0000000091386734958004013759891573873629383131", "-7.3000000091386734958004013759891573873629383131"); + plus_test ("-83570037032769234234524544857963", "-16329401826664066011232.5825604925166033769207446067722340786326", "-8.35700370490986360611886108691955825604925166033769207446067722340786326e+31"); + plus_test ("207724189276.2354966467766137168630074255", "368.36464299671427627280350157241857056036300267791934105571800636754609729339278308276622409777940247912804080708853009235428453986", "207724189644.60013964349088998966650899791857056036300267791934105571800636754609729339278308276622409777940247912804080708853009235428453986"); + plus_test ("1036451349506118936704271313996579271029057412.5954933332585621063133644518747511868339417", "1919224338475644109", "1.0364513495061189367042713159158036095047015215954933332585621063133644518747511868339417e+45"); + plus_test ("4594184.672287496737761641402840568569137816292501654869263256716904015818", "9", "4594193.672287496737761641402840568569137816292501654869263256716904015818"); + plus_test ("50922584112695986965179537750579107265371590444561808302376506246479343493.0485900097493874734", "-105588622877722030471490473554330788644165258321036318195143132112931", "5.09224785240731092431490662601055529345829462793034872660583111033472305620485900097493874734e+73"); + plus_test ("8762733230291549920959.461299029519859816221596648161", "-0.0000000000000031719158", "8.762733230291549920959461299029519856644305796648161e+21"); + plus_test ("-0.000000000001088450644628700841462499123795267689859321764189574607336877911119745839851152785101218885203868", "225068092611409981730971194567763438117689044018909866535690426664845083547381487510884944286310222323340655938142842019712684", "2.25068092611409981730971194567763438117689044018909866535690426664845083547381487510884944286310222323340655938142842019712683999999999998911549355371299158537500876204732310140678235810425392663122088880254160148847214898781114796132e+125"); + plus_test ("-0.0000000739096483131943", "0.0077245546142820934802776687821282016447278885", "0.0077244807046337802859776687821282016447278885"); + plus_test ("13773756.65", "82341713701089392.952", "82341713714863149.602"); + plus_test ("0.210858539297226184666150871507845048599002989549496974738305", "893397778957253392646834827705840161788170516925929814290917857496573588954994819301103.84678150026", "8.93397778957253392646834827705840161788170516925929814290917857496573588954994819301104057640039557226184666150871507845048599002989549496974738305e+86"); + plus_test ("-311598106485014524446810253701.9", "-273597385676217579425078047906355.35858548639357", "-2.7390898378270259394952485816005725858548639357e+32"); + plus_test ("0.0000000000000010949761538307759705645612635463870582102620259", "-642669739487957339653187054422612017200108895155999822088234612866942591002244842.544328938390312037134789574351984286413492175445739315", "-6.426697394879573396531870544226120172001088951559998220882346128669425910022448425443289383903109421586357435760137218522286290586811047379741e+80"); + plus_test ("-1413496343761296278143773037357799924448219743939.91034833304743349454253527380297135637064998230", "-0.0967154985326414596487190403709602844792653613", "-1.4134963437612962781437730373577999244482197439400070638315800749541912543141739316408499153436e+48"); + plus_test ("88324430808176237552938.25850832460", "-1355506260987917851790849984926562224803792482721611489882549294623263720214603522264447050471402562893267497494827198102938336997669.605991", "-1.3555062609879178517908499849265622248037924827216114898825492946232637202146035222644470504714025628932674974065027672947620994447313474826754e+132"); + plus_test ("1913616274506284536238001245388057898244388034.32351451667730419851", "-0.000000000000007988642436925641812976903901681868680726375828237077834585228067490119284435811740642127567200765018765914463975898057", "1.913616274506284536238001245388057898244388034323514516677296209867563074358187023096098318131319273624171762922165414771932509880715564188259357872432799234981234085536024101943e+45"); + plus_test ("-0.00016620663104623655416647045", "-12686797041.8875795703189682", "-12686797041.88774577695001443655416647045"); + plus_test ("-955318682044891602024512908305401581438484362308395.3064608014", "2405264255243858252389318787930524.596646933647908", "-9.55318682044891599619248653061543329049165574377870709813867752092e+50"); + plus_test ("38251344747049710395611359429944", "0.000000000025044307069557002354176630069758745187110935106932295261690460", "3.825134474704971039561135942994400000000002504430706955700235417663006975874518711093510693229526169046e+31"); + plus_test ("6556082.32", "-0.000000000000001855587562856033456366238361224693109198376760772204394200539703419686910321614077786337510464951", "6556082.319999999999998144412437143966543633761638775306890801623239227795605799460296580313089678385922213662489535049"); + plus_test ("-601066282116.773646944861803892913655", "0.45869929801033616081412998252506077240747661632297824035019059504580212743644756970631731956591592148421555634", "-601066282116.31494764685146773209952501747493922759252338367702175964980940495419787256355243029368268043408407851578444366"); + plus_test ("-23.6504678041285333307941", "9322173289440937942221726663585040711544412727245532618749747902349893601059242945545713822289661475003325571215052971921099787751298.5", "9.3221732894409379422217266635850407115444127272455326187497479023498936010592429455457138222896614750033255712150529719210997877512748495321958714666692059e+132"); + plus_test ("13954.05335659426859124804949201546230433799858282911276550573060408965278409946479104625725605515184113476163", "54942938376898283461251972594178875731793459692.69288668376868", "5.494293837689828346125197259417887573179347364674624327803727124804949201546230433799858282911276550573060408965278409946479104625725605515184113476163e+46"); + plus_test ("38338476138349711098378.3943108022013227510", "184968761212298160660521125177275265078971984111374634082506646317710944619077959845438.025316842804835238303934013763002232693292615810218", "1.84968761212298160660521125177275265078971984111374634082506646356049420757427670943816419627645006157989303934013763002232693292615810218e+86"); + plus_test ("-535317800652152416.666011782506679594256929333292104206593745014", "206357700474622846234363174929527883904699924195458.1468414719961788534413928358700225430521698882933015922823192348467761048", "2.063577004746228462343631749295273485868992720430414808296894894992591844635025779183364584248742933015922823192348467761048e+50"); + plus_test ("2833257851650449534329564356827343715273182823625486392869199675024054992102672521.4119632200042590623653138732343284", "27874145222289935847607844819151291", "2.8332578516504495343295643568273437152731828236533605380914896108716628369218238124119632200042590623653138732343284e+81"); + plus_test ("0.00000000000000000002618552546853233266995429732175655051680150038461910732084518605757265", "-139.1176780483072", "-139.11767804830719999997381447453146766733004570267824344948319849961538089267915481394242735"); + plus_test ("-5231728462708550604235813229", "-91296185221416978065707502278539916045872.674264172531093353580151543119", "-9.1296185221422209794170210829144151859101674264172531093353580151543119e+40"); + plus_test ("0.000000106213737285740538348043261083184649640660300492624731818517303939576491624096820480026083363433", "-22201770785094963881965679358073543814802495287033739904412088335159142995847539301013.995757400073858039256583163281728323829172117", "-2.2201770785094963881965679358073543814802495287033739904412088335159142995847539301013995757293860120753516044815238467240644522476339699507375268181482696060423508375903179519973916636567e+85"); + plus_test ("-67911351036760640240904249364595686607959826796143043932178763791112125413384969479427858233781973657171072664684275848926309593074.2736408437759912", "-77343795081059041036255490247057579", "-6.79113510367606402409042493645956866079598267961430439321787637911121254133849694794278582337820510009661537237253121044165566506532736408437759912e+130"); + plus_test ("-365663287930535233624529826657412624347925682105954594671581052959938622", "6954200.1293731825636", "-3.656632879305352336245298266574126243479256821059545946715810529529844218706268174364e+71"); + plus_test ("-86904523910181630995087116839233134949554297554466494568778841810992441.93482682", "8131622.282657081038690", "-8.690452391018163099508711683923313494955429755446649456877884180286081965216973896131e+70"); + plus_test ("-1625898821893719962579186943572639572628075158134", "154905121706840975019322074123957122201752614177688556257506327062930427205660262365762413912612.3699041018353", "1.549051217068409750193220741239571222017526141760626574356126071003512402620876227931343387544783699041018353e+95"); + plus_test ("7155707429106159594597753.602", "-8825753984190829367467677923527023814575827126015236448.1769432522585118457684798455299849721603516850", "-8.825753984190829367467677923519868107146720966420638694574943252258511845768479845529984972160351685e+54"); + plus_test ("14702524453269326207746839725456981418982455947784576163899708846627563947982587259694248527512065356328701857996383.8405344660118236145367576964488171", "0.000000000000279801481414509128", "1.47025244532693262077468397254569814189824559477845761638997088466275639479825872596942485275120653563287018579963838405344660121034160181722055768171e+115"); + plus_test ("-225100394111865994732205121145289659406.81347348992302868556770481345355033428867007077210213924805668907831310175342503282790874586923576524594", "16536197888541991489345013693415581039371231147607496617201758269219830229742518663209266982586909041114114", "1.653619788854199148934501369341558103937123114760749661720175826921960512934840679721453477746576375145470718652651007697131443229518654644966571132992922789786075194331092168689824657496717209125413076423475406e+106"); + plus_test ("-147016978159508669835046590756636450424769212453306265233290290589028698490660334843817522777298255009234097047902836152977047399695261588489020507996", "-3385444909290343226731953993543122186484062389074939550327086795043944171", "-1.47016978159508669835046590756636450424769212453306265233290290589028698490663720288726813120524986963227640170089320215366122339245588675284064452167e+149"); + plus_test ("-199818369850480446138557902023384546574063876954063983588740826564571725789062130098498070856521310723010198313678089493931618667410", "-82297155933721780656979816142942540102465515796252492877737040", "-1.9981836985048044613855790202338454657406387695406398358874082656457180808621806382027872783633745366555030077919388574642449640445e+131"); + plus_test ("1224211946370320242988310.539593783414725138865000500768803244328120208411774168803312677659248392891734554652728756344327699042687781768182371130", "146158963047904046913411919077533655315762900865.56618168609343", "1.4615896304790404691341314328948002563600588917610577546950815513886500050076880324432812020841177416880331267765924839289173455465272875634432769904268778176818237113e+47"); + plus_test ("0.00000000000000000008559294799519157774769508766803", "-0.551609783500231605091545012587226546044881570184707190", "-0.55160978350023160500595206459203496829718648251667719"); + plus_test ("-0.00000000000000364248749061745076846426096689761350484416821596341761277974108029120654192812240270659121286544404842359764995", "0.00000000000000012915182634025629462517104694343718453070590970719003893358456085974950708638362321445540916204635318582523370886863628537009101151163541", "-3.51333566427719447383908991995417632031346230625622757384615651943145703484173877949213580370339769523777241624113136371462990898848836459e-15"); + plus_test ("-0.0000012159213941933105485030856059051020630869271620812934680783745913", "435177388107137395111544818911495302729591053552420773207670273108531988732273993785286.67035351430698075129626580", "4.351773881071373951115448189114953027295910535524207732076702731085319887322739937852866703522983855865579857172969143940948979369130728379187065319216254087e+86"); + plus_test ("-244127359165.119239441740", "-156775332029133323786340200106246008327217172695025168660963117705504796367803174489432334620737960393.807345425858853639626141", "-1.56775332029133323786340200106246008327217172695025168660963117705504796367803174489432334864865319558926584867598853639626141e+101"); + plus_test ("-1.3", "38822623294205506.9130785519203", "38822623294205505.6130785519203"); + plus_test ("-0.000000000000000200529323920298995078835589947427959287114325689776790905715952540392301944664052487332084825933878060366283983109838980691230645368608610691238118", "8.9235511422835689686003636129516379856485298", "8.923551142283568768071039692652642906812939852572040712885674310223209094284047459607698055335947512667915174066121939633716016890161019308769354631391389308761882"); + plus_test ("-2957229910068789430753016717681830773467703355331693598573435320975440031813155744826634542489276009415208500102073", "1387116781565930070372821993801771.117", "-2.957229910068789430753016717681830773467703355331693598573435320975440031813155743439517760923345939042386506300301883e+114"); + plus_test ("1700002853156086652196589662796447571836354710587680189245495702990262116528669877736.14002354840708066274724201698188364950277252310355226408545", "0.00000000000000001040670152065846069679024081862566530541721990959996195085462554562276036783860750708035", "1.70000285315608665219658966279644757183635471058768018924549570299026211652866987773614002354840708067315394353764034434629301334172921756950266990959996195085462554562276036783860750708035e+84"); + plus_test ("275376444375379941033818605.172279107271998841", "479542807197295799803972994083414159220618900334356109151914563415527998484615170546961833405749594109884901428553537510172052.3945910", "4.79542807197295799803972994083414159220618900334356109151914563415527998484615170546961833405749594385261345803933478543990657566870107271998841e+125"); + plus_test ("201072.84", "-18291007075346088677522680107496617786379481993162852.5235791884", "-1.82910070753460886775226801074966177863794819929617796835791884e+52"); + plus_test ("4.79698005010389753070269243940420243222736581061677999244886345403385181646604209917629845674090797104700400712679893585", "9488800450.896868361907362310326", "9488800455.69384841201125984102869243940420243222736581061677999244886345403385181646604209917629845674090797104700400712679893585"); + plus_test ("1079602565226551350070617572381861809880919380670631.1941110380393840344419101968428407597315561768248982401339351384570356479736868707938705396478", "-976453379501315909711332105625801476050587869483628203480762777882592729043296523674472960763347999942046454132907563626456686905612777665215490", "-9.764533795013159097113321056258014760505878694836282034807627778825927290432965236744729607622683973768199027828369460540748250957318582845448588058889619606159655580898031571592402684438231751017598660648615429643520263131292061294603522e+143"); + plus_test ("-0.00000000644271271718069271020345607284106825430330344982447309294205280695455856", "-4416.748357493646036829616437", "-4416.74835750008874954679712971020345607284106825430330344982447309294205280695455856"); + plus_test ("3445711155679699718853304199017871443351956851656285424813892934989061182900239514362410627083188779604842513142", "-0.0000000016502205307974697933105166599651672169912797927812530032512206464857476224692850052", "3.4457111556796997188533041990178714433519568516562854248138929349890611829002395143624106270831887796048425131419999999983497794692025302066894833400348327830087202072187469967487793535142523775307149948e+111"); + plus_test ("-0.000000000000000001721243717528274638265294074343297487403293013692904865481482446596237956150738926135318544866402636735967915186120920316527028", "0.000000000000000436433664131032429923892680858273396689173735933956", "4.34712420413504155285627386783930099201770442920263095134518517553403762043849261073864681455133597363264032084813879079683472972e-16"); + plus_test ("1204447398244110346590693828919979918701287883959208424098228210909783249592980543967052564154", "-1.202", "1.204447398244110346590693828919979918701287883959208424098228210909783249592980543967052564152798e+93"); + plus_test ("-0.00000000000000000003511", "-36043841896699925", "-36043841896699925.00000000000000000003511"); + plus_test ("-3025613431812032994475405709985.7993469679039433736384733579074386422934426781633847239705968789457410845", "-1002588615531.9649364944823485872292540973546318938467102", "-3.0256134318120329954779943255177642834623862919608677274552620705361401528781633847239705968789457410845e+30"); + plus_test ("-0.00000034223095611049552775891228859686202901218738308167914660966601362250385709703952480432247", "-972934111420524554955644957601045537.987527746161528768501935193004724606168511203759505291457031083199089815", "-9.7293411142052455495564495760104553798752808839248487899746295191701320303054021594688837313617769286510343750385709703952480432247e+35"); + plus_test ("-260.8020033716610908017940221805155296272264320025030641582384857795184385939216818072400908848372378517124042819164098083213511102035", "17001.46833548258145536106307267277476995298424211430854042389081593596901026449283938670366734353012622907027133923538851172235700848608201622", "16740.66633211092036455926905049225924032575781011180547626565233015645057167057115757946357645869288837735786705731897870340100589828258201622"); + plus_test ("4753081575672367265214388.9329438810676699994575479313858093392877635113982018254535256873963800876321781902066650227606038529159973094772009", "-7324419798632309384717050.254499146068562829441638", "-2.5713382229599421195026613215552650008928299840900686141906607122364886017981745464743126036199123678218097933349772393961470840026905227991e+24"); + plus_test ("261907813073953576038800700421412.5334378919400078993318520596126658082471977395259716516663364", "-0.0000000086951723661290447823645735627390797806202562817264370379556867453", "2.619078130739535760388007004214125334378832448355332028072772480922455081179589057153699398993620443132547e+32"); + plus_test ("-21057062244163808361926294417077492805710.769766499111898332671", "-540838928.18483069140526251205066101016721497478267885509539520800221", "-2.105706224416380836192629441707803364463895459719051716084472166101016721497478267885509539520800221e+40"); + plus_test ("-158255.62893406", "-31604958588557863785879282950522895919205970023779482993880870538808826806472714286351962262535559188830287123905862547286466", "-3.160495858855786378587928295052289591920597002377948299388087053880882680647271428635196226253555918883028712390586254744472162893406e+124"); + plus_test ("-0.00872805303919760722958348618910955647808183701772080233955945973054140753844133709507372345122366634238497203383151041725907235916579449430863", "-101853444464243101382759799835868417551993254203707661817114852", "-1.0185344446424310138275979983586841755199325420370766181711485200872805303919760722958348618910955647808183701772080233955945973054140753844133709507372345122366634238497203383151041725907235916579449430863e+62"); + plus_test ("-45631392014.68038550439368025039999458620767416686726", "-16083812762280564885084.27247572", "-1.608381276232619627709895286122439368025039999458620767416686726e+22"); + plus_test ("-1439626983041987850913974184983601119473089147100564746927844789096157891.4841085238151384299", "0.000000000000000000031951455735478942002429224112959031269033600382871577234131203139", "-1.439626983041987850913974184983601119473089147100564746927844789096157891484108523815138429868048544264521057997570775887040968730966399617128422765868796861e+72"); + plus_test ("-3773188261867111267717109.48643521972869867743466506227122436366440807932802199071587048", "-10773530952405638442737529189330991723231726109739.439911386600615356849445155509285190", "-1.077353095240563844273753296251925359034299382684892634660632931403428411021778050955366440807932802199071587048e+49"); + plus_test ("5276177017268.35565399021279131413495227030075", "33380791872.126", "5309557809140.48165399021279131413495227030075"); + plus_test ("-128.032971413512325119332251541126003042400653717001958956874845360597144465880718042889612181", "3394406625963422663090321402154499517163312515368646.5438894836165998162937", "3.394406625963422663090321402154499517163312515368518510918070104274696961448458873996957599346282998041043125154639402855534119281957110387819e+51"); + plus_test ("-0.00000000000000000319057978729978801053247482850854", "-5970871936587764739377055460041397843015391161297703354420885181193398466623676.491266129426", "-5.97087193658776473937705546004139784301539116129770335442088518119339846662367649126612942600000319057978729978801053247482850854e+78"); + plus_test ("-1059900849522366748033951746353058622121879424133545530750.9681536282", "0.0000643997702370519405494192784251815344112451050443536256021694283534059757585612317456776719019257679238083053", "-1.0599008495223667480339517463530586221218794241335455307509680892284297629480594505807215748184655887548949556463743978305716465940242414387682543223280980742320761916947e+57"); + plus_test ("912258587155780697120724221920358016075695895559841256853912713603948747888.0315678411874212150256690949682329867739341", "2.256661", "9.122585871557806971207242219203580160756958955598412568539127136039487478902882288411874212150256690949682329867739341e+74"); + plus_test ("-0.0000000000010627444491654438", "413858262712309329471602287282236771662.23037198528863973813156909657677576430461650127105324676789469187837272211762396717083479560627202188", "4.1385826271230932947160228728223677166223037198528757699368240365277677576430461650127105324676789469187837272211762396717083479560627202188e+38"); + plus_test ("10889284485250482936848754210451881764666355121565381521609141220124805252627779969564893095316988849809.140913232560678725", "265462397841083205283689782772736396048751613685021523052966574884200782708580692276859125750962879382252839837", "2.65462408730367690534172719621490606500633378351376644618348096493342002833385944904639095315855974699241689646140913232560678725e+110"); + plus_test ("-3940354048038348812232523779780977.34694963308484986947203317656721412409336941345032192250794544448871277436178166955124911913191273620514614922051333", "108461342576678368692525128056407844311709242137736115728865741966953.265427848893134917162575927126158297967830952", "1.0846134257667836869252512805640784037135519409938730349634196218597591847821580828504769054275055894417387446153854967807749205455551128722563821833044875088086808726379485385077948667e+68"); + plus_test ("26059607473911021896148097458633904533525723836841783.8770871138672438759194942708994459838051487010227902", "-455763990053647411202608788023.11837212224235256867341260022328839083293408", "2.60596074739110218961476416946438508861145212280537607587149916248913072460816706761575929722146210227902e+52"); + plus_test ("7485939927194657722950.3195815053046002170111816290687951", "3027.358", "7.4859399271946577259776775815053046002170111816290687951e+21"); + plus_test ("-0.00000000000005599703632158865779999224097099964286077696620548833919840351030138988682760507", "3.5", "3.49999999999994400296367841134220000775902900035713922303379451166080159648969861011317239493"); + plus_test ("-0.0000000000000000653970485009455424706348378806364512481181501902433188498531335390353104396782305272068893617841048746913384690805807406227445668817807", "-173224891091130915632980803868987591469417896552426790538575965839932016256122849190", "-1.732248910911309156329808038689875914694178965524267905385759658399320162561228491900000000000000000653970485009455424706348378806364512481181501902433188498531335390353104396782305272068893617841048746913384690805807406227445668817807e+83"); + + + plus_test ("1.06832442449657e+9", "5.31512565221766313e+1", "1068324477.6478265221766313"); + plus_test ("-8.9672012052076147472375857e-20", "6.391778063682e+4", "63917.780636819999999999910327987947923852527624143"); + plus_test ("0e+0", "3.803634150690184e+15", "3803634150690184"); + plus_test ("0e+0", "-2.250919143163409794163082811e+1", "-22.50919143163409794163082811"); + plus_test ("2.8352844e+1", "-9.8421821e+10", "-98421820971.647156"); + plus_test ("-3.96169309707604251e+17", "-3.28373582e+3", "-396169309707607534.73582"); + plus_test ("9.436349291685128603888e-8", "-2.264108528075248e-4", "-0.00022631648931460794871396112"); + plus_test ("0e+0", "7.2004864761158514004448e+17", "720048647611585140.04448"); + plus_test ("-4.8717347274e-19", "3.61737685608086525157404817e+26", "3.6173768560808652515740481699999999999999999951282652726e+26"); + plus_test ("-2.168389290841e+6", "5.223e+2", "-2167866.990841"); + plus_test ("-4.38725314493094e+12", "1.40054785697916026635598226844e+11", "-4247198359233.023973364401773156"); + plus_test ("7.1223378147664003e-7", "3e+0", "3.00000071223378147664003"); + plus_test ("-1.0656660973e+10", "-2.97209463056314635542851541186e+2", "-10656661270.209463056314635542851541186"); + plus_test ("1.2883277094e+1", "-5.54548048203261067457185e+22", "-5.5454804820326106745705616722906e+22"); + plus_test ("-1.504e-14", "2.71e+2", "270.99999999999998496"); + plus_test ("4.7287555806698e+13", "-3.5935329574452318e+14", "-312065739937825.18"); + plus_test ("5.4e-15", "-8.35468469007e+0", "-8.3546846900699946"); + plus_test ("-1.735565e+4", "-2e+0", "-17357.65"); + plus_test ("-6.89525e-18", "6.7229852843e+10", "67229852842.99999999999999999310475"); + plus_test ("-2.63508402e+2", "-2.478965e+4", "-25053.158402"); + plus_test ("6.4909990971742952e+9", "8.633411384049431980845536589e+27", "8.6334113840494319873365356861742952e+27"); + plus_test ("2.87817691607168594282e+13", "3.695e-1", "28781769160717.2289282"); + plus_test ("1.2558509833653622e-12", "9.46079802e+0", "9.4607980200012558509833653622"); + plus_test ("3.2795331525179582319e-17", "-9.431388519232451406922e+21", "-9.431388519232451406921999999999999999967204668474820417681e+21"); + plus_test ("-2.7943785679585251935425773745e+1", "1.177045839871050879e+18", "1177045839871050851.056214320414748064574226255"); + plus_test ("-6.73086857309438227946149e+24", "1.71905552920711054538516e-15", "-6.73086857309438227946148999999999999999828094447079288945461484e+24"); + plus_test ("1.9905292e+5", "3.0839223106e+3", "202136.8423106"); + plus_test ("8.31048846338017e+14", "2.83123673288364500197794e+22", "2.83123681598852963577964e+22"); + plus_test ("8.36725e+4", "0e+0", "83672.5"); + plus_test ("-2.110811501755e+8", "1.646035246034983555808013262e+16", "16460352249268685.38258013262"); + plus_test ("8e+0", "-8.45386934e+4", "-84530.6934"); + plus_test ("-1.5014313151e+11", "-1.3943193159404694868e+9", "-151537450825.9404694868"); + plus_test ("-6.19826535590383384678e+19", "1.45912696e+4", "-61982653559038323876.5304"); + plus_test ("-2.30128559243369e-20", "-1.74358e-1", "-0.1743580000000000000230128559243369"); + plus_test ("7e+0", "2.9175e+4", "29182"); + plus_test ("0e+0", "8.074398952e-13", "8.074398952e-13"); + plus_test ("-1.10169992553226e-6", "-1.489521419796568135223154e+3", "-1489.521420898268060755414"); + plus_test ("-1.2847222948669e-8", "6e+0", "5.999999987152777051331"); + plus_test ("-2.0748595e+6", "1.7737013267831817855508474e+17", "177370132676243319.05508474"); + plus_test ("-1.3e+1", "-5.537580936457497529591215129e+27", "-5.537580936457497529591215142e+27"); + plus_test ("1.53041098285404062449166636e-20", "-1.09698519e+5", "-109698.5189999999999999999846958901714595937550833364"); + plus_test ("-9.0549157165169081301152736658e+13", "1.71861116418514e+4", "-90549157147982.969659301336658"); + plus_test ("-6.84667133296448035e+4", "-1.2552e+3", "-69721.9133296448035"); + plus_test ("-3.38133320737533874e-3", "-3.6195193454909046017940982507e+23", "-3.6195193454909046017940982845133320737533874e+23"); + plus_test ("5.28063684109958995e+11", "3e+0", "528063684112.958995"); + plus_test ("5.6486677840434364930096077898e+6", "7.7345049656351983276666e+2", "5649441.2345400000128423744498"); + plus_test ("1.071698848e+5", "8.09702667e+6", "8204196.5548"); + plus_test ("-2.56438e+1", "-4.7752581981e-15", "-25.6438000000000047752581981"); + plus_test ("1.11255906527629e+3", "0e+0", "1112.55906527629"); + plus_test ("5.29214639434e+5", "0e+0", "529214.639434"); + plus_test ("1.907665907177150817777618e-16", "3.996484323e+1", "39.9648432300000001907665907177150817777618"); + plus_test ("-2.284817838850737484e+0", "1.70660375373e-10", "-2.284817838680077108627"); + plus_test ("-2e+0", "1.2057236765392598216859e+0", "-0.7942763234607401783141"); + plus_test ("9.5417e+3", "1.19709798011e-10", "9541.700000000119709798011"); + plus_test ("-2.1e-6", "1.73249589179219564051e-11", "-0.0000020999826750410820780435949"); + plus_test ("3.33966813434843e+8", "-4.33492101363039e+8", "-99525287.928196"); + plus_test ("-7.6863012322962e+0", "5.40256e+5", "540248.3136987677038"); + plus_test ("1.893278638203e+10", "-2.79127597942747e+9", "16141510402.60253"); + plus_test ("8.708419184498120859374e+8", "-2.125e+2", "870841705.9498120859374"); + plus_test ("-3.79886239868039785166793949e+26", "1.9e-15", "-3.798862398680397851667939489999999999999981e+26"); + plus_test ("1e+0", "-3.2066099723526e-8", "0.999999967933900276474"); + plus_test ("-2.101824983e-20", "3.3833950371681e+13", "33833950371680.99999999999999999997898175017"); + plus_test ("-6.1088406176222166146368e+22", "-2.00280388042170752227327721005e+18", "-6.109040898010258785389027327721005e+22"); + plus_test ("-2.0983e+0", "-1.1343932020174e+5", "-113441.41850174"); + plus_test ("-2e+0", "-1.19204063249021e+4", "-11922.4063249021"); + plus_test ("3e+0", "-2.989e+0", "0.011"); + plus_test ("-1.5828496509e+0", "-2.60683254419027318e-15", "-1.58284965090000260683254419027318"); + plus_test ("1.078440230361e-17", "-1.7739037620412430484912549e-12", "-1.7738929776389394384912549e-12"); + plus_test ("1.711170067502562238123015e+13", "2.259516522692505152e+18", "2259533634393180177.62238123015"); + plus_test ("-1.1997027e+5", "9e+0", "-119961.27"); + plus_test ("-6.7259257776601e+7", "5.960973996e-14", "-67259257.77660099999994039026004"); + plus_test ("2.85992183e+2", "-6.064117834028922826e+4", "-60355.18615728922826"); + plus_test ("7.934778e+6", "-9.4139862782877690738251378918e+28", "-9.413986278287769073824344414e+28"); + plus_test ("-6.263942705879383579638312222e+18", "3.2403266e+2", "-6263942705879383255.605652222"); + plus_test ("-2.329980632158e+5", "-1.08e-19", "-232998.063215800000000000108"); + plus_test ("-2.60095989544433e-14", "2.56e-5", "0.0000255999999739904010455567"); + plus_test ("-1.001038173511924331447439e+24", "-3e+0", "-1.001038173511924331447442e+24"); + plus_test ("3.68958378497693152e+6", "2.3811e+1", "3689607.59597693152"); + plus_test ("-7.20153952e-2", "-1.14726471710912029765e+1", "-11.5446625662912029765"); + plus_test ("4.66584406082341e+12", "-6.1465061983e+5", "4665843446172.79017"); + plus_test ("-7.088494e+5", "9.24436069228226918e+0", "-708840.15563930771773082"); + plus_test ("3.45085557305234282971e-8", "1.40482921012791804198897e+23", "1.404829210127918041988970000000345085557305234282971e+23"); + plus_test ("-2.8679709521880775607842e+21", "-5e+0", "-2.8679709521880775607892e+21"); + plus_test ("6.49984583317234152952e+17", "-2.9114532734232268763826e-20", "649984583317234152.951999999999999999970885467265767731236174"); + plus_test ("2.6e+0", "7.759622397664468658e+14", "775962239766449.4658"); + plus_test ("1.12464142221080461622674e-17", "4.39864275886353589274384e+23", "4.398642758863535892743840000000000000000112464142221080461622674e+23"); + plus_test ("-1.0485669677437140330013740955e+14", "5.37355740951565887959624082769e+5", "-104856696237015.662348571521590375917231"); + plus_test ("8.019083936288e+12", "2.1955080947893037e-5", "8019083936288.000021955080947893037"); + plus_test ("-6.2275998681220583433895e+8", "5.5575382458820654178885565e+23", "5.5575382458820591902886883779416566105e+23"); + plus_test ("-1e+0", "-1.8359922820027707246784e+6", "-1835993.2820027707246784"); + plus_test ("6.8845860200016e+9", "3.53338102476e+5", "6884939358.104076"); + plus_test ("9.89004923e-1", "9.5157252327953911020394e-15", "0.9890049230000095157252327953911020394"); + plus_test ("1.95366847613052662290905e-1", "4.61089e+1", "46.304266847613052662290905"); + plus_test ("1.52850891752130568e+1", "3.8790643093207712266859866e-16", "15.28508917521305718790643093207712266859866"); + plus_test ("1e+0", "-3.351589594322899987e-13", "0.9999999999996648410405677100013"); + plus_test ("4e+0", "-2.25635728971207153477e-17", "3.9999999999999999774364271028792846523"); + plus_test ("-7.1521e+0", "3e+0", "-4.1521"); + plus_test ("5.73130841108862822977457839205e-6", "-2.0226350480263253215e+10", "-20226350480.26324748369158891137177022542160795"); + plus_test ("2.38700916108487e+10", "4.6410211658583484277994722e+24", "4.6410211658583722978910830487e+24"); + plus_test ("-1.10178448051944844475771905272e-15", "-6.39395321758408376910624e+18", "-6393953217584083769.10624000000000110178448051944844475771905272"); + plus_test ("-3.013637e-14", "1.2228170261603e+3", "1222.81702616029996986363"); + plus_test ("5.701362229840513e+1", "-4.1266579254956732345e+1", "15.747043043448397655"); + plus_test ("-1.26549524e+4", "7.114747175586575423929900617e+4", "58492.51935586575423929900617"); + plus_test ("2e+0", "-6.19566611167700965419057181e-4", "1.999380433388832299034580942819"); + plus_test ("-1.59294729923996920972246e-17", "2.05841676458664250980624366171e+12", "2058416764586.6425098062436616940705270076003079027754"); + plus_test ("-3.611261022614801981543826e+5", "-5.4e+0", "-361131.5022614801981543826"); + plus_test ("-1.382436556533e+2", "-2.0005230510874070622654e+4", "-20143.474166527370622654"); + plus_test ("2.725e+1", "6.5907103031686003312192e+10", "65907103058.936003312192"); + plus_test ("1.7102043e+1", "1.630185891228e+5", "163035.6911658"); + plus_test ("1.06251e+1", "8.86362042342990151231977e+15", "8863620423429912.13741977"); + plus_test ("-2.0075903158e+3", "4.632965490155132e+15", "4632965490153124.4096842"); + plus_test ("1.57481186e+8", "1.9928e+2", "157481385.28"); + plus_test ("-4.4540881340084554082e+12", "-8.567827997230912244e-19", "-4454088134008.4554082000000000008567827997230912244"); + plus_test ("3.0149809456450947682607926e+26", "1.52e+4", "3.0149809456450947682609446e+26"); + plus_test ("3.55773e+1", "-1.296139601615599519887e-2", "35.56433860398384400480113"); + plus_test ("-2.88697527177e-7", "8.20473793e+9", "8204737929.999999711302472823"); + plus_test ("1.22209473e+8", "-2.071859795614941e+13", "-20718475746676.41"); + plus_test ("-4.29227481925874031992865289e+13", "-3.3e-4", "-42922748192587.4035292865289"); + plus_test ("-1.12e+0", "-3.656079060826e-5", "-1.12003656079060826"); + plus_test ("-5.6653957709162986e+0", "1.8713973e-1", "-5.4782560409162986"); + plus_test ("-7.598187175103e+12", "2.95663854017257699181848633626e+17", "295656255830082596.181848633626"); + plus_test ("-7.904686344760362698443617622e+19", "1.980883539639923746866474445e-3", "-79046863447603626984.434195336460360076253133525555"); + plus_test ("-1.887416922022595192028e+16", "-4.59e-20", "-18874169220225951.9202800000000000000459"); + plus_test ("-8.148255639724e+10", "2.891684342e+8", "-81193387963.04"); + plus_test ("6.23847007946890103e-19", "-8.4455421112902026239156794885e+9", "-8445542111.290202623915679487876152992053109897"); + plus_test ("-1.625684355377512651803808e+7", "-1.348895528074479183e+18", "-1348895528090736026.55377512651803808"); + plus_test ("-6.535179015515075206e+8", "-8.95738948608652714735e-10", "-653517901.551507521495738948608652714735"); + plus_test ("-8.153e-7", "1.65820611454448412e-13", "-8.15299834179388545551588e-7"); + plus_test ("5.051843689061792432745588e+1", "2.8243308408e+8", "282433134.59843689061792432745588"); + plus_test ("-1.8e+0", "9.44922368261817e+2", "943.122368261817"); + plus_test ("-4.6e+0", "1.636104301545649956e-6", "-4.599998363895698454350044"); + plus_test ("3.9366814707165145667343522e-12", "3.0389e+4", "30389.0000000000039366814707165145667343522"); + plus_test ("7.436644701432e+7", "2.6484854e+0", "74366449.6628054"); + plus_test ("6.072728e-6", "1.091e-13", "0.0000060727281091"); + plus_test ("-9.57628017436746e+6", "-5.39066706500255775e+13", "-53906680226305.75186746"); + plus_test ("4.09624190548576e-18", "-9.6749e+2", "-967.48999999999999999590375809451424"); + plus_test ("-8.6632e+3", "2.120751089392768905787515e+24", "2.1207510893927689057788518e+24"); + plus_test ("1.857536e+2", "6.75400474e+1", "253.2936474"); + plus_test ("-5.6e-18", "-2.0950506003186642599853e+3", "-2095.0506003186642599909"); + plus_test ("3.33788850991236125e+12", "-1.58862526437795e+14", "-155524637927882.63875"); + plus_test ("3.1483e+1", "2.28650378766881198016e+12", "2286503787700.29498016"); + plus_test ("1.234624954152162611e-19", "-7.4619712e+2", "-746.1971199999999999998765375045847837389"); + plus_test ("1.080098052386732090801e+17", "3.09363317193526857948304e-13", "108009805238673209.080100000000309363317193526857948304"); + plus_test ("-2.51e+0", "1.409033443601486029357e-19", "-2.5099999999999999998590966556398513970643"); + plus_test ("5.427853163e+2", "-1.29492978844337839542353e+23", "-1.294929788443378395418102146837e+23"); + plus_test ("-2.02e+2", "5.4765009943616783637932886e+25", "5.4765009943616783637932684e+25"); + plus_test ("6.0089899644e+8", "8.77139309e+7", "688612927.34"); + plus_test ("-2.52975e+2", "-8.063181606e-8", "-252.97500008063181606"); + plus_test ("4.5094208494899584309066e+0", "-1.103e+0", "3.4064208494899584309066"); + plus_test ("3.0782e+0", "8.6800615973178390115257e-7", "3.07820086800615973178390115257"); + plus_test ("1.242839052621980122206838e+18", "3.9218504671511828734123451441e+14", "1243231237668695240.49417923451441"); + plus_test ("3e+0", "9.0309539359826e+1", "93.309539359826"); + plus_test ("-7.79925520165e-12", "2.4e-16", "-7.79901520165e-12"); + plus_test ("-7.82454855580508259123083736e+4", "-1.4505891967290641474446448e+14", "-145058919751151.9003025153059123083736"); + plus_test ("-3.23795969916119488744e-19", "6.13973898934392e+6", "6139738.989343919999999999676204030083880511256"); + plus_test ("-3.2125638937067043056e+16", "6.26147244159010381015573613741e-5", "-32125638937067043.0559373852755840989618984426386259"); + plus_test ("-5.6388596462772628354639232512e+27", "-8.7402462294e+3", "-5.6388596462772628354639319914462294e+27"); + plus_test ("-5.18916166140020398584e+3", "-2.286072187548843381829615e+12", "-2286072192738.00504322981898584"); + plus_test ("4.07978e+3", "6.009589348894649131e+1", "4139.87589348894649131"); + plus_test ("1.24981916598699796711558874e+20", "-6.097e+0", "124981916598699796705.461874"); + plus_test ("3.40205966339e+9", "-5e+0", "3402059658.39"); + plus_test ("-2.011230243535947305604087574e-1", "8.09834868377e-6", "-0.2011149260049109605604087574"); + plus_test ("1.823304324438653941487094855e+6", "-4.755e-7", "1823304.324438178441487094855"); + plus_test ("1.984404125928134e-20", "-6.0867637168658727533522913e+25", "-6.086763716865872753352291299999999999999999998015595874071866e+25"); + plus_test ("2.15e-7", "1.40111e+5", "140111.000000215"); + plus_test ("1.8919e-20", "7.1771e+4", "71771.000000000000000000018919"); + plus_test ("9.95146e+3", "-3.9373688835252249931e+10", "-39373678883.792249931"); + plus_test ("-1.014255162652494738303244155e+7", "-2.67797715547e-5", "-10142551.62655172715458714155"); + plus_test ("-4.428e+0", "1.3437431538744606393264041272e+3", "1339.3151538744606393264041272"); + plus_test ("-2e+0", "-2.229409910360055e+4", "-22296.09910360055"); + plus_test ("4.0148389757764685838e+4", "3.07591618307944204e+15", "3075916183119590.429757764685838"); + plus_test ("1.5e+0", "3.204179e+2", "321.9179"); + plus_test ("1.7628168176292522230070264e-9", "-7.857162462055267e+5", "-785716.2462055249371831823707477769929736"); + plus_test ("-4.7068322333826667e+2", "2.6204796284915915378e+6", "2620008.94526825327113"); + plus_test ("-5.7849662e+6", "-1.67379927e+8", "-173164893.2"); + plus_test ("6.36341614538e+4", "-5.684708914970007106903e+11", "-568470827862.8392568903"); + plus_test ("-9.8170683973203026118362784916e-18", "-4.76099856150535148899823166528e+24", "-4.7609985615053514889982316652800000000000098170683973203026118362784916e+24"); + plus_test ("-1.450475441789747351396091722e-14", "9.5e-16", "-1.355475441789747351396091722e-14"); + plus_test ("-1.2401309543790470973e+12", "-3.283421840845701731666242363e-14", "-1240130954379.04709730000003283421840845701731666242363"); + plus_test ("3.8284741521518e+9", "1.040053292332476e+7", "3838874685.07512476"); + plus_test ("-3.629548186614033358094334214e+14", "3.88460431849184e-13", "-362954818661403.335809433421011539568150816"); + plus_test ("4.492353541896215e+4", "4.2278871477030354988345988e+12", "4227887192626.5709177967488"); + plus_test ("1.39125503887158081793020576e+12", "7.107400120480733e+4", "1391255109945.58202273753576"); + plus_test ("4.29162281457350835270745e-1", "-8.29e+0", "-7.860837718542649164729255"); + plus_test ("9.8480007978020274403298876e-14", "-9e+0", "-8.999999999999901519992021979725596701124"); + plus_test ("-6.065629590943247e+11", "2.1353939336e-5", "-606562959094.324678646060664"); + plus_test ("-1.90520093211683e-14", "2.6011329423597853e+3", "2601.1329423597852809479906788317"); + plus_test ("-5.258159e-8", "1.79707627e+3", "1797.07626994741841"); + plus_test ("4.39e-13", "3.909008772398642e-9", "3.909447772398642e-9"); + plus_test ("-5.5413711e+1", "1.72056051290943960725138e+22", "1.7205605129094396072458386289e+22"); + plus_test ("-2.653033e+6", "-2.3e+2", "-2653263"); + plus_test ("2.1e+0", "-1.03e-12", "2.09999999999897"); + plus_test ("4.5e+0", "5.57773e+5", "557777.5"); + plus_test ("-1.31252712310416354e-17", "-5.34133135e+6", "-5341331.3500000000000000131252712310416354"); + plus_test ("3.5452349200934969e+11", "8.46089262134099e+10", "439132418222.75959"); + plus_test ("-2.39151247297029e+0", "-3.4e+1", "-36.39151247297029"); + plus_test ("1.04933449400897990977690656e+16", "-2.0991e+0", "10493344940089796.9986690656"); + plus_test ("-2.3192197014588986e+10", "1.3582e-16", "-23192197014.58898599999999986418"); + plus_test ("7.142194053338425321066077e+5", "1.90025134243757962899e+1", "714238.4078472669079028976"); + plus_test ("-1.136854e-7", "9.38832e+5", "938831.9999998863146"); + plus_test ("3.32614494028772216103868273496e+27", "2.7733154489672324e+9", "3.3261449402877221638119981839272324e+27"); + plus_test ("8.53310299029659557937678946674e+29", "-2.171026229e-18", "8.53310299029659557937678946673999999999999999997828973771e+29"); + plus_test ("-8.7775827884702947387676403e+9", "-2.24368450892611e+10", "-31214427877.7313947387676403"); + plus_test ("-5.2404730569306871e-14", "-1.95066228095626569312714706e+26", "-1.95066228095626569312714706000000000000052404730569306871e+26"); + plus_test ("-1.3962539732462279142518e+9", "5.818337806672885323307992101e+8", "-814420192.5789393819210007899"); + plus_test ("-3e+0", "-3.758144520778459805048058852e+16", "-37581445207784601.05048058852"); + plus_test ("4.533812642503788216091413e-2", "0e+0", "0.04533812642503788216091413"); + plus_test ("2.2345667600317984449936934959e+28", "-2.312549676277765984005310857e+23", "2.23454363453503566733385344279143e+28"); + plus_test ("5.890444410932411361081252e+15", "3.886333434874616465e-9", "5890444410932411.361081255886333434874616465"); + plus_test ("7.0771471576147436232551549e+25", "3.31023407231546910086281e+14", "7.0771471576478459639783095910086281e+25"); + plus_test ("-4.579025795557e+9", "-9.412662879882994536113862e+19", "-94126628803408971156.69562"); + plus_test ("6.68976500113452229442881759e+16", "9.35885176e+2", "66897650011346158.8294641759"); + plus_test ("1.8481649705340526197387e+16", "-2.6037916468e+0", "18481649705340523.5935953532"); + plus_test ("4.57418412e+2", "1.2332172148052647e+6", "1233674.6332172647"); + plus_test ("1.11e+1", "-2.6e+0", "8.5"); + plus_test ("-2.1661e+3", "-3.7327283613e-10", "-2166.10000000037327283613"); + plus_test ("1.756224491703e-3", "4.5319398279654e+6", "4531939.829721624491703"); + plus_test ("-1.34077579411e+7", "8.24170643747189e+13", "82417050966960.9589"); + plus_test ("-2.0495814528228973658098e+10", "-5.20314966589367e-15", "-20495814528.22897365809800520314966589367"); + plus_test ("8.541190743467170007744156375e-13", "7.0401506297973216018710560963e+28", "7.04015062979732160187105609630000000000008541190743467170007744156375e+28"); + plus_test ("-9.61633628e+7", "-3.613868352359377835e+11", "-361482998598.7377835"); + plus_test ("-2.767001037506171092080557112e+14", "9.244954929589141444423604e-17", "-276700103750617.10920805571119990755045070410858555576396"); + plus_test ("1.89901678657288039300855105894e-13", "-1.58598406112309192413155018311e+25", "-1.5859840611230919241315501831099999999810098321342711960699144894106e+25"); + plus_test ("1.268441520208713701742930596e+15", "4.970632009043856853119754828e+18", "4971900450564065566.821497758596"); + plus_test ("-1.9274080087e-7", "-1.226582591e+3", "-1226.58259119274080087"); + plus_test ("7.6027378901641e+4", "5.6020622089981e+2", "76587.58512254081"); + plus_test ("-8.955651e+4", "-2.311647517004775402486236216e+27", "-2.31164751700477540248632577251e+27"); + plus_test ("-8.640119777677045398616e+19", "7.1041062169678654e-10", "-86401197776770453986.15999999928958937830321346"); + plus_test ("-4.9472e+1", "-9.5254025997e+4", "-95303.497997"); + plus_test ("4.9115e+4", "1.1091035133e+10", "11091084248"); + plus_test ("2.00178779e-3", "2.3e+0", "2.30200178779"); + plus_test ("-1.22635159837898393566542487e+7", "7.6174490056742349880855e-11", "-12263515.983789839280479758643257650119145"); + plus_test ("5e+0", "4.83e+0", "9.83"); + plus_test ("-5.18305e+1", "2.06741e+0", "-49.76309"); + plus_test ("4.732184851555942426024763e-20", "1.536847890671368e+15", "1536847890671368.00000000000000000004732184851555942426024763"); + plus_test ("1.88358776282573960911e+15", "-5.5178544e-9", "1883587762825739.6091099944821456"); + plus_test ("-7.250860069e+9", "-2.0722613389416e-6", "-7250860069.0000020722613389416"); + plus_test ("-9.37492384e-16", "-3.59438537290428941803686306e+26", "-3.59438537290428941803686306000000000000000937492384e+26"); + plus_test ("2.29612282112427409597796e+6", "-2.44261697753e+0", "2296120.37850729656597796"); + plus_test ("-4.410025312651288094581277836e+21", "-1.448656017e-16", "-4.4100253126512880945812778360000000001448656017e+21"); + plus_test ("-1.7181773728e+9", "-1.896321199e+7", "-1737140584.79"); + plus_test ("4.3098015497657959948133e+20", "1.274986092270260964754410066e+11", "430980155104078208708.3560964754410066"); + plus_test ("-2.1959570176e+10", "5.725576310292088e-18", "-21959570175.999999999999999994274423689707912"); + plus_test ("-1.44792248534417343390548623e+21", "1e+0", "-1.44792248534417343390448623e+21"); + plus_test ("1.040704879928354425713e+2", "4.86388848511334545e+2", "590.4593365041699875713"); + plus_test ("4.241468133452732043755761186e+16", "-2.73798399968495e+11", "42414407536127351.94255761186"); + plus_test ("-2e+0", "6.24224662705e+11", "624224662703"); + plus_test ("5.6641294006148610219533163e+0", "-2.12295174799e+11", "-212295174793.3358705993851389780466837"); + plus_test ("2.865e+0", "-4.095879034404159898232e-16", "2.8649999999999995904120965595840101768"); + plus_test ("1.897905e+1", "6.596474438004821e+15", "6596474438004839.97905"); + plus_test ("2.8032755954946389580459726817e+0", "-3.504845500434e+4", "-35045.6517287445053610419540273183"); + plus_test ("3.2100930836673e+7", "1.7556652634247164889788e+3", "32102686.5019364247164889788"); + plus_test ("3.94508726739917261971194668167e+20", "3.2678976e-12", "394508726739917261971.1946681670032678976"); + plus_test ("1.013478996e+6", "-1.35851240932e+11", "-135850227453.004"); + plus_test ("5.76471020553517e+10", "9.361663010412251704182487e+1", "57647102148.96833010412251704182487"); + plus_test ("8.039198206551479e-19", "-4.7304610153534734555e+11", "-473046101535.3473455499999999991960801793448521"); + plus_test ("1.08616611370746e+10", "1.63357530853972701257283441042e+29", "1.633575308539727012681451021790746e+29"); + plus_test ("8.985857919040188655e+18", "6.9122771945490484660606087488e+22", "6.9131757803409524849261087488e+22"); + plus_test ("8.55516146e+6", "-5.20868e-6", "8555161.45999479132"); + plus_test ("1.35007756418551e+5", "2.1871207843576e-10", "135007.75641855121871207843576"); + plus_test ("1.997393922577102e+15", "2.04297682524767e+14", "2201691605101869"); + plus_test ("-2.8299e+0", "-2.0533e+1", "-23.3629"); + plus_test ("9.801120776319968546478e-1", "-5.506831779512856926053754757e-6", "0.980106570800217341790873946245243"); + plus_test ("4.7906337242e+7", "-3.024012845303e+0", "47906334.217987154697"); + plus_test ("-1.27217277089e+6", "-2.5964435963219617e+8", "-260916532.40308617"); + plus_test ("-9.42191e-10", "2.844075292805153735859165701e+3", "2844.075292804211544859165701"); + plus_test ("-2.6967949047958223297482e+19", "9.67282581408114114e+13", "-26967852319700082486.0706"); + plus_test ("-1.1745879912966672172374876e+14", "-5.942752909258700258e-14", "-117458799129666.72172374876005942752909258700258"); + plus_test ("1.17492331131707e+14", "-1.85e+2", "117492331131522"); + plus_test ("3.8237936883565271658e-7", "-7.468507e+1", "-74.68506961762063116434728342"); + plus_test ("2.080597621127443899864e+7", "2.0363911e+2", "20806179.85038443899864"); + plus_test ("-1.317672639296246e+11", "-3.47791814748480321636668116e+26", "-3.477918147484804534039320456246e+26"); + plus_test ("4.02924099e+1", "5.28393737349807e+9", "5283937413.7904799"); + plus_test ("3.62917205826288627489788295e+18", "2.49970474597037787872e+12", "3629174557967632245.27576167"); + plus_test ("3.08272649390034127669268182e-2", "3e+0", "3.0308272649390034127669268182"); + plus_test ("5.85719579984856882552621456e+26", "-2e+0", "5.85719579984856882552621454e+26"); + plus_test ("-2.50225156633622568317671509e-9", "-2.2582829e+2", "-225.82829000250225156633622568317671509"); + plus_test ("-5.15193401834588205516587050994e-14", "1.4e+0", "1.3999999999999484806598165411794483412949006"); + plus_test ("1e+0", "8.8924e+0", "9.8924"); + plus_test ("-3.3e+0", "-7.8502049490351637397e-8", "-3.300000078502049490351637397"); + plus_test ("-7.33960473805391e+11", "7.439838102434947302e+0", "-733960473797.951161897565052698"); + plus_test ("-3.16e-5", "1.726737549992789265e+13", "17267375499927.8926184"); + plus_test ("4.270228010774903285941e+15", "3.46096007736828546415995945e+26", "3.46096007741098774426770848285941e+26"); + plus_test ("-2.10368325850606703058e+20", "-2.08133369e+0", "-210368325850606703060.08133369"); + plus_test ("1.7e+1", "-1.0122120905476e+13", "-10122120905459"); + plus_test ("-7.07684131786e+1", "2.63774583435255785325881638e+25", "2.63774583435255785325880930315868214e+25"); + plus_test ("9.1072366943654984307009963e+25", "1.439998771392437399072989e+2", "9.10723669436549843070101069998771392437399072989e+25"); + plus_test ("-2.291554e-12", "2.61075274155651389913495756e-20", "-2.2915539738924725844348610086504244e-12"); + plus_test ("1.7602843372492822519e+15", "-8.1404508102e+7", "1760284255844774.1499"); + plus_test ("-4e+0", "-1.944878631711881888860126e+0", "-5.944878631711881888860126"); + plus_test ("-2.187281084011878193e+17", "-7.474048902432652904641e-13", "-218728108401187819.3000000000007474048902432652904641"); + plus_test ("3.2e-19", "3.681598265268061504382107e+7", "36815982.65268061504382107032"); + plus_test ("-7.99963142249e+5", "-1.10759709047786981579e+17", "-110759709048586944.721249"); + plus_test ("8.6126004e+7", "-2.260854106319155e+12", "-2260767980315.155"); + plus_test ("-1.545857065710954713345527676e+7", "1.693211571e+2", "-15458401.33595244713345527676"); + plus_test ("1.7634085229179948402e-1", "-7.72257679334452942471286361e+10", "-77225767933.26895339483683661598"); + plus_test ("-4.09737779175073422506155472749e+17", "-9.371187455652828779751905571e-19", "-409737779175073422.5061554727490000009371187455652828779751905571"); + plus_test ("2.94436782641191186e+1", "-1.757436041e+0", "27.6862422231191186"); + plus_test ("1e+0", "6.393155e+4", "63932.55"); + plus_test ("6.94692049e-4", "1.1351884189267733e+13", "11351884189267.733694692049"); + plus_test ("-6.30461698646036622857426e-5", "-4.09097e+1", "-40.9097630461698646036622857426"); + plus_test ("-2.0402e-20", "1.67107872884e+7", "16710787.288399999999999999979598"); + plus_test ("5.532395277106440788e+9", "-7.24995e+5", "5531670282.106440788"); + plus_test ("6.000727e-18", "6.917267560158418e+11", "691726756015.841800000000000006000727"); + plus_test ("1.166055456823e+12", "-5.5020976743949e+12", "-4336042217571.9"); + plus_test ("-3.91173319151e-2", "4.41620271855e-17", "-0.0391173319150999558379728145"); + plus_test ("4.91856485935137e-1", "-1.08457423464500916876e+19", "-10845742346450091687.108143514064863"); + plus_test ("2.09824848244684254866384581e+26", "3.638246794566e+10", "2.0982484824468429124885252666e+26"); + plus_test ("-3.2e-8", "-7.140239683783e-17", "-3.200000007140239683783e-8"); + plus_test ("1.2946e+4", "6.4275853487855044216637711965e+27", "6.4275853487855044216637841425e+27"); + plus_test ("-2.31e+1", "-5.1e+0", "-28.2"); + plus_test ("-5.98100271250578949179e+8", "2.012527542898146781797867e+2", "-598100069.9978246593643218202133"); + plus_test ("-2.2616174364e+6", "1.808741032320373831865e+21", "1.8087410323203715702475636e+21"); + plus_test ("-1.59844056581e+11", "-3.677066761421338e-2", "-159844056581.03677066761421338"); + plus_test ("-3.070121910623175279e-4", "-8.191845955248936529857e+0", "-8.1921529674399988473849"); + plus_test ("3e+0", "-3.131384399e+0", "-0.131384399"); + plus_test ("5.493193351746495014e+9", "1.0058110782705526011700063e+10", "15551304134.452021025700063"); + plus_test ("3.7662480770326031342303292983e+26", "-1.532179017e+5", "3.766248077032603134228797119283e+26"); + plus_test ("2.2078732616074486433852e+19", "-8.0117272927216e+5", "22078732616073685261.12272784"); + plus_test ("-1.101469921604903937413697e+24", "-5.6493478665614358249763e+22", "-1.15796340027051829566346e+24"); + plus_test ("4.002068393e+2", "3.88674498621732e-19", "400.206839300000000000388674498621732"); + plus_test ("1.18924625762106479751351e+1", "2.12367151349326e-7", "11.8924627885777993244611"); + plus_test ("6.18899636825e+1", "-1.34517400616695669045e-3", "61.88861850849383304330955"); + plus_test ("-1.727166e+4", "-1.232546640708229439e-7", "-17271.6600001232546640708229439"); + plus_test ("-7.39e-16", "2.158174383154757e-7", "2.158174375764757e-7"); + plus_test ("5.95645368014790753037091178681e-18", "8.9194691702199e+13", "89194691702199.00000000000000000595645368014790753037091178681"); + plus_test ("2.4544990425537516895759e+6", "1.2777961e+5", "2582278.6525537516895759"); + plus_test ("-5.185388510885e+1", "-7.693787224e-8", "-51.85388518578787224"); + plus_test ("-2.7398396455549889037919557e+23", "-4.220983829023255e+0", "-2.73983964555498890379199790983829023255e+23"); + plus_test ("1.02153991719e+1", "9.3244708599174510285e-9", "10.2153991812244708599174510285"); + plus_test ("4.60472064169766494e+16", "-1.0328246092260039e+0", "46047206416976648.3671753907739961"); + plus_test ("-2.38454077437299e+14", "-4e+0", "-238454077437303"); + plus_test ("8.370371680400711505807e+17", "7.56e-7", "837037168040071150.580700756"); + plus_test ("2.10262406584177455194e+6", "-7.99673704574e+1", "2102544.09847131715194"); + plus_test ("1.35918051082554629399892854005e+7", "-9.05428949025616791486522594e+1", "13591714.5653605603783101367482406"); + plus_test ("4.19333658548894567e+0", "1e+0", "5.19333658548894567"); + plus_test ("-1.12684363429737223640594383707e+22", "8.25876483519322470373806e+21", "-3.0096715077804976603213783707e+21"); + plus_test ("0e+0", "6.04e+2", "604"); + plus_test ("1.8364537e+2", "1.0468696299566552286716e+22", "1.046869629956655228689964537e+22"); + plus_test ("-5.073984e+6", "6.9887615721504817196587e+8", "693802173.21504817196587"); + plus_test ("2.5457e+2", "1.341466050473471653464e+9", "1341466305.043471653464"); + plus_test ("5.448451501591168054051559931e+5", "6.906967417242e-6", "544845.1501660237728223979931"); + plus_test ("-1.194671553787672e+1", "-1.91896603190801227e+3", "-1930.91274744588899"); + plus_test ("1.279395975361696355442e+8", "-6.96569613221558540371e+7", "58282636.2140137815071"); + plus_test ("-5.97073932850348e-7", "-2.2291090891563813e+4", "-22291.090892160886932850348"); + plus_test ("1.464561173e+9", "1e+0", "1464561174"); + plus_test ("-9.4963284032193e+3", "6.16644216458418847e+10", "61664412149.5134814807"); + plus_test ("-5.4865356898608376e+9", "5e+0", "-5486535684.8608376"); + plus_test ("1.807335611418e+5", "0e+0", "180733.5611418"); + plus_test ("4.79648059622793e+11", "-5.79415144368e+3", "479648053828.64155632"); + plus_test ("-1.19816450616e+11", "-5.716149095e-7", "-119816450616.0000005716149095"); + plus_test ("-2.3561102073882235262820415e-17", "-1.608713271019924e-3", "-0.001608713271019947561102073882235262820415"); + plus_test ("4.34065400608679942e+8", "-6.6465252539670797297214992789e+4", "433998935.356140271202702785007211"); + plus_test ("3.0930179144e+10", "0e+0", "30930179144"); + plus_test ("5.366042e+2", "2.270835328764610647e+18", "2270835328764611183.6042"); + plus_test ("7.48097472370778786852679e-7", "9.4767671341211803315002015e+26", "9.47676713412118033150020150000000748097472370778786852679e+26"); + plus_test ("-8.23842e+4", "1.229458568566523723615668197597e+14", "122945856774268.1723615668197597"); + plus_test ("-8.7862458629211487549e+19", "-1.1019849690697e+0", "-87862458629211487550.1019849690697"); + plus_test ("0e+0", "1.089862696164931e+15", "1089862696164931"); + plus_test ("-1.4492938845e+8", "-1.42921263881025236036504955e+26", "-1.4292126388102523618143434345e+26"); + plus_test ("-1.6381521194899074907e+6", "5.6572651171333e-11", "-1638152.119489907434127348828667"); + plus_test ("-4.396054117495148392356145377e+21", "-1.829550398438512721241206e+17", "-4.3962370725349922436282694976e+21"); + plus_test ("3.742420087218951e+10", "-1.730936977e+2", "37424200699.0958123"); + plus_test ("-1.1285098282e+2", "3.0174920978669756069e-1", "-112.54923361021330243931"); + plus_test ("3.328692e-19", "-3.74463079e+10", "-37446307899.9999999999999999996671308"); + plus_test ("1.28232894392211733573999076556e+29", "1.149729331569322243219279e+20", "1.282328945071846667309313008779279e+29"); + plus_test ("1.07034e+2", "1.4997e+1", "122.031"); + plus_test ("-2.76584099e-19", "-3.3993789e-8", "-3.3993789000276584099e-8"); + plus_test ("-4.60271074562e+11", "-3.45574059291359666323689575e+15", "-3456200863988158.66323689575"); + plus_test ("1.73104292971e+10", "7.220485847821601e+10", "89515287775.31601"); + plus_test ("2.26079231553066e+14", "-3.429835324275129e+15", "-3203756092722063"); + plus_test ("4.909949450328607351257e+9", "1.693032494154686e+15", "1693037404104136.328607351257"); + plus_test ("2.804004587e+1", "3.054e-4", "28.04035127"); + plus_test ("-1.21373e+4", "-1.7051357521743463e+13", "-17051357533880.763"); + plus_test ("-2.010863577144665818021832751e+17", "-1.1990113e+7", "-201086357726456694.8021832751"); + plus_test ("-7.1235473e+6", "-3.145986004148e+9", "-3153109551.448"); + plus_test ("1.3665398036864664266039e+22", "4.089516e-2", "1.366539803686466426603904089516e+22"); + plus_test ("1.727799e+0", "-4.8149925e+4", "-48148.197201"); + plus_test ("6.6630744630002551658489e+11", "-5.8410410897522728193e+12", "-5174733643452.24730271511"); + plus_test ("2.0767364695045007623516126e+11", "6.25410192352696e+8", "208299057142.80277223516126"); + plus_test ("7.75e+0", "-1.569335603101854838490073823e-12", "7.749999999998430664396898145161509926177"); + plus_test ("5e+0", "-7.431618517651602908e+18", "-7431618517651602903"); + plus_test ("-1.5453e+3", "-3.9000399435568029e-6", "-1545.3000039000399435568029"); + plus_test ("-7.0748737648616353693e+0", "2.591961010757e+5", "259189.0262019351383646307"); + plus_test ("1.651e+4", "-2.8703125534636e+9", "-2870296043.4636"); + plus_test ("3.087702748515e-12", "8.3067008464351e+3", "8306.700846435103087702748515"); + plus_test ("7.7880835734433871606349974196e+9", "2.82154e+4", "7788111788.8433871606349974196"); + plus_test ("-1.9482797447534242447e+5", "4.172181002194178915e-13", "-194827.9744753424240527818997805821085"); + plus_test ("1.23e+0", "1.22e+0", "2.45"); + plus_test ("1.692421753e-9", "8.9292167159609532663074588e+4", "89292.167159611225084827588"); + plus_test ("-4.003138001375e+6", "-3.6225528729195e+13", "-36225532732333.001375"); + plus_test ("-1.043499514e+8", "1.85379394110541607112156303315e+27", "1.85379394110541607101721308175e+27"); + plus_test ("1.2e+0", "-2.2e+0", "-1"); + plus_test ("-4.59964147358e+0", "-1.245052236142679713264875449e+25", "-1.245052236142679713264875908964147358e+25"); + plus_test ("1.435745816367079985483e-17", "-2.2506199410005066316855e-13", "-2.2504763664188699236869517e-13"); + plus_test ("3.9212949955518e+12", "-6.253e+2", "3921294994926.5"); + plus_test ("3.272898632836139464918e+14", "-1.125321770879687081334515545e+6", "327289862158292.175612112918665484455"); + plus_test ("-7.0051742181e+0", "-3.558851591145309897e+6", "-3558858.596319527997"); + plus_test ("-1.17791e-5", "-2.8283187205369969776764952883e+28", "-2.82831872053699697767649528830000117791e+28"); + plus_test ("8.6191671e-12", "-8.66936689467088e+10", "-86693668946.7087999999913808329"); + plus_test ("3.67300220532035e-3", "-2.20592e+2", "-220.58832699779467965"); + plus_test ("5.307907765699952590606427e+24", "-8.116566770561e+12", "5.307907765691836023835866e+24"); + plus_test ("1.3693156074977e+1", "-1.86125e+3", "-1847.556843925023"); + plus_test ("-1.305776227522e+0", "3.1e+0", "1.794223772478"); + plus_test ("-5.8e+0", "-4.2864143878e-14", "-5.800000000000042864143878"); + plus_test ("7.3171907466448357479336251741e-7", "-3.6643373621770251e-1", "-0.36643300449862784551642520663748259"); + plus_test ("9.5507944480252871732e+8", "-1.473719301517056667482e+7", "940342251.78735815064518"); + plus_test ("-1.594802356375808285e+18", "2.2091549349442255368551009e+23", "2.2091389869206617787722509e+23"); + plus_test ("-1.38180012856133843768288e+23", "-1.4881225686551882e+12", "-1.381800128576219663369431882e+23"); + plus_test ("3.9944940533448e-11", "-1.42182826302e+9", "-1421828263.019999999960055059466552"); + plus_test ("2.1246e+0", "-1.190013e-18", "2.124599999999999998809987"); + plus_test ("-1.6725888942e+5", "5.22591577449581327e+5", "355332.688029581327"); + plus_test ("6.2523356350387526825216271e-1", "5.8015517e+6", "5801552.32523356350387526825216271"); + plus_test ("-3.5042195675619e+11", "-1.61923859937529243154197361e+19", "-16192386344174881071.6097361"); + plus_test ("5.326226512685426512311428421e+15", "-2.14826116e+2", "5326226512685211.686195428421"); + plus_test ("-2.033908204665857e-20", "5.0334987e-20", "2.999590495334143e-20"); + plus_test ("4.92122690634e+11", "-1e+0", "492122690633"); + plus_test ("-1.850639822486488995e+3", "2.2247255806523203254e+6", "2222874.940829833836405"); + plus_test ("-1.4652329507e-8", "-2.2e+0", "-2.200000014652329507"); + plus_test ("1.031983768655972e+3", "3.196384720063040238523e+7", "31964879.18439905835723"); + plus_test ("-3.95755151236389821e+0", "8.219752462201035868e+15", "8219752462201031.91044848763610179"); + plus_test ("4.960062e-7", "-4.48e-18", "4.9600619999552e-7"); + plus_test ("8.424039578e+8", "-1.3745220992603451351702e+8", "704951747.87396548648298"); + plus_test ("5.306671354863915213e-8", "9.108152565584071569e-2", "0.09108157872255426432915213"); + plus_test ("-1.469495615534e+1", "4.847e-3", "-14.69010915534"); + plus_test ("3.5853e+3", "1.7093298564986700250582085e+15", "1709329856502255.3250582085"); + plus_test ("5.482e+2", "-4.105575442089757e+15", "-4105575442089208.8"); + plus_test ("1.99e+2", "3.8145468189e-3", "199.0038145468189"); + plus_test ("-3.49258722592820006912e-2", "-1.949843151114522843231e+2", "-195.0192409837115663237912"); + plus_test ("-1.1936922e+2", "1.94667093809609e+10", "19466709261.59168"); + plus_test ("3.0612779617e+9", "5.5021749870968147533e-4", "3061277961.70055021749870968147533"); + plus_test ("1.6469577765954843637144527776e+25", "-3.53617804087992991e+1", "1.64695777659548436371444924142195912007009e+25"); + plus_test ("5.762086232617e+3", "-1e+0", "5761.086232617"); + plus_test ("-2.085492256313382505e+20", "2.73885062e-11", "-208549225631338250499.9999999999726114938"); + plus_test ("-1.0504694638041059389625e+14", "1.2117447209021816889456469472e+27", "1.21174472090207664199926653660610375e+27"); + plus_test ("3.266124155553289418147501e+25", "-1.196361921508326229864197918e+8", "3.26612415555328940618388178491673770135802082e+25"); + plus_test ("-3.681434944093545137202e-11", "-9.8172931644e-9", "-9.85410751384093545137202e-9"); + plus_test ("-5.5110319265e+9", "2.511e+2", "-5511031675.4"); + plus_test ("2.24384830388360906481037e+4", "-6.688e+4", "-44441.5169611639093518963"); + plus_test ("1.30685382594601602875155e-13", "-2.9e-7", "-2.89999869314617405398397124845e-7"); + plus_test ("1.256635121672088721271099e+24", "9.2e+0", "1.2566351216720887212711082e+24"); + plus_test ("4.25e+1", "2.097673647e+5", "209809.8647"); + plus_test ("-1.0834844778746335e+4", "5.724238385893731161972e-7", "-10834.8447781739111614106268838028"); + plus_test ("-1.3622153693079e+13", "-1.82203795563644950428091436626e+29", "-1.82203795563644964050245129705e+29"); + plus_test ("6.124567392189732e-10", "2.086068109112e-5", "0.0000208612935478592189732"); + plus_test ("-1.01e-15", "-1.6428548827105e+6", "-1642854.88271050000000101"); + plus_test ("-4.277650516254732251e-20", "5.58481757486e+1", "55.84817574859999999995722349483745267749"); + plus_test ("-3.9947160422255e+13", "1.230577e+0", "-39947160422253.769423"); + plus_test ("-6.97056460621311741e+17", "-1.19084697861e-14", "-697056460621311741.0000000000000119084697861"); + plus_test ("1.99e+0", "2.432670941489e+2", "245.2570941489"); + plus_test ("2.8e+0", "-6e-13", "2.7999999999994"); + plus_test ("1.48e+1", "-4.493331507903141119919e+20", "-449333150790314111977.1"); + plus_test ("1.5212827e+1", "2.37852664031269644800630723e+6", "2378541.85313969644800630723"); + plus_test ("-8.68972e+3", "-3.409629e+3", "-12099.349"); + plus_test ("8.7e+0", "1.053877931698399708032024498e+3", "1062.577931698399708032024498"); + plus_test ("-5.569516602e+2", "-7.674336919779554845819e+9", "-7674337476.731215045819"); + plus_test ("-2.33172e+4", "-1.1357215e+6", "-1159038.7"); + plus_test ("-7.728437483e+4", "-1.954891686102566032254774334e-1", "-77284.5703191686102566032254774334"); + plus_test ("-1.794108984118418586e+19", "4.29563121585293316012291166e+26", "4.29563103644203474828105306e+26"); + plus_test ("-2.5159616882775e+7", "0e+0", "-25159616.882775"); + plus_test ("-1.1497021250372501e+2", "8.3582955257533834133933719723e+22", "8.358295525753383413381874951049627499e+22"); + plus_test ("2.8314056900555843e+12", "4.23695829388274243636e-6", "2831405690055.58430423695829388274243636"); + plus_test ("-1.31709787273518408e+17", "8.014510794225900917778e+4", "-131709787273438262.89205774099082222"); + plus_test ("0e+0", "-1.629e+2", "-162.9"); + plus_test ("7.65253317420838491672142405e-2", "-7.99262139691085667872536301e+15", "-7992621396910856.6022000312679161508327857595"); + plus_test ("1.890960123000345821183126769e+14", "7.20788924150109e+9", "189103220189276.0832083126769"); + plus_test ("-1.3e+0", "8.319553612816369962e+7", "83195534.82816369962"); + plus_test ("-3.5558858e+7", "-8.10954e-10", "-35558858.000000000810954"); + plus_test ("-6.59635684e-11", "-1.12991511439649957747410439089e+29", "-1.129915114396499577474104390890000000000659635684e+29"); + plus_test ("2.84985498518035e+0", "-2.69695005783e+4", "-26966.65072331481965"); + plus_test ("-6.85881760429450007919e+20", "-4.2520891329373816896808041239e-11", "-685881760429450007919.000000000042520891329373816896808041239"); + plus_test ("-7.60611902357978e+5", "0e+0", "-760611.902357978"); + plus_test ("-2.8400853393896819e-12", "3.9346602572408205959634e+10", "39346602572.4082059596311599146606103181"); + plus_test ("-6.2918148769550413935353223e-6", "-1.46926127598445193e+7", "-14692612.7598508111148769550413935353223"); + plus_test ("-6.6e+0", "5.29e+2", "522.4"); + plus_test ("-5.32901866812117076e+16", "5.923499732512e+7", "-53290186621976710.27488"); + plus_test ("2.8826366994411923511e-4", "9.0827607747846942e+14", "908276077478469.42028826366994411923511"); + plus_test ("-1.16063858058205683e+17", "1.63197623001574371048e+1", "-116063858058205666.6802376998425628952"); + plus_test ("2.33448774537387e-8", "-2.344769e+1", "-23.4476899766551225462613"); + plus_test ("5.221324777342731268951204567e+27", "5.2831642468607302614700095e+25", "5.274156419811338571565904662e+27"); + plus_test ("3.176941232598488925334e+19", "-5.78631858983696974141e+20", "-546862446657712084887.66"); + plus_test ("-9.83148865e-8", "2.162567052649e-8", "-7.668921597351e-8"); + plus_test ("1.45780087267250652143848567879e+17", "2.31e+1", "145780087267250675.243848567879"); + plus_test ("1.938157e+6", "2.60157906e+1", "1938183.0157906"); + plus_test ("2.428e-6", "-5.322e+3", "-5321.999997572"); + plus_test ("8.2046484844e+3", "2.1549373877917e+14", "215493738787374.6484844"); + plus_test ("-8.834664968e+2", "-2.55430491293e+5", "-256313.9577898"); + plus_test ("2.3572045735847686172e+12", "-1.3818314700215998e+16", "-13815957495642413.2313828"); + plus_test ("-3.2657953413e-16", "4.1453273974121236811839e-18", "-3.224342067325878763188161e-16"); + plus_test ("3.9e+1", "9.93455000207993341247941942e-15", "39.00000000000000993455000207993341247941942"); + plus_test ("9.37900728e+0", "-7.836904346001529841e-17", "9.37900727999999992163095653998470159"); + plus_test ("-3.0891e+0", "-9.719267672741339831199e+21", "-9.7192676727413398312020891e+21"); + plus_test ("1.76267171902379081421e-4", "4.274711452739918e+15", "4274711452739918.000176267171902379081421"); + plus_test ("1.3371e-5", "-2.337338537516546e+15", "-2337338537516545.999986629"); + plus_test ("5.1552633575093e+3", "-4.78079e-3", "5155.2585767193"); + plus_test ("-5.5504722943333778362e+19", "8.8121340924893706238e+8", "-55504722942452564952.75106293762"); + plus_test ("-9.56289179492575435222173761e+9", "-1.5507589407486e+14", "-155085456966654.92575435222173761"); + plus_test ("1.813253984710071e+8", "-1.19293200963040761850166359388e+11", "-119111875564.569754750166359388"); + plus_test ("4.813328953637197259781466269e-12", "-4.47e+0", "-4.469999999995186671046362802740218533731"); + ) diff --git a/drafts/bs-big/__tests__/pow_test.ml b/drafts/bs-big/__tests__/pow_test.ml new file mode 100644 index 0000000..b1f9b3e --- /dev/null +++ b/drafts/bs-big/__tests__/pow_test.ml @@ -0,0 +1,923 @@ +open Jest + +let () = + describe "pow_tests" (fun () -> + let open Expect in + + let pow_test = + let count = ref 0 in + fun (expected, a, b) -> + count := !count + 1; + let v = Big.pow (Big.fromString a) b |. Big.toString in + test ("pow_test" ^ string_of_int !count) (fun () -> expect v |> toBe expected) + in + + Big.setDP 20; + Big.setRM 1; + + pow_test ("4", "2", 2); + pow_test ("2147483648", "2", 31); + pow_test ("0.25", "2", -2); + pow_test ("0.0625", "2", -4); + pow_test ("1", "1", 1); + pow_test ("1", "1", 100); + pow_test ("0", "0", 1000); + + pow_test ("4096", "8", 4); + pow_test ("-1.331", "-1.1", 3); + pow_test ("5.125696", "-2.264", 2); + pow_test ("6.7266e-7", "6.7266E-7", 1); + pow_test ("1", "-1", 8); + pow_test ("4142779.6499215776", "21.06", 5); + pow_test ("731.1616", "-5.2", 4); + pow_test ("1", "61818", 0); + pow_test ("3.2", "3.2", 1); + pow_test ("5.4139923025768140625e-41", "-1.945E-7", 6); + pow_test ("1280630.81718016", "5.8", 8); + pow_test ("3965.318943552", "15.828", 3); + pow_test ("53.721", "53.721", 1); + pow_test ("1", "-1.9", 0); + pow_test ("4.58357323731267363492522744606954913014016e-39", "-0.0000161306", 8); + pow_test ("-8560814308.6108448224", "-96.94", 5); + pow_test ("4.4127502627834341562081e-74", "-6.77E-10", 8); + pow_test ("79327261142.56790234534719652175488087744161", "23.0371", 8); + pow_test ("3.101121e-38", "1.761E-19", 2); + pow_test ("1", "-1", 4); + pow_test ("6.23201296e-28", "-1.58E-7", 4); + pow_test ("-8.50893402176e-19", "-9.476E-7", 3); + pow_test ("16", "4", 2); + pow_test ("90368789.0625", "-97.5", 4); + pow_test ("1", "-112.8", 0); + pow_test ("4.122181458338334221291398681640625e+27", "40042.5", 6); + pow_test ("5.94467302491009e+21", "1290.0", 7); + pow_test ("5.6599836943004175019970957e+25", "141437", 5); + pow_test ("9", "3", 2); + pow_test ("69.75757441", "1.7", 8); + pow_test ("1e-42", "0.0000010", 7); + pow_test ("8", "8", 1); + pow_test ("-2.5090696333749305038864384e+25", "-664", 9); + pow_test ("24794.911296", "5.4", 6); + pow_test ("7077398515.1515538432", "93.32", 5); + pow_test ("-1.4520042511984659693722813984375e-130", "-2.8295E-19", 7); + pow_test ("4", "4", 1); + pow_test ("372088627687.312953646321", "781.019", 4); + pow_test ("-5.3864523289963490660381317787272961329536e-23", "-0.000658806", 7); + pow_test ("-1.8", "-1.8", 1); + pow_test ("1", "-5.9", 0); + pow_test ("1", "2", 0); + pow_test ("-6.4097340625", "-1.45", 5); + pow_test ("170859375", "15", 7); + pow_test ("595732589817199.440265999920799232", "43.82", 9); + pow_test ("1.7080198121677824e+36", "-4200", 10); + pow_test ("1", "658.8", 0); + pow_test ("136.460505366756569881", "2.269", 6); + pow_test ("-1", "-1", 3); + pow_test ("236007.159691873761", "-22.041", 4); + pow_test ("1", "-1.1", 0); + pow_test ("287803125756.085809269657829376", "18.76", 9); + pow_test ("4.1069049025e-34", "-2.02655E-17", 2); + pow_test ("-8", "-2", 3); + pow_test ("-5.0787635527751e-52", "-5.51E-11", 5); + pow_test ("-8", "-2", 3); + pow_test ("1704883919.2576", "203.2", 4); + pow_test ("22106814.0740608", "11.2", 7); + pow_test ("3.7481851264119295287828498195966142655968201e+23", "227.71", 10); + pow_test ("-3", "-3", 1); + pow_test ("5.308416e-54", "4.8E-14", 4); + pow_test ("1", "-1", 8); + pow_test ("1", "-4.1", 0); + pow_test ("398", "398", 1); + pow_test ("1", "1.17981E-18", 0); + pow_test ("255896509713547.45824", "761.4", 5); + pow_test ("16807", "7", 5); + pow_test ("1", "232.6", 0); + pow_test ("2.67066142562472466573674890357652039841e+30", "-6358.1", 8); + pow_test ("390625", "-5", 8); + pow_test ("85766121", "21.0", 6); + pow_test ("2206809.987903620081317314341735861401", "4.309", 10); + pow_test ("6.1917364224e-80", "-1.2E-8", 10); + pow_test ("64", "-2", 6); + pow_test ("-1", "-1", 7); + pow_test ("-39.8778220049", "-2.09", 5); + pow_test ("892496818.033068251283537321", "-31.029", 6); + pow_test ("1.1289646949223432899980166202016362758071452681629968849e+25", "320.087", 10); + pow_test ("1932991.455312009", "124.569", 3); + pow_test ("635307227133823.258624", "-293.2", 6); + pow_test ("784", "-28", 2); + pow_test ("-43361725294765860565.175323475675341312", "-152.02", 9); + pow_test ("1589.6036888689492933115234375", "4.36775", 5); + pow_test ("1", "-18.4", 0); + pow_test ("20832.8532313216810321678408500840248440324096", "3.46612", 8); + pow_test ("6.5536", "-1.6", 4); + pow_test ("174729381067.247616", "5590.56", 3); + pow_test ("-4.084101e-14", "-0.0021", 5); + pow_test ("7.46848810699576790739263937619996819197249e+21", "153.93", 10); + pow_test ("2.09881105970752e-16", "0.0000059428", 3); + pow_test ("23298085122481", "-169", 6); + pow_test ("1", "-4.095E-11", 0); + pow_test ("30016915.773120638290557721", "17.629", 6); + pow_test ("16807", "7", 5); + pow_test ("130666515.5580240243056896", "-10.34", 8); + pow_test ("-5.97080224872032e-91", "-9.02E-19", 5); + pow_test ("-3450.25251", "-5.1", 5); + pow_test ("43046721", "-9", 8); + pow_test ("1", "1", 1); + pow_test ("3545.66529682492339392399", "5.1279", 5); + pow_test ("3396.171616714297", "15.0313", 3); + pow_test ("4.622674003397519975764019459730496e+33", "-408146", 6); + pow_test ("1", "918.0", 0); + pow_test ("7.59375", "1.5", 5); + pow_test ("-67822.3072849", "-4.90", 7); + pow_test ("3.7588592026706176e-104", "-1.18E-13", 8); + pow_test ("1", "1", 3); + pow_test ("5237990.22862336", "47.84", 4); + pow_test ("11698.5856", "10.4", 4); + pow_test ("110075314176", "24", 8); + pow_test ("3.24210716131761936e-27", "2.38620E-7", 4); + pow_test ("9", "3", 2); + pow_test ("14641", "121", 2); + pow_test ("62.81386652381601821841", "2.81523", 4); + pow_test ("1", "8", 0); + pow_test ("4.29981696e-160", "-1.2E-20", 8); + pow_test ("1.692652673311521044295612689449216e-7", "-0.14242", 8); + pow_test ("1", "-19.5", 0); + pow_test ("1", "8621.8", 0); + pow_test ("7.907e-7", "7.907E-7", 1); + pow_test ("1.61051", "1.1", 5); + pow_test ("1.553e-14", "1.553E-14", 1); + pow_test ("858461358961485360081", "171171", 4); + pow_test ("64", "-2", 6); + pow_test ("-2.9", "-2.9", 1); + pow_test ("-2.0661046784e-179", "-1.4E-20", 9); + pow_test ("39.0625", "-2.5", 4); + pow_test ("-391460020121.8781037", "-45.3", 7); + pow_test ("-80.1", "-80.1", 1); + pow_test ("3.5831808", "1.2", 7); + pow_test ("41.08469075197275390625", "-1.45", 10); + pow_test ("-128", "-2", 7); + pow_test ("-5277043158.170301334052958483", "-12.03", 9); + pow_test ("100.31024025", "10.0155", 2); + pow_test ("262144", "4", 9); + pow_test ("-2.66450474490105494016e-70", "-1.86E-8", 9); + pow_test ("1.58541338622748269695158625134808009096449e+21", "-131.83", 10); + pow_test ("1.69e-14", "1.3E-7", 2); + pow_test ("81", "-3", 4); + pow_test ("1.3979045762098993055105649e+25", "327", 10); + pow_test ("-2.8334269484119140625e-17", "-0.0145", 9); + pow_test ("8455365204.69607", "96.7", 5); + pow_test ("4.826809", "-1.3", 6); + pow_test ("-4.2027e-14", "-4.2027E-14", 1); + pow_test ("-3671885391606530844.02199", "-5163.9", 5); + pow_test ("1.4833", "1.4833", 1); + pow_test ("1078702060.96", "32843.6", 2); + pow_test ("16384", "4", 7); + pow_test ("0.000041046707114327285209693732389121", "-0.185729", 6); + pow_test ("9.04141586678594150656e-76", "1.73404E-19", 4); + pow_test ("7", "7", 1); + pow_test ("-5.408864751631992324037382349788164206309e+39", "-25989", 9); + pow_test ("3.6213725246884329693766314512921496510839580087890625e-58", "0.00000180255", 10); + pow_test ("51.58686976", "-2.68", 4); + pow_test ("32562222.2784028467808485507564561204461862636001", "5.6399", 10); + pow_test ("1.5269627878770126091369423832739776731492122624e-24", "-0.0041532", 10); + pow_test ("2.27128515349184346452713121698128944001e-82", "-6.849E-9", 10); + pow_test ("788.12330352545906108118941549114886272", "2.59298", 7); + pow_test ("-128", "-2", 7); + pow_test ("2.43585613160298150834272926486523151679435546875e+29", "1841.55", 9); + pow_test ("3573226485.213841", "39.1", 6); + pow_test ("5.0912", "5.0912", 1); + pow_test ("1.302260124847515625e-102", "1.0450E-17", 6); + pow_test ("-1097881.796860068547323829", "-4.69", 9); + pow_test ("24.137569", "1.70", 6); + pow_test ("67.937289638464", "-2.02", 6); + pow_test ("-91125", "-45.0", 3); + pow_test ("3.5658406477912053139330818066558837890625e-96", "1.17225E-12", 8); + pow_test ("5.11226325150500959599107782635087831282590275214649e-160", "-1.17723E-16", 10); + pow_test ("67.937289638464", "-2.02", 6); + pow_test ("-3125", "-5", 5); + pow_test ("-3125", "-5", 5); + pow_test ("-2983765.0756983032103435524997723277", "-8.4133", 7); + pow_test ("4535877.137495584829386816", "-12.866", 6); + pow_test ("256", "-2", 8); + pow_test ("-7.9", "-7.9", 1); + pow_test ("4.18161601", "1.430", 4); + pow_test ("2.3591116836e-38", "-1.53594E-19", 2); + pow_test ("6648326359.9150104576", "9.6", 10); + pow_test ("65536", "-4", 8); + pow_test ("22777216155500625", "-12285", 4); + pow_test ("1", "-1.14E-9", 0); + pow_test ("1", "7.4", 0); + pow_test ("1.21", "1.1", 2); + pow_test ("0.248", "0.248", 1); + pow_test ("-2187", "-3", 7); + pow_test ("1.48996e-23", "-3.86E-12", 2); + pow_test ("2.49173e-14", "2.49173E-14", 1); + pow_test ("-2738.124199", "-13.99", 3); + pow_test ("-2.7044661231722633428249e-63", "-3.0649E-13", 5); + pow_test ("0.0000998001", "-0.00999", 2); + pow_test ("9", "3", 2); + pow_test ("-331.370935156703232", "-3.192", 5); + pow_test ("2.611824102393094023763", "1.147", 7); + pow_test ("-527", "-527", 1); + pow_test ("27", "3", 3); + pow_test ("2.313441e-34", "3.90E-9", 4); + pow_test ("1", "-8.00148E-16", 0); + pow_test ("6.427669793976056365481141274099681e+25", "-1682.7", 8); + pow_test ("-27", "-3", 3); + pow_test ("256", "-2", 8); + pow_test ("59049", "-3", 10); + pow_test ("8.7713801081173367580884490451432713332434379776e+26", "494.66", 10); + pow_test ("20234327779106168.4159474599729911316138226499265176167424", "42.7178", 10); + pow_test ("-27", "-3", 3); + pow_test ("0.009411328144", "-0.097012", 2); + pow_test ("349044.64", "-590.8", 2); + pow_test ("4750.104241", "-4.1", 6); + pow_test ("-173928970714601588962.8103429", "-778.9", 7); + pow_test ("3656158440062976", "-36", 10); + pow_test ("6.12220032e+22", "1800", 7); + pow_test ("1", "3.4", 0); + pow_test ("9.70097321773035876225154576358130561e-37", "0.000031503", 8); + pow_test ("-12.812904", "-2.34", 3); + pow_test ("-1.7340444960685031988323168e+25", "-111638", 5); + pow_test ("282475249", "7", 10); + pow_test ("-81.746504", "-4.34", 3); + pow_test ("-7.219028320823404915424e-24", "-0.000023534", 5); + pow_test ("41.0338673", "1.7", 7); + pow_test ("2.0415562993764162403236821478431932029075456e-128", "6.4896E-15", 9); + pow_test ("82955.444920574689", "43.6129", 3); + pow_test ("-160578147647843", "-107", 7); + pow_test ("3450.25251", "5.1", 5); + pow_test ("82854921260716023991.1435387164164096", "308.88", 8); + pow_test ("1", "-285", 0); + pow_test ("390625", "-5", 8); + pow_test ("1.8189597967773564082837969e-101", "1.6217E-17", 6); + pow_test ("2.825761e-74", "4.1E-19", 4); + pow_test ("1355738723022659.5905381376", "-32.6", 10); + pow_test ("1", "26.5", 0); + pow_test ("1", "-1", 4); + pow_test ("9", "3", 2); + pow_test ("8.02677619844494861156679981606477327016984576e-140", "4.10268E-18", 8); + pow_test ("6", "6", 1); + pow_test ("-97.65625", "-2.5", 5); + pow_test ("47524", "218", 2); + pow_test ("4.70681", "4.70681", 1); + pow_test ("3588.01", "59.9", 2); + pow_test ("1", "-52.1233", 0); + pow_test ("150837370166.726828752896", "-72.960", 6); + pow_test ("1", "-202722", 0); + pow_test ("531441", "9.0", 6); + pow_test ("1", "1", 8); + pow_test ("16", "-2", 4); + pow_test ("10.5413504", "1.4", 7); + pow_test ("-43003385433558549", "-350349", 3); + pow_test ("11656", "11656.0", 1); + pow_test ("2.5937424601e-80", "-1.1E-8", 10); + pow_test ("380008", "380008", 1); + pow_test ("1", "1", 10); + pow_test ("65248.283129848297112850803864372537279713", "3.4273", 9); + pow_test ("-1147575293595.98432", "-258.2", 5); + pow_test ("1.3689e-20", "1.17E-10", 2); + pow_test ("5.9969536e-41", "-8.80E-11", 4); + pow_test ("36", "6", 2); + pow_test ("8.38561807e-52", "9.43E-18", 3); + pow_test ("4248380.5456", "45.4", 4); + pow_test ("15400296222.263289476715621650663041", "-18.769", 8); + pow_test ("2381343457183.27934976", "1242.24", 4); + pow_test ("1", "1", 4); + pow_test ("4.78918476762052235286361700161e+21", "512.9", 8); + pow_test ("2089309226.032466059985824", "73.114", 5); + pow_test ("2641.807540224", "2.4", 9); + pow_test ("1", "430.260", 0); + pow_test ("6.1917364224", "1.2", 10); + pow_test ("19407735094418288.17030696889622168576", "42.54", 10); + pow_test ("1", "-10.7661", 0); + pow_test ("-3125", "-5", 5); + pow_test ("481.890304", "2.8", 6); + pow_test ("3.341488431860881e-53", "-7.603E-14", 4); + pow_test ("1", "2.8", 0); + pow_test ("14214.495945642721", "-10.919", 4); + pow_test ("40353607", "7", 9); + pow_test ("2.033478055981629545259599e-91", "7.2719E-19", 5); + pow_test ("1.0007101809887004032e-16", "0.00518", 7); + pow_test ("82653950016", "66", 6); + pow_test ("287365339.799", "659.9", 3); + pow_test ("1.2675964125399273523216299738998904467161547776e+26", "-407.66", 10); + pow_test ("64", "-2", 6); + pow_test ("41933.25113121", "-14.31", 4); + pow_test ("-300763", "-67", 3); + pow_test ("2187", "3.00", 7); + pow_test ("1085328071.651663", "1027.670", 3); + pow_test ("3.02024876193621053068500168512434520049e-112", "7.047E-12", 10); + pow_test ("-50817457664", "-3704", 3); + pow_test ("1.2167e-14", "0.0000230", 3); + pow_test ("-47932.2", "-47932.2", 1); + pow_test ("-2187", "-3", 7); + pow_test ("-10.611843208841110742516870554084117001", "-1.3001", 9); + pow_test ("1", "-1", 2); + pow_test ("-80473337380004.2860993293", "-604.13", 5); + pow_test ("574015339044", "-757638", 2); + pow_test ("1", "1", 5); + pow_test ("2.53295162119140625e-13", "0.055", 10); + pow_test ("-6.12220032e-20", "-0.00180", 7); + pow_test ("-27", "-3", 3); + pow_test ("11040808032", "102", 5); + pow_test ("416336.3127196737601536", "5.04", 8); + pow_test ("269175550798.26432", "193.2", 5); + pow_test ("-1.528", "-1.528", 1); + pow_test ("4.782969e-127", "9.0E-19", 7); + pow_test ("-7.51e-8", "-7.51E-8", 1); + pow_test ("1024", "-2", 10); + pow_test ("607.850029476310544160862292358275390625", "2.0385", 9); + pow_test ("-11.8", "-11.8", 1); + pow_test ("1.076079329936225357094692222242816e+27", "32011.6", 6); + pow_test ("-351982550989147112", "-706058", 3); + pow_test ("1", "1", 0); + pow_test ("9", "-3", 2); + pow_test ("86.44348156327976252176", "-3.04918", 4); + pow_test ("1.382898042825325230836148576046154775429376e+34", "18518.2", 8); + pow_test ("193.180743258112", "5.7808", 3); + pow_test ("-38.98", "-38.98", 1); + pow_test ("456976", "-26", 4); + pow_test ("-5.156993509526072073746875e+24", "-87595", 5); + pow_test ("-3311111.840687797824457", "-20.137", 5); + pow_test ("-3854601532649", "-329", 5); + pow_test ("1", "-8011", 0); + pow_test ("1", "2", 0); + pow_test ("1", "-0.0185", 0); + pow_test ("245925124", "15682", 2); + pow_test ("-5.774467426440121643433984e-21", "-0.00564", 9); + pow_test ("1207.269217792", "2.2", 9); + pow_test ("4552.045708313044707921", "-4.071", 6); + pow_test ("1", "-29.2", 0); + pow_test ("-4.3847739074110089716547584e-136", "-4.604E-20", 7); + pow_test ("-7776", "-6", 5); + pow_test ("3.0745786029631524271923429376e+28", "498376", 5); + pow_test ("-322.687697779", "-1.9", 9); + pow_test ("-31084123244.396440017759765625", "-14.65", 9); + pow_test ("1.4641e-56", "1.1E-14", 4); + pow_test ("-172.10368", "-2.8", 5); + pow_test ("3894161181.1810745401", "-9.1", 10); + pow_test ("1296", "-6", 4); + pow_test ("1", "6.2", 0); + pow_test ("2.91506581425215873264648192e+26", "872", 9); + pow_test ("1.85843153221037962890625e-175", "3.85E-20", 9); + pow_test ("2534495.8401", "-39.9", 4); + pow_test ("-1.85738630687872790421037608793067224429e-7", "-0.17869", 9); + pow_test ("20711912.837890625", "6.5", 9); + pow_test ("216270112.515625", "24.5", 6); + pow_test ("1.61051e-30", "0.0000011", 5); + pow_test ("192541.45824", "11.40", 5); + pow_test ("1", "-6.91E-13", 0); + pow_test ("2313060.765625", "-11.5", 6); + pow_test ("31653832624.2576", "421.8", 4); + pow_test ("0.000008916100448256", "-0.144", 6); + pow_test ("1", "6.074", 0); + pow_test ("200476.12231936", "-4.6", 8); + pow_test ("-2097152", "-8", 7); + pow_test ("1", "1", 7); + pow_test ("1.024e-37", "-3.200E-19", 2); + pow_test ("-7.56680642578125e-40", "-0.0000450", 9); + pow_test ("22363441", "-4729", 2); + pow_test ("0.326940373369", "0.83", 6); + pow_test ("0.0653", "0.0653", 1); + pow_test ("67937289.638464", "-20.2", 6); + pow_test ("1", "-6935.7", 0); + pow_test ("37366.9453125", "4.5", 7); + pow_test ("84736910327822.09024", "610.4", 5); + pow_test ("89.3871739", "1.9", 7); + pow_test ("-74088", "-42", 3); + pow_test ("2.6", "2.6", 1); + pow_test ("-2.74625e-52", "-6.5E-18", 3); + pow_test ("7.25211296602410832237035188113814152676619241652224e-20", "0.0121912", 10); + pow_test ("-0.231616946283203125", "-0.85", 9); + pow_test ("136117620759552651.464603466304", "-717.22", 6); + pow_test ("7149.24299", "5.9", 5); + pow_test ("-105748.898523294431279732941", "-5.221", 7); + pow_test ("4", "-2", 2); + pow_test ("2.177e-10", "2.177E-10", 1); + pow_test ("729", "3", 6); + pow_test ("62050623946302131.87381413659819", "250.59", 7); + pow_test ("39413.40648961", "-14.09", 4); + pow_test ("1", "1", 0); + pow_test ("6561", "3.0", 8); + pow_test ("0.000039304", "0.034", 3); + pow_test ("343", "7", 3); + pow_test ("256", "4", 4); + pow_test ("187914065609.1136", "658.4", 4); + pow_test ("-2017403668.061600505811231934445020891", "-10.811", 9); + pow_test ("1", "-1", 2); + pow_test ("-1", "-1.0", 7); + pow_test ("-5", "-5", 1); + pow_test ("-9892530380752880769", "-129", 9); + pow_test ("6.6241549228613285241719980684340096e-106", "9.4286E-16", 7); + pow_test ("3.43333904131263903194677248e-46", "0.00000888", 9); + pow_test ("-9.7699019384092441818970744182751232e-92", "-9.9668E-14", 7); + pow_test ("22518.75390625", "-3.5", 8); + pow_test ("9.90817568487338826820891768064226576961e-66", "-7.49030E-9", 8); + pow_test ("-2", "-2", 1); + pow_test ("3.7805311079775207424e-77", "1.832E-13", 6); + pow_test ("-14326936981.650438436683776", "-107.456", 5); + pow_test ("31509057.52576", "31.6", 5); + pow_test ("-1729271944.97024", "-70.4", 5); + pow_test ("4.182119424e-81", "8.4E-17", 5); + pow_test ("5406147534197334.84011776", "-92.6", 8); + pow_test ("-0.00000363167", "-0.00000363167", 1); + pow_test ("9536.7431640625", "-2.5", 10); + pow_test ("11094619561", "-105331", 2); + pow_test ("3.0073480681463454661678314208984375e-137", "6.775E-16", 9); + pow_test ("1.5374535781262326309644119647446644001e+29", "-4449.9", 8); + pow_test ("9.70138473177843532176348676096e+29", "99496", 6); + pow_test ("127.45506816", "-3.36", 4); + pow_test ("1", "-84.7", 0); + pow_test ("1.7499128828948144488585826444218125390625e+40", "-107245", 8); + pow_test ("3577.714596", "-59.814", 2); + pow_test ("-13012.5", "-13012.5", 1); + pow_test ("-1", "-1", 1); + pow_test ("16", "2", 4); + pow_test ("254016", "504.0", 2); + pow_test ("-1607.369262344", "-11.714", 3); + pow_test ("1", "1.251E-11", 0); + pow_test ("208.5136", "3.8", 4); + pow_test ("387420489", "9", 9); + pow_test ("1", "4.2", 0); + pow_test ("6104030772588134.765625", "-427.5", 6); + pow_test ("161.29", "12.7", 2); + pow_test ("9", "3", 2); + pow_test ("-2181835737885608.101460104333373352538009179", "-50.619", 9); + pow_test ("-3997.92155722610103", "-3.27", 7); + pow_test ("2565164201769", "-117", 6); + pow_test ("-512", "-8", 3); + pow_test ("6.04380441302073327515625e+23", "-9195", 6); + pow_test ("1", "1", 5); + pow_test ("-9.2389579776e-25", "-0.0000156", 5); + pow_test ("7.997656216391946134348627101293601e+33", "17293", 8); + pow_test ("39520792565978809.524305593609", "-583.63", 6); + pow_test ("16", "-2", 4); + pow_test ("7807.4896", "-9.4", 4); + pow_test ("248832", "12.0", 5); + pow_test ("496981290961", "-89", 6); + pow_test ("-4.3606774182392e-44", "-3.5198E-15", 3); + pow_test ("16777216", "64", 4); + pow_test ("1", "1.0", 6); + pow_test ("1", "91.4", 0); + pow_test ("9.851127637605409e-117", "-4.63E-20", 6); + pow_test ("1", "-1.4E-9", 0); + pow_test ("-4.52470110728381829e-7", "-0.00767709", 3); + pow_test ("282475249", "7.0", 10); + pow_test ("16651779441254092864", "1598", 6); + pow_test ("729", "3", 6); + pow_test ("6.90946358996746999370693799867018948630842395035736169049e-104", "-4.82997E-11", 10); + pow_test ("684.84796416", "26.1696", 2); + pow_test ("-1", "-1", 5); + pow_test ("1", "-6", 0); + pow_test ("0.0000078310985281", "-0.23", 8); + pow_test ("2.274064", "-1.508", 2); + pow_test ("3.04122555034158459939649e-47", "-0.0000223", 10); + pow_test ("696452982073287.871843324909094936562277581368328192", "44.5872", 9); + pow_test ("-7.5151448e-29", "-4.22E-10", 3); + pow_test ("1", "6", 0); + pow_test ("-12.708", "-12.708", 1); + pow_test ("70", "70", 1); + pow_test ("2187", "3", 7); + pow_test ("-1.628413597910449e-174", "-4.9E-20", 9); + pow_test ("-6.312457192887951173182283446626151709594241e-66", "-5.6961E-8", 9); + pow_test ("0.000299069043583441159212021318210939", "0.4059", 9); + pow_test ("15.995353981724701", "1.741", 5); + pow_test ("1", "97857", 0); + pow_test ("0.221585791441", "-0.470729", 2); + pow_test ("1", "52.0023", 0); + pow_test ("-26015680550432", "-482", 5); + pow_test ("22903.7956", "151.34", 2); + pow_test ("6.561e-17", "-8.1E-9", 2); + pow_test ("-93189625398108974.44387339079552", "-265.58", 7); + pow_test ("-3086125724460522.34468469084288", "-163.22", 7); + pow_test ("0.0000051", "0.0000051", 1); + pow_test ("19683", "3", 9); + pow_test ("-2.4507253464874125175251e+22", "-30051", 5); + pow_test ("-38.907147732329430154371456512", "-1.502", 9); + pow_test ("4.68733667816790896452997907438948199465216e+41", "161758", 8); + pow_test ("64", "-2", 6); + pow_test ("27541696650101.74182563635028557824", "-22.08", 10); + pow_test ("1.352771823277379852935844331805603817270014056494234420224e-23", "-0.00516562", 10); + pow_test ("1", "1", 4); + pow_test ("-2350072823968", "-298", 5); + pow_test ("8941.5936", "-94.56", 2); + pow_test ("97241.5", "97241.5", 1); + pow_test ("6.93207873781332929149e-50", "9.49E-8", 7); + pow_test ("-59049", "-9", 5); + pow_test ("-8882.144880086754771640625", "-3.665", 7); + pow_test ("8100981934880.472", "20083.8", 3); + pow_test ("16", "4.0", 2); + pow_test ("6.561e-49", "-9.00E-13", 4); + pow_test ("-446592952.353220867168501", "-53.701", 5); + pow_test ("-3.2466525536194576823494051652634346881e-125", "-1.47210E-14", 9); + pow_test ("3.89751", "3.89751", 1); + pow_test ("3.8443359375e-107", "1.5E-12", 9); + pow_test ("493.039", "7.9", 3); + pow_test ("-16807", "-7", 5); + pow_test ("-4.7471727261300877329502034895519256591796875e+34", "-7127.5", 9); + pow_test ("49", "-7", 2); + pow_test ("1.27e-12", "1.27E-12", 1); + pow_test ("30373391.06115737305088", "11.72", 7); + pow_test ("1", "-1", 6); + pow_test ("-19349.17632", "-7.2", 5); + pow_test ("361", "19.0", 2); + pow_test ("1", "0", 0); + pow_test ("-10077696", "-6", 9); + pow_test ("42180.533641", "5.9", 6); + pow_test ("38.443359375", "1.5", 9); + pow_test ("1643032", "118", 3); + pow_test ("16", "-2", 4); + pow_test ("1962.49", "-44.3", 2); + pow_test ("640.09", "-25.3", 2); + pow_test ("8693.75638483077329986588967330173480782272550321318049", "-2.47697", 10); + pow_test ("8105445187812500000", "6050", 5); + pow_test ("3106365092236328976", "41982", 4); + pow_test ("1.9e-18", "1.9E-18", 1); + pow_test ("1388437454689.837102639637015104", "105.622", 6); + pow_test ("217.67", "217.67", 1); + pow_test ("-1", "-1", 1); + pow_test ("-40.84101", "-2.1", 5); + pow_test ("1.542564e-12", "-0.0000012420", 2); + pow_test ("-1.18009517625e-37", "-4.9050E-13", 3); + pow_test ("5549069137356750625", "-48535", 4); + pow_test ("1172.7599043051", "4.11", 5); + pow_test ("1.024e-39", "-3.2E-20", 2); + pow_test ("64", "-2", 6); + pow_test ("9765625", "-5", 10); + pow_test ("10174708482.4576", "317.6", 4); + pow_test ("4596.544052624786837880243001942570369016159210753", "2.55233", 9); + pow_test ("4096", "8", 4); + pow_test ("729", "-3", 6); + pow_test ("19034163", "267.0", 3); + pow_test ("7.13342911662882601e-183", "-6.1E-19", 10); + pow_test ("-8", "-2", 3); + pow_test ("7.458836077824580594735138491702651752566987e+24", "580.27", 9); + pow_test ("-1.488656882033767469315065509517197312e-126", "-1.0452E-14", 9); + pow_test ("-22512044836648447.5871232", "-216.8", 7); + pow_test ("1", "1.0", 2); + pow_test ("-1048576", "-16.0", 5); + pow_test ("2.96566225198439749053708901e+26", "196981", 5); + pow_test ("387361397731.0852349972153162834577841407848071071001", "-14.4149", 10); + pow_test ("2.5937424601", "1.1", 10); + pow_test ("1", "-132.84", 0); + pow_test ("1", "4642.2", 0); + pow_test ("-7.3499661205554469210497482752e+28", "-1612", 9); + pow_test ("2.56745903401e-35", "-5.06701E-18", 2); + pow_test ("-8.0416926477372443174045490389e-14", "-0.013469", 7); + pow_test ("481.890304", "2.8", 6); + pow_test ("-2.0079766520165347109375e+22", "-1535", 7); + pow_test ("-3.34255384e-7", "-0.00694", 3); + pow_test ("65536", "-4", 8); + pow_test ("15700.150160096030724096", "5.004", 6); + pow_test ("3", "3", 1); + pow_test ("-1024", "-4.0", 5); + pow_test ("1", "-0.0000026", 0); + pow_test ("3.75e-11", "3.75E-11", 1); + pow_test ("-2.197e-33", "-1.3E-11", 3); + pow_test ("850260.560009615038237114368", "7.032", 7); + pow_test ("1.165611915415579117119882256009e-48", "-1.02587E-8", 6); + pow_test ("1.874746414628249416823686235041e+30", "-6083", 8); + pow_test ("3541035030023585410.9685579776", "-71.6", 10); + pow_test ("159873594510682.812023861622308942042241", "59.631", 8); + pow_test ("964", "964", 1); + pow_test ("1", "7", 0); + pow_test ("1", "1", 7); + pow_test ("959554720546.9939335182868736", "-31.46", 8); + pow_test ("390625", "5", 8); + pow_test ("8.58117156760783434066136732224e-67", "9.7482E-12", 6); + pow_test ("1", "1.10E-19", 0); + pow_test ("2.7206534396294947e-38", "0.000067", 9); + pow_test ("-2.7993930117296371229848579851719540736e+30", "-22365.6", 7); + pow_test ("5531947943217503125", "5605", 5); + pow_test ("2.77921878692682183940201e+33", "2210", 10); + pow_test ("-1.34775901066369285240390603125e+29", "-669765", 5); + pow_test ("1", "1", 8); + pow_test ("-187.539", "-187.539", 1); + pow_test ("114983.567789585767578125", "3.65", 9); + pow_test ("1", "1", 6); + pow_test ("9.5563709286130016454092290324007041e+28", "-67615.9", 6); + pow_test ("2.39576999392237432790890516398336", "-1.1154", 8); + pow_test ("-23.924567789936824982851522063", "-1.423", 9); + pow_test ("39.4384", "-6.28", 2); + pow_test ("46411484401953", "33", 9); + pow_test ("3864", "3864", 1); + pow_test ("20554002898923904", "214", 7); + pow_test ("1", "-481", 0); + pow_test ("1073741824", "8", 10); + pow_test ("64", "-2", 6); + pow_test ("-15633814.156853823", "-6.3", 9); + pow_test ("7.9", "7.9", 1); + pow_test ("-284.68", "-284.68", 1); + pow_test ("1", "92.6", 0); + pow_test ("256", "4", 4); + pow_test ("-4233837892.359375", "-1617.75", 3); + pow_test ("1.01054975167057821704275308297863156222443369140625e+40", "10010.5", 10); + pow_test ("4.15867265447116306999621451776e-171", "-9.16E-18", 10); + pow_test ("14796.346375", "24.55", 3); + pow_test ("0.000003596774583043934673428448834277192142749696", "-0.208684", 8); + pow_test ("19619412024963200000", "7220", 5); + pow_test ("203.33219575276960518721", "3.77617", 4); + pow_test ("2187", "3", 7); + pow_test ("-512", "-2", 9); + pow_test ("1", "2.4E-15", 0); + pow_test ("-79", "-79", 1); + pow_test ("-281399112371155271", "-311", 7); + pow_test ("2.0441457156547956272121e-32", "-0.000005229", 6); + pow_test ("164546156906.7655853425459503979807203014092043691201", "13.2321", 10); + pow_test ("-46.13", "-46.13", 1); + pow_test ("191707312997281", "-61", 8); + pow_test ("1019.4513038883292709315124224", "3.99644", 5); + pow_test ("1", "3", 0); + pow_test ("1", "-44.4", 0); + pow_test ("545516.0701056", "6.6", 7); + pow_test ("-4177", "-4177", 1); + pow_test ("358050", "358050", 1); + pow_test ("229.97659811731444699830505796029057408", "2.17462", 7); + pow_test ("2.6108288368639387032909799e-70", "1.21159E-14", 5); + pow_test ("4325169905.757", "1629.3", 3); + pow_test ("122.5", "122.50", 1); + pow_test ("1", "-0.0001858", 0); + pow_test ("3.17145729137553882999930496108165023687245824e+34", "2819.2", 10); + pow_test ("-1", "-1", 3); + pow_test ("-49.358166606568", "-3.6682", 3); + pow_test ("-3.0228559084421978498330001408", "-1.17120", 7); + pow_test ("24.76099", "1.9", 5); + pow_test ("-17.576", "-2.6", 3); + pow_test ("-20", "-20", 1); + pow_test ("-1", "-1", 1); + pow_test ("30804.095140913337149030892729572601", "2.811", 10); + pow_test ("15625", "-5", 6); + pow_test ("117649", "7", 6); + pow_test ("27", "3", 3); + pow_test ("-65939.264", "-40.4", 3); + pow_test ("4.56976e-27", "2.6E-7", 4); + pow_test ("3052847.6176", "41.8", 4); + pow_test ("18440755681.001536", "51.4", 6); + pow_test ("693.43957", "3.7", 5); + pow_test ("-10187688835060.27636096761856", "-72.16", 7); + pow_test ("-290.1", "-290.1", 1); + pow_test ("-2097152", "-8", 7); + pow_test ("63.582", "63.582", 1); + pow_test ("-92713.643576", "-45.26", 3); + pow_test ("58778272623218534616.288838935169", "1971.83", 6); + pow_test ("606071.1605323", "6.7", 7); + pow_test ("49478904727733663575.051582184770446498259493718971258958961046708278746324459568256251259157238318185790764612200843144821137580796334089638532287323488178607687532035618686192601481827902773410791645057647691925965756808571011539462511641266331263543939501901006735272661302011976870015625991111560481188335365459566760212844848008439578745211448299643484693328447464460429576345111356618402802188681216", "-1.60380", 96); + pow_test ("1.17647340482075248419254427344376045314316013640615098803852731448350843468375614975229837000370025634765625e+81", "-1312.5", 26); + pow_test ("7.0251816660378376802360594609084621021532608383100803495211258733288152327693358768741786747381360859889479870288549139760601303377485234176e+87", "-2391.76", 26); + pow_test ("85.717123455378345835968064", "2.0998", 6); + pow_test ("7.8189586726154755713303078223442071754329e+40", "187", 18); + pow_test ("9.145283009860369082115124525217171723626500086794105722560960199131059600008740516579605574000306840952542591838726900925804876261491646795282472377021036430500854987560433039755667787412917103148092128371355207976203112911565783359385741850905996481e+41", "-6.4113", 52); + pow_test ("2.05766289512932241998482631797034621069017517962263802542480365981262536498089637707776e+86", "26", 61); + pow_test ("98190573319064.214163360748608660888346857427032348178060040012159036566957731914573312588336568078808326155328828092023492584783227218123097647282496144318320115860427194595696623235777670393347299594686642872330179664094829207439052010438267983369137644871417464586087393161049", "-1.6293", 66); + pow_test ("1.392598192044227355988772015943279484446048049140235246881310663971517522995991944491655264930301742862780134225258915488062891063359354742689683631308848403923615202977361e+171", "109", 84); + pow_test ("1.5469996446227372120183605762031536360861258626528255060075983309687394111102266369973688377324297491658050323998067994446097153176237864040180207896595918522219595889946775556217e+64", "13.37", 57); + pow_test ("417.53905413413116367045797", "1.3", 23); + pow_test ("1.624290817967129588779052613030846258081e+39", "79677", 8); + pow_test ("-6.3573488855626874208656330920509964477352567129457629687143164320289038602869782661489925857813432230614125728607177734375e-576", "-0.00000000000000935", 41); + pow_test ("4.64886146511675512184781529230310759569090675635563199653956477629674515058124652544e-866", "0.0000000000014", 73); + pow_test ("6.613998972307900952958925063693292646912001305426127894831260851822286968476028114198011923029274945784114379928252947652708965396453170282038903005249536e-263", "0.00000908", 52); + pow_test ("17179869184", "2", 34); + pow_test ("9.7756260861181096053516970094092017016032995016954767790504110039917368643756356818044285001644705953440430468819149794081183248976623767084182482857941562203266736374606395800621259352114936429301555533971456e+141", "131.6", 67); + pow_test ("4294967296", "2", 32); + pow_test ("131621703842267136", "-6", 22); + pow_test ("7.9228162514264337593543950336e+28", "2", 96); + pow_test ("-1", "-1", 41); + pow_test ("5.0096959237841976223015468271587016074738912992534254294320102857326166341642003475731604090433896328441157235303061782495282575910872792923981113856240569836427242032573810996210128117467500761653330557379347005097932959928243111015057764620250811725789666461853189934772359267843261626881e+197", "140.9", 92); + pow_test ("2.404907604760405225358828131112281116032698930082119547604265954848982041717359046106827774346003151904701415424e+111", "32", 74); + pow_test ("2.69721605590607563262106870407286853611938890184108047911269431464974473521e+22", "-2.7", 52); + pow_test ("18.174", "18.174", 1); + pow_test ("1.36891479058588375991326027382088315966463695625337436471480190078368997177499076593800206155688941388250484440597994042813512732765695774566001e+43", "2.7", 100); + pow_test ("1.25668660115116491467662710973545031109788152235501170924313646703423681882164573441433515503588152722789494580469301248e+72", "34.2", 47); + pow_test ("1.56438420672167084519979701497174364597412396629019101951505612890666817698608365177006994887516584111152450449887451995069033040411213741933147153316594951835865202053237255800944727011696760985308614176976019463960094165747239428884158901702435389388132623055120422260406418255249330452909476806656e+299", "1308", 96); + pow_test ("-3.3612593878633377323120299366598552550657318092430645826641551765299195886060921308858703945250378295445932063495284056402608601041200858277129191414584253234377130155413110017511561906751453442173764185430889086682955797697564561876544299009572864e-463", "-0.00000030640", 71); + pow_test ("-1.366174308182025187777528918308146941320736787278460889575749404867695325446359807161410602138908197731224033169833047036778978022709170976735608988099868310813030127497812540494011203545816852288666658682985428600019476831917843e+58", "-4.83", 85); + pow_test ("2.966806088806219456880539423158152815514806645521282752514016241570099725287916962770395912230014801025390625e+28", "-5.15", 40); + pow_test ("8589934592", "2", 33); + pow_test ("3.92012913845865034844198476089476040042936801910400390625e+28", "-10.5", 28); + pow_test ("6.26204859896956162110746451442214931102399028194694661966016701109504299345041406486245804277657094315831017177064948219797627444240188709011456e+72", "10.6", 71); + pow_test ("-7.4010922571797388655581604684527426699437277457499992187268655958229686891933340740793991046504324130585438416249947232728346081088006867719609592595610095069331022367447133421906806310032697675369409918188139600222703781482594772971289070262621142441874895437059567046831661495957273728351051362944953711082346089727330717918651409489163662706555003193741825901442633007312863953564385259087744338361955671878877893732351367361843585968017578125e+364", "-31956.5", 81); + pow_test ("6.192736416792149755132475219493405669399778858602560762871794455317449717448580836229845787580888290473782381059983387805505374173265513677435445890655671110840202944429668728225878544903602239e-270", "0.000319", 77); + pow_test ("2.321827472731847506187210910989207010589651530892302311791322352855446782760907718473019283821056753242967949096791603718944064726033664384082861996009850744961116407128920163494805886357836270766853975184523023642990429569615539676822828070446559161161124635674389704743948383107212919966543969471039720464085404567773913503635201792672811032312063265454094042341369554833714443413857449688164664657173315113983032808001e+220", "159.83", 100); + pow_test ("4.953736650985698001275587761883016173298229503362193331584010106486052779761329981195411366329068322677550960044762649449732919438910119549694010717647780952298320287365138145210431380601324547389442337520392258009e+27", "-2.797", 62); + pow_test ("-338678221586896.02233451034424755534030583977124338116841050703894756829829935320421996887", "-2.47", 37); + pow_test ("-3.181403788572786716059998378326698266679069780899509454959934125355133265193e-226", "-0.0000057", 43); + pow_test ("2.2481244795444847556680083178853571141700204725943661497539185751725919215990484669445118877448657555202573745174750533635052209260608084995835891707958259234271442982681066779696130155696868114346639852814575962457281749995256623713554214237458259176913852401064878760784275382146658972801541462348779288776844691139086889351786721e+179", "229.03", 76); + pow_test ("1.09544203269304121665791452848994634135137143229447033238750572549632571476402641497730897157401184093614916314911584167715115647604065370616785146866296916632437569033863034458711783186506727022529378159297811462454675308057682780534190256280910865229376785975491743196806996272790525705427972427376758443312371576466422700240638756574402393677191376501159420836822933903938571935476091044876631814554274289087939783553959776485376e+31", "-2.0436", 100); + pow_test ("-18437563379.178327736384102280592359424", "-2.4", 27); + pow_test ("-2.565217290810806995636762133271387046711787821113755094865559403845937698002650308359872294490245896048511431844327060222279092126522644090602653932364773936569690704345703125e-1286", "-0.00000000000000000245", 73); + pow_test ("-9.9938258857146531850367031e-85", "-0.0000000231", 11); + pow_test ("2.45673281757908854552870925433471410070214400334169452520459965621921664416713287959754208329284439619509099451538227140937811535553399003066102795766261859069268099803838998995339331311912275460846260697085073312049264485545427543086425664188963659692922005683716104197951717376e+78", "-6.08", 100); + pow_test ("-1.270210714458885172439348525985048001607770314656078008119108251089872343340175575576722621917724609375e+24", "-4.15", 39); + pow_test ("1209.5", "1209.5", 1); + pow_test ("1220703125", "5.0", 13); + pow_test ("2.2282376678496302739664556233420633e-74", "0.000000006553", 9); + pow_test ("-2.0143178310003212256300583293456672172631020531521918361472772972889521239226102046625809514969363623444910359830312781808037277269448486731571232348276098930038993446113250228220070581715505392835999598313673094262893473819122138457089550860895343281662272401621942844086800579631762991581889839022236592407099699255051163050728007905851774204682372669170991112060985568225152641619715730738207580551834481069203501503809308865543720800327e-380", "-0.000067223", 91); + pow_test ("2.218088039378445352751296336694731578146959285984085545221611060271486214348079661041003283535646898758718143100202167951881147633680620698026648392938984778649e+159", "893", 54); + pow_test ("2.10030968607618842407969732186669026418164521383378412734005003194384320968659491239802049483617846390172315534146347011074332799904332281963786542263761412332465321180532568441958976108339460464558490863953503079336356338135760894630619724493454777575270501253639608281424341291617698518141921861556244699796561591915201261004739209197698527393965924844797945393999012105081714167479170123104969e-75", "-0.16053", 94); + pow_test ("2.5812157101662325924336748344070521698410946762506012782923924916938485004644329931151074914373301798478548152505612780265485671672098712055026947247254600014458282820627468534250894082132928621697659949721616819635951012296371246281717642419683893063297904005186874144169940879165882368e+286", "25488", 65); + pow_test ("-15.625", "-2.5", 3); + pow_test ("2.9729685996261878754343622542880008372085710279050331084451543295302017053107644303792930816e+59", "-72.2", 32); + pow_test ("8.15730721", "1.3", 8); + pow_test ("1027.334860999330573407176938442293022889", "-1.47", 18); + pow_test ("1.20109289910050514343148045475506579676136202628631781424931463646123976128634333627993215283736800191296195442718065238702508520055513255346146658609301480565930380776363581062628797012612519067602295957218821773367819208495782017345400726347727499503218384384326417098721424389373157748956399698521853695814977704822352568748499324367082691064737392226159651276162776412093080580234527587890625e+315", "8679.5", 80); + pow_test ("-6.00774319642841528092711102659123449286352750007573133369794363392e-33", "-0.22", 49); + pow_test ("-4.399348626310072691340857398671747903319767685984244866658805429802943497233040561059795990923598510826890908258017493538766494536483606174431755682553269424176946343755577041745496403493430254087811474250251864009392456889456030217048416123130922140883015639602300329038985615284964386359900403921860549312983015992252637174331659470716194350399038561704290046291e+177", "-81.31", 93); + pow_test ("-2.8207084178214872249481823288498698761858927113247705134064774975584407746875292397517412079545141630385439164566258891612557809688920433687345470043533104587152797682527671453716396264049694524828296706083384902442044310310028264740195536658201877924115112455928789057407729309051948428713154253269588754827200494136242524139799015813072692354239567376152196027070283776e-140", "-0.022816", 85); + pow_test ("-3.05410827582876268390180635074883196222812916959850956275590047122226930793718597160851022493537771838978253152932907298258251555751167476560688772053768410645587233357374279876239597797393798828125e-247", "-0.000000217485", 37); + pow_test ("5.94029530519133658573841651381893916937282220672559984930445801765696530117833330901747112098660456061962952244422396324466169433806822249922825538552986841011e-19", "0.491", 59); + pow_test ("6.30523820693302485362185385323378612453984181696300485861970499164041182778517073604560519798249286847423997356860449832519236757706844668669858983416671702949907296869514603475482872905487176008793424936405673085021973514041591620544995041842415714193527926259387876594710020672351902248919941484928131103515625e+217", "-207.5", 94); + pow_test ("1.3437482898194084408359108790569717431056936319064040016470306278420649755238589129250716839755182586596297106623509972801915917688676116852207e-198", "0.0047", 85); + pow_test ("-7.2125976851811538835264180669311252876757309817127885777282268797579465235996423577991265862898834402822899090972405912847104748143261578733778979456054998346007864343435284069799588577484912513898046820531311312862161018665360468415091050892814436289818311468501837802070896183140379745282036670643116477155731121958797307187300620339307163520531060733946755523082115115646976e+279", "-767.6", 97); + pow_test ("-3.6014175419419889979825978713404525121917028354184157603813105843373968813713708575013260529677555144144724689493141661197266911743582631754736205113266715503341523389605232359965730457026715491821102337726896541765297511282920487936650122950956509166185123335946923710632464810273024751e+116", "-23.51", 85); + pow_test ("864441744884.215763637320205869663958329635842919446190153261333597518371076208416885489806126587561695103959519298009135858834566699504679568405218950836778578735139166130606578479646072479355927241854902595925015466294859320621226069690609744261681250304", "1.404", 81); + pow_test ("2.1740698194376449374483147468467027620784304276072222988616865620688896e+52", "808.4", 18); + pow_test ("3.8358611506121121577937e+22", "113", 11); + pow_test ("7.708142065054490966774434895299862856570563111111152865942369472254266622057906176e-375", "0.0000000000000002582", 24); + pow_test ("1.697054670829812124918589801369405630774787179949418285317226086899030607907838200923128944336540480137932154797404155642362243064347816887752994688507537824596616056930370261936449615792564115353680658971035397858675806419291627327666883921628766762017e+153", "35.3", 99); + pow_test ("-4.710128697246244834921603689e+27", "-9", 29); + pow_test ("3.2505902718449668133084058626546515621706592677748264541998335302067693284031047914414370910433910917853346703702752017311701370087768406221174636457161634693311184118695477205673579866365261461786447054994132502457715569269165081396243597525386428206972507983546973520886724081775555138991647659604473279e+52", "6.8159", 63); + pow_test ("10125003344964.40019736846338763496828575459544161517257186895064610033021488387585533013795387142569984", "1.4", 89); + pow_test ("2.42345584530855605369352607812401621812969514892052587699595659920444177232215830190610734163995767659717739085262295176867928060719223680015363045876418329825526462245791557686517318912084055326038644410192581225881763601238326486032097397313474568621301371994854117791159281618952104825018353797567777238802251899860635626775962501422496596274647502903894924414615487350912292031481351426623112873751676007424245517123533625171075882961511452925284934841852786866383531618051093655741591513417469573410554311639321196001e-979", "-0.000000000163623", 100); + pow_test ("-1.4631650542473900277009650505078819321358806229e+27", "-26.90", 19); + pow_test ("0.000005295825289418576524939548312590198218162176", "0.468", 16); + pow_test ("3.05549283928318655080789264037405744521084525112150000840590011398025015062827701972944507923133274963552582295751430636384831621423236859444282002625831436173279343347208611168256e-1317", "0.0000000000000000000436", 68); + pow_test ("6.8737496584907426626313819245031248376837843308744720028536801727310422590256416090562808800210844531270544472690018733914673078562856645346395894509829890694096382823686071373178326267458718358846285479617141539840116621230393837804338664073754005311299301249174709116759875425996420794047622228612301608179896688165566947248834248141957503280864708798493297587091913325875132574818764391975237904072613078649529818121345346997223704868660928398187111003322117526971179779471513066563912173514255531973497213908454568244522179614576040541056831042204810866674499062704103999143936e+424", "147892459.992", 52); + pow_test ("-2.8146479662541597081274416178733121860079696712353521349953087140279328650573199835200989048752954416072723266612561673395327067860385419926496980826273624648819979832189443473160998127180490840670643347268997115172483666046588726408061842543063557107507571471460449079090247848491631453237051551777817536688202337705039020111356944014738131800368308453481235885327559176247859131329636754873006899345889798004981220291943445182637375840333548122722503521409219604293110110218239977642014577818005413689988750976249287035141420798845245155557117360125630350198594871668428356167381408479509575844631810711980641599329408885428661560190538079795413218925648499321738196539353823363150418207529405972685060870280312509298991051194276419276281665021145145231388777163604743396002252126683136e+708", "-928355316.6", 79); + pow_test ("4.1550056575303757228119633897485161478257545991080710781246444078890480445595483297162130879326322767394020818992612209273113282741423297800374026062917889514219222760102972249776783705399405702208500983661432328199077976712616889331132073633345739451305161947343186063845584853370234906486236182246156880042982439581300028796255911192143593205953934116870666334468549426713036166883165227311236788431588170407270107831386834377236415331046139978378131343210669779889432793552847716954802965953947383085829332369100621026610341613919587586441133939688279844321511780619910499072915827001583773089715651976020809993294119257087611233862264828674135126902550664589266837280471718998978964104111815396251418310806010610004963036079972123625916091809522896488981728056893575146362581153784045875486607998050213627823201e-26", "-0.433918499439", 70); + pow_test ("-2.13825209215512828440269455240169347772084407562319954177735966744864590012014618496355742013223900851293500036195697397558882293948621657334016332630442341312358031641684225772703692879077286212410249112292259617578818732032e+224", "-203479518", 27); + pow_test ("4.07921626152759874706750636234610711277511981267140799487233110013700434628310396204835945123342429644616677263924098409140271398300308140751898877152374852101672423561384671338353950413166856702896620695812471792217562634286857498132969913812033679861984845959241689697235821203390602245450598886660048044481023188506388871537857616153846606889656647661553925800233006508370220964183808519443488054785371171178458637493447718543668982370416902695149696323193977948327786874993513535986236378654219637640158954029160466244562872094676729043997615005949784734421964950592990177655538750040478391007794104382875758798061808214848367338145330473927905182075863984150597953008335668923177942931986912633579578368880902417004108428955078125e-349", "0.0000007725113250445", 57); + pow_test ("5.444517870735015415413993718908291383296e+39", "8", 44); + pow_test ("-33338.549041729", "-33338.549041729", 1); + pow_test ("2.7214030202002235259872217354276868322505756236796101744750922254072943468398158090938361760503196297567571421573431913968089480080443473498108606049915577803053551131894096917430267992139228904833591260925102332702863889641131058350845466180073805176058062062511496305436593986927276878340795001904960142635221849217162104418149855782368706167456898339731322626805338533602069310753044118499679070391659043014863756212342671519561753648641528938961249781667596503442752009505056776106357574462890625e+355", "25403380.775", 48); + pow_test ("7.488967886646769020135665775188919173982517766411546419429833806092666779946692720558606535250488757150058796202968413241639517383652620019580992048245618242802791919565261399799275748008372859035772846386750851749482155871108863512939378067436886935381752737141129513585362569208124557454386670272939418822453438670913670149714787757724915875534683373244734438381987473430196456436990814262346701710120113213932002664424213764208834743329181661358839573220074737883074138029822996500442023856383570524772344040729242866145735668954219795903770313321694206678450634108956120637363083442475459132238765735069225942833258958556032448438304510175681777905847909119739292131657606066356382458693278659384332038729633098815077443043626686315515128390302721e+430", "5400237.28783", 64); + pow_test ("-134217728", "-8.00", 9); + pow_test ("6.4919612772480684272077477598407081955951769084986853540654908040236664132468736e+31", "4.6", 48); + pow_test ("-2.19516244547091597952961625454695348245614659050655334765404613313384017646438800510561124115050347626607557413049526710505947787909678168881471450760692589194458296975014469481607782428972426101228030076378151928725802874208326366011927330053807955414428037618766935246244704158022651997839e-412", "-0.000000000027838959", 39); + pow_test ("-408518.488", "-74.2", 3); + pow_test ("2.6122383559387081296537383480965114437482497294603331038492821930754511334614082451247995976011754175948033208350877260508339210350470971773483611262598975948388081226982520139805939801386768827832059816233575763932242012655210850575522139572300856461682889553829554870249034765972111622144e-53", "0.119534", 57); + pow_test ("4.9850229727065564838552075936058884072483546836617925693918734591757063770692197370714015506959425473376386516711436607268208277636503475437445688665069491061323537515635105084625953963084527783397499370629700852265394871597666675552871197319798769732286411073611671053518019648674881861991039408411419655406435532953187363560760310907326462424912442938917143874903625529560559341987014054017728254155646042683657020960066518571091535493426634709747560461439105274695605741238558071638728063086433086290881426724576410242527931842535143281385481835738259965154613661873378195341787543569962613719963795456e-148", "-0.02709904", 94); + pow_test ("1.56946509471456053067919046607778209965771259504948582489855492239980383980825548822368765834159376513519684340813231776441618746842197628264511664812727788324193189716236172201170988327488959873357917098281e-1180", "0.00000000000121", 99); + pow_test ("1.88522188856624562372708154656751441041381726119427387599765763695834615013232142421520586436232009071932931843172032205056661409003338693915273301223126561630347970098203184279906247655542800284362476149094060315694708604230353242909365032002466875120342181047689475694706227284673985251088619705863125778538982501735383260557349198668384156297528069830916927729430864813333996813440323955895348081117644429414429531206777610934118661932545955356203081687958272101e+350", "1396953.01", 57); + pow_test ("-7.4641079962956705920034912695642465787383566977879750308559196923222402311665962335871104200586964218306687527948988363660881738310704671349709669487610144905689251123467238632699575375039822099609504292687413249132266915915320573775450823119373280252201183083672896166447786672561808861768782076443312543759437244643146889964363933455672502577964296155349186564340392078021387512970362139779496580009767098175116221996336815276032e+365", "-425417.2", 65); + pow_test ("1.915651048048760989675223006710502095760272088541579446290639477213455428121307995153274075329786132157611746651e+72", "363227.051", 13); + pow_test ("-7.65032026817518248876564402449082201253180407179105772287243705588834467106246226864795794350056707139677395342984049031608196167e-158", "-0.0000000000008205956327", 13); + pow_test ("1.5286700631942576193765185769276826401e+37", "7", 44); + pow_test ("1073741824", "8", 10); + pow_test ("-7.492788722116264058568890205770570774859100309722464309788118049412229345772411480224300523702767256086276612012745150464681862935165491623598382139203570285583278591609354972796097254467143774807748614976801272704624819215123157317922738427454525033948883547809409740884056108275497786621497433099431568320476275959806764951584862378486525479494452910448127181400467328943711415916384184330110378180608e+38", "-2.6742", 91); + pow_test ("-9.9615483925456314514941835282258027490657130453558630944504898425429565393128463181577359582035968e+22", "-34.13672", 15); + pow_test ("1.399922200750534682219817715626042346444265577310152832656021878942015248035909712686518235139333930615671437276362060231490721869741275050613538630628001507198150040959125681675660226363983554975062957910826317184614904091530578807538850671607301864207908455029708464592014690257839027200102495492869235566493012545340996194182688131148892605629158333606816661843824439253963260085811270982958376407623291015625e+181", "8668.79595", 46); + pow_test ("1.1972515182562019788602740026717047105681e+40", "9", 42); + pow_test ("2.202115503151472939378975945429179012130502358719841711078827390192395746343741047199171734327335651520251442046215323779489495715592781811364085280202651471923814503516348966730262218625708815960745017538450289188340543284914566286787264564178893226078936128988787471928557990525062334846282320996222324625945765877847033774462855391128649374296526404082041033729448885939056214542657236719090328218184247313009075703142241933320700374462796901110200768625476731302618344824136736084289091354487089946804741870143078521211017751418875276281149037837553896673998109493098384421833504725859181031374464775140113274356212635994412769954920908641601e+645", "-116623347", 80); + pow_test ("2.809433795080632851709145012225734908409054034941321241601987773815883609706743541544402166343924517939889529050536360240983658675834106822309237371584880050176e+67", "29.26", 46); + pow_test ("1.07868398780558185107374474403020532661797776728251416174497323943011899689646635171198704732611201406021634948916076829493438856010253804362200645063540951721664626993793950535311074968979486772512114485903108974813153787515086384110800820767447561947653627148706348696137405309393089297059509877094341371443072935310278087678490134404105182181366232864420501488011018398616532312274978834403446637210442398221579810182631353067504903643457223517919753185513169702647264458151237138501509960401271778857785196059943376161475076004628662470655380785641707995265694079267410121449453510909358494365516418648346056999086350031787200888670260526532745451073436638759925695050423663041216049456771565033256332270529303132799570858912705564112506445240662496492805855959005388730223329638719134014885120936603994232094072118708951475531280218682408087208751084100846868818757315278245976624833064394058879581085028991210887627047410825276390136344004466080305862737728217342821469057995832117084467798274844185879951131300757779959691834097216917003287899924056620049926974974109199191606737920319507952408320236800792559969771048293815035062609730066303408711203037138390978875350456123554886388685750150167745416719567226420868939694324912807423373360490897739135611243033809540137389420138490212707060759530504538976563026719537360751101833747910242549437103469735149162329286577965743319935974856372834520558206976e-156", "-0.0256152689843076", 98); + pow_test ("2.88578006478481109681709292955455719460704031113277109068984071037918062293570113975476734737301949530731913632979303450186466568369318518876187546075767065504326813e-502", "0.000000000000027853", 37); + pow_test ("-1.130764362193076554708917348657069436161383119992010510285626112959278426786936465605907875370782367006311207257151205709430547608789956273155866459033031412425747753017041228269946019068798157376004812291000927158419091251680264057450083682494989856683271885476193403159681085354715517423876371812000883161101039915298940406738346701704184093773206563783365396974283025554248166993067633181013835776e+229", "-495.16", 85); + pow_test ("1.4079204473765793611205659398747988324553877949122198881761823569037754286497795555255078328593539192688183469346829895557363028984266513451480429352198565079209701785014261786299007878956587947295766448428517173439894654471188272662954572295701492355589193513351750151274620765557903307460230125360124013361832687856567900491820049531825904083512531047613995244068915188374911719721681159419255851678650464403431153812796388113981457279816536052532029022159116363377812871507097009696999094856073325011666162559051661029942614061375069471909443382620314251546452011990276242995027453796323946493608369520697971319607477108850805623943653859336240552463433942656966057268476396727643619402363764661755104039596942016778012443861853146848694945561138583599984515041713806683288152679908819567129262792401029872485370102439410128369121641465473638876158320127373102022232994888209825736760912929558531292428824599483050405979156494140625e+234", "-219.5259075", 100); + pow_test ("-3.077228040283419501485435148888847716813106712632276671229710377509021026817676725408321326107948661263691709915698886286976007892051135335651197784824163323643144277812710153968406419716183905139635176333083510237302643593683953953477494067043109636077672667948180821005422658784541128359007025402810248257138220199195378601727145592714535208968044372704483391015842523268884989073259915535384596690721656759730286732238685451797332150695395077171985430070293527840123294365665570804795301448909420756992e+418", "-5398620298.48", 43); + pow_test ("2591500643510.8703986391408896", "35.620", 8); + pow_test ("3.477283234494247174955772981135213481734078932418183722882598073322692286025940951446621170551672753962398590460771481424186923218942154108093532866071869012357999740676113816609494789228401437424825811561820654792528325225812752470383184957891230592748660748903040466372367629077067239697577276390325455061343687182891385586253067945740768918704902176664219044850100644662536723412908533903648591296570565588579797033639391045393005317694425271135677214884155349799855536719234969547130129e-1361", "0.00000000000000000041249830", 74); + pow_test ("-3.35390966929685775566428232543003229321430942684482327393890454463616e+26", "-6156.933746", 7); + pow_test ("-4911940958770.721866380729238693889243243167048192", "-25.7122", 9); + pow_test ("-7.2098871027996882164550848582893324736206875895159968045387594761033704208535510362468505731281582425298017917320284602282447985874106953873551e-295", "-0.0000000000001626351", 23); + pow_test ("2.09670982511886308779364382461226064522913244291274975553909045464953985730555995547122852179186171376596687978705841751285402054060384366505333092240660435368377833186306191605049e+179", "2093", 54); + pow_test ("-1.3120135409024675389197377e-32", "-0.0000000000235855553", 3); + pow_test ("3.06580286249339590556181770635869764259023245764469206004664101e-78", "0.0061", 35); + pow_test ("-4.429293345196932276984549040219058245905488651609667018402382745119170674779904528756935495114384894434070998056621967747005022674509457845620395626349316891933712941619646377506486625368600115937614507993729672492431012578899815005421568e+37", "-32.051870380", 25); + pow_test ("1.299270565684257922619246441017034698039805547412943905460754496572097300952165266370194652051376805296279609746312644347199238836765289306640625e+56", "-18.85", 44); + pow_test ("1.566108714385843340192620380546546555641735293434509574033302065853656477829384746549085411912657151882140111651595251043453318950397645765893613409097202898027341727466585518405768283017471302953847629952837298920882176e+24", "41.0192888808596", 15); + pow_test ("2.61958676888190130160363553014940478261307337527924200329289138176e+65", "-1866", 20); + pow_test ("3.23590932372253866812859949454563891250217856922745576253641197253435665205998361592799809e+89", "2474977", 14); + pow_test ("-9.7368504802272205153595678239454304952368475046930119079817985916928e+67", "-12", 63); + pow_test ("3.44552147465294110719732986332367243247925798357929806000836849e+62", "-7", 74); + pow_test ("-1.452398236000580121072066902680504451473423787336338424980953647832201352052465847557295963455561081881743103593061176242491787910639717141192177431170020387387239122306327928120484949004627255099437140135623570858068768556995906899604425201341758241176605224609375e-198", "-0.0000000003794433436895", 21); + pow_test ("128", "2", 7); + pow_test ("5.65251025822228531444194278761233641822281792819659230058333528631972497846690920646507426317458140864925211864848848044857090776165664263450974899867329254381660849739991179791628529582217569168185463633540183106805961127540063207424e+251", "-96880334819820", 18); + pow_test ("1.14107582607108828738727786705842372956085739834768525725464902794127546836243697599408154971875430236598124720627825695807225748800206865776759209466523560191022176894495595957948456740052589766169910566748987526231116768317131023909655394007055203701522554585739267475902349909475429549403555539653461493158398661311247261808161537169043101921093658271479583004747121113491003276556799338354235965632672999762610653218768326389269215399799820616040039956676066934784e-213", "-0.00000054573252549798", 34); + pow_test ("2.694661255697411397638382996364833318896569132107254175704475656993408149148787257876989709118912535228351106752665777548202167498537778413043897904425246334243516040510224069308160416421621694293323335359415777019643686364603342500176348207942392201863311693577378702165646022467014567507350758519739242895637828787757898674096128347546314083698792347687986627552406389069409804518896369803168004318670513348178554684863589395170672076476692813070782506346023243347685532106534664790313142896989018262863589145173454075951584755268325058105333073378797737002280203168643844576066486206631537822243062881472854331833497932080918039317893726556287893765343937829144478219032999389426126114377441753098232009323368937575158666282216495169817356507116769115165201637431411429901795895447411017897288700508354934492324978841890388723566094744246181121450362989343657238605524996170413474765724415123048917997930643380598337786915363082241543058132144906707064242590005607032784044327110468761297341884902367668493103410518314292043153000929758576269862004120759966136121319405434151364177997201999380295579576988910231518865392237933271936797413045669678563984190093867545214722525723761e-162", "0.0119276152381013", 84); + pow_test ("6.819668312352580735571062160710567114849175817831511892010723043920379092031215450236971346081546538898709343868035480833649809755005794379226534646933878314382300734811205288513924832344426178927991401393582816473921386210239936761734834845537558625877346857367488344220978330978463797202471868399404300493221286022793154457818428986435946448801449065938442082235318928992721704504378480165785082979441671849270351366472512862482347465713408854026594512160429600282728718794411008926422853751208126199019311146437195308261518055169159585380164716319779975316169881503852676219525036820498468552310784e+393", "510194.414", 69); + pow_test ("1.214529036103353599078303402353988354368901290518483617131872964733929620706476271152496337890625e+43", "6.5", 53); + pow_test ("-6.347837933056513353722482549802422893506022350398412637063463118408446866348060970316579990161491662971791431669434501980107126871004910084045827612746953888709955252364570683937894037212845688709149304388261135750051460016927221140392539241810645976791531257356157419153359404750948111183767643741377517979124849570287898660377838281034265223482576628270475748463593328028769895760141786535396100135700043132605861966879736164432625165034941381798797087075873047582570991477092202474033008636487673565486409112008997813187783434059853722747545465564823272494338930887139620822174942289758209743101745474476030369348174618632813079185886197394019109147868498920361931074940617039630508529285432884170952988080710596227749489369515496826666987363170244800209006727739277360232390906096945537367274422272e-1224", "-0.0000000000000007921325322", 81); + pow_test ("4.427788351999056892908779661304294204303506505740727156388644268519265092320054815319679560671232535269063116229417433542825837713401836579398864981866891524018752289794372972338646723907744000865693630274469282762772410301411230122599123677701587004286800853942816776387032063244935274501241310871747398849676492965589671571039172675061157921330595997693266588428933017692954803972839671865559553974412513763174029378195757001005995534096180268496099336902456639779966934268998934512369301143425326651935144496827467217523298707659499118081164646205877729620930792063706409045131266902206188922084763864137797951942027404778289235617846011440638260873801319970320165240018403702195879801694584203559689412731527544179035983805204513123788649219706079228081e-76", "0.0355539787671237", 52); + pow_test ("-1.2019514515640847575586926976222420288880922930930392632826439389028070216309009753873171550956237644053737905713930601182266550298694556856644221165736835506561041710133625619715943531598437067853105931820970146527606676211927176997675395162032067921680902917533169975496828556060791015625e-332", "-0.00000000000050893518745", 27); + pow_test ("-1.3089738102615705488950036718911116878301386483323342409513651601949943841095689259436086715966084434967103664037924413474102289403813212913777522181382481044473580351805322191321973e+181", "-78533", 37); + pow_test ("3.96435664551023166009432527884162006067853796367737813024190430384615252569493823212334015555476045223745267710440584785405114790003193045416759973795409712664077896837596687988358977963017261551575085886339378601753188813933464452096512526061746367179589942239837535849629855994642069316614543080293743786862266272667077293905812061925850138605681557967339405649099920095406780826427052068862402508544030914598887413326170889080842118181707782092869110288450380556681201356803298480762937106754408669544846715047370740072553230754652098629105895209895679440213970887252806092019885007412267948350528687016986211524428725145096245261205664457425524504259402407667126129396321622738877790982973827629236592975050954770759254867539024593007061691314559144608057254973749886498871153697476316002651798291357530399789489708421091129587128561305692205004611764864589809192513065786225109359726736441344e-1183", "0.000000000000000440688901534", 77); + pow_test ("2.678568043734091619878005678603454046890065730319059041066922617779738732552013071823964867731789481610691269440500962742418256182423074462657908268651743482014494029327824586172450705847083812144127819545703393146264767652584905037972471212033862288363332136481985535835026012527790465668040492097675469321915742224501044837369992177682352931842218853184230289300338298905895371981623996281414258096442423897257161265043380604655709475991898216307163238525390625e-458", "-0.0000106265", 92); + pow_test ("1.726146302297509640766292449752859764903022078656430010248920859830072010352007366328438911617657425649650367170506346895173396486476847725257574613405822496736182549233608967999820941307875511369188178896525716609263902445331754066625178138893213646783862066055205225450522717549872978272577099559202040965374304210695726239275248389809683461472065386641615538014939133369785455245219942798762563171967930161818698263654632146616677273270255164005761339575073597428814125346630365394507885993312732399706334184762774047407763728952601184374357825368624589796928083783689318973871597143367328054205245865104545174016228334760205754534111255523758589108503454315120311926536799827472005648122589642825287832641320048477707961989609306835298991026782291839544666294097047274554107822412948625252397092571160782378777183761424371215388093802134334984812532390805884157055020448204417356561101547571620503859926648120658212095674300954695082023275140281418952276189324248672101519574402708232154221216402609706003426735616605880789673740701217723552955825804146586105232550363059826111286997462404300893227116277343564362324133906878692598854932115522796052836850267098160405721244179608199869338374556585830298585958747040887791760204298688011390939627724800498866877415562066410814257206608746120224395781406201422214508056640625e+222", "260.387665955795", 92); + pow_test ("1.252453015827223091648143056289e+30", "47", 18); + pow_test ("4.593884321465082753417847006029094939767153045428871371185146539475234934788078659649525017869031479813190380591953477672897146298354193774199686172307595609685062957351072442717423824419651156326307969688849329e+172", "34973.7", 38); + pow_test ("6.4993779802563991313942147088910855038980304493628711994552936552675080091715543868582664478495863312478503560216160496462563144213423384672637506819444007554298505039521124189159003567749810227911510054190116940785207230365438230686589958633589792785739898681640625e+25", "19.527362557915", 20); + pow_test ("22876792454961", "3", 28); + pow_test ("429643228077338878294.90980773552148447232", "13385.0992", 5); + pow_test ("-7316.89", "-7316.89", 1); + pow_test ("6.87914590155026303370980110789497161335603936645395950008039524549423998547430459718690832485899591715423495939905041962091003793736119955958518759896414837384978971473726237305516963629287255286872328980051210041042418780821291070799434690334936525030793157741585829279074161542016174895927147907012499623328711921362945061656483581268375800046383063714806105729927399779641951702986991589688809363278120544452733946185051027375853021790353396740959054941411469330354238589831745170722278547542572570113574396538111546572410672138305451026720042576080626158546636278154541296219048542847365418147562911738603614657265796029784007988955899036541413836373006221312e+589", "120217094.2", 73); + pow_test ("1.239574795810526079748489147215724813987666305795348774093301305206857104388667872792722298696320762041716833793171380166642565938543813063965908215730138726274640558732378376081345774829243873301016011042987213064608498952230404692092930689186546931537772947407974492191946655043420261314494731696589682500096515708673465576418083366037746066181944261200756080966915362706737228961228094676733386508269067016989638785370510316351486703825902385195520744639816051326954756067123576368987864531312848054804595825163440506228252295842312598308190174979485478767598866319117877799314143909178603119708443578223570915610468469949806392232326089217551025083863958495966830034713358088911166327675839869180039029601144061805857957059401720225647922270097400056178339656509407631860651339114653575907071912293895974822551650560599072628850817170660484929519400346271419914740172937356080849208976491109534798334462570451085006567233874961401450283993130878770062700272556416772479998171111870509759292224746999678148420295642269858123285894535197188590937033092112714248284586801385841210089015311172545935949730111157433149124120743103281523326976e-1070", "0.00000000000025873908155486", 85); + pow_test ("5234016485162380478.15409743331356736233224871362317808951664029477472141754368438049197212877764328120319129016485361", "2.41", 49); + pow_test ("2.3587523476214488265105602233384822170431351571499949327792901375176219636953224670476463392373342279772850838452001851364491120595912397303760903286261541146631936830192308870389073374785895767836490477131403524578795077182693968484924474587814719179230245985331005838316256612823429831217004241217996728082675400098261089625533152223187450996066900095561520954236869900406302680423400482744491187930028993448348081190342732950402585676045621897388802838551757987655079454177981594526914994900926245046947484718071152759157721281932920908780781390332713691860960870572770040761154320419837824189071690254844854593343459633607733189681415999534694236173627509165089552965354274533408153893430075897901955566030923516936720199506503090119996175174794124435874644332511673899164593545913859009450879811276894036262929185905062064201251350256407499186307953211211742221462225577354600131030662462776599229715013951102968270099539931356477033894609326532954524810067603029689715219319863214513567526378103385141785789916386486343106420900301324775823843071160771421983879429528958998947915991010621806091931816141987852367290525737e+34", "2.386282102713", 91); + pow_test ("936715201610276565.121219177846759965092294037184459655112420506770954861339939295097568524612228771176779451285540872548572669139410080641220337509779355970915039117791045026675942372796217903566744371329096278047272159067195543527515016330528461268617826559677152033625945241108753484887834868554776141004652395753058963525578493344234441729097555557721919163232938285249196150226085243092573393734731092201479606268037047533934826431548289543047983548470548923290980238572301772673775072264037139381648624711690145835765678758822594470249537696766900852116381823037280731383416971641039263361", "-2.368146093671", 48); + pow_test ("1.3458439131498195323786528583479606393575536164255741666418955356844345324579594678199724544070952537313508949217012282459611297214665778807265341646101943507184150142509791982872347949683325035172100020000154912216772842085357404197730651656947685019039027437632994864578420850298458434675021508281598421364790325204120523582697615926276683088910375524563225657663644596592216948974056331399590460267403223032587644165524444425820025328591360851973651333314015380853968023632372287350054207185599371069878908668849043723938217393218749026137508121697823922573029674248393275179922555863853082171000692921875494766992093057203484510278165328340192460964396895589377301082266621542097676974077616873128400267882521248810555224844925459156239671725294657022129911051697181823809807228700964467590836700654852334498610034031401231488158553123767644737259941517947087785101465826866359735042387848014989852599568750748869928849235262872434098103652425750975704592582899579447794113208368377654003816485721230449311530271585346790530790428425713522163601027306457750920785462406436356452477565333325504326467125792987644672393798828125e-410", "0.0000087069115374365", 81); + pow_test ("-6.1929235359377507312281131012038351587368950153152975357535571845644005480462974619161439022738726479946690750026534164068777632032187658972625047122850721897565751294389171057608669479324287486532007867156146673581246410700360784140288599508760017944860321480468003345825664794759524541276131175689087951776415011273003161501760326678723814154494949608727351108658698662447773169903947201447280945550901147241628131791799019695838180988668491614860985218842845383323542953554350520436926580209264504224289641207101059908641550039414260263864284289634535580271422536744706681662746231304579346896472244224610217365387765143127793708245503177386221263366770715991973516535247445600197317181214103464901242633208165352628228359009946968657720259318250928483525927379586656228952459195584561227411138226350339186199256456210254130733123824550545306156294840068619857494045273956142065000283386051662650884544228310001e+238", "-1527.186030801", 75); + pow_test ("-9.18448171920669942200338050009727274073573579465100492416464784644248864677562331387086995022599687737054074140424187879986024804042070022603490146718362719056788563440317890910682257768632925460866552260450415793672740716743856864948011399578402033107962721324762764871499139470157293091799845778141752390211181570286270362089589942764421437922022663206638528993662330911966459538905107421403529415706249287725923857606476849002798755812680628308770502507877888997449832630062999974358780733e+247", "-11613.6333", 61); + pow_test ("9.00534500151871393968393182204789895254808009774083925739583913139744428258820018895294210766290738563245192706173741434367174311803991979819858136383571385689405915210566734194237574513700408103748220971184119700751936043969773600887138954770719916145764591788895536769504424586656704372424183902701252759414411596149470601541857251360631738659563583649636774213282738217476649973300597538010960389409378261220341346226990122343134167832094311982679300076141215464857703660864924210486350832131660412093540844768322422730252869897097733912901747800467318861862225211148617574307735346975751376032341961536913141883210606579274491424216450106329517468829186737530608281956211322014174714075245950188408511119277135829814966934159576369452442208992213257734675865633857771370587246881314008195421762766997418140893877428847481759362859431583598206066370359444199841730507231732351726597037154719568424203772133372253713759753114003013627088700294122141177777020252868547836359305587452020511868681628046227604546542259628717458912576794483424426690392370814102629028715884512020934842234539838799872e+1097", "181614013181552", 77); + pow_test ("-1.23528311430017745980681640966956076652030679452919906158752021718722301574640224534929754544956717572460637538159556600593377996815523698860198279346656557673391582603822239136397525796715515594924893485174002763423256737401358209070784994372919823627795438659925045145838110381445677693346919667629645750108678235386703421232818567784359923933722891257791623191263321196551881442530246560410717585179292007822202786185443194364605326148507122824090647294413224330381273679824886549106621139051707355050164555704989028861454165044951508278420052199256381844433504794321028008032654947772671808005663922922038567755972745149376920700771177235017180770498424038993156220009935199044697962770631826942473822311984815669248e+475", "-61431287.1198", 61); + pow_test ("2.648409294963988844015616e-24", "0.0000000138355056", 3); + pow_test ("2.40863472207038829716951461596425356200891165327233287498341065017430044564718221477455813374032856667895504085743031089347856425830213625711815509685491800628989456526993157007511653813393067316060298253585492583958097263354394562221211900373157618798878275619835293896301261289133749847496154802330721946407650402052956106639135229248180394944200385403412146150497882700273381421471626181859523581299015700836664867216504968658889499860010034200157321932124862289179191239642591047175122517733014555125735104472403712501002006088016431555682009e+357", "6337.73", 94); + pow_test ("-3502571449.82200575261531309080576", "-2.6", 23); + pow_test ("3.476476818948845998001030650476295453181247545559522084788918535203260597551626095245998397584095580303926090518042805770647508288690085639158825885044253780231438163844934309393e-520", "0.00000000000021393", 41); + pow_test ("3.01264602077503396553028159046697775952364093583950024836015253833440897836386470207048971682950128610418919156549188373312577357571717925360563881487841993249907698003381917913550805575200795765716052288892628051588664016510473689746879884622780863018244491731859793637242017876542348273336934204544690232710638389609197987886252503990407378825398639153993405459244929392649916196490420428591295051414371300821828051366484998485944752317128395695896528773542603956895037622256170062938519314235861903738115128360302046928256980541146446559607826088951046677218861706599854555915276720853351646088067836131525708447208119772629571725216339427934609234459201358526789418029470210806603721281e+161", "2312.83553970261", 48); + pow_test ("9.005184717176930478102791782076862228006327352615805784783146333035706197635879005693552412099811970184378799956879273e-246", "0.00000003753", 33); + pow_test ("1", "1", 25); + pow_test ("4.05129929545010159177895753388178150581456809338867612606558959308891452424132880822384248894555509941430703770187352267719278049966852159867408411313868048284652990968283076525530668485093689102888375971926511478236021580486207199815304541755517361681744424769768925178687424398875682126555432767026580854082660116786254097997542073404521882149466694962687119267533030305371904385001716197248516783116746628128159682519599799144439980293050507629744383718958560423968444215424641122740550965524020102239043491734038919336670135222799567722578231175799352527458223575143415900224592903685252952681818992387167675100469288777308071037639375810753979067339068471e+77", "6.310711", 97); + pow_test ("-1.1809125003067061836785344667120764389443931749265317457525459548456128442105786285468877390219672806038351135283671645849621670658638427296075188535296e+27", "-7.46960", 31); + pow_test ("-7804725.584345565904628551916716032", "-1.8", 27); + pow_test ("652.68343537143736977925527144667849979675453569710942641839519790994481", "-1.1", 68); + pow_test ("6.347632690470980780771578675552276637061059382774318001265539984506213934765263884921639481863522855446850248190640384975242547827559674641143687363586046653926918728263293566118669512822042487976415052111413256676605941161792519436820477099825895274456934341461395679285131684015935258759683653353217057215413375333241770058757608263160466756836580028579606957497117342564425931824695481220509415164212500845154298184282125397297745919183962458931412844756465334244299196320609660981439919849161615207060803762786556888490763055537968954854206553722868857068202003810763342647095974540704073677096870053573460935331503249667563019861185471271460943390068145540005687872827e-1245", "0.000000000000000002992906323", 71); + pow_test ("2.15563894172196024093920977150538929699155317817435721941139671042584098028409386483275286853014376052273085179955316467499415655783131107622838141170698636978879185262823690153018555305556315588279210146398953033272874508316308577279223442110325742384869562140427172170238905749958161250632960545305389673718773669576798283170556914818983685326769736551061354350641792755121899728402406494468077316475802887495468901294965903992610334661015465862948472103491723924769010992037621122249854108885083324606934823928420467636542974980236452139793226916820487035909041906512281298939379459990899889643386394707926539730879629157307711871371840222169925653434081781148892704580585587764074713326028394355564539751395890997165055128928791058726295150819453922316393488593599284988720811174363504621711710563117496721630026298161236567852610043373993852510501083512789025524730162959143248393084069076712374797747281972636928788000180283289392557e+413", "324425.0251253", 75); + pow_test ("1", "-3", 0); + pow_test ("4.26825223812027400796974891518773732342988745354489429495479078935112929549619739019072139340757097296812815466676129830954465240517595242384015591919845376e+55", "3.6", 100); + pow_test ("1.143346541001259437465016483752642875340200408207372315398374410086504054045958634479945641547514904516533919702060746490155830653988883705469429546657675670673347514271976875109918113055399954802405065425692486675365016543448426931378922954782957026636988416e+190", "-388997.14", 34); + pow_test ("1.391479860226959780852496779461260634580951060711489905798047445581119629509685004732118558920853318033429289719854192097911392274604744812177542476869031306237630906988638098552100901480110526866015997536096860367785128698535455722265589251495705036009334110148089566472594008624482378925581538366245059147829461639938451131334656e+162", "785.994", 56); + pow_test ("-2.039429275458086101347617297850948854294429450037773018607110681185721614063201210356599410953e+93", "-27753", 21); + pow_test ("1.8072708076715752612606017458825273480777271963492548142293548724970849500539908571180569517655791008990836891664536992680448e+43", "64022.984420938", 9); + pow_test ("-155568095557812224", "-14", 15); + pow_test ("2.18753957001465798602093911444285519704647324430365134831536108015616e+44", "4954.46", 12); + + pow_test ("506006218906684823229.56892808849303", "907.27", 7); + pow_test ("-7", "-7", 1); + pow_test ("-901", "-901", 1); + pow_test ("1.016984074247269470395836690098169093010136836967e+39", "21584.7", 9); + pow_test ("-2.137188356786572105085597593380951428481871335229083554584070474976079844687257680784073933135806738155" ^ + "846154867946651092729083821725815874768375163982851482102962410568100645181922392637169148087702583906275806" ^ + "254987676848814681203987550808366160736707783273633323341494160195050788402536450819951456112231044987896082" ^ + "054284953492245429169226582932327802987445013148530522433068163661483119195972210188504560615278918448219025" ^ + "00302159789434488225792e+125", "-43837.525307806238", 27); + pow_test ("6.6067183217034216835242910438119195789788339709493349261334009277024675568767116522521737472677079426635" ^ + "748603259327817717050761351617610783486587612028204471198915744801916514515768618923473461233676712402753179" ^ + "616115705829361991013069927369820940249862144e+28", "-63581.52864975395137421365938883267810362492", 6); + pow_test ("3.4979655423042386318207008930737637967359866053138998526505479068249644854876701482811561341347105355107" ^ + "695596776164641704434681969517211923069874207364828070027467521475982678466251216378786468053405366050900916" ^ + "905682920934733855175647035328921497719019616796867272653837232009633511918699584196136643032274244642212313" ^ + "884180837128156688381283842300678798685499010807063746785776492193558002382725297304258913361e+62", "8606583" ^ + "55.93419774133511168973596889241553275604551215135281", 7); + pow_test ("243", "3", 5); + pow_test ("1.1341259418236998571758990926811782086077524757263871423863079766086030645673726799115988350322336274469" ^ + "528121736526520039192242333771040454545272536238688950013853620343757910936524944674880346697808001951639020" ^ + "756685105416346426508389541123017097529060283829118103883424462596062875341251599735321937114348037712815556" ^ + "934333412355272212045907182873831909566029976608100685207198148793211027456e+142", "-77969657.57799062937836", 18); + pow_test ("-3.002868635110885376257819498476291928435426781135644398581841720946695913529443732738563280115637723690" ^ + "527669601811845008088443533185638348230873897655818695558823986816170233733475974743919539739293881958257711" ^ + "082964428156108562084141530748801048154746755861630902751665438161045606541506565311391326592002987029794247" ^ + "9155862011879884534002975129045737955826661617772520189976935251896803639204375428428030749e+58", "-3144155." ^ + "647351179442684823966727126493552586749", 9); + pow_test ("1.2017535763663944855319855165568672417473424918240625939835372525654871294098024731568097136162414533196" ^ + "302209237255696285222881479316995572849461193750229851490507274307754777241507309897136938873682646559601827" ^ + "818522406048398360528045183412226195227922260847969487653141933223147699460606337223535312433317282585307625" ^ + "14582945950418550784e+31", "27540.61485935537676544614263765574563131573245204", 7); + pow_test ("33715.504067877824494301254520391898692874566929517185069539454439093971130103103995461456226946881594407" ^ + "231961561136789085959653748072704542114811853522742743643494246976010868257225332083632035616264964911458078" ^ + "6938367825230347818905248996593031355662611333376", "-3.68110925219710489918033269313682", 8); + pow_test ("-1.157385562678413511184308898769846329872668259271078544423253372613586833033423503791374542602879075132" ^ + "311305638124240471079826030985837104460703581522437292662638238646090030670166015625e+186", "-7784665", 27); + pow_test ("5.7216584769709576633639728428105243709762039786762015993329350164736e+39", "-8697220540.1137988", 4); + pow_test ("3605.080945893673836738483946060969335788919921875", "2.48435", 9); + pow_test ("-1.362404507662848650537496030549874060243136512349225493914817345823216048548172723419966950986850374951" ^ + "739062406422122991421171819900345266361503090008226665166641608549693639479556058501083403734722051283642171" ^ + "702315664077013568676066027004539719689871686866966504316666900974963459985167975529154752566435990494883222" ^ + "43247996920458277719083301674288561258518312772229949771006312491204843363917607453589630126953125e+161", "-" ^ + "3009460118.872263767875045", 17); + pow_test ("-3.843371297315665982931203359606126137800390271392237908468836564381335317605019011842110932416054439429" ^ + "378863667709490793077731714107684101027634234502991961374605763957702424230907755584087764579064955483406351" ^ + "493859629284536525094600819056677481423671987511092619602892825089212125285973667322259735000675496129438960" ^ + "5594296221696e+157", "-271616.155606", 29); + pow_test ("8.880125173267286184293229956929e+30", "-143903", 6); + pow_test ("4.4911854404409149925571757890570413318443326899494030577850505583635288027204483770002925339061413234579" ^ + "0751503571600332872e+26", "765808758.66956931514481639498062905791538", 3); + pow_test ("-1.128193052103617375313057818469912250487118062091774976e+29", "-646363.29196", 5); + pow_test ("-38528.42458277771128223673975490918109", "-38528.42458277771128223673975490918109", 1); + pow_test ("4.4731752932054401250767895500165212172045977003048118078740540509372027814009045673824755086223811265665" ^ + "9162732461713512251836889602737214995151906586537236627456e+105", "5932.48", 28); + pow_test ("1", "-13.97065588562499", 0); + pow_test ("2.5693800113130673596912052579425172401156285606894961933662611589081996263592777487294665112945054695374" ^ + "79575614097255886064905027804073982599354300474897943e+129", "62080.7", 27); + pow_test ("5.8184614940398660397269861002282485754727820202610984176867121393228080929668759435750127783038726637982" ^ + "733623328431481036051105505754347945097758662358771120575735317995690686375214099713422708363500801239117100" ^ + "825191190580442024497060759059174441880072773407853158923191005671440255110099432788599963091463491081295880" ^ + "09524947393206783018441414022970002633906397294399684375635228021017590940658971148436650082905540838555648e" ^ + "+102", "6398.880593717242", 27); + pow_test ("134971356455.75897529253431118705664765245378061900400303221733155570426158512526184604071289685694603714" ^ + "4900053640398406244356726653396169868958721875222540716653887768486266703330919098362921", "4.1528548909", + 18); + pow_test ("-1.77396388128500114222945974047586725531284545911409446577e+56", "-913", 19); + pow_test ("-1.234934401068907372254145669800965657224014404194120877473524432765749324191815980973795365542372548417" ^ + "270938366077639126652036699333110108213095940749940674117006576189505444008333197068723155539463584326235225" ^ + "64358319794505880365894233180227408889879677018966524371664896e+230", "-90520083747.46", 21); + pow_test ("1", "-562610.16179592649796590823394093366548", 0); + pow_test ("553995165458.66639955830015026176", "14.94", 10); + pow_test ("1.4941893958492691882112550397099333090864242597784459064194649425760971480442163767897353189803927503362" ^ + "856448046387436008075500742061282723456500292550169543216112640021419198404623695509050987637232549016751357" ^ + "87504979910497931539962354019230845564318816091666473025536e+126", "-32698949771.110178432792", 12); + pow_test ("1150494087127674.2926708823617505372960241390892442547940194260102743306128298973371802547471453755938653" ^ + "944600792141533514422490556963535378521856840746722206160260148176604222079226186281680715577736316488196108" ^ + "040509176925372372483300649927835887344415603493563915019264675154039059770309142781930141352329958156926976", + "-8.7358521345995835476", 16); + +) diff --git a/drafts/bs-big/__tests__/round_test.ml b/drafts/bs-big/__tests__/round_test.ml new file mode 100644 index 0000000..285d22f --- /dev/null +++ b/drafts/bs-big/__tests__/round_test.ml @@ -0,0 +1,4990 @@ +open Jest + +let () = + describe "round_tests" (fun () -> + let open Expect in + let round_test_no_opt = + let count = ref 0 in + fun (exp, v) -> + let r = Big.fromString v |. Big.round () |. Big.toString in + test ("round_test_no_opt" ^ string_of_int !count) (fun () -> expect r |> toBe exp) + in + Big.setDP 20; + Big.setRM 1; + + round_test_no_opt ("0", "0.000084888060736883027314038572334303632"); + round_test_no_opt ("30845717889906383053", "30845717889906383052.56472015469740823"); + round_test_no_opt ("76", "76.0719"); + round_test_no_opt ("0", "-0.00686876124450101884528"); + round_test_no_opt ("71710176", "71710176"); + round_test_no_opt ("79", "79"); + round_test_no_opt ("6309793381", "6309793381"); + round_test_no_opt ("76162410487880977", "76162410487880976.81307140573688335764284"); + round_test_no_opt ("7491318926", "7491318926.312122759153805942088431"); + round_test_no_opt ("74909422733607112719", "74909422733607112719.13179009875"); + round_test_no_opt ("559", "559.2110851431205"); + round_test_no_opt ("8", "8.0606265529"); + round_test_no_opt ("24701408591129838", "24701408591129838.22163"); + round_test_no_opt ("826068555927524695", "826068555927524695"); + round_test_no_opt ("0", "0.000058441452091833136219167587256"); + round_test_no_opt ("47353089", "47353089.2019161006899898"); + round_test_no_opt ("3103", "3103"); + round_test_no_opt ("5620", "5620.48101861977"); + round_test_no_opt ("9105547112", "9105547112.1319443692"); + round_test_no_opt ("335816732795", "335816732794.51601276961965281205689254"); + round_test_no_opt ("439059239410", "439059239409.55703238112278"); + round_test_no_opt ("43465109466157505", "43465109466157505"); + round_test_no_opt ("5390894521", "5390894520.8738091063016"); + round_test_no_opt ("485669", "485669"); + round_test_no_opt ("3", "3.284095344472285718254591781467536534546"); + round_test_no_opt ("0", "-0.4210910538061556801483189"); + round_test_no_opt ("3134", "3133.654494231705614"); + round_test_no_opt ("27796900", "27796900.0685101"); + round_test_no_opt ("736988809325", "736988809325"); + round_test_no_opt ("577064478018279", "577064478018279"); + round_test_no_opt ("3269018763090", "3269018763089.5711045989917554"); + + round_test_no_opt ("0", "0"); + round_test_no_opt ("0", "-0"); + round_test_no_opt ("1", "0.5"); + round_test_no_opt ("1", "0.7"); + round_test_no_opt ("1", "1"); + round_test_no_opt ("1", "1.1"); + round_test_no_opt ("1", "1.49999"); + round_test_no_opt ("-1", "-0.5"); + round_test_no_opt ("-1", "-0.5000000000000001"); + round_test_no_opt ("-1", "-0.7"); + round_test_no_opt ("-1", "-1"); + round_test_no_opt ("-1", "-1.1"); + round_test_no_opt ("-1", "-1.49999"); + round_test_no_opt ("-2", "-1.5"); + round_test_no_opt ("-10", "-10"); + + round_test_no_opt ("9007199254740990", "9007199254740990"); + round_test_no_opt ("9007199254740991", "9007199254740991"); + round_test_no_opt ("-9007199254740990", "-9007199254740990"); + round_test_no_opt ("-9007199254740991", "-9007199254740991"); + + round_test_no_opt ("536870911", "536870910.5"); + round_test_no_opt ("536870911", "536870911"); + round_test_no_opt ("536870911", "536870911.4"); + round_test_no_opt ("536870912", "536870911.5"); + round_test_no_opt ("536870912", "536870912"); + round_test_no_opt ("536870912", "536870912.4"); + round_test_no_opt ("536870913", "536870912.5"); + round_test_no_opt ("536870913", "536870913"); + round_test_no_opt ("536870913", "536870913.4"); + round_test_no_opt ("1073741823", "1073741822.5"); + round_test_no_opt ("1073741823", "1073741823"); + round_test_no_opt ("1073741823", "1073741823.4"); + round_test_no_opt ("1073741824", "1073741823.5"); + round_test_no_opt ("1073741824", "1073741824"); + round_test_no_opt ("1073741824", "1073741824.4"); + round_test_no_opt ("1073741825", "1073741824.5"); + round_test_no_opt ("2147483647", "2147483646.5"); + round_test_no_opt ("2147483647", "2147483647"); + round_test_no_opt ("2147483647", "2147483647.4"); + round_test_no_opt ("2147483648", "2147483647.5"); + round_test_no_opt ("2147483648", "2147483648"); + round_test_no_opt ("2147483648", "2147483648.4"); + round_test_no_opt ("2147483649", "2147483648.5"); + + round_test_no_opt ("0", "0.4"); + round_test_no_opt ("0", "-0.4"); + round_test_no_opt ("-1", "-0.5"); + round_test_no_opt ("1", "0.6"); + round_test_no_opt ("-1", "-0.6"); + round_test_no_opt ("2", "1.5"); + round_test_no_opt ("2", "1.6"); + round_test_no_opt ("-2", "-1.6"); + + round_test_no_opt ("8640000000000000", "8640000000000000"); + round_test_no_opt ("8640000000000001", "8640000000000001"); + round_test_no_opt ("8640000000000002", "8640000000000002"); + round_test_no_opt ("9007199254740990", "9007199254740990"); + round_test_no_opt ("9007199254740991", "9007199254740991"); + round_test_no_opt ("-8640000000000000", "-8640000000000000"); + round_test_no_opt ("-8640000000000001", "-8640000000000001"); + round_test_no_opt ("-8640000000000002", "-8640000000000002"); + round_test_no_opt ("-9007199254740990", "-9007199254740990"); + round_test_no_opt ("-9007199254740991", "-9007199254740991"); + + round_test_no_opt ("0", "0.49999999999999994"); + round_test_no_opt ("1", "0.5"); + round_test_no_opt ("0", "-0.49999999999999994"); + + let round_test_opt = + let count = ref 0 in + fun (exp, v, dp, rm) -> + let r = Big.fromString v |. Big.round ~dp:dp ~rm:rm () |. Big.toString in + test ("round_test_no_opt" ^ string_of_int !count) (fun () -> expect r |> toBe exp) + in + + round_test_opt ("-7187", "-7187", 4, 1); + round_test_opt ("-2.4263", "-2.426346", 4, 2); + round_test_opt ("652506", "652506", 3, 2); + round_test_opt ("-0.0496", "-0.049635", 4, 1); + round_test_opt ("520216039", "520216039", 7, 0); + round_test_opt ("53937.3", "53937.399", 1, 0); + round_test_opt ("-3583", "-3583", 5, 0); + round_test_opt ("-888980.3", "-888980.3", 1, 2); + round_test_opt ("-0.336889", "-0.336888682", 6, 2); + round_test_opt ("43759", "43759", 6, 1); + round_test_opt ("0.0000804", "0.0000804", 8, 2); + round_test_opt ("336379823", "336379823", 4, 0); + round_test_opt ("-5446775", "-5446775", 7, 1); + round_test_opt ("47086", "47085.84", 0, 1); + round_test_opt ("-2564", "-2564", 3, 1); + round_test_opt ("-0.4", "-0.42528874", 1, 2); + round_test_opt ("-0.00005573", "-0.000055732", 8, 0); + round_test_opt ("-0.00003014", "-0.000030137", 8, 2); + round_test_opt ("57", "57", 3, 2); + round_test_opt ("-7", "-7", 0, 1); + round_test_opt ("-0.00004595", "-0.00004595", 8, 0); + round_test_opt ("-22243", "-22243", 0, 0); + round_test_opt ("5", "5", 1, 2); + round_test_opt ("2", "2", 2, 2); + round_test_opt ("3808", "3808", 0, 1); + round_test_opt ("0.00009", "0.00008892", 5, 1); + round_test_opt ("0.07", "0.06922", 2, 1); + round_test_opt ("-326", "-326", 2, 0); + round_test_opt ("-0.356", "-0.3564473", 3, 2); + round_test_opt ("0", "-0.003", 0, 1); + round_test_opt ("-572936", "-572936", 3, 2); + round_test_opt ("684.2426407", "684.2426407", 8, 2); + round_test_opt ("0", "-0.0007851", 1, 2); + round_test_opt ("-0.00064", "-0.00063953", 6, 2); + round_test_opt ("-3.76703298", "-3.767032983", 8, 1); + round_test_opt ("-645406477.5", "-645406477.5", 2, 0); + round_test_opt ("-0.89603", "-0.8960278", 5, 2); + round_test_opt ("484.002", "484.002", 4, 2); + round_test_opt ("420", "419.83", 0, 2); + round_test_opt ("4611867124", "4611867124", 4, 1); + round_test_opt ("0", "-0.02829833", 1, 1); + round_test_opt ("-8", "-8", 0, 1); + round_test_opt ("-0.0073554", "-0.00735541", 7, 1); + round_test_opt ("228", "228", 3, 1); + round_test_opt ("0", "0.005", 0, 2); + round_test_opt ("-0.026", "-0.0259", 3, 1); + round_test_opt ("-0.00801", "-0.008007359", 5, 1); + round_test_opt ("-81", "-81", 4, 2); + round_test_opt ("-2876", "-2876", 5, 2); + round_test_opt ("-62453828", "-62453828", 7, 2); + round_test_opt ("-706", "-706", 0, 0); + round_test_opt ("36.911", "36.9109527", 4, 1); + round_test_opt ("-0.08", "-0.08", 2, 1); + round_test_opt ("-0.352847", "-0.352847085", 6, 2); + round_test_opt ("-0.4389", "-0.438905", 4, 0); + round_test_opt ("-8858843.829", "-8858843.829", 3, 0); + round_test_opt ("608475", "608475", 6, 2); + round_test_opt ("-1.6", "-1.5678", 1, 2); + round_test_opt ("-7.173", "-7.173", 4, 2); + round_test_opt ("-54.37621076", "-54.37621076", 8, 1); + round_test_opt ("4823.725785", "4823.725785", 7, 1); + round_test_opt ("0", "-0.000084", 1, 1); + round_test_opt ("-7491", "-7491", 4, 2); + round_test_opt ("-0.8", "-0.8109", 1, 2); + round_test_opt ("-91.1579356", "-91.15793558", 7, 2); + round_test_opt ("-5376196", "-5376196", 1, 2); + round_test_opt ("-0.6", "-0.6", 1, 2); + round_test_opt ("-39983.5195", "-39983.5195", 5, 2); + round_test_opt ("-0.723", "-0.722771", 3, 1); + round_test_opt ("-8637388", "-8637388", 4, 0); + round_test_opt ("193", "193", 4, 2); + round_test_opt ("0.00052", "0.00051869", 5, 2); + round_test_opt ("-0.248552", "-0.248552", 6, 1); + round_test_opt ("0.8599583", "0.8599583", 7, 2); + round_test_opt ("868619", "868619", 3, 1); + round_test_opt ("-0.0003926", "-0.0003926", 7, 1); + round_test_opt ("4.3567", "4.35670557", 4, 1); + round_test_opt ("-238", "-238", 3, 0); + round_test_opt ("1271.594054", "1271.594054", 7, 1); + round_test_opt ("-4.1787893", "-4.178789328", 7, 0); + round_test_opt ("372", "372", 3, 2); + round_test_opt ("-9.1645", "-9.1645354", 4, 2); + round_test_opt ("83.241462", "83.241462", 6, 2); + round_test_opt ("-0.00001262", "-0.00001262", 8, 2); + round_test_opt ("2138522", "2138522", 6, 0); + round_test_opt ("-1969563", "-1969563", 8, 0); + + round_test_opt ("0.00085774283834918184933525579624189945402764", "0.0008577428383491818493352557962418994540276420616048890965876345513", 44, 1); + round_test_opt ("0", "0.0000083135366316053183734543904737952651532784316140061929170739473518406297062533554026617147464", 0, 0); + round_test_opt ("-22678769.817248435493696742588538", "-22678769.817248435493696742588538331241538369550386799148219117165563326051964281", 24, 1); + round_test_opt ("-35620697798492911.0669248410687861643251268323797667576839159303711022", "-35620697798492911.066924841068786164325126832379766757683915930371102255700535220012496346147093317", 52, 0); + round_test_opt ("-0.8174627036499993060703761337876311", "-0.81746270364999930607037613378763105641195817852303184573911882", 34, 1); + round_test_opt ("-0.0005550919624693963627417354876271038367574907", "-0.000555091962469396362741735487627103836757490736793688", 46, 2); + round_test_opt ("83", "83", 1, 1); + round_test_opt ("-554303811557294466.269761483473739646624314242607077", "-554303811557294466.269761483473739646624314242607077815435340758612837177421989342652", 33, 0); + round_test_opt ("-0.19004485", "-0.19004485473016995992614957080209680408919713640428488619", 8, 0); + round_test_opt ("0.000252525605711892", "0.000252525605711891731866212005527221984514215823140269482997380211714402276122070798053", 18, 2); + round_test_opt ("-20967.65067808575", "-20967.6506780857520813447701235001803657407937", 11, 2); + round_test_opt ("-274912.8896024699", "-274912.8896024699118787839924993246206752520896053416203239133353705", 10, 0); + round_test_opt ("-2651358523359639", "-2651358523359639", 16, 1); + round_test_opt ("-699708233495.712278374225898965891885496", "-699708233495.71227837422589896589188549642075052667001859282382939797996992686357419809583", 27, 1); + round_test_opt ("6744808.28630410992583043657159413157574982400492", "6744808.28630410992583043657159413157574982400491999838773235902794700459508120619939892", 42, 2); + round_test_opt ("0.07662404229928167815820747802086592943344134084819", "0.0766240422992816781582074780208659294334413408481864862625859275536716954542357278357044523255", 50, 1); + round_test_opt ("663336.45734367931832199866", "663336.4573436793183219986595282312647796998714487327022132545955984591825466144183", 20, 1); + round_test_opt ("-461221276.52047063868261544207237644195170184", "-461221276.5204706386826154420723764419517018397461911607", 36, 1); + round_test_opt ("19446.966116400627008657626752077217581388920002", "19446.966116400627008657626752077217581388920001650492489914443643730475", 42, 2); + round_test_opt ("0.42425", "0.4242532985015934975349331325449597502579863812797694513697436078382", 5, 2); + round_test_opt ("-0.0000762276772207934863238537452", "-0.000076227677220793486323853745211809223538788353453336644181293192727858100277468114", 31, 0); + round_test_opt ("2545.02415115677316212239", "2545.0241511567731621223858827267448711169160082660710108790421759089", 20, 1); + round_test_opt ("182677642047881.78165441673019155464219406264001214565556885348479", "182677642047881.78165441673019155464219406264001214565556885348478627713505384459736760885446", 50, 1); + round_test_opt ("11036262983412.43034", "11036262983412.43033528368482450310801430632754197929230502318864896161821328429506937237954870210095", 5, 2); + round_test_opt ("114826904256612733.386864222161825009298982005624415354243438170865464426025", "114826904256612733.3868642221618250092989820056244153542434381708654644260250420408639727676555", 58, 2); + round_test_opt ("-0.012993495776054845588950537203826106468", "-0.01299349577605484558895053720382610646775576321", 39, 1); + round_test_opt ("33939997624.0197921818931949496918774963224187187", "33939997624.01979218189319494969187749632241871866115828172706446", 37, 1); + round_test_opt ("0.00013443010000122739", "0.000134430100001227389387332790313969924187247172103522415803", 20, 1); + round_test_opt ("-209.9943998837517521171865", "-209.9943998837517521171865", 22, 0); + round_test_opt ("-5091778328", "-5091778328", 3, 1); + round_test_opt ("0.12237956363887424653903641168389546218306318289244", "0.122379563638874246539036411683895462183063182892438860817851", 50, 2); + round_test_opt ("-21623630838130.41753786411051466836143", "-21623630838130.41753786411051466836142541353", 23, 1); + round_test_opt ("0.01670470626375882709919052077738319859836353121358428", "0.01670470626375882709919052077738319859836353121358428381884805750145", 53, 2); + round_test_opt ("-0.00007215749036271791941521566318078882873853148647784214", "-0.0000721574903627179194152156631807888287385314864778421351738105827688353", 56, 1); + round_test_opt ("366211876730525184.2112925847409", "366211876730525184.2112925847408882079013862619705659971494103242295", 13, 2); + round_test_opt ("614620959.71471965275572405064779427741657286", "614620959.71471965275572405064779427741657286365469689495728000154430488188257888436646377190255908", 35, 1); + round_test_opt ("0.00081378123325625046095444674524950183268906906", "0.0008137812332562504609544467452495018326890690605771240762295999653129452516984857208", 48, 0); + round_test_opt ("22790948246303245", "22790948246303245", 2, 0); + round_test_opt ("26063.51488387693273367995592341542227268081315828530152", "26063.51488387693273367995592341542227268081315828530152248204562165099342", 50, 0); + round_test_opt ("82575172816978114.87683857936991415384457", "82575172816978114.876838579369914153844570011199517178441757629522946782860018297776571802906754196", 24, 1); + round_test_opt ("-2437094615.41350858123042926442269584680387347048427179419", "-2437094615.4135085812304292644226958468038734704842717941889573519082323297558840308", 47, 2); + round_test_opt ("332180937526303", "332180937526303", 11, 2); + round_test_opt ("-309838422086.048", "-309838422086.04808185", 3, 0); + round_test_opt ("3747046262", "3747046262", 5, 0); + round_test_opt ("169029712348.55170414716062751882592912346872779338106493155966548277055", "169029712348.551704147160627518825929123468727793381064931559665482770557368651", 59, 0); + round_test_opt ("31.0602835210115", "31.06028352101159116694707249229172391419071049341139", 13, 0); + round_test_opt ("-290563347.4018618590644496547932201955716045339506671235383081837373", "-290563347.40186185906444965479322019557160453395066712353830818373739840892194032111993775", 58, 0); + round_test_opt ("36646445.4", "36646445.42824516523285194093354092096642673855547686910006", 1, 1); + round_test_opt ("0.43424917263886958982405140577413037118", "0.43424917263886958982405140577413037118797467795184", 38, 0); + round_test_opt ("-35159732781823.97716511119720206064558667", "-35159732781823.977165111197202060645586672946470926242812549089110584121041", 26, 1); + round_test_opt ("4478793059557.919366066899688681937166624937", "4478793059557.919366066899688681937166624937037651207942775207986303596524642642692579", 31, 0); + round_test_opt ("-0.00000336921984240686812663817912975898", "-0.00000336921984240686812663817912975898003855606655763928424753588827973199516045", 38, 0); + round_test_opt ("-7094775936348915.769263075129454561542743852557970402", "-7094775936348915.7692630751294545615427438525579704015758356635999962", 36, 1); + round_test_opt ("-0.0004618114320999748548", "-0.0004618114320999748548227742586597847789768814695996979397676648662277615278571112727802", 22, 0); + round_test_opt ("4397525934482", "4397525934482", 10, 0); + round_test_opt ("-0.00080510769276", "-0.0008051076927558161863905844170590891349375387966097254255501665792278513428990177180729", 14, 1); + round_test_opt ("-85.754361554275952592904696122168206579", "-85.754361554275952592904696122168206579375505261", 36, 2); + round_test_opt ("-8969924824887750.078167576440491913960555993", "-8969924824887750.0781675764404919139605559934327012046423719029", 27, 2); + round_test_opt ("83664.29974759139108443286033487", "83664.2997475913910844328603348762233403", 26, 0); + round_test_opt ("4783482240722.889565506051950025731026748125580032", "4783482240722.88956550605195002573102674812558003270323257226548107196735812", 36, 0); + round_test_opt ("0.08328506397736199", "0.08328506397736199281189505020297381756462266529288847578", 17, 2); + round_test_opt ("6138685955473706895.27191846437634217823067", "6138685955473706895.271918464376342178230674192673963926883446477458738606505318684196487099828273", 23, 0); + round_test_opt ("8676085578448129636.46125142815995954615633699159686307427564866280997975", "8676085578448129636.461251428159959546156336991596863074275648662809979754896", 53, 2); + round_test_opt ("-5656502680950453.307129232", "-5656502680950453.3071292317099969560559506107", 9, 2); + round_test_opt ("707.380045900803464776244462046183", "707.380045900803464776244462046182987", 31, 2); + round_test_opt ("86863819.0795207560566246205038942404911", "86863819.07952075605662462050389424049106413333666160054769765", 31, 1); + round_test_opt ("-0.00000690323521226292545282", "-0.0000069032352122629254528255683555238", 26, 0); + round_test_opt ("-0.00864924723907831760464760343418947", "-0.00864924723907831760464760343418946520325901534", 35, 2); + round_test_opt ("11960649002", "11960649002", 11, 0); + round_test_opt ("-6502553383150595", "-6502553383150595", 18, 2); + round_test_opt ("-679.96730494488662265292122816939430658266", "-679.96730494488662265292122816939430658266", 38, 2); + round_test_opt ("-77589.796358", "-77589.7963584873098058997214465516938135824363", 6, 0); + round_test_opt ("489167543699462369.29206154", "489167543699462369.2920615397068117518054274410906616895686747969646065180181122832961", 8, 1); + round_test_opt ("1736062301921704.3544399700210783", "1736062301921704.354439970021078301187861306249924535576", 17, 1); + round_test_opt ("2", "2", 2, 2); + round_test_opt ("-346930759824.8932559917769593999", "-346930759824.893255991776959399952245588688", 19, 0); + round_test_opt ("-7953667604", "-7953667604", 5, 0); + round_test_opt ("-0.00068344382770949159674695980739380635445", "-0.0006834438277094915967469598073938063544463198925827927897963802449983538", 41, 1); + round_test_opt ("-2372.6417339151826508053284670230939641484", "-2372.6417339151826508053284670230939641484398", 37, 0); + round_test_opt ("-296495898199.58115237407948666112", "-296495898199.5811523740794866611232178652873298488744263", 20, 2); + round_test_opt ("0", "0.0002", 0, 0); + round_test_opt ("-4470337.856339789341346743328195402056", "-4470337.8563397893413467433281954020555766465023528610798962516623771308", 30, 1); + round_test_opt ("-869559474794910580.4702422545", "-869559474794910580.470242254580425701508344203389450340088616045503344062196", 10, 0); + round_test_opt ("-269860226.555168110686802", "-269860226.555168110686802406496811651255242690733933523277397815449890266344932488292555", 15, 2); + round_test_opt ("-498.288", "-498.2877551595647284860735236925190739383420573843285964682707105606057458671350918750993", 3, 2); + round_test_opt ("-58249061380532235.683643040770210682572744295", "-58249061380532235.68364304077021068257274429468", 27, 1); + round_test_opt ("17790773861566.9127491793774523928", "17790773861566.9127491793774523927742086885", 19, 2); + round_test_opt ("-0.000052578846594552360365003261412", "-0.00005257884659455236036500326141292751072228323274374276273184032573733734930586182920538869496014", 33, 0); + round_test_opt ("-1848824671208162.036118636322531620559621761039257152", "-1848824671208162.0361186363225316205596217610392571519859349877420578173659325511361795", 36, 2); + round_test_opt ("-8815.8895192223252405825465547234263054813143616472980391", "-8815.889519222325240582546554723426305481314361647298039143773292329917612441361288012832403085661674", 52, 1); + round_test_opt ("-1.337926538823846889672640236908474426590700086", "-1.3379265388238468896726402369084744265907000856185156132950540139555844532982184035787153238", 45, 1); + round_test_opt ("22265", "22265", 3, 1); + round_test_opt ("44550253.862798116411937890173846464380254722540077", "44550253.862798116411937890173846464380254722540076612180961686217459396341111804577388882586249791", 42, 2); + round_test_opt ("89983719097904808464", "89983719097904808464", 1, 1); + round_test_opt ("-229500965923850.70051429223116003250968598721393599828363661825696333", "-229500965923850.700514292231160032509685987213935998283636618256963339786490679495749782904303115", 53, 0); + round_test_opt ("0.00017652709951498133638383919005461463529305123", "0.000176527099514981336383839190054614635293051230467643495742837724131", 47, 0); + round_test_opt ("-2410200702497", "-2410200702497", 11, 0); + round_test_opt ("-0.00566575519125872879638699056271355696758097", "-0.00566575519125872879638699056271355696758097875409951260368210651006", 44, 0); + round_test_opt ("1706349694.76350749557800040706127419362257045545428491995", "1706349694.763507495578000407061274193622570455454284919951774181697932220714269", 47, 1); + round_test_opt ("5457344694848495013.70758306793373443062303840408774687096091471", "5457344694848495013.70758306793373443062303840408774687096091470997296538132975451", 45, 2); + round_test_opt ("-0.519371276718530514624846800754582116141529266132757", "-0.5193712767185305146248468007545821161415292661327570320784267894852821486214528653", 51, 0); + + Big.setRM 3; + + round_test_no_opt ("0", "0"); + round_test_no_opt ("0", "-0"); + round_test_no_opt ("1", "0.1"); + round_test_no_opt ("-1", "-0.1"); + round_test_no_opt ("1", "0.4"); + round_test_no_opt ("-1", "-0.4"); + round_test_no_opt ("1", "0.5"); + round_test_no_opt ("-1", "-0.5"); + round_test_no_opt ("1", "0.6"); + round_test_no_opt ("-1", "-0.6"); + round_test_no_opt ("1", "0.9999999"); + round_test_no_opt ("-1", "-0.9999999"); + round_test_no_opt ("1", "1"); + round_test_no_opt ("2", "1.1"); + round_test_no_opt ("2", "1.49999"); + round_test_no_opt ("-1", "-0.5000000000000001"); + round_test_no_opt ("-1", "-1"); + round_test_no_opt ("-2", "-1.1"); + round_test_no_opt ("-2", "-1.49999"); + round_test_no_opt ("-2", "-1.5"); + round_test_no_opt ("-10", "-10"); + round_test_no_opt ("2", "1.5"); + round_test_no_opt ("2", "1.6"); + round_test_no_opt ("-2", "-1.6"); + round_test_no_opt ("1", "0.00000000000000001"); + round_test_no_opt ("1", "1e-100"); + round_test_no_opt ("1", "0.49999999999999994"); + round_test_no_opt ("1", "0.5"); + round_test_no_opt ("-1", "-0.00000000000000001"); + round_test_no_opt ("-1", "-1e-100"); + round_test_no_opt ("-1", "-0.49999999999999994"); + round_test_no_opt ("536870911", "536870910.5"); + round_test_no_opt ("536870911", "536870911"); + round_test_no_opt ("536870912", "536870911.4"); + round_test_no_opt ("536870912", "536870911.5"); + round_test_no_opt ("536870912", "536870912"); + round_test_no_opt ("536870913", "536870912.4"); + round_test_no_opt ("536870913", "536870912.5"); + round_test_no_opt ("536870913", "536870913"); + round_test_no_opt ("536870914", "536870913.4"); + round_test_no_opt ("1073741823", "1073741822.5"); + round_test_no_opt ("1073741823", "1073741823"); + round_test_no_opt ("1073741824", "1073741823.4"); + round_test_no_opt ("1073741824", "1073741823.5"); + round_test_no_opt ("1073741824", "1073741824"); + round_test_no_opt ("1073741825", "1073741824.4"); + round_test_no_opt ("1073741825", "1073741824.5"); + round_test_no_opt ("2147483647", "2147483646.5"); + round_test_no_opt ("2147483647", "2147483647"); + round_test_no_opt ("2147483648", "2147483647.4"); + round_test_no_opt ("2147483648", "2147483647.5"); + round_test_no_opt ("2147483648", "2147483648"); + round_test_no_opt ("2147483649", "2147483648.4"); + round_test_no_opt ("2147483649", "2147483648.5"); + + Big.setDP 20; + Big.setRM 2; + + round_test_opt ("3", "3", 0, 0); + round_test_opt ("3.4157", "3.41571", 4, 0); + round_test_opt ("77", "77.47", 0, 0); + round_test_opt ("9424.512995", "9424.51299501636", 6, 0); + round_test_opt ("-9.804e-7", "-0.000000980422875677", 10, 0); + round_test_opt ("-2.3e-8", "-0.00000002396558486342", 9, 0); + round_test_opt ("-147.5", "-147.548160", 1, 0); + round_test_opt ("0", "-0.000000014550487", 3, 0); + round_test_opt ("-12.9", "-12.9065548981629", 1, 0); + round_test_opt ("2518", "2518.43", 0, 0); + round_test_opt ("-315563065838", "-315563065838.04", 0, 0); + round_test_opt ("-35054647", "-35054647.6002", 0, 0); + round_test_opt ("0", "0", 0, 0); + round_test_opt ("0", "-0.131", 0, 0); + round_test_opt ("-13419", "-13419.8455", 0, 0); + round_test_opt ("12225.2", "12225.2508", 1, 0); + round_test_opt ("0", "0.27", 0, 0); + round_test_opt ("10991.1", "10991.13", 1, 0); + round_test_opt ("-10.699", "-10.69920", 3, 0); + round_test_opt ("-0.00048", "-0.0004822436817", 5, 0); + round_test_opt ("2.311e-7", "0.000000231184325036", 10, 0); + round_test_opt ("7913863527", "7913863527.1310", 0, 0); + round_test_opt ("1318352", "1318352.8", 0, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("9.6", "9.609231", 2, 0); + round_test_opt ("2.9", "2.9928", 1, 0); + round_test_opt ("0", "0.000000441533788150", 6, 0); + round_test_opt ("-10.7", "-10.7716818", 1, 0); + round_test_opt ("7", "7", 0, 0); + round_test_opt ("-45", "-45.4372867804721", 0, 0); + round_test_opt ("-3.6192", "-3.61925479396", 4, 0); + round_test_opt ("-138", "-138.9", 0, 0); + round_test_opt ("0", "0.0100244375", 0, 0); + round_test_opt ("166.604", "166.6041518", 3, 0); + round_test_opt ("-1", "-1.1", 0, 0); + round_test_opt ("-1", "-1.7", 0, 0); + round_test_opt ("13997", "13997.5175", 0, 0); + round_test_opt ("-69", "-69.45", 0, 0); + round_test_opt ("1124033.703", "1124033.703710", 3, 0); + round_test_opt ("217.3", "217.352", 1, 0); + round_test_opt ("483", "483.3", 0, 0); + round_test_opt ("-25.976341", "-25.9763414", 6, 0); + round_test_opt ("43.49", "43.4908", 2, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("46", "46.6", 0, 0); + round_test_opt ("1.541e-7", "0.00000015411430", 10, 0); + round_test_opt ("0", "-0.000000830", 0, 0); + round_test_opt ("7584807.5", "7584807.572", 1, 0); + round_test_opt ("6", "6", 0, 0); + round_test_opt ("0", "0.0000000205720727244", 1, 0); + round_test_opt ("-2.6400375", "-2.64003750311", 8, 0); + round_test_opt ("10.3", "10.3965", 1, 0); + round_test_opt ("0", "-0.000496334", 2, 0); + round_test_opt ("1.1993", "1.19937", 4, 0); + round_test_opt ("-2", "-2", 0, 0); + round_test_opt ("-19", "-19.0046", 0, 0); + round_test_opt ("0", "0.00048", 2, 0); + round_test_opt ("-1264.5", "-1264.513", 1, 0); + round_test_opt ("-0.00798172", "-0.0079817231887464", 8, 0); + round_test_opt ("2145526645", "2145526645.44370", 0, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("1880207.8", "1880207.821", 1, 0); + round_test_opt ("0.00006441", "0.0000644121908433204", 8, 0); + round_test_opt ("314892", "314892.96976", 0, 0); + round_test_opt ("0", "-0.0000004795062", 0, 0); + round_test_opt ("1", "1.2", 0, 0); + round_test_opt ("377.672", "377.672806", 3, 0); + round_test_opt ("-7", "-7.71", 0, 0); + round_test_opt ("-1", "-1.9453", 0, 0); + round_test_opt ("0", "0.0000034", 5, 0); + round_test_opt ("-1", "-1.644", 0, 0); + round_test_opt ("-1.6170028", "-1.61700283891260", 7, 0); + round_test_opt ("0", "0.000000011711069429347", 3, 0); + round_test_opt ("-360982021", "-360982021.39", 0, 0); + round_test_opt ("48339808025", "48339808025.72", 0, 0); + round_test_opt ("868951121630", "868951121630.43", 0, 0); + round_test_opt ("0", "-0.00043", 3, 0); + round_test_opt ("-660368729645", "-660368729645.21", 0, 0); + round_test_opt ("-10710785", "-10710785.3", 0, 0); + round_test_opt ("0.1028356423", "0.102835642301091", 10, 0); + round_test_opt ("-845886", "-845886.85353", 0, 0); + round_test_opt ("-1015806.57278", "-1015806.5727870", 5, 0); + round_test_opt ("711", "711.3", 0, 0); + round_test_opt ("-355", "-355.7", 0, 0); + round_test_opt ("-40333.1536731", "-40333.15367314", 7, 0); + round_test_opt ("434.4804", "434.480478585", 4, 0); + round_test_opt ("-25", "-25.2", 0, 0); + round_test_opt ("-700838.64", "-700838.6401", 2, 0); + round_test_opt ("1", "1.2", 0, 0); + round_test_opt ("-125.8", "-125.8009", 1, 0); + round_test_opt ("-1.042", "-1.042407797", 3, 0); + round_test_opt ("-13.6", "-13.661", 1, 0); + round_test_opt ("5295445267", "5295445267.58", 0, 0); + round_test_opt ("0", "0.0000022009534937", 2, 0); + round_test_opt ("1.781", "1.7816", 3, 0); + round_test_opt ("2", "2", 0, 0); + round_test_opt ("-193.14", "-193.14012581600", 3, 0); + round_test_opt ("-5.9", "-5.9171262", 1, 0); + round_test_opt ("0.01", "0.010072549149960", 4, 0); + round_test_opt ("-2855964", "-2855964.070", 1, 0); + round_test_opt ("1549.1", "1549.125", 1, 0); + round_test_opt ("-132632", "-132632.83", 0, 0); + round_test_opt ("-0.000803", "-0.0008038171535511", 6, 0); + round_test_opt ("-5.648e-7", "-0.00000056485800370", 10, 0); + round_test_opt ("0", "-0.048", 0, 0); + round_test_opt ("-1218896175", "-1218896175.20", 0, 0); + round_test_opt ("2", "2.24", 0, 0); + round_test_opt ("-57786", "-57786.167707791", 0, 0); + round_test_opt ("87743", "87743.9", 0, 0); + round_test_opt ("0", "0.0016299", 0, 0); + round_test_opt ("-0.00008767", "-0.00008767694", 8, 0); + round_test_opt ("-74839", "-74839.9", 0, 0); + round_test_opt ("-138.3197", "-138.319719351192", 4, 0); + round_test_opt ("-20.4", "-20.48512", 1, 0); + round_test_opt ("0", "-0.0001075340957445", 1, 0); + round_test_opt ("-0.2", "-0.28402", 1, 0); + round_test_opt ("-349", "-349.5791", 0, 0); + round_test_opt ("8433", "8433.11", 0, 0); + round_test_opt ("55.8", "55.817", 1, 0); + round_test_opt ("-23.4", "-23.44711", 1, 0); + round_test_opt ("-8", "-8.96086822", 0, 0); + round_test_opt ("106.692", "106.6928125", 3, 0); + round_test_opt ("9627", "9627.565267", 0, 0); + round_test_opt ("335561404", "335561404.9395", 0, 0); + round_test_opt ("-72.83", "-72.83489272", 2, 0); + round_test_opt ("8380.8168", "8380.816861", 4, 0); + round_test_opt ("23842617274", "23842617274.4", 0, 0); + round_test_opt ("40148.6", "40148.634", 1, 0); + round_test_opt ("0", "-0.1255758162297", 0, 0); + round_test_opt ("780381160", "780381160.80", 0, 0); + round_test_opt ("-42122.9929627", "-42122.992962748", 7, 0); + round_test_opt ("5.94", "5.9443", 2, 0); + round_test_opt ("-49569", "-49569.4921442", 0, 0); + round_test_opt ("-14348604230", "-14348604230.8", 0, 0); + round_test_opt ("-0.0075", "-0.0075419045288", 4, 0); + round_test_opt ("1614572.14", "1614572.140804", 3, 0); + round_test_opt ("-573", "-573.60", 0, 0); + round_test_opt ("-56.77", "-56.779037760684", 2, 0); + round_test_opt ("0", "-0.0000000487660", 2, 0); + round_test_opt ("-7727", "-7727.7", 0, 0); + round_test_opt ("-0.00082", "-0.000828380", 5, 0); + round_test_opt ("-175.7", "-175.7979133887", 1, 0); + round_test_opt ("0", "-0.000000012336338193", 0, 0); + round_test_opt ("-31", "-31.6", 0, 0); + round_test_opt ("-1.5992", "-1.59927551", 4, 0); + round_test_opt ("-1877909543422", "-1877909543422.67", 0, 0); + round_test_opt ("-42164", "-42164.0870", 1, 0); + round_test_opt ("-87.9", "-87.94336", 1, 0); + round_test_opt ("0", "0.0000000173460424291", 0, 0); + round_test_opt ("42429150137495", "42429150137495.0", 0, 0); + round_test_opt ("37498693", "37498693.83", 0, 0); + round_test_opt ("-4659", "-4659.2", 0, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("727082", "727082.1", 0, 0); + round_test_opt ("0.0000015", "0.000001541114108773", 7, 0); + round_test_opt ("4.26", "4.2647805637288", 2, 0); + round_test_opt ("-16891181", "-16891181.93", 0, 0); + round_test_opt ("9.182898", "9.18289830", 6, 0); + round_test_opt ("119.6", "119.6950", 1, 0); + round_test_opt ("-0.068369", "-0.0683696097", 6, 0); + round_test_opt ("-38", "-38.7", 0, 0); + round_test_opt ("-904.78062", "-904.78062404", 5, 0); + round_test_opt ("0", "-0.000011", 1, 0); + round_test_opt ("0", "-0.0000112382500844484", 1, 0); + round_test_opt ("-54916112.1", "-54916112.174", 1, 0); + round_test_opt ("-1328966", "-1328966.8", 0, 0); + round_test_opt ("-1.2897361368", "-1.28973613685897", 10, 0); + round_test_opt ("6", "6", 0, 0); + round_test_opt ("49463742", "49463742.197", 0, 0); + round_test_opt ("-26556652", "-26556652.7", 0, 0); + round_test_opt ("-5", "-5", 0, 0); + round_test_opt ("120362", "120362.044", 0, 0); + round_test_opt ("7.52869", "7.528690875", 5, 0); + round_test_opt ("-545.557951", "-545.5579519426", 6, 0); + round_test_opt ("-87.84160902281", "-87.841609022811", 11, 0); + round_test_opt ("0", "-0.00000746", 3, 0); + round_test_opt ("0.0001", "0.00010074610", 6, 0); + round_test_opt ("282", "282.725", 0, 0); + round_test_opt ("-6.53", "-6.5375", 2, 0); + round_test_opt ("-1.0091e-7", "-0.000000100912", 11, 0); + round_test_opt ("2058817", "2058817.13", 0, 0); + round_test_opt ("0", "-0.000232325894", 3, 0); + round_test_opt ("0", "0.000036396", 1, 0); + round_test_opt ("1", "1.7", 0, 0); + round_test_opt ("1", "1.2", 0, 0); + round_test_opt ("91.17", "91.1758", 2, 0); + round_test_opt ("4284.594", "4284.5945725385", 3, 0); + round_test_opt ("19.361", "19.3617694197238", 3, 0); + round_test_opt ("-241543229", "-241543229.419", 0, 0); + round_test_opt ("0", "0.0000010", 2, 0); + round_test_opt ("-9.1e-7", "-0.00000091165421", 8, 0); + round_test_opt ("2332", "2332.5022", 0, 0); + round_test_opt ("0", "-0.0000000668925289", 3, 0); + round_test_opt ("7466.5", "7466.560", 1, 0); + round_test_opt ("1", "1.94", 0, 0); + round_test_opt ("-0.000031", "-0.00003140689353", 6, 0); + round_test_opt ("-219", "-219.6", 0, 0); + round_test_opt ("696971", "696971.4910", 0, 0); + round_test_opt ("0", "0.0000000120460503155595", 3, 0); + round_test_opt ("-0.0906", "-0.090693", 4, 0); + round_test_opt ("-3.087814", "-3.08781449", 6, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("-7", "-7", 0, 0); + round_test_opt ("0", "0.0000031618658712", 3, 0); + round_test_opt ("0.00097461", "0.0009746146031569", 8, 0); + round_test_opt ("-9", "-9", 1, 0); + round_test_opt ("-18.96460027725", "-18.964600277252", 11, 0); + round_test_opt ("0", "-0.1946", 0, 0); + round_test_opt ("-382004141344", "-382004141344.6", 0, 0); + round_test_opt ("-33", "-33.067865207540", 1, 0); + round_test_opt ("3", "3.5", 0, 0); + round_test_opt ("0", "-0.000000152493329", 5, 0); + round_test_opt ("6", "6", 0, 0); + round_test_opt ("-136420", "-136420.235", 0, 0); + round_test_opt ("0", "-0.063190393", 0, 0); + round_test_opt ("-136", "-136.19", 0, 0); + round_test_opt ("0", "-0.0000010895573842", 5, 0); + round_test_opt ("0.000009155", "0.000009155983308330", 9, 0); + round_test_opt ("218.73110807", "218.7311080731", 8, 0); + round_test_opt ("-9", "-9.8", 0, 0); + round_test_opt ("-12150204207146", "-12150204207146.8", 0, 0); + round_test_opt ("32687681", "32687681.4", 0, 0); + round_test_opt ("0", "0.000002318138842", 0, 0); + round_test_opt ("-194994.799527", "-194994.7995270", 6, 0); + round_test_opt ("-6400.47", "-6400.4797836", 2, 0); + round_test_opt ("-3", "-3.1", 0, 0); + round_test_opt ("3604", "3604.033", 1, 0); + round_test_opt ("6179882.66", "6179882.66353438", 2, 0); + round_test_opt ("-1", "-1.1", 0, 0); + round_test_opt ("-3353188", "-3353188.754831", 0, 0); + round_test_opt ("-3479.8", "-3479.814763641", 1, 0); + round_test_opt ("193837916.51", "193837916.51059", 3, 0); + round_test_opt ("925910.2", "925910.2254", 1, 0); + round_test_opt ("-3", "-3.1", 0, 0); + round_test_opt ("-45923605", "-45923605.3", 0, 0); + round_test_opt ("-5739640408", "-5739640408.61", 0, 0); + round_test_opt ("0", "0.000000026702", 2, 0); + round_test_opt ("2263", "2263.2278", 0, 0); + round_test_opt ("-1.26098", "-1.26098908270364", 5, 0); + round_test_opt ("-6349.354", "-6349.35474", 3, 0); + round_test_opt ("458189.4", "458189.4043", 1, 0); + round_test_opt ("8", "8.17298", 0, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("0", "0.000211155", 1, 0); + round_test_opt ("-7.3837356", "-7.383735616214", 7, 0); + round_test_opt ("-0.6559159", "-0.65591593", 7, 0); + round_test_opt ("25479402895651", "25479402895651.0", 0, 0); + round_test_opt ("59.53", "59.5333", 2, 0); + round_test_opt ("384", "384.6", 0, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("-1", "-1.2", 0, 0); + round_test_opt ("-31622181", "-31622181.760", 0, 0); + round_test_opt ("66.10928637", "66.109286376", 8, 0); + round_test_opt ("9", "9", 0, 0); + round_test_opt ("-5", "-5.6", 0, 0); + round_test_opt ("50", "50.33", 0, 0); + round_test_opt ("-1", "-1.6874", 0, 0); + round_test_opt ("-2893.77715", "-2893.7771581", 5, 0); + round_test_opt ("-36585.1", "-36585.1493766222", 1, 0); + round_test_opt ("23", "23.0320", 1, 0); + round_test_opt ("-1", "-1.51744523757", 0, 0); + round_test_opt ("0.112", "0.112042321", 3, 0); + round_test_opt ("-3965526", "-3965526.33", 0, 0); + round_test_opt ("0.039", "0.039883413", 3, 0); + round_test_opt ("-5985", "-5985.5", 0, 0); + round_test_opt ("-11128639", "-11128639.5", 0, 0); + round_test_opt ("-21", "-21.2", 0, 0); + round_test_opt ("0", "-0.157", 0, 0); + round_test_opt ("287", "287.1", 0, 0); + round_test_opt ("-11166.2403", "-11166.24038274", 4, 0); + round_test_opt ("-0.6", "-0.6672197920040", 1, 0); + round_test_opt ("11642.4966", "11642.496644822", 4, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("0", "0.000000040144735", 6, 0); + round_test_opt ("-380.9", "-380.9234", 1, 0); + round_test_opt ("0", "0.310292869", 0, 0); + round_test_opt ("-1626.45", "-1626.4574", 2, 0); + round_test_opt ("34109264", "34109264.610", 0, 0); + round_test_opt ("-18.6803", "-18.68030", 4, 0); + round_test_opt ("39743", "39743.1221508", 0, 0); + round_test_opt ("13.1", "13.198", 1, 0); + round_test_opt ("34.193151", "34.1931518121594", 6, 0); + round_test_opt ("-1.5197", "-1.519726", 4, 0); + round_test_opt ("-905422", "-905422.3", 0, 0); + round_test_opt ("-70.05747", "-70.0574738", 5, 0); + round_test_opt ("-11396.553", "-11396.55311402", 3, 0); + round_test_opt ("-18", "-18.1", 0, 0); + round_test_opt ("-35786612404273", "-35786612404273.4", 0, 0); + round_test_opt ("-0.0697", "-0.069781754", 4, 0); + round_test_opt ("0", "0.407", 0, 0); + round_test_opt ("25112.523", "25112.5230201", 4, 0); + round_test_opt ("0", "0.0000006117065780539", 0, 0); + round_test_opt ("4", "4", 0, 0); + round_test_opt ("-0.3", "-0.30492201", 2, 0); + round_test_opt ("3740", "3740.7", 0, 0); + round_test_opt ("17260922.317", "17260922.31728", 3, 0); + round_test_opt ("0", "0.0000057926177", 4, 0); + round_test_opt ("-1", "-1.23", 0, 0); + round_test_opt ("-315.21", "-315.216212550992", 2, 0); + round_test_opt ("1059567.1", "1059567.1851551", 1, 0); + round_test_opt ("11183622.74", "11183622.741", 2, 0); + round_test_opt ("33460011.925", "33460011.92578", 3, 0); + round_test_opt ("4.26516", "4.26516757341024", 5, 0); + round_test_opt ("-1", "-1.19", 0, 0); + round_test_opt ("633931143962", "633931143962.5", 0, 0); + round_test_opt ("6.262", "6.2624", 3, 0); + round_test_opt ("-203.8", "-203.80", 1, 0); + round_test_opt ("-85", "-85.4", 0, 0); + round_test_opt ("0.000001", "0.000001207624055558", 6, 0); + round_test_opt ("-0.000019", "-0.000019202077603", 6, 0); + round_test_opt ("0.0009", "0.0009133094523911", 4, 0); + round_test_opt ("945051319576", "945051319576.58", 0, 0); + round_test_opt ("-70953", "-70953.5", 0, 0); + round_test_opt ("-0.000002", "-0.0000020685433866", 6, 0); + round_test_opt ("-207", "-207.7", 0, 0); + round_test_opt ("-490", "-490.444", 0, 0); + round_test_opt ("-5.37", "-5.3771", 2, 0); + round_test_opt ("83", "83.7", 0, 0); + round_test_opt ("366796807.5", "366796807.5574", 1, 0); + round_test_opt ("1745848", "1745848.08", 0, 0); + round_test_opt ("1", "1.0", 0, 0); + round_test_opt ("-1", "-1.5", 0, 0); + round_test_opt ("5", "5.14", 0, 0); + round_test_opt ("0", "0.00003456", 0, 0); + round_test_opt ("-8.1477", "-8.147743719852", 4, 0); + round_test_opt ("-4910173945.9", "-4910173945.90609", 2, 0); + round_test_opt ("0", "0.000000022285849598", 0, 0); + round_test_opt ("3.33465", "3.3346587411", 5, 0); + round_test_opt ("0", "-0.00000729", 0, 0); + round_test_opt ("-6522.4", "-6522.434", 1, 0); + round_test_opt ("259", "259.537", 0, 0); + round_test_opt ("0", "-0.00104081043935", 2, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("-1", "-1", 1, 0); + round_test_opt ("-1864926.52", "-1864926.5206", 2, 0); + round_test_opt ("-71542", "-71542.7", 0, 0); + round_test_opt ("2", "2", 0, 0); + round_test_opt ("40.4", "40.490", 1, 0); + round_test_opt ("-164258071856", "-164258071856.43", 0, 0); + round_test_opt ("-2231171.7782484", "-2231171.77824847", 7, 0); + round_test_opt ("0.00006946", "0.0000694635799508", 8, 0); + round_test_opt ("2188795845.6", "2188795845.680", 1, 0); + round_test_opt ("-21", "-21.1", 0, 0); + round_test_opt ("0", "-0.000000031", 0, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("-1526", "-1526.888", 0, 0); + round_test_opt ("-438", "-438.2", 0, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("-6814824", "-6814824.25", 0, 0); + round_test_opt ("-2", "-2", 0, 0); + round_test_opt ("98991.3", "98991.3556836", 1, 0); + round_test_opt ("5312169", "5312169.9", 0, 0); + round_test_opt ("-42854", "-42854.6", 0, 0); + round_test_opt ("-27.6572", "-27.6572288157", 4, 0); + round_test_opt ("9", "9.6002813627", 0, 0); + round_test_opt ("0", "-0.029", 1, 0); + round_test_opt ("-526534", "-526534.4", 0, 0); + round_test_opt ("-7.5", "-7.5124", 1, 0); + round_test_opt ("-108923", "-108923.1", 0, 0); + round_test_opt ("-9", "-9.4", 0, 0); + round_test_opt ("-850.5", "-850.55888926", 1, 0); + round_test_opt ("20.2", "20.2030258520", 2, 0); + round_test_opt ("-0.609870723", "-0.6098707231015", 9, 0); + round_test_opt ("5281.09", "5281.0906", 3, 0); + round_test_opt ("-3.7e-8", "-0.000000037004277253", 9, 0); + round_test_opt ("-0.0000488", "-0.0000488028554633245", 7, 0); + round_test_opt ("0.02366303", "0.0236630365418", 8, 0); + round_test_opt ("1", "1.63", 0, 0); + round_test_opt ("-0.0005", "-0.00053", 4, 0); + round_test_opt ("42406.41", "42406.4173728213", 2, 0); + round_test_opt ("-1234.07", "-1234.0784", 2, 0); + round_test_opt ("-3e-7", "-0.0000003154", 7, 0); + round_test_opt ("-0.0081739", "-0.00817397896", 7, 0); + round_test_opt ("173650", "173650.451", 0, 0); + round_test_opt ("11284.3", "11284.397", 1, 0); + round_test_opt ("-6", "-6", 0, 0); + round_test_opt ("-6893", "-6893.8", 0, 0); + round_test_opt ("99.17", "99.1724", 2, 0); + round_test_opt ("39", "39.13", 0, 0); + round_test_opt ("16564.38", "16564.38086", 3, 0); + round_test_opt ("-191.419", "-191.419531187", 3, 0); + round_test_opt ("-7", "-7", 0, 0); + round_test_opt ("84298765.75", "84298765.7508", 3, 0); + round_test_opt ("-145830", "-145830.71251", 0, 0); + round_test_opt ("-234182173", "-234182173.87", 0, 0); + round_test_opt ("0", "-0.00000001345158437", 1, 0); + round_test_opt ("2552530.18", "2552530.1811", 2, 0); + round_test_opt ("0.001367", "0.001367230074", 6, 0); + round_test_opt ("572.04343", "572.04343606", 5, 0); + round_test_opt ("-1487814", "-1487814.67", 0, 0); + round_test_opt ("2678", "2678.096391", 0, 0); + round_test_opt ("-2", "-2", 1, 0); + round_test_opt ("0", "-0.0000055", 4, 0); + round_test_opt ("0", "0.0001067796289669", 0, 0); + round_test_opt ("1393884", "1393884.74335020", 0, 0); + round_test_opt ("-2", "-2", 0, 0); + round_test_opt ("-10861102", "-10861102.43", 0, 0); + round_test_opt ("-336423.21", "-336423.21318", 2, 0); + round_test_opt ("0.0000021066", "0.00000210660015078679", 11, 0); + round_test_opt ("39358671", "39358671.66589", 0, 0); + round_test_opt ("0", "-0.0000604438109", 2, 0); + round_test_opt ("28", "28.8", 0, 0); + round_test_opt ("0.0002", "0.0002127", 4, 0); + round_test_opt ("5", "5.27", 0, 0); + round_test_opt ("2e-8", "0.0000000223520836", 8, 0); + round_test_opt ("1.2952", "1.2952068", 5, 0); + round_test_opt ("-0.0009", "-0.000977833", 4, 0); + round_test_opt ("4", "4", 0, 0); + round_test_opt ("422856110415", "422856110415.57", 0, 0); + round_test_opt ("-21279632", "-21279632.42", 0, 0); + round_test_opt ("8310941", "8310941.9", 0, 0); + round_test_opt ("6138183175.8", "6138183175.801", 1, 0); + round_test_opt ("-1", "-1.0", 0, 0); + round_test_opt ("-92", "-92.4", 0, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("0", "-0.00005520", 2, 0); + round_test_opt ("1400", "1400.4268", 0, 0); + round_test_opt ("-7.6", "-7.6365", 1, 0); + round_test_opt ("11734", "11734.29825972", 0, 0); + round_test_opt ("-47.52771384", "-47.5277138495", 8, 0); + round_test_opt ("58073.135", "58073.13547", 3, 0); + round_test_opt ("183.515939", "183.51593967261", 6, 0); + round_test_opt ("-441.16", "-441.162", 2, 0); + round_test_opt ("-7", "-7.36", 0, 0); + round_test_opt ("70.05777541765", "70.0577754176541", 11, 0); + round_test_opt ("-94", "-94.193", 0, 0); + round_test_opt ("16035311", "16035311.3", 0, 0); + round_test_opt ("0", "0.0083246640962823", 0, 0); + round_test_opt ("1", "1.023", 1, 0); + round_test_opt ("0", "0.000038668455", 0, 0); + round_test_opt ("0", "0.06305", 0, 0); + round_test_opt ("-136906.5153", "-136906.515355622", 4, 0); + round_test_opt ("-43.96", "-43.9649", 2, 0); + round_test_opt ("0", "-0.00001820", 3, 0); + round_test_opt ("-9", "-9.3013", 0, 0); + round_test_opt ("244", "244.60011", 0, 0); + round_test_opt ("85.0993", "85.099344", 4, 0); + round_test_opt ("-0.27", "-0.27837505453", 2, 0); + round_test_opt ("175189.6", "175189.643", 1, 0); + round_test_opt ("-328814818618", "-328814818618.75", 0, 0); + round_test_opt ("-4.4748e-7", "-0.000000447487436", 11, 0); + round_test_opt ("-2", "-2.04", 0, 0); + round_test_opt ("-0.089", "-0.08939251022342", 3, 0); + round_test_opt ("0", "-0.000000010877355", 5, 0); + round_test_opt ("53321.87", "53321.8748", 2, 0); + round_test_opt ("1915", "1915.79", 0, 0); + round_test_opt ("-367.5", "-367.578", 1, 0); + round_test_opt ("-21.9", "-21.9540", 1, 0); + round_test_opt ("-39.1", "-39.14059", 1, 0); + round_test_opt ("-1.6", "-1.60601", 1, 0); + round_test_opt ("6", "6.8", 0, 0); + round_test_opt ("-1.2885", "-1.28850179741370", 4, 0); + round_test_opt ("-1", "-1.55455", 0, 0); + round_test_opt ("-221", "-221.13", 0, 0); + round_test_opt ("0", "0.000012022217901638", 2, 0); + round_test_opt ("0", "0.000639079", 2, 0); + round_test_opt ("1.84", "1.846583441436", 2, 0); + round_test_opt ("12071.250496", "12071.2504963", 6, 0); + round_test_opt ("-3675", "-3675.926242", 0, 0); + round_test_opt ("-315374", "-315374.067", 0, 0); + round_test_opt ("7", "7.91", 0, 0); + round_test_opt ("-0.0027114", "-0.00271140536474855", 8, 0); + round_test_opt ("-24", "-24.7", 0, 0); + round_test_opt ("0", "0.00000414", 5, 0); + round_test_opt ("37689482.631", "37689482.631724", 3, 0); + round_test_opt ("1621038532", "1621038532.13", 0, 0); + round_test_opt ("-7000312.14286", "-7000312.1428635", 5, 0); + round_test_opt ("0.0001366067", "0.0001366067359067", 10, 0); + round_test_opt ("356688.7", "356688.768", 1, 0); + round_test_opt ("-429630451056", "-429630451056.17", 0, 0); + round_test_opt ("0.001", "0.001706", 3, 0); + round_test_opt ("-0.15", "-0.15115309937", 2, 0); + round_test_opt ("0", "-0.00000426741761569024", 5, 0); + round_test_opt ("-361", "-361.8735", 0, 0); + round_test_opt ("34.463", "34.46316", 3, 0); + round_test_opt ("2773", "2773.052", 1, 0); + round_test_opt ("-48.8555", "-48.8555860944", 4, 0); + round_test_opt ("-401.15381", "-401.15381004", 7, 0); + round_test_opt ("15080", "15080.56474400", 0, 0); + round_test_opt ("739", "739.712017", 0, 0); + round_test_opt ("17394829", "17394829.4", 0, 0); + round_test_opt ("-94603484573", "-94603484573.572", 0, 0); + round_test_opt ("88.287", "88.28799", 3, 0); + round_test_opt ("-3", "-3.9", 0, 0); + round_test_opt ("0.028002559", "0.028002559141", 9, 0); + round_test_opt ("0.0003965772", "0.000396577277638737", 10, 0); + round_test_opt ("6", "6.1", 0, 0); + round_test_opt ("-343.35771428", "-343.35771428919", 8, 0); + round_test_opt ("-3.6", "-3.6321", 1, 0); + round_test_opt ("272406.4320645", "272406.43206452", 7, 0); + round_test_opt ("0", "-0.0022548", 0, 0); + round_test_opt ("-0.001", "-0.0013211", 3, 0); + round_test_opt ("5.6", "5.6424", 1, 0); + round_test_opt ("-4856.3", "-4856.365", 1, 0); + round_test_opt ("8983241577", "8983241577.46", 0, 0); + round_test_opt ("-104785798641", "-104785798641.1979", 0, 0); + round_test_opt ("-25.3", "-25.36896", 1, 0); + round_test_opt ("0", "0.0000000439950662012", 0, 0); + round_test_opt ("-4449540", "-4449540.86", 0, 0); + round_test_opt ("-474.7142", "-474.7142522663", 4, 0); + round_test_opt ("-1.31", "-1.319", 2, 0); + round_test_opt ("1", "1.0886", 0, 0); + round_test_opt ("-7", "-7", 0, 0); + round_test_opt ("-0.0001", "-0.0001727480", 4, 0); + round_test_opt ("573.868", "573.86843", 3, 0); + round_test_opt ("0", "-0.00095", 0, 0); + round_test_opt ("344", "344.2", 0, 0); + round_test_opt ("-2334602", "-2334602.418", 0, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("11831576861.1", "11831576861.108", 1, 0); + round_test_opt ("-5", "-5.84", 0, 0); + round_test_opt ("0", "-0.0000516463227954072", 4, 0); + round_test_opt ("-1871009.24048", "-1871009.240482", 5, 0); + round_test_opt ("-14", "-14.5", 0, 0); + round_test_opt ("-21773807.1", "-21773807.116", 1, 0); + round_test_opt ("-13990", "-13990.320", 0, 0); + round_test_opt ("-9", "-9.741", 0, 0); + round_test_opt ("0", "0.00000270", 5, 0); + round_test_opt ("8.4e-7", "0.0000008440", 8, 0); + round_test_opt ("-324.951", "-324.9513563376", 3, 0); + round_test_opt ("0", "-0.0017455758", 2, 0); + round_test_opt ("-4.7", "-4.70677", 1, 0); + round_test_opt ("-4000702.65", "-4000702.6580", 2, 0); + round_test_opt ("0", "0.046250560170087", 0, 0); + round_test_opt ("0", "0.000901", 3, 0); + round_test_opt ("21173148", "21173148.59", 0, 0); + round_test_opt ("0", "0.0000001917443", 2, 0); + round_test_opt ("22", "22.170", 0, 0); + round_test_opt ("-264", "-264.40", 0, 0); + round_test_opt ("-2313.4", "-2313.478", 1, 0); + round_test_opt ("1.3", "1.375", 1, 0); + round_test_opt ("192.6523", "192.6523354", 4, 0); + round_test_opt ("-6", "-6.2", 0, 0); + round_test_opt ("-20007999756", "-20007999756.5", 0, 0); + round_test_opt ("23", "23.0", 0, 0); + round_test_opt ("-67156.4", "-67156.46", 1, 0); + round_test_opt ("0", "0.00080", 1, 0); + round_test_opt ("-1241843.08", "-1241843.08419", 2, 0); + round_test_opt ("16", "16.9", 0, 0); + round_test_opt ("-13574.183", "-13574.183482", 3, 0); + round_test_opt ("85.5", "85.5844524", 1, 0); + round_test_opt ("326691", "326691.689", 0, 0); + round_test_opt ("-3.61", "-3.6129", 2, 0); + round_test_opt ("-5832697.9", "-5832697.901", 1, 0); + round_test_opt ("-86.6", "-86.611", 1, 0); + round_test_opt ("17211", "17211.120849", 0, 0); + round_test_opt ("-6", "-6.3", 0, 0); + round_test_opt ("0", "0.00603649", 0, 0); + round_test_opt ("-0.8", "-0.859", 1, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("-72262215.33", "-72262215.33059", 2, 0); + round_test_opt ("30151422", "30151422.2379", 0, 0); + round_test_opt ("0", "0.0000041944073", 4, 0); + round_test_opt ("-6", "-6.686", 0, 0); + round_test_opt ("3841", "3841.462", 0, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("0", "-0.000000434373861681637", 3, 0); + round_test_opt ("0.19151782", "0.191517823", 8, 0); + round_test_opt ("3", "3.0622069618", 1, 0); + round_test_opt ("-1103792", "-1103792.3", 0, 0); + round_test_opt ("2600", "2600.0", 0, 0); + round_test_opt ("-0.049", "-0.049027", 4, 0); + round_test_opt ("245", "245.2", 0, 0); + round_test_opt ("17", "17.9", 0, 0); + round_test_opt ("-5", "-5", 1, 0); + round_test_opt ("9", "9.1", 0, 0); + round_test_opt ("-5.426", "-5.4267", 3, 0); + round_test_opt ("-7", "-7.12", 0, 0); + round_test_opt ("6469941", "6469941.9", 0, 0); + round_test_opt ("0", "0.00001772", 3, 0); + round_test_opt ("373", "373.7", 0, 0); + round_test_opt ("90.9", "90.9725", 1, 0); + round_test_opt ("0.00002706", "0.000027066060090", 8, 0); + round_test_opt ("0", "0.51", 0, 0); + round_test_opt ("-26", "-26.753", 0, 0); + round_test_opt ("38", "38.0927444", 0, 0); + round_test_opt ("-28.4", "-28.4389641946", 1, 0); + round_test_opt ("-363", "-363.9", 0, 0); + round_test_opt ("-1195", "-1195.7", 0, 0); + round_test_opt ("3.11198", "3.1119880455", 5, 0); + round_test_opt ("0", "0.045227", 0, 0); + round_test_opt ("-1316140051.5", "-1316140051.579", 1, 0); + round_test_opt ("-4", "-4.118", 0, 0); + round_test_opt ("-3936947210", "-3936947210.85", 0, 0); + round_test_opt ("110.6003", "110.600335", 4, 0); + round_test_opt ("-6", "-6.0", 0, 0); + round_test_opt ("90893484.6", "90893484.650", 1, 0); + round_test_opt ("-0.7006", "-0.7006145", 4, 0); + round_test_opt ("-0.00001", "-0.000019936362507165", 5, 0); + round_test_opt ("24678137835.9", "24678137835.942", 1, 0); + round_test_opt ("-0.00000971", "-0.00000971086828641997", 8, 0); + round_test_opt ("0", "0.0000000580238", 2, 0); + round_test_opt ("11528102.7726", "11528102.7726523", 4, 0); + round_test_opt ("-2.68486159", "-2.6848615902383", 8, 0); + round_test_opt ("1161", "1161.7", 0, 0); + round_test_opt ("-5", "-5.567", 0, 0); + round_test_opt ("10144443712", "10144443712.86", 0, 0); + round_test_opt ("-2", "-2", 1, 0); + round_test_opt ("9", "9", 0, 0); + round_test_opt ("6.2889e-7", "0.0000006288925870", 11, 0); + round_test_opt ("876.4", "876.468063", 1, 0); + round_test_opt ("105.9", "105.91973", 1, 0); + round_test_opt ("0", "0.0000010125974", 2, 0); + round_test_opt ("2.0842154", "2.08421540", 7, 0); + round_test_opt ("-4649.5", "-4649.5866", 1, 0); + round_test_opt ("0.11245", "0.112457886", 5, 0); + round_test_opt ("-7", "-7.1", 0, 0); + round_test_opt ("-625.285", "-625.28564498", 3, 0); + round_test_opt ("-7475217", "-7475217.036", 1, 0); + round_test_opt ("-1.603017", "-1.60301705792", 7, 0); + round_test_opt ("-869155972", "-869155972.30", 0, 0); + round_test_opt ("-39", "-39.004217187", 2, 0); + round_test_opt ("-1772", "-1772.7", 0, 0); + round_test_opt ("3", "3.0", 0, 0); + round_test_opt ("-7809", "-7809.1", 0, 0); + round_test_opt ("112", "112.98", 0, 0); + round_test_opt ("306940", "306940.42", 0, 0); + round_test_opt ("200", "200.113", 0, 0); + round_test_opt ("0", "-0.000000062530377194", 6, 0); + round_test_opt ("-17.011295", "-17.011295361", 6, 0); + round_test_opt ("110.184", "110.18489", 3, 0); + round_test_opt ("5", "5", 0, 0); + round_test_opt ("1.4e-8", "0.00000001445074049593", 9, 0); + round_test_opt ("-1.215", "-1.2157723", 3, 0); + round_test_opt ("1732583495.3", "1732583495.304", 1, 0); + round_test_opt ("124948994003", "124948994003.9", 0, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("0", "-0.000000137314187", 4, 0); + round_test_opt ("13413", "13413.019", 1, 0); + round_test_opt ("0", "-0.17318", 0, 0); + round_test_opt ("15387866568", "15387866568.3", 0, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("-13", "-13.94", 0, 0); + round_test_opt ("7291", "7291.102", 0, 0); + round_test_opt ("-57.8613", "-57.86131", 4, 0); + round_test_opt ("43386097920", "43386097920.70", 0, 0); + round_test_opt ("-0.000128966", "-0.00012896634", 9, 0); + round_test_opt ("-232", "-232.969", 0, 0); + round_test_opt ("-42", "-42.79069937124", 0, 0); + round_test_opt ("3.6248", "3.62487029", 4, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("0", "0.000000013", 6, 0); + round_test_opt ("15", "15.43478642", 0, 0); + round_test_opt ("350", "350.6", 0, 0); + round_test_opt ("77697915082828", "77697915082828.5", 0, 0); + round_test_opt ("7338", "7338.3", 0, 0); + round_test_opt ("-51.9775", "-51.977502", 5, 0); + round_test_opt ("95", "95.9", 0, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("-8", "-8.9", 0, 0); + round_test_opt ("8284.591", "8284.5917750894", 3, 0); + round_test_opt ("-1e-7", "-0.0000001088", 7, 0); + round_test_opt ("-33376.998", "-33376.99830385", 3, 0); + round_test_opt ("0.03", "0.0382307", 2, 0); + round_test_opt ("-48.7", "-48.709", 1, 0); + round_test_opt ("2.6168481", "2.6168481042", 8, 0); + round_test_opt ("-5.483812", "-5.4838122", 6, 0); + round_test_opt ("2.646923529", "2.64692352926013", 9, 0); + round_test_opt ("-26257", "-26257.7041", 0, 0); + round_test_opt ("-49641.7", "-49641.7149", 1, 0); + round_test_opt ("-462589", "-462589.0", 0, 0); + round_test_opt ("461214", "461214.3649", 0, 0); + round_test_opt ("129386821301", "129386821301.98", 0, 0); + round_test_opt ("3", "3.2905", 0, 0); + round_test_opt ("1", "1.4", 0, 0); + round_test_opt ("0", "-0.000000227515922", 2, 0); + round_test_opt ("3588.6381", "3588.63817", 4, 0); + round_test_opt ("3.53", "3.53466566", 2, 0); + round_test_opt ("-6660.35", "-6660.35924", 2, 0); + round_test_opt ("0", "0.0000066060550015", 3, 0); + round_test_opt ("156637133.3", "156637133.39", 1, 0); + round_test_opt ("5", "5.108", 0, 0); + round_test_opt ("168508", "168508.1", 0, 0); + round_test_opt ("-10", "-10.33499", 0, 0); + round_test_opt ("0", "0.000000067600476724650", 1, 0); + round_test_opt ("-22.83", "-22.83845", 2, 0); + round_test_opt ("-20706434", "-20706434.27", 0, 0); + round_test_opt ("0", "0.00024671", 2, 0); + round_test_opt ("-1769955.74", "-1769955.746", 2, 0); + round_test_opt ("9", "9.25", 0, 0); + round_test_opt ("-64310286654", "-64310286654.707", 0, 0); + round_test_opt ("-5.818273127", "-5.8182731277099", 9, 0); + round_test_opt ("8.4", "8.4839", 1, 0); + round_test_opt ("-289049", "-289049.8667", 0, 0); + round_test_opt ("-8.87381741", "-8.8738174166", 8, 0); + round_test_opt ("61078769295.7", "61078769295.796", 1, 0); + round_test_opt ("-2142", "-2142.2491090", 0, 0); + round_test_opt ("-24", "-24.0", 0, 0); + round_test_opt ("-28450.7746", "-28450.77469", 4, 0); + round_test_opt ("-8", "-8.9", 0, 0); + round_test_opt ("0", "0.0000000264301164105", 7, 0); + round_test_opt ("-4181.599211", "-4181.599211051", 7, 0); + round_test_opt ("0", "-0.000199", 1, 0); + round_test_opt ("-10590.48", "-10590.4897", 2, 0); + round_test_opt ("-135.7703", "-135.770329", 4, 0); + round_test_opt ("0", "-0.000017071302239222", 2, 0); + round_test_opt ("4096.2", "4096.273925994", 1, 0); + round_test_opt ("-1e-8", "-0.00000001831", 8, 0); + round_test_opt ("-1", "-1.8", 0, 0); + round_test_opt ("59.323301", "59.323301609", 6, 0); + round_test_opt ("10785.986", "10785.98636097841", 3, 0); + round_test_opt ("1", "1.3", 0, 0); + round_test_opt ("-7.332", "-7.3327", 3, 0); + round_test_opt ("-37", "-37.8", 0, 0); + round_test_opt ("275519", "275519.8", 0, 0); + round_test_opt ("47451699221", "47451699221.7", 0, 0); + round_test_opt ("0", "0.00000416770", 1, 0); + round_test_opt ("-0.0343498646", "-0.03434986461", 10, 0); + round_test_opt ("4242324543.46", "4242324543.469", 2, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("52.42", "52.4272395", 2, 0); + round_test_opt ("98579756", "98579756.6", 0, 0); + round_test_opt ("0.0033455329", "0.003345532903918", 10, 0); + round_test_opt ("38006", "38006.2595", 0, 0); + round_test_opt ("-5827979902", "-5827979902.5", 0, 0); + round_test_opt ("1027679", "1027679.04", 0, 0); + round_test_opt ("0", "-0.0000001128226980", 1, 0); + round_test_opt ("-0.0355", "-0.0355964995", 4, 0); + round_test_opt ("0", "0.00028", 2, 0); + round_test_opt ("-5.2271551934", "-5.22715519347", 10, 0); + round_test_opt ("-7.2886723", "-7.288672381", 7, 0); + round_test_opt ("135123420", "135123420.26", 0, 0); + round_test_opt ("-43551.8", "-43551.8035464", 2, 0); + round_test_opt ("-1.52", "-1.5240", 2, 0); + round_test_opt ("-9", "-9", 0, 0); + round_test_opt ("0", "-0.422", 0, 0); + round_test_opt ("-8.3", "-8.357", 1, 0); + round_test_opt ("0.0000036043", "0.000003604354139", 10, 0); + round_test_opt ("0.0000242", "0.0000242502776", 7, 0); + round_test_opt ("-601701.23461", "-601701.234613771", 5, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("0", "-0.1888421", 0, 0); + round_test_opt ("-7.4024", "-7.4024326123759", 4, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("-77", "-77.0", 0, 0); + round_test_opt ("2", "2", 0, 0); + round_test_opt ("173.826146", "173.826146902372", 6, 0); + round_test_opt ("41628873412", "41628873412.7", 0, 0); + round_test_opt ("-7.6898808", "-7.689880862", 7, 0); + round_test_opt ("7", "7", 0, 0); + round_test_opt ("0", "-0.105", 0, 0); + round_test_opt ("42148790855.26", "42148790855.2676", 2, 0); + round_test_opt ("-6032.8", "-6032.806", 1, 0); + round_test_opt ("1", "1.1", 0, 0); + round_test_opt ("0.279", "0.279143546", 3, 0); + round_test_opt ("-0.00020291", "-0.0002029105398", 9, 0); + round_test_opt ("-58.3168385", "-58.3168385103573", 7, 0); + round_test_opt ("1200671047233", "1200671047233.0", 0, 0); + round_test_opt ("5", "5", 0, 0); + round_test_opt ("-2", "-2.1", 0, 0); + round_test_opt ("-8026", "-8026.55", 0, 0); + round_test_opt ("3557", "3557.9", 0, 0); + round_test_opt ("-4172", "-4172.11", 0, 0); + round_test_opt ("-434443.5", "-434443.55842219", 1, 0); + round_test_opt ("-79649", "-79649.589", 0, 0); + round_test_opt ("-683356", "-683356.704", 0, 0); + round_test_opt ("-23157.94", "-23157.9414070", 2, 0); + round_test_opt ("-834275304.9697", "-834275304.969786", 4, 0); + round_test_opt ("0.00021394028", "0.000213940281027423", 11, 0); + round_test_opt ("207220", "207220.6", 0, 0); + round_test_opt ("0", "0.00000027328846590", 3, 0); + round_test_opt ("-181", "-181.7", 0, 0); + round_test_opt ("993", "993.47", 0, 0); + round_test_opt ("0.0000183", "0.00001831903", 7, 0); + round_test_opt ("-2165", "-2165.914422617", 0, 0); + round_test_opt ("7158", "7158.6", 0, 0); + round_test_opt ("0.000004399", "0.000004399592", 9, 0); + round_test_opt ("-448.1549", "-448.154990", 4, 0); + round_test_opt ("8", "8.31", 0, 0); + round_test_opt ("-4646.3", "-4646.366", 1, 0); + round_test_opt ("-374405891.742", "-374405891.74227", 3, 0); + round_test_opt ("-18858640.775", "-18858640.7752", 3, 0); + round_test_opt ("-5.944e-7", "-0.0000005944823366829", 10, 0); + round_test_opt ("-3763100.1", "-3763100.173", 1, 0); + round_test_opt ("0", "-0.00009409", 1, 0); + round_test_opt ("-1465712045100", "-1465712045100.7", 0, 0); + round_test_opt ("77.9", "77.9005", 2, 0); + round_test_opt ("-582373.3", "-582373.36", 1, 0); + round_test_opt ("0.00101946", "0.0010194644198", 8, 0); + round_test_opt ("-1990653061", "-1990653061.0972", 1, 0); + round_test_opt ("3", "3.462697", 0, 0); + round_test_opt ("1.957", "1.95785", 3, 0); + round_test_opt ("2420754", "2420754.52", 0, 0); + round_test_opt ("-0.0006430603", "-0.00064306030", 10, 0); + round_test_opt ("22411582.12", "22411582.1255", 2, 0); + round_test_opt ("74677097.7", "74677097.718049", 1, 0); + round_test_opt ("-1", "-1.9", 0, 0); + round_test_opt ("-4228070", "-4228070.3279", 0, 0); + round_test_opt ("-46.3", "-46.3717", 1, 0); + round_test_opt ("-3", "-3", 0, 0); + round_test_opt ("0", "0.00012", 2, 0); + round_test_opt ("-0.04332484", "-0.043324844640", 8, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("0", "-0.21", 0, 0); + round_test_opt ("0.0008", "0.0008813", 4, 0); + round_test_opt ("0", "-0.000003211579", 5, 0); + round_test_opt ("1555", "1555.7", 0, 0); + round_test_opt ("2", "2", 0, 0); + round_test_opt ("-14", "-14.7", 0, 0); + round_test_opt ("1.2", "1.262009414478", 1, 0); + round_test_opt ("11", "11.30224", 0, 0); + round_test_opt ("3.3e-8", "0.00000003399", 9, 0); + round_test_opt ("13", "13.56", 0, 0); + round_test_opt ("2646.8", "2646.82301781544", 1, 0); + round_test_opt ("122.7", "122.7266", 1, 0); + round_test_opt ("3", "3.48298", 0, 0); + round_test_opt ("3", "3.4", 0, 0); + round_test_opt ("3", "3.0", 0, 0); + round_test_opt ("7", "7.6", 0, 0); + round_test_opt ("0", "0.58", 0, 0); + round_test_opt ("-21.0915", "-21.091525", 4, 0); + round_test_opt ("22262", "22262.5", 0, 0); + round_test_opt ("-2415583", "-2415583.0", 0, 0); + round_test_opt ("-962", "-962.6", 0, 0); + round_test_opt ("3", "3.024", 0, 0); + round_test_opt ("2.7997", "2.799706099", 5, 0); + round_test_opt ("-15804.6023", "-15804.6023324", 4, 0); + round_test_opt ("1", "1.23924229", 0, 0); + round_test_opt ("-200373.5", "-200373.502979", 1, 0); + round_test_opt ("-4170.151", "-4170.151057", 3, 0); + round_test_opt ("279", "279.1052697190", 0, 0); + round_test_opt ("-14902.11331", "-14902.1133147411", 5, 0); + round_test_opt ("-72", "-72.19800", 0, 0); + round_test_opt ("-0.00001961", "-0.000019610697", 8, 0); + round_test_opt ("-5", "-5", 0, 0); + round_test_opt ("0", "0.00000349047", 2, 0); + round_test_opt ("69", "69.4", 0, 0); + round_test_opt ("1886", "1886.04", 0, 0); + round_test_opt ("7982", "7982.5", 0, 0); + round_test_opt ("35.142265745", "35.1422657459", 9, 0); + round_test_opt ("7408353", "7408353.2", 0, 0); + round_test_opt ("7", "7", 0, 0); + round_test_opt ("-5", "-5", 0, 0); + round_test_opt ("-10159281.7729875", "-10159281.77298752", 7, 0); + round_test_opt ("0.0138316681", "0.01383166817", 10, 0); + round_test_opt ("149232", "149232.9", 0, 0); + round_test_opt ("10983303592", "10983303592.73", 0, 0); + round_test_opt ("0", "-0.000000099576", 7, 0); + round_test_opt ("-1.10231", "-1.1023114", 5, 0); + round_test_opt ("0.002316", "0.00231613481130", 6, 0); + round_test_opt ("-5", "-5", 0, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("550", "550.6", 0, 0); + round_test_opt ("-50", "-50.4", 0, 0); + round_test_opt ("-0.00030265", "-0.0003026572202", 8, 0); + round_test_opt ("10043.24", "10043.24056", 3, 0); + round_test_opt ("6165060053567", "6165060053567.8", 0, 0); + round_test_opt ("0", "0.074", 1, 0); + round_test_opt ("-8867", "-8867.9", 0, 0); + round_test_opt ("375.094", "375.094529", 3, 0); + round_test_opt ("0", "-0.000000062089369038978", 5, 0); + round_test_opt ("3", "3.4", 0, 0); + round_test_opt ("-2.3", "-2.30006", 3, 0); + round_test_opt ("-1451.61677", "-1451.616779838", 5, 0); + round_test_opt ("-258.4", "-258.41", 1, 0); + round_test_opt ("0.000001", "0.00000134861276115417", 6, 0); + round_test_opt ("0", "-0.000003211650", 0, 0); + round_test_opt ("-0.000573521", "-0.000573521667", 9, 0); + round_test_opt ("0", "0.0000000506819", 4, 0); + round_test_opt ("-0.00002", "-0.000022909766037852", 5, 0); + round_test_opt ("0", "0.0000381368", 2, 0); + round_test_opt ("-76", "-76.1", 0, 0); + round_test_opt ("0", "-0.000000068", 3, 0); + round_test_opt ("-0.009719", "-0.009719051425047", 7, 0); + round_test_opt ("40.55", "40.5592", 2, 0); + round_test_opt ("-83.5379912", "-83.53799123571", 7, 0); + round_test_opt ("10", "10.3", 0, 0); + round_test_opt ("9.92844", "9.928445325", 5, 0); + round_test_opt ("303698112889", "303698112889.87", 0, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("-602", "-602.89", 0, 0); + round_test_opt ("-186404.9571", "-186404.95710", 4, 0); + round_test_opt ("4", "4.1", 0, 0); + round_test_opt ("40380", "40380.0", 0, 0); + round_test_opt ("2", "2.5", 0, 0); + round_test_opt ("-8", "-8.0683", 0, 0); + round_test_opt ("0", "0.00000011768533836", 2, 0); + round_test_opt ("-11576", "-11576.09", 0, 0); + round_test_opt ("-776", "-776.04", 0, 0); + round_test_opt ("-52520079.8", "-52520079.861", 1, 0); + round_test_opt ("913", "913.10", 0, 0); + round_test_opt ("1", "1.1", 0, 0); + round_test_opt ("1774", "1774.181", 0, 0); + round_test_opt ("31322.26", "31322.26062", 2, 0); + round_test_opt ("-29.086", "-29.086057", 3, 0); + round_test_opt ("-19.6", "-19.66", 1, 0); + round_test_opt ("-189695248", "-189695248.65", 0, 0); + round_test_opt ("11169869441", "11169869441.4", 0, 0); + round_test_opt ("71454", "71454.00777", 0, 0); + round_test_opt ("-0.00000137577", "-0.000001375778212", 11, 0); + round_test_opt ("-8", "-8.59", 0, 0); + round_test_opt ("-0.000001952", "-0.00000195225207", 9, 0); + round_test_opt ("2.9e-8", "0.00000002985427932", 9, 0); + round_test_opt ("-6", "-6.0", 0, 0); + round_test_opt ("851", "851.58", 0, 0); + round_test_opt ("4", "4.8", 0, 0); + round_test_opt ("0.000008153", "0.000008153933", 9, 0); + round_test_opt ("-5.349177", "-5.34917724", 6, 0); + round_test_opt ("-5.2", "-5.2316", 1, 0); + round_test_opt ("-377", "-377.577", 0, 0); + round_test_opt ("3834387", "3834387.2", 0, 0); + round_test_opt ("12181", "12181.725980", 0, 0); + round_test_opt ("71428.4620618", "71428.462061893", 7, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("-0.0110663", "-0.01106636", 7, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("0.0002597768", "0.00025977687636", 10, 0); + round_test_opt ("-1", "-1.9599", 0, 0); + round_test_opt ("275.5", "275.58", 1, 0); + round_test_opt ("-0.0814", "-0.081443", 4, 0); + round_test_opt ("0", "0.000008240", 3, 0); + round_test_opt ("0", "-0.60624570", 0, 0); + round_test_opt ("-0.0227783311", "-0.02277833117", 10, 0); + round_test_opt ("-541", "-541.62", 0, 0); + round_test_opt ("-14.2", "-14.209", 1, 0); + round_test_opt ("1.2e-8", "0.0000000129296", 9, 0); + round_test_opt ("-1", "-1.6", 0, 0); + round_test_opt ("3773.2", "3773.286093", 1, 0); + round_test_opt ("-2875.1", "-2875.1665111", 1, 0); + round_test_opt ("0", "0.0000000697699318009", 2, 0); + round_test_opt ("-7030.3", "-7030.36404", 1, 0); + round_test_opt ("-40373.922163", "-40373.92216305", 6, 0); + round_test_opt ("3006131", "3006131.2004", 0, 0); + round_test_opt ("2", "2.2455", 0, 0); + round_test_opt ("852718", "852718.7", 0, 0); + round_test_opt ("-1", "-1", 0, 0); + round_test_opt ("5347.08", "5347.0867716269", 2, 0); + round_test_opt ("-4192.483", "-4192.48339", 3, 0); + round_test_opt ("-378464", "-378464.2", 0, 0); + round_test_opt ("-12839.478", "-12839.4786507", 3, 0); + round_test_opt ("0.000026608", "0.0000266084208752225", 9, 0); + round_test_opt ("-6", "-6.5", 0, 0); + round_test_opt ("-4.212691", "-4.21269172515416", 6, 0); + round_test_opt ("139.9", "139.957", 1, 0); + round_test_opt ("86", "86.700", 0, 0); + round_test_opt ("-0.00011158487", "-0.000111584878251992", 11, 0); + round_test_opt ("-1247678537977", "-1247678537977.4", 0, 0); + round_test_opt ("-23354042796", "-23354042796.5", 0, 0); + round_test_opt ("2.3", "2.30288", 2, 0); + round_test_opt ("-17", "-17.0", 0, 0); + round_test_opt ("193.64", "193.6412", 2, 0); + round_test_opt ("21", "21.15", 0, 0); + round_test_opt ("-0.0000011652", "-0.000001165269571", 10, 0); + round_test_opt ("0", "-0.00000014165644812", 1, 0); + round_test_opt ("-3906082.6", "-3906082.6538", 1, 0); + round_test_opt ("3.15", "3.1573", 2, 0); + round_test_opt ("-26", "-26.680", 0, 0); + round_test_opt ("0", "0.0000058085006209", 2, 0); + round_test_opt ("498671554.99", "498671554.99400", 2, 0); + round_test_opt ("3", "3", 0, 0); + + round_test_opt ("-621.1", "-621.1936868481623240587206058101226345962123520808", 1, 0); + round_test_opt ("5.99444445523332228500677286802783348360874453460088221e+52", "59944444552333222850067728680278334836087445346008822.13109022", 1, 0); + round_test_opt ("-0.00002", "-0.0000201677676330073", 5, 0); + round_test_opt ("1.53863896315841870737458749488245817075e+31", "15386389631584187073745874948824.5817075338", 7, 0); + round_test_opt ("-56330304118.366083", "-56330304118.366083425392876", 6, 0); + round_test_opt ("-16", "-16.99", 0, 0); + round_test_opt ("4.3668867451575236553332372e+21", "4366886745157523655333.2372863483627759542882630172217538130769969793881", 4, 0); + round_test_opt ("1.097179", "1.09717917321722983004155405936241279", 6, 0); + round_test_opt ("-3.6975305330293889774343758702e+22", "-36975305330293889774343.75870221577", 6, 0); + round_test_opt ("-8.88998801310289527776424735580399220426722e+36", "-8889988013102895277764247355803992204.2672237", 5, 0); + round_test_opt ("-2196415.5156", "-2196415.515629482968611257446984981968", 4, 0); + round_test_opt ("0", "-0.00000005313286431705", 2, 0); + round_test_opt ("-0.000102", "-0.00010217822924031", 6, 0); + round_test_opt ("5.96350134614079915547738049581729484902e+28", "59635013461407991554773804958.172948490263614", 10, 0); + round_test_opt ("-16", "-16.884", 0, 0); + round_test_opt ("-76225396478720.7008524", "-76225396478720.700852473753693253737152345038330", 7, 0); + round_test_opt ("-48577704323.577", "-48577704323.57724116540031426797", 3, 0); + round_test_opt ("9172999786599669515", "9172999786599669515.1985", 0, 0); + round_test_opt ("-5.13728694936470433709839374614062215040327669043753416e+50", "-513728694936470433709839374614062215040327669043753.4169063486", 3, 0); + round_test_opt ("0.01", "0.019477672802315379261", 2, 0); + round_test_opt ("-2.8580836477802451608475674622084473734e+36", "-2858083647780245160847567462208447373.488250403720", 1, 0); + round_test_opt ("1.696764276603630426587419544285178813310996399309659791613e+49", "16967642766036304265874195442851788133109963993096.59791613055777022317054", 8, 0); + round_test_opt ("510015455512", "510015455512.773144427", 0, 0); + round_test_opt ("198799307405.41868368", "198799307405.41868368401077584830034903659", 8, 0); + round_test_opt ("-33654.17", "-33654.178044480", 2, 0); + round_test_opt ("-7", "-7.5", 0, 0); + round_test_opt ("-7.945797700578646041041642994871386743393827046e+46", "-79457977005786460410416429948713867433938270460.92", 0, 0); + round_test_opt ("-44", "-44.6", 0, 0); + round_test_opt ("6969661407", "6969661407.48424", 0, 0); + round_test_opt ("83893.2", "83893.22331277", 1, 0); + round_test_opt ("-2.630769214064197932535879788479595265695e+36", "-2630769214064197932535879788479595265.69521806007", 3, 0); + round_test_opt ("990990", "990990.4", 0, 0); + round_test_opt ("-1945631159.4810852163", "-1945631159.48108521631058458200076750951128255185238512326839986743900799", 10, 0); + round_test_opt ("24905227025676.571", "24905227025676.5716106", 3, 0); + round_test_opt ("0", "-0.000201430550343505757156880394129280666198393269302", 1, 0); + round_test_opt ("-7561348607829301891.14806377", "-7561348607829301891.1480637733147836437810415200", 8, 0); + round_test_opt ("-405812.4387", "-405812.438704644726521226898488918352166523197441655908639584529732376", 5, 0); + round_test_opt ("47.22039131203", "47.220391312031825404355122541793679345", 11, 0); + round_test_opt ("0", "0.061467931008788549313382642265045703820816822", 1, 0); + round_test_opt ("-522", "-522.27", 0, 0); + round_test_opt ("-1.0298090952446488212965020894376172016774303e+36", "-1029809095244648821296502089437617201.67743037440775706800232655651", 7, 0); + round_test_opt ("-49391771041600926.19376192011", "-49391771041600926.1937619201198", 11, 0); + round_test_opt ("6.1771381755937831918252746169e+26", "617713817559378319182527461.6946248462538585976176748811616955665", 2, 0); + round_test_opt ("4.7e-8", "0.0000000470087540427589519389570706502883047502294670400998618937817856494", 10, 0); + round_test_opt ("126217046586302550", "126217046586302550.025", 0, 0); + round_test_opt ("-4.2664699739101266426220460329e+27", "-4266469973910126642622046032.94313272856121814", 1, 0); + round_test_opt ("73319041804356.002247491", "73319041804356.00224749170535645204297035206", 9, 0); + round_test_opt ("4.55876708695751791697893686065697e+22", "45587670869575179169789.368606569711018880333705815252211", 10, 0); + round_test_opt ("0", "-0.0000001434883113009966933873395369054112062388926420862433380492288546295369348", 1, 0); + round_test_opt ("3016.8146519", "3016.8146519048", 8, 0); + round_test_opt ("0", "-0.0000014354308754362856910795566313805294620061860895512856075910468433", 4, 0); + round_test_opt ("-113074753134553.8674007293", "-113074753134553.8674007293072734726949062844916460018529095146537036", 11, 0); + round_test_opt ("-3464", "-3464.746778614274994429826235994128081767466690909212396204", 0, 0); + round_test_opt ("14917.299", "14917.29949887", 3, 0); + round_test_opt ("5.31076079084367953105700057004959675218098419542915084e+46", "53107607908436795310570005700495967521809841954.2915084902", 7, 0); + round_test_opt ("-1.040401883357966973828661248788073147986368877554342679e+44", "-104040188335796697382866124878807314798636887.7554342679937294752334", 10, 0); + round_test_opt ("3.27429527792", "3.2742952779219542", 11, 0); + round_test_opt ("-3.0401688094971536417093904855772853976e+35", "-304016880949715364170939048557728539.762216882104", 2, 0); + round_test_opt ("-5991407.328708", "-5991407.32870817577", 6, 0); + round_test_opt ("-243.4", "-243.47182", 1, 0); + round_test_opt ("2", "2.7", 0, 0); + round_test_opt ("1.287479360486616348178843963e+25", "12874793604866163481788439.6336905060374319474242776890412336399691", 2, 0); + round_test_opt ("-17211.33", "-17211.3348298348721175791398512934620533547204228871623142124252", 2, 0); + round_test_opt ("-2.750531014066285288486154362448825511195696793357440694193e+48", "-2750531014066285288486154362448825511195696793357.44069419365292729", 9, 0); + round_test_opt ("4283923754637.7694", "4283923754637.769449546039", 4, 0); + round_test_opt ("581735157.86130924", "581735157.86130924967847643084880395988936857460019579671897", 8, 0); + round_test_opt ("5.712", "5.71266", 3, 0); + round_test_opt ("220.4", "220.466163946155", 1, 0); + round_test_opt ("3432432548.35", "3432432548.359", 2, 0); + round_test_opt ("0", "-0.000080760485437144615992151070726723778256819938", 1, 0); + round_test_opt ("-21698917949276671923.1", "-21698917949276671923.10205", 1, 0); + round_test_opt ("529.04", "529.04476753422213292011208273412114659", 2, 0); + round_test_opt ("-507800676594.83", "-507800676594.83242350850813652671110610288061248835132620", 2, 0); + round_test_opt ("-4794533274621.74926", "-4794533274621.749266083338158610283566763759340664128162695", 5, 0); + round_test_opt ("-1.76397707743100284264532089027283467941689395373725e+41", "-176397707743100284264532089027283467941689.3953737252804799408650025222", 9, 0); + round_test_opt ("6.522728150963021116628893371747564560173083459950784699084470643e+57", "6522728150963021116628893371747564560173083459950784699084.470643477", 6, 0); + round_test_opt ("-35258530238599.6", "-35258530238599.629", 1, 0); + round_test_opt ("-8.732591689772504734455817160416563354576836156e+39", "-8732591689772504734455817160416563354576.83615670298067742759875349154", 6, 0); + round_test_opt ("1.9278512518337504615624783032371199006751550185707360652672364126e+53", "192785125183375046156247830323711990067515501857073606.526723641263841174", 11, 0); + round_test_opt ("4.288192032964014615755494325492124705877934669e+45", "4288192032964014615755494325492124705877934669.308919220119", 0, 0); + round_test_opt ("1081499", "1081499.340547937530711016", 0, 0); + round_test_opt ("1937456388292374.476731", "1937456388292374.476731668861915440713155190170836", 6, 0); + round_test_opt ("9.7843242779655264916144633656155391703e+31", "97843242779655264916144633656155.39170345271222446", 6, 0); + round_test_opt ("96020928829768.10663813833", "96020928829768.10663813833637107018993087", 11, 0); + round_test_opt ("-1404660430272454.995761758", "-1404660430272454.99576175888357480117217949034", 9, 0); + round_test_opt ("-0.0001819", "-0.000181998190255586118068479533019475726491058426074059095491632442624987334604", 7, 0); + round_test_opt ("-8.53692202899", "-8.53692202899553884", 11, 0); + round_test_opt ("1.8948398953903675796801968762872526848885e+33", "1894839895390367579680196876287252.6848885539934891607289174963694814850", 7, 0); + round_test_opt ("1.2942015160060948232044544828758143089710176705868728e+49", "12942015160060948232044544828758143089710176705868.7289030111", 3, 0); + round_test_opt ("-1.668355544328844957526397301607869823058e+29", "-166835554432884495752639730160.786982305820088063915283383412524254", 10, 0); + round_test_opt ("-208.641", "-208.641643023", 3, 0); + round_test_opt ("0.0044", "0.004440721763727523846427918683602094331446739592972780457001368833293", 4, 0); + round_test_opt ("1.8000294404468274394450127472021884973400130177632829445984e+57", "1800029440446827439445012747202188497340013017763282944598.42664110863075", 1, 0); + round_test_opt ("-1.663694795014649286027998916820975379128758945630263647771e+48", "-1663694795014649286027998916820975379128758945630.263647771061032926129697", 10, 0); + round_test_opt ("183982490", "183982490.7540529110", 0, 0); + round_test_opt ("4.5179e-7", "0.000000451791742650153941321563100125029348696439716", 11, 0); + round_test_opt ("3.07843381954352839904767689826e+21", "3078433819543528399047.67689826456", 8, 0); + round_test_opt ("703094413485022326.29383", "703094413485022326.29383791942669106433079", 5, 0); + round_test_opt ("-7.6441086157640615807282619077874809177472329954691e+44", "-764410861576406158072826190778748091774723299.54691778214479967820", 5, 0); + round_test_opt ("1.7969733913826182126120489369443001595436011683e+46", "17969733913826182126120489369443001595436011683.8", 0, 0); + round_test_opt ("424", "424.0625789", 0, 0); + round_test_opt ("-968899371607.5608", "-968899371607.5608700932694", 4, 0); + round_test_opt ("103", "103.3551450921833686059315778179256", 0, 0); + round_test_opt ("0", "0.000757123872112209889927518652070234813867880039983564592421157804", 0, 0); + round_test_opt ("-0.00011179065", "-0.000111790659699", 11, 0); + round_test_opt ("-2e-8", "-0.0000000204345202376402833084935395637065638724483544956497074232931", 9, 0); + round_test_opt ("-762475500540.295122171", "-762475500540.295122171843853282909431645820678185456789361877151582", 9, 0); + round_test_opt ("176156.9", "176156.985979052314472225633608623323563", 1, 0); + round_test_opt ("0", "-0.01206587298374532086925889221874090724433409239555026431545007500", 1, 0); + round_test_opt ("5.89192140089688259342559325654e+21", "5891921400896882593425.59325654785790306", 8, 0); + round_test_opt ("-0.0000885", "-0.00008851689324", 7, 0); + round_test_opt ("-3.24749690892", "-3.247496908921508566511556285", 11, 0); + round_test_opt ("18278158818.793124326", "18278158818.7931243264927799557220771159", 9, 0); + round_test_opt ("-2193356253079.5", "-2193356253079.5748407545247053489151071979465252418192690592", 1, 0); + round_test_opt ("-7.8283552610688878548333208280647880275355192458558e+42", "-7828355261068887854833320828064788027535519.24585582091559480953", 7, 0); + round_test_opt ("122466.3927", "122466.39271", 4, 0); + round_test_opt ("1.35508201785836360038092301151263116222e+28", "13550820178583636003809230115.126311622233379", 10, 0); + round_test_opt ("-3357263812997320489", "-3357263812997320489.28684299830402222687595077091942630", 0, 0); + round_test_opt ("-572629.1657", "-572629.16570004207511779521313055159794990541408988601548190310870875248", 7, 0); + round_test_opt ("-1.362956631213164447817483051461022029606957046318999058437e+49", "-13629566312131644478174830514610220296069570463189.99058437392", 8, 0); + round_test_opt ("7.8e-7", "0.0000007825493958482525", 8, 0); + round_test_opt ("-0.5093", "-0.5093044573152321275285783647460768563513835655687560", 4, 0); + round_test_opt ("1", "1.43", 0, 0); + round_test_opt ("5.58298595981175588480004210935337e+22", "55829859598117558848000.4210935337076623857438813821060915952243622275", 11, 0); + round_test_opt ("1.5233343194169311107500909380787852284746387419762508408e+49", "15233343194169311107500909380787852284746387419762.50840840791943", 6, 0); + round_test_opt ("0.000005", "0.00000554466759427564870786645690498627177", 6, 0); + round_test_opt ("1.6470459067450660089114601177e+25", "16470459067450660089114601.177933318701734936705", 3, 0); + round_test_opt ("-169454980923350", "-169454980923350.539110315560833861894", 0, 0); + round_test_opt ("1.59244019874696194359922544692e+29", "159244019874696194359922544692.812", 0, 0); + round_test_opt ("0", "-0.00000010640568829452763610800039032588474099795283885047127225343614944", 6, 0); + round_test_opt ("-3.78624438268881842269739489156e+25", "-37862443826888184226973948.915695305453903203897386", 4, 0); + round_test_opt ("2.98108476513426175971467852186325736e+31", "29810847651342617597146785218632.573695725815755547242233867", 4, 0); + round_test_opt ("-662.1368", "-662.136833141", 4, 0); + round_test_opt ("-147106526173825.2867101389", "-147106526173825.2867101389196435369588", 10, 0); + round_test_opt ("1.43670887212657952287587e+22", "14367088721265795228758.7417610610725284316560219", 1, 0); + round_test_opt ("-66088388794388381382.8622091", "-66088388794388381382.862209167639577363", 7, 0); + round_test_opt ("0", "0.00000028900352893882415015658089254626163204582366959", 4, 0); + round_test_opt ("0", "0.1110824238844369871371015629337477", 0, 0); + round_test_opt ("4.013137942240553065957183228344012e+22", "40131379422405530659571.8322834401245989022030481075279092940325725", 11, 0); + round_test_opt ("366522483730948.9", "366522483730948.9410457", 1, 0); + round_test_opt ("-635661944421848.13", "-635661944421848.13561", 2, 0); + round_test_opt ("-464032909524683312691.20464", "-464032909524683312691.20464345926823518", 5, 0); + round_test_opt ("-3295550873673941.196209475", "-3295550873673941.1962094750682620434172387221212716035", 10, 0); + round_test_opt ("29.0071041578", "29.007104157838691532857026891163787420228593629840231832633217", 10, 0); + round_test_opt ("3.552301800376926251312483579134278762257e+37", "35523018003769262513124835791342787622.570583628867", 2, 0); + round_test_opt ("1", "1", 0, 0); + round_test_opt ("883270406217971", "883270406217971.84075684", 0, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("0", "-0.0008675899217770461423354681626904394809662788110819918795335", 1, 0); + round_test_opt ("-0.0000054", "-0.00000547758490741367927", 7, 0); + round_test_opt ("36", "36.4", 0, 0); + round_test_opt ("1.8897980442175431071851730842393614876e+29", "188979804421754310718517308423.936148765853251317189398288", 8, 0); + round_test_opt ("-1.1457206581840961483702129812202931992404712420834931410821e+55", "-11457206581840961483702129812202931992404712420834931410.8214147435495006", 3, 0); + round_test_opt ("0", "-0.00003418014014354605974", 3, 0); + round_test_opt ("1.08627300720819424774100936183120861755032795354319206820304661e+62", "108627300720819424774100936183120861755032795354319206820304661.36", 0, 0); + round_test_opt ("0", "-0.0000008826780710237101534839334003491546857115558379387283809", 0, 0); + round_test_opt ("-0.2", "-0.27262066316663189844699825285243922042", 1, 0); + round_test_opt ("-1.2734605018735958248502548e+24", "-1273460501873595824850254.82835251694", 1, 0); + round_test_opt ("0", "-0.0000022988384652503747936752850467602008689327344", 3, 0); + round_test_opt ("-18174970825856477.3", "-18174970825856477.3074482547", 1, 0); + round_test_opt ("-106773.0476", "-106773.04768350721216651533847933852004806216967710847580764680", 4, 0); + round_test_opt ("2.3956115746159882129934842207e+28", "23956115746159882129934842207.30761903149070", 0, 0); + round_test_opt ("-4.34736832418163635178249231367e+26", "-434736832418163635178249231.367076", 3, 0); + round_test_opt ("1.298530424288187903018473058167860792085752926e+34", "12985304242881879030184730581678607.9208575292695376856554984070969081748740", 11, 0); + round_test_opt ("194797080090002690.16", "194797080090002690.1663486955588151687848147692", 2, 0); + round_test_opt ("1.2386167739374301743671445187e+24", "1238616773937430174367144.518753573168521505940763", 4, 0); + round_test_opt ("-2870053.8679261551", "-2870053.8679261551465", 10, 0); + round_test_opt ("-7.4390502631475374477298396352e+22", "-74390502631475374477298.396352228294450218530", 6, 0); + round_test_opt ("-17747957199001766605.78814981636", "-17747957199001766605.788149816367636967763431769786295751371696048302660487", 11, 0); + round_test_opt ("26.6", "26.6944692073126451687781431072069795350236", 1, 0); + round_test_opt ("-485184315", "-485184315.9", 0, 0); + round_test_opt ("13285719.4763047", "13285719.4763047571387992542198134986758176086864627177975740909459553087035", 7, 0); + round_test_opt ("-426391.758", "-426391.758490723147", 3, 0); + round_test_opt ("0.0496304", "0.049630418953", 7, 0); + round_test_opt ("-3.710678540703152527500023763323267641531782e+40", "-37106785407031525275000237633232676415317.820453567428079469388217239", 3, 0); + round_test_opt ("3.5", "3.522", 1, 0); + round_test_opt ("45433421369161", "45433421369161.68442099806029000587663491218502017328187645", 0, 0); + round_test_opt ("-1.3176", "-1.3176073", 4, 0); + round_test_opt ("-2.20636486597900214368358506927185625431264002582e+43", "-22063648659790021436835850692718562543126400.25825556", 4, 0); + round_test_opt ("-0.000003", "-0.000003800", 6, 0); + round_test_opt ("0.0001", "0.0001066928846067353999453896267892144860873304390869242760135881028334791948", 4, 0); + round_test_opt ("13370890.028447", "13370890.028447719443000572782", 6, 0); + round_test_opt ("-0.002854", "-0.002854132010168", 6, 0); + round_test_opt ("-1.36835068792165244964367055623463448365e+37", "-13683506879216524496436705562346344836.5644131145220898728325480014775787", 1, 0); + round_test_opt ("52.1", "52.1986", 1, 0); + round_test_opt ("-1.605044493102064468833520939e+22", "-16050444931020644688335.2093919239970792001350433875", 5, 0); + round_test_opt ("0", "-0.000004771156424010419119829988853", 4, 0); + round_test_opt ("2.0016487356511796984178e+22", "20016487356511796984178.41", 0, 0); + round_test_opt ("-0.0000425", "-0.00004255477314450976148075447051756431999655754935016368071166740", 7, 0); + round_test_opt ("8277333746516897.180275586", "8277333746516897.1802755869157162497", 9, 0); + round_test_opt ("6.292580420622652228607172707464889e+33", "6292580420622652228607172707464889.290610389971317641703738443939590", 0, 0); + round_test_opt ("-0.00011", "-0.00011429709282446853254556488946551697722931383939927196", 5, 0); + round_test_opt ("-54815865864100534450.12625", "-54815865864100534450.126251139", 5, 0); + round_test_opt ("3444555419522944481.6377", "3444555419522944481.6377911617444569", 4, 0); + round_test_opt ("7.1", "7.112", 1, 0); + round_test_opt ("3873369.8", "3873369.823", 1, 0); + round_test_opt ("-6", "-6.097", 0, 0); + round_test_opt ("881942537884746.634401391", "881942537884746.6344013913524107821463944792", 9, 0); + round_test_opt ("147.557805", "147.55780578552047", 6, 0); + round_test_opt ("1.360661218764723546101434893065580880554303196411043336251649043e+53", "136066121876472354610143489306558088055430319641104333.625164904304330113", 11, 0); + round_test_opt ("-3.6358793138178240822562643092655522410853419411397655049658727e+61", "-36358793138178240822562643092655522410853419411397655049658727.87", 0, 0); + round_test_opt ("-10", "-10.46343109269871923780122241346406655750435775895660420699159782", 0, 0); + round_test_opt ("144016588896272878.01", "144016588896272878.012441", 2, 0); + round_test_opt ("0", "0.0000143118174214791570666477821216420086504888243", 0, 0); + round_test_opt ("0", "-0.0000009216037985889175319897606512176142523507025631582568746", 1, 0); + round_test_opt ("0", "0.018924317664142942743154696151527983624985506256173575489945597606091738", 0, 0); + round_test_opt ("0", "-0.0012384681586411924085605244957560657888146052", 1, 0); + round_test_opt ("-1.9962139398189005397351423924e+26", "-199621393981890053973514239.2478", 2, 0); + round_test_opt ("7.3240325390574920949672025280204581901311477e+35", "732403253905749209496720252802045819.01311477077027051341952754041218130", 9, 0); + round_test_opt ("7.20797888759725269110448401449311327403641414603871118e+52", "72079788875972526911044840144931132740364141460387111.8170046188657523694591", 1, 0); + round_test_opt ("-2.6775381974268043087248686e+23", "-267753819742680430872486.8666830274904078860682529", 2, 0); + round_test_opt ("23.86", "23.8671781391501056278971378348123790521971996328", 2, 0); + round_test_opt ("-1.695e-8", "-0.000000016952525349", 11, 0); + round_test_opt ("-997032368255340.85", "-997032368255340.858167", 2, 0); + round_test_opt ("3102", "3102.3282323930789400085493726946893130103734000514579676340627508447765", 0, 0); + round_test_opt ("0.0000028", "0.0000028580305", 7, 0); + round_test_opt ("134635038", "134635038.97", 0, 0); + round_test_opt ("-0.2613769", "-0.261376900396132412934758268522146171186416181286722535792306023", 9, 0); + round_test_opt ("47830201688.0174895004", "47830201688.017489500417749306790656314394", 10, 0); + round_test_opt ("-4.760416615168524995210630297610798168548714366209e+42", "-4760416615168524995210630297610798168548714.36620985351198725168", 6, 0); + round_test_opt ("2396712571453.0062", "2396712571453.0062223914270561212745595222436061190181782432322653", 4, 0); + round_test_opt ("5666074752714.376444147", "5666074752714.376444147382948323436605741840112535", 9, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("-35487092590.323484129", "-35487092590.3234841293", 9, 0); + round_test_opt ("0.0000031", "0.000003186073204002183", 7, 0); + round_test_opt ("0.0002074", "0.000207466964950951844860515", 7, 0); + round_test_opt ("1.2831881222343647528658123606e+28", "12831881222343647528658123606.12805", 0, 0); + round_test_opt ("-0.4471", "-0.4471004715357804871305109", 6, 0); + round_test_opt ("-3.8746041804740719834063e+22", "-38746041804740719834063.147219", 0, 0); + round_test_opt ("-1.4586261266351697829931608642354799913292571e+40", "-14586261266351697829931608642354799913292.571114826", 3, 0); + round_test_opt ("2135.734", "2135.734038487", 4, 0); + round_test_opt ("0", "0.00000023401336870829522118094403373873354815641796082508693909184856655856028239", 6, 0); + round_test_opt ("-0.0000097337", "-0.0000097337033573100298", 10, 0); + round_test_opt ("0.00121979045", "0.001219790452873015772530825230", 11, 0); + round_test_opt ("-10683389", "-10683389.7", 0, 0); + round_test_opt ("-5.406675323117739022228e+21", "-5406675323117739022228.07", 0, 0); + round_test_opt ("-0.47675", "-0.47675244022186747923865985435466799925694588482853", 5, 0); + round_test_opt ("91441691420756116902.80665861001", "91441691420756116902.80665861001006726847189277342411748556292657", 11, 0); + round_test_opt ("4", "4.831740829717073261450711096113951605848900293077879898738234061695193", 0, 0); + round_test_opt ("-6.42165157475544721109839882297580925202244142594608091715e+51", "-6421651574755447211098398822975809252022441425946080.917155958106", 5, 0); + round_test_opt ("1846729365800666.1292", "1846729365800666.129290307", 4, 0); + round_test_opt ("-1.0061956108903602810047893740230186911756e+29", "-100619561089036028100478937402.301869117569540574858039", 11, 0); + round_test_opt ("0", "-0.000000084828275333301566425543267138805818239983425418247985348526171519070087130", 6, 0); + round_test_opt ("1.489088332992948496349659568953171722884872e+35", "148908833299294849634965956895317172.288487208712031099079746443843", 8, 0); + round_test_opt ("-0.0000047", "-0.000004799032886229965156863176212727828859057881174", 7, 0); + round_test_opt ("3.1038605680375917071523388e+21", "3103860568037591707152.338825842176399498685", 4, 0); + round_test_opt ("-8.36936794331128299654061446036342538681e+38", "-836936794331128299654061446036342538681.10", 0, 0); + round_test_opt ("4.93413565873232980894673e+22", "49341356587323298089467.3787070845", 1, 0); + round_test_opt ("60808.24038482914", "60808.24038482914787367162935430003621673616014962009861716892370781210986", 11, 0); + round_test_opt ("0", "0.0000001389251986236583290110743215307476", 0, 0); + round_test_opt ("0", "-0.0000000720119054163336208", 6, 0); + round_test_opt ("3096.35", "3096.359", 2, 0); + round_test_opt ("0", "0.000000214687199805660791987938147817896390564632616832441", 5, 0); + round_test_opt ("5", "5", 0, 0); + round_test_opt ("5.81009876511765640002990483832063765610025426e+40", "58100987651176564000299048383206376561002.5426972547431455320826100073399562", 4, 0); + round_test_opt ("-3566258", "-3566258.71789", 0, 0); + round_test_opt ("-7.1121392852483844051240080203543974369013e+39", "-7112139285248384405124008020354397436901.35977852", 1, 0); + round_test_opt ("-3.1030322445411722033618923e+25", "-31030322445411722033618923.87", 0, 0); + round_test_opt ("1338.18384986", "1338.183849861656266320788438522111848084507432240033258605411", 8, 0); + round_test_opt ("-0.00835822", "-0.0083582266064483839752", 8, 0); + round_test_opt ("-13242677.11038703", "-13242677.1103870313740058387180784633685610074407936315123006", 8, 0); + round_test_opt ("-0.914372", "-0.9143725218462452966687", 6, 0); + round_test_opt ("-93446160531244.77086866616", "-93446160531244.770868666163444621106575819324", 11, 0); + round_test_opt ("0", "-0.0490", 1, 0); + round_test_opt ("0.00039684", "0.0003968403544217719999216", 8, 0); + round_test_opt ("-0.00004", "-0.000042471316853291209476781179454367913", 5, 0); + round_test_opt ("0", "-0.08169118731568279980175561480562036791914279342220440953803", 0, 0); + round_test_opt ("-8.743188556735564953976507080360176205277e+34", "-87431885567355649539765070803601762.052774577", 5, 0); + round_test_opt ("-0.0002", "-0.00026048898753846715072949338593135164864804725739105356", 4, 0); + round_test_opt ("30.1", "30.1070", 2, 0); + round_test_opt ("-372443500", "-372443500.87", 0, 0); + round_test_opt ("-1.16353257607190506884948452531e+21", "-1163532576071905068849.4845253194161005921931519251443597", 8, 0); + round_test_opt ("1.167892482779209659681424e+24", "1167892482779209659681424.146", 0, 0); + round_test_opt ("17270175", "17270175.7281", 0, 0); + round_test_opt ("619625.7286", "619625.7286058432355202393008523", 5, 0); + round_test_opt ("-83.0869176", "-83.08691763", 7, 0); + round_test_opt ("-4118", "-4118.8", 0, 0); + round_test_opt ("2440050845384.87357791", "2440050845384.8735779158293538846996892279411728111590045386688649294634175", 8, 0); + round_test_opt ("-59098969147090265", "-59098969147090265.2155", 0, 0); + round_test_opt ("0", "0.000019445968509762027587853915750836776260487420534707223798804570502095905827", 4, 0); + round_test_opt ("7.508470444531795608012761679545077964561514273903291455183e+57", "7508470444531795608012761679545077964561514273903291455183.28", 0, 0); + round_test_opt ("1.21480991630151311662879932683552403e+28", "12148099163015131166287993268.355240389974552485540959", 7, 0); + round_test_opt ("0", "0.00974491088762115527935828096020382412594603931084053594935957087773954221", 2, 0); + round_test_opt ("0.857953", "0.8579539758668673057170095849043785347365712", 6, 0); + round_test_opt ("-2.60369231014935603404789157368928779112e+37", "-26036923101493560340478915736892877911.2153548", 1, 0); + round_test_opt ("-149182643775156.5784113923", "-149182643775156.57841139234626989630252539230050001889364941702", 10, 0); + round_test_opt ("-61908.2832", "-61908.283290208", 4, 0); + round_test_opt ("0", "-0.0000000174116332658497", 4, 0); + round_test_opt ("-0.00010289348", "-0.0001028934818977297155342229240900125914965", 11, 0); + round_test_opt ("0.0127546", "0.01275465715370721130299340566504165922633043642993809232890289101897125023", 7, 0); + round_test_opt ("0", "0.00003625", 1, 0); + round_test_opt ("-1430892736.68453081757", "-1430892736.6845308175727428982", 11, 0); + round_test_opt ("141190906659881641.38794", "141190906659881641.387941864319419844935479637500611246061779392682027", 5, 0); + round_test_opt ("-1321676844103668.3112788284", "-1321676844103668.3112788284667476612533101226174", 10, 0); + round_test_opt ("9675620", "9675620.3", 0, 0); + round_test_opt ("-0.005367", "-0.0053679901474997", 6, 0); + round_test_opt ("2", "2.6", 0, 0); + round_test_opt ("0", "-0.00809", 2, 0); + round_test_opt ("0", "0.000005968754734081530078567711869927223359925853632268952475278181833791005", 3, 0); + round_test_opt ("-17031766.68299", "-17031766.682999904740138346", 5, 0); + round_test_opt ("-4140921928.6208084928", "-4140921928.62080849280290109410537423622502801699165114622706", 10, 0); + round_test_opt ("2556570187717.276", "2556570187717.27668266925882609", 3, 0); + round_test_opt ("7.42264163005814411652305998493937e+23", "742264163005814411652305.99849393765", 9, 0); + round_test_opt ("0.00020231965", "0.00020231965294979204736358744034769355714940580140209380823393112", 11, 0); + round_test_opt ("-1.0677137535421841434976925678125003299e+36", "-1067713753542184143497692567812500329.9377258", 1, 0); + round_test_opt ("-13.00220354", "-13.00220354894936829693751908776940012275270320437", 8, 0); + round_test_opt ("0", "-0.02482741101921428855995376839268938064810209683400948022", 0, 0); + round_test_opt ("0", "0.0064933231650473424923752474715793843629291714768170299403", 1, 0); + round_test_opt ("1e-8", "0.00000001776216224201190413578979105910", 8, 0); + round_test_opt ("-3.163144769362405522940054788790777097100684578844072467410986510768307e+69", "-3163144769362405522940054788790777097100684578844072467410986510768307.855", 0, 0); + round_test_opt ("-1.224647928181561457020277159914e+30", "-1224647928181561457020277159914.882", 0, 0); + round_test_opt ("-1444921.9885", "-1444921.988545053874186127598252743189634713992842106795644310074704927781", 4, 0); + round_test_opt ("0.000002954", "0.00000295466629149644888035604565294", 9, 0); + round_test_opt ("7177.6", "7177.63937736", 1, 0); + round_test_opt ("0.010499", "0.0104991705576431924165420325976930820", 6, 0); + round_test_opt ("4324993562.2", "4324993562.29980986154939338565764", 1, 0); + round_test_opt ("38205143834359582694.76", "38205143834359582694.7644", 2, 0); + round_test_opt ("-0.00000609", "-0.000006095848225286539665414", 8, 0); + round_test_opt ("38385446899272.37", "38385446899272.370635491019661673655363639327097785502776771839", 3, 0); + round_test_opt ("13482367.671", "13482367.6712355812690101759607172942952207375677", 3, 0); + round_test_opt ("-93206560", "-93206560.922", 0, 0); + round_test_opt ("0", "-0.0000001764791019977084216549880884390737540307620", 5, 0); + round_test_opt ("-0.60448", "-0.6044825535", 5, 0); + round_test_opt ("-197246", "-197246.8", 0, 0); + round_test_opt ("-672924716467362234208", "-672924716467362234208.06373", 0, 0); + round_test_opt ("0", "0.82971389037810240798314377212101170870", 0, 0); + round_test_opt ("4.304128887470973117692846397983402e+33", "4304128887470973117692846397983402.091290106184824850752099673554922458", 1, 0); + round_test_opt ("250.7773", "250.77734824513275397094632260910820641", 4, 0); + round_test_opt ("-0.05", "-0.0536185198999776174717811772609795004", 2, 0); + round_test_opt ("-96.027", "-96.0277791695733479800169548987224782155523920791589487094223720228946", 3, 0); + round_test_opt ("-64883262956.4979330025", "-64883262956.4979330025696591829267906657318134", 10, 0); + round_test_opt ("1747629841057963", "1747629841057963.304628381402528543417389640791687081229802", 0, 0); + round_test_opt ("2.4243800119692796428032600479001157e+29", "242438001196927964280326004790.011572665426689176701270789827300846745", 5, 0); + round_test_opt ("-31303936.05", "-31303936.053051252", 2, 0); + round_test_opt ("425880.5627034044", "425880.562703404445931160478127510385977001", 10, 0); + round_test_opt ("-1", "-1.5106", 0, 0); + round_test_opt ("5950725620727.6", "5950725620727.621734376461617", 1, 0); + round_test_opt ("4.708543191176142909137246901540413194933e+29", "470854319117614290913724690154.04131949333", 10, 0); + round_test_opt ("223305405251.29687", "223305405251.296873588577424550942551362859460695495773270406806", 5, 0); + round_test_opt ("765003784909712666.2055905668", "765003784909712666.205590566874870047", 10, 0); + round_test_opt ("0", "0.00014324223647476234425594472169889008092", 0, 0); + round_test_opt ("0.752267306", "0.7522673060296722267", 10, 0); + round_test_opt ("-285413834777400834460.5317657534", "-285413834777400834460.531765753405012", 11, 0); + round_test_opt ("-0.00012694251", "-0.0001269425181372227857995226818562132019338832175049504302", 11, 0); + round_test_opt ("-6", "-6", 1, 0); + round_test_opt ("-4.427734311", "-4.427734311522", 9, 0); + round_test_opt ("-3.36034171879742754409086862346619250463963149e+34", "-33603417187974275440908686234661925.04639631492225906731529462533363", 10, 0); + round_test_opt ("-339.6", "-339.6490", 1, 0); + round_test_opt ("-15162965", "-15162965.5753622884962", 0, 0); + round_test_opt ("2980", "2980.7", 0, 0); + round_test_opt ("-8", "-8.6", 0, 0); + round_test_opt ("-7.2930743714224300387618190169600765421717451222413e+38", "-729307437142243003876181901696007654217.174512224134736361", 11, 0); + round_test_opt ("0", "0.0000573223449789679316774692546803782743781481278821106295395857414498799931887", 0, 0); + round_test_opt ("0.3866077149", "0.3866077149633565382069316773051635298849181318362", 10, 0); + round_test_opt ("15.57", "15.577", 2, 0); + round_test_opt ("0", "-0.000012273012586376759227038973184", 1, 0); + round_test_opt ("-0.000004867", "-0.000004867492749464", 9, 0); + round_test_opt ("0.0001", "0.0001095307659063969625208", 4, 0); + round_test_opt ("0", "-0.000005427710610340713573075723399512800", 1, 0); + round_test_opt ("1.6373871008860865592799865380097002606e+31", "16373871008860865592799865380097.0026062889343715930001633912740543", 6, 0); + round_test_opt ("22.022", "22.0227038563434378290975354399306066851", 3, 0); + round_test_opt ("1", "1.0481032788093", 0, 0); + round_test_opt ("4.2", "4.278", 1, 0); + round_test_opt ("-4.03775717455877344134046611079003671293849273e+44", "-403775717455877344134046611079003671293849273.28", 0, 0); + round_test_opt ("7.1242645028305587840846248e+25", "71242645028305587840846248.23205", 0, 0); + round_test_opt ("-3.5730547399540425456965478979002981382305e+33", "-3573054739954042545696547897900298.1382305656635943914086370993", 7, 0); + round_test_opt ("-675099994", "-675099994.9", 0, 0); + round_test_opt ("25314724232", "25314724232.072", 1, 0); + round_test_opt ("5.53721917393132515454468195563178759165638198802122e+42", "5537219173931325154544681955631787591656381.98802122370577567969250", 8, 0); + round_test_opt ("3026055655279.233561193", "3026055655279.23356119337088454", 9, 0); + round_test_opt ("-1.422806960639524126623200027372808449126974075e+36", "-1422806960639524126623200027372808449.126974075182510319839324167", 9, 0); + round_test_opt ("0", "0.000000356401788904508358896228311234", 4, 0); + round_test_opt ("-2e-8", "-0.00000002707733961926713177822772332770373164449982159883694286921", 8, 0); + round_test_opt ("9724879823855729.4983898", "9724879823855729.498389866598442", 7, 0); + round_test_opt ("-1", "-1.4", 0, 0); + round_test_opt ("-6.318922438489962225585117207108373356301446444810967526467020299e+56", "-631892243848996222558511720710837335630144644481096752646.7020299443361", 7, 0); + round_test_opt ("-425.4", "-425.4618361", 1, 0); + round_test_opt ("22832971148.2078787405", "22832971148.20787874057427810133", 10, 0); + round_test_opt ("-2192638256", "-2192638256.633", 0, 0); + round_test_opt ("-8.0993880635959158901012908005279193926658344e+34", "-80993880635959158901012908005279193.92665834432831345298052522568773", 9, 0); + round_test_opt ("-14265996585.2129870452", "-14265996585.2129870452159", 10, 0); + round_test_opt ("1.38098692327849284088017053e+25", "13809869232784928408801705.3811102252370773378748441221155215502776022", 1, 0); + round_test_opt ("0", "-0.000032193514758463", 1, 0); + round_test_opt ("-3.30946096675482763608388616051e+25", "-33094609667548276360838861.60518084103074444080165", 4, 0); + round_test_opt ("-2521813153.99", "-2521813153.991359183227269831960", 2, 0); + round_test_opt ("164.64781304", "164.647813049903845572882310160222156484", 8, 0); + round_test_opt ("95277306006990726587.25549888", "95277306006990726587.2554988863807673374634102640547614361", 8, 0); + round_test_opt ("56686708331658418.197", "56686708331658418.1974342002", 3, 0); + round_test_opt ("3.139173808678031493712273995822215318e+36", "3139173808678031493712273995822215318.34714872221556703629", 0, 0); + round_test_opt ("1.3165829356447483373211291824898e+31", "13165829356447483373211291824898.29840376", 0, 0); + round_test_opt ("-178169181739645704657.2981", "-178169181739645704657.2981721112", 4, 0); + round_test_opt ("3.68467509698", "3.68467509698957075012252592640", 11, 0); + round_test_opt ("1.73634822392412550118984628e+22", "17363482239241255011898.46284629519281", 4, 0); + round_test_opt ("4.79348637332402354824716927912589733e+35", "479348637332402354824716927912589733.40", 0, 0); + round_test_opt ("-1.594501087683540921323214e+21", "-1594501087683540921323.2145959715538866096", 3, 0); + round_test_opt ("-2", "-2", 0, 0); + round_test_opt ("1.1646141036182830696548831860019e+32", "116461410361828306965488318600190.6472", 0, 0); + round_test_opt ("16", "16.5", 0, 0); + round_test_opt ("38.261568894", "38.2615688947", 9, 0); + round_test_opt ("42.78", "42.7878", 2, 0); + round_test_opt ("789388090.774", "789388090.774740", 3, 0); + round_test_opt ("-0.000324", "-0.000324007355296354614909840185671486572099947", 8, 0); + round_test_opt ("-8.12458027014004111989605212e+22", "-81245802701400411198960.5212906126162992810148378568930", 4, 0); + round_test_opt ("6467469.33689672", "6467469.3368967277447259584009887667747", 8, 0); + round_test_opt ("-2.57039830497867645337981665434153180496689591554966170009477e+59", "-257039830497867645337981665434153180496689591554966170009477.61", 0, 0); + round_test_opt ("0.000068", "0.0000686901196897790630511468496", 6, 0); + round_test_opt ("2.55579935343945983659998822935592e+32", "255579935343945983659998822935592.224761466867002", 0, 0); + round_test_opt ("32141818.956097", "32141818.9560975847810962464", 6, 0); + round_test_opt ("2.3550386349516411676438367220376144532738606135e+41", "235503863495164116764383672203761445327386.061356509869489775298", 5, 0); + round_test_opt ("-0.00000213", "-0.000002130361279925841154", 8, 0); + round_test_opt ("-26796403902", "-26796403902.2", 0, 0); + round_test_opt ("-2.0079835705261416530976415724605412e+34", "-20079835705261416530976415724605412.128676322226980848217", 0, 0); + round_test_opt ("-91120857.8", "-91120857.819108392986534932140992385972178000812644252717554465", 1, 0); + round_test_opt ("-189.7288", "-189.7288810", 4, 0); + round_test_opt ("57680.7", "57680.70640919937521727437569913061826823192692703812275057477981518007048", 1, 0); + round_test_opt ("642368771596624.4", "642368771596624.4983226583191", 1, 0); + round_test_opt ("0", "0.000000121771821345422866035718300131045", 2, 0); + round_test_opt ("4634752.2332487", "4634752.2332487271", 7, 0); + round_test_opt ("0.2", "0.207", 1, 0); + round_test_opt ("-18146399958.2514570173", "-18146399958.25145701730", 10, 0); + round_test_opt ("235120212008292695825.21236190975", "235120212008292695825.21236190975527368992393365283125", 11, 0); + round_test_opt ("-308885207994835711.15688", "-308885207994835711.15688372563620895934805060382171", 5, 0); + round_test_opt ("8.08217669", "8.082176698927877602", 8, 0); + round_test_opt ("2.0878318078463408754784e+22", "20878318078463408754784.80", 0, 0); + round_test_opt ("-8.454043592532232948387671e+23", "-845404359253223294838767.1667233258327", 1, 0); + round_test_opt ("470.21344167639", "470.21344167639152046362676178721363979220169", 11, 0); + round_test_opt ("1.222155957406616073863236148184972375584078899667067e+48", "1222155957406616073863236148184972375584078899667.06737125481831992608593564", 3, 0); + round_test_opt ("159008.92793825", "159008.927938257709702318264376740863200907973313239382125026576056926203155", 8, 0); + round_test_opt ("2.134538351051546861879077801892214625626e+31", "21345383510515468618790778018922.14625626508385894959552", 8, 0); + round_test_opt ("-1.3020155476456994061444877669129783924443962248004e+45", "-1302015547645699406144487766912978392444396224.80043767414078272816856", 4, 0); + round_test_opt ("0", "-0.0003213146822330987763249634874812550662835002430704733228221708553265345", 0, 0); + round_test_opt ("9.56965172370903663965140024e+23", "956965172370903663965140.024733", 3, 0); + round_test_opt ("-119776164113297999828.12037", "-119776164113297999828.120378815462266668039085", 5, 0); + round_test_opt ("81477213332813026419.69", "81477213332813026419.6929254248665086511783416084310934507749445", 2, 0); + round_test_opt ("-0.0001754", "-0.00017544909121", 7, 0); + round_test_opt ("0", "-0.147278935", 0, 0); + round_test_opt ("0", "-0.002587107072212092757522490723865014169", 2, 0); + round_test_opt ("4.75544482100415445857730098512900600299e+28", "47554448210041544585773009851.29006002996563821365", 10, 0); + round_test_opt ("2.13190179605758224032247e+22", "21319017960575822403224.776941156563", 1, 0); + round_test_opt ("14754293664011304687.79100555657", "14754293664011304687.791005556571983352775", 11, 0); + round_test_opt ("1.06750973", "1.0675097375408131630668957917532058125642", 8, 0); + round_test_opt ("-3.29305579823417900484505609758207907116127727259187e+49", "-32930557982341790048450560975820790711612772725918.7734380926", 1, 0); + round_test_opt ("4.7e-7", "0.00000047971613168064240150373114358298786372634554407675238830009663", 8, 0); + round_test_opt ("4.7030077272797028131891309847834272e+35", "470300772727970281318913098478342720.8", 0, 0); + round_test_opt ("0.0002", "0.00020662410032804269392", 5, 0); + round_test_opt ("0.269292", "0.269292051055601846868876264", 6, 0); + round_test_opt ("-107946415385049.73", "-107946415385049.733453008437", 2, 0); + round_test_opt ("-1382049868.46911", "-1382049868.469119279", 5, 0); + round_test_opt ("-1", "-1.973", 0, 0); + round_test_opt ("-2.5957603675339547496002591738104489e+23", "-259576036753395474960025.9173810448962540877985761415345354692751", 11, 0); + round_test_opt ("9330365751491.494", "9330365751491.49482057598423593579489712590731280183168698642616296781297", 3, 0); + round_test_opt ("0.02863808", "0.0286380899665338458758024915280692", 8, 0); + round_test_opt ("7.905276448752364004467172072061757677124158539175227343e+47", "790527644875236400446717207206175767712415853917.522734347021947", 7, 0); + round_test_opt ("23345208538964009.8164", "23345208538964009.8164741757835608091916531484683390250100691034", 4, 0); + round_test_opt ("1.67148414", "1.671484145469631601134082", 8, 0); + round_test_opt ("0.002", "0.0028071057930094233241781856794321", 3, 0); + round_test_opt ("1.6045358314382307282565639593417789386631636e+41", "160453583143823072825656395934177893866316.362690701", 2, 0); + round_test_opt ("-2.08259336939225693051187e+21", "-2082593369392256930511.877136676416381190490519055609611156", 2, 0); + round_test_opt ("-118814528031522.19", "-118814528031522.19972035", 2, 0); + round_test_opt ("-1.958838207297959207945e+21", "-1958838207297959207945.2971324200818441085014981639092972833865964", 0, 0); + round_test_opt ("6.6e-8", "0.0000000662119135906632810568699987539844784853859058864531066", 9, 0); + round_test_opt ("-167", "-167.10", 0, 0); + round_test_opt ("1692043349420108106", "1692043349420108106.8", 0, 0); + round_test_opt ("2e-8", "0.000000020935513997167797193397973766229736564337726316507136243641941728", 8, 0); + round_test_opt ("-9618.87779576", "-9618.87779576516105933645321300734758676986688279252970", 8, 0); + round_test_opt ("-0.00007", "-0.0000708221427644344613420998310417208104130537220113336", 5, 0); + round_test_opt ("-741715495132", "-741715495132.7", 0, 0); + round_test_opt ("1.514423260904431150132567816897936418291851773831931528e+54", "1514423260904431150132567816897936418291851773831931528.3285", 0, 0); + round_test_opt ("0.000021832", "0.00002183292363281114", 9, 0); + round_test_opt ("-0.00001155", "-0.0000115511670164513443948325262", 8, 0); + round_test_opt ("-0.0891495", "-0.089149518216074815", 7, 0); + round_test_opt ("-1648809.92809113", "-1648809.9280911309325743966557559984671", 8, 0); + round_test_opt ("2.05081776533150043381770869554555215651958838030866046832872e+59", "205081776533150043381770869554555215651958838030866046832872.21", 0, 0); + round_test_opt ("0", "-0.00000034113025971634708599834754698657881048609671151399", 3, 0); + round_test_opt ("1348", "1348.8", 0, 0); + round_test_opt ("3", "3.2361188790344478956136516016241", 0, 0); + round_test_opt ("100345392482113", "100345392482113.1388951481855717039174819045", 0, 0); + round_test_opt ("1.2414009598547683002702425150518879e+32", "124140095985476830027024251505188.7904955077716802810163625", 2, 0); + round_test_opt ("1.0145167015814693126827433e+21", "1014516701581469312682.74331704144237403051304691", 4, 0); + round_test_opt ("14732742920.26", "14732742920.2685559974631997792773", 2, 0); + round_test_opt ("-0.0000024396", "-0.00000243967419912877390787054052365115", 10, 0); + round_test_opt ("-4.0652508739514080019583290078439950962271332e+32", "-406525087395140800195832900784399.5096227133214862156130351490", 11, 0); + round_test_opt ("-1723979796", "-1723979796.36", 0, 0); + round_test_opt ("5525", "5525.92", 0, 0); + round_test_opt ("-3945747002551399578.343468", "-3945747002551399578.3434682661524331142116054134897040821632176778072415187", 6, 0); + round_test_opt ("-2.7780232151171394619321317048575868086206929374e+47", "-277802321511713946193213170485758680862069293740.394536021", 0, 0); + round_test_opt ("20009625230484826.12356005", "20009625230484826.1235600500135", 8, 0); + round_test_opt ("44880369477378.33", "44880369477378.33683988", 2, 0); + round_test_opt ("-0.00002", "-0.00002070867117576", 5, 0); + round_test_opt ("1603.77149385202", "1603.771493852020103076100922878498629488434386573975", 11, 0); + round_test_opt ("0", "0.0017748129281851314125454440286334982408504523961975049886257367986777", 1, 0); + round_test_opt ("-1550422", "-1550422.358", 0, 0); + round_test_opt ("-4.5e-7", "-0.00000045650272822792696660021783625691968009108554171438878088264841794276932", 8, 0); + round_test_opt ("4.1", "4.183503660", 1, 0); + round_test_opt ("0.02108569", "0.021085698865677366047750841398199696262143401265150640671649097736218283", 8, 0); + round_test_opt ("-3515707", "-3515707.1", 0, 0); + round_test_opt ("-1199369298.5", "-1199369298.53062585030", 1, 0); + round_test_opt ("184.31314", "184.31314737703995157395494440087062581441249", 5, 0); + round_test_opt ("-1", "-1.9", 0, 0); + round_test_opt ("-1.97e-7", "-0.00000019731724344543479845753700126009098771380157471239", 9, 0); + round_test_opt ("0.13", "0.1330", 2, 0); + round_test_opt ("0", "-0.170797860790707644741173067420215649184403", 0, 0); + round_test_opt ("-1.058791456939305607808666099444175650225669395607895889843e+48", "-1058791456939305607808666099444175650225669395607.8958898438980228534", 9, 0); + round_test_opt ("1.81471749893173114051685035838817192816002517e+44", "181471749893173114051685035838817192816002517.093", 0, 0); + round_test_opt ("3", "3", 0, 0); + round_test_opt ("-8210356329.8350248", "-8210356329.83502480092019", 7, 0); + round_test_opt ("970309054384.7", "970309054384.7077624529925550266852265867852219138787709262", 2, 0); + round_test_opt ("0", "0.001256084817082448822869563644416034044969297869311795367679024", 2, 0); + round_test_opt ("-73253339269.00317", "-73253339269.003177874104876286563406", 5, 0); + round_test_opt ("-0.0001095774", "-0.0001095774586911457858120030993374571566809707128377023326606794", 10, 0); + round_test_opt ("-4.06114936290035281747321715977579517e+30", "-4061149362900352817473217159775.79517553170363759", 5, 0); + round_test_opt ("-177.759", "-177.7597", 3, 0); + round_test_opt ("-9689136821930366.362039", "-9689136821930366.3620393296962009031", 6, 0); + round_test_opt ("0", "-0.00000026610962684697676312450579756507", 1, 0); + round_test_opt ("4.173e-7", "0.0000004173202906218834631", 10, 0); + round_test_opt ("645158009697.975", "645158009697.9756067861", 3, 0); + round_test_opt ("3.9930686135370805999397805041e+29", "399306861353708059993978050410.3192", 0, 0); + round_test_opt ("-4.50555959338720252810716307358365213830134e+41", "-450555959338720252810716307358365213830134.6935", 0, 0); + round_test_opt ("5.8362109268073045818954628434687849525599077754e+45", "5836210926807304581895462843468784952559907775.409", 1, 0); + round_test_opt ("-0.0162077", "-0.01620770", 7, 0); + round_test_opt ("-22.43", "-22.437", 2, 0); + round_test_opt ("1829830.38527", "1829830.3852727457818890034794051195", 5, 0); + round_test_opt ("-4042", "-4042.3", 0, 0); + round_test_opt ("-1.543e-7", "-0.000000154314412587363247204811405157772723", 10, 0); + round_test_opt ("-108219527.2", "-108219527.2753825142493880175762918722366497565062990963579193260442", 1, 0); + round_test_opt ("-6693837", "-6693837.34", 0, 0); + round_test_opt ("181889127.62828662692", "181889127.628286626927713395304", 11, 0); + round_test_opt ("143519501512857845", "143519501512857845.52745932333494473744528867459573671281622423730632325", 0, 0); + round_test_opt ("-2.97840471795764585085100568390504009e+28", "-29784047179576458508510056839.05040099963416337672436", 7, 0); + round_test_opt ("0.0004729", "0.0004729742140402031262663950013870098613", 7, 0); + round_test_opt ("6.027491580728751445977097297364913829146e+31", "60274915807287514459770972973649.138291469484", 8, 0); + round_test_opt ("-2974205108472984.0187894994", "-2974205108472984.0187894994152562247", 10, 0); + round_test_opt ("0", "0.00000003009610991086645054308592280317853547678789030319098478950", 4, 0); + round_test_opt ("4.03012103930395941348059491e+26", "403012103930395941348059491.9180", 0, 0); + round_test_opt ("-0.1393983138", "-0.13939831384897888129257340318652092887944119864399281284907491225104465342", 10, 0); + round_test_opt ("1011149900.5282", "1011149900.5282077336421015157519567471045463775066283923", 5, 0); + round_test_opt ("8757", "8757.3748738406897702852206883331108562", 0, 0); + round_test_opt ("0", "-0.00000003416534537494286", 5, 0); + round_test_opt ("10602062556447038.062767923", "10602062556447038.0627679235875283817418323", 9, 0); + round_test_opt ("-257086.4", "-257086.4828724867962888260166020699520935110804", 1, 0); + round_test_opt ("572159505468186.77378", "572159505468186.7737880713875315207454289441416743", 5, 0); + round_test_opt ("7530.1229589115", "7530.1229589115753760123793226226265", 10, 0); + round_test_opt ("-8872964877907125.83663224", "-8872964877907125.836632242339819051886008", 8, 0); + round_test_opt ("2.135649501653429583982578779007e+23", "213564950165342958398257.877900795456", 7, 0); + round_test_opt ("104474530", "104474530.59968725243197049730531512711173143221249334644382", 0, 0); + round_test_opt ("5602949", "5602949.19574", 0, 0); + round_test_opt ("-4.7019643514874636942057482628125287e+33", "-4701964351487463694205748262812528.779706941940756897", 1, 0); + round_test_opt ("-1.496261933510554322547529229678085544700407e+34", "-14962619335105543225475292296780855.4470040706000838466800380657384201941388", 8, 0); + round_test_opt ("-3341205218116868.231958233", "-3341205218116868.23195823366593974408576984756959338338", 9, 0); + round_test_opt ("-9.5528", "-9.55286496837663", 4, 0); + round_test_opt ("-171362.48", "-171362.48491", 2, 0); + round_test_opt ("230352589.6893", "230352589.689308254079219490583", 4, 0); + round_test_opt ("2.967567462870573188997043463715161944631486206865763e+47", "296756746287057318899704346371516194463148620686.5763165070566684812", 4, 0); + round_test_opt ("-81.9731037493", "-81.97310374930414353", 11, 0); + round_test_opt ("0", "-0.000001364895713381179229228129", 4, 0); + round_test_opt ("-0.0064456035", "-0.006445603540385205399", 10, 0); + round_test_opt ("0.5357", "0.53570153071612836", 5, 0); + round_test_opt ("-0.000073283", "-0.000073283335116091089788268013822581929607077220801606989298113096", 9, 0); + round_test_opt ("0", "0.00115208912639663390043073006446847154309286519", 2, 0); + round_test_opt ("-53231893.3", "-53231893.3768667511787779872401690753646608375", 1, 0); + round_test_opt ("55.53", "55.53793629", 2, 0); + round_test_opt ("6326591924581951.226410656", "6326591924581951.2264106560290992", 10, 0); + round_test_opt ("493707390.18", "493707390.18624460056971050831646", 2, 0); + round_test_opt ("-13827742.1165809042", "-13827742.116580904208679321874576115091", 11, 0); + round_test_opt ("314697175.2272149", "314697175.22721493131154", 7, 0); + round_test_opt ("1.05892136737591133155235384190575784e+31", "10589213673759113315523538419057.57849396617692150181", 4, 0); + round_test_opt ("0.15956", "0.159565725056306032039912920289953", 5, 0); + round_test_opt ("-3.488895423328733482554502771e+22", "-34888954233287334825545.027710099059496511784329", 6, 0); + round_test_opt ("-1.609819", "-1.6098196859", 6, 0); + round_test_opt ("-975983.96922718323", "-975983.969227183233", 11, 0); + round_test_opt ("-0.0141935", "-0.01419356410", 7, 0); + round_test_opt ("84880122612.770782", "84880122612.770782013755", 7, 0); + round_test_opt ("-0.0000178", "-0.00001786452390451", 7, 0); + round_test_opt ("-1.3798798327631376188186773982e+27", "-1379879832763137618818677398.22414462933821716", 1, 0); + round_test_opt ("-2.245402865590056643557523753833e+29", "-224540286559005664355752375383.32978492325792324672", 1, 0); + round_test_opt ("-8315.1468", "-8315.1468630503641630807897537632482126986782838279069296070041015502607", 4, 0); + round_test_opt ("0", "-0.0000000838211740920556261299830093531772078", 2, 0); + round_test_opt ("-0.0416876582", "-0.041687658284091671374555836402610898955125740095273786", 10, 0); + round_test_opt ("7.65815382418113814779861743921190243765657354981e+45", "7658153824181138147798617439211902437656573549.8183", 2, 0); + round_test_opt ("0.02767389", "0.0276738904494591599704336", 8, 0); + round_test_opt ("-5.4185550099080522233510156701024301728125270723e+39", "-5418555009908052223351015670102430172812.52707235037987", 7, 0); + round_test_opt ("-1899149827", "-1899149827.82514", 0, 0); + round_test_opt ("0.7955483", "0.79554834141083", 7, 0); + round_test_opt ("8154781528705858888", "8154781528705858888.9755625442951128673075040254267", 0, 0); + round_test_opt ("-3803", "-3803.73898144337426131695504756056366905080520143458631028393761802679372", 0, 0); + round_test_opt ("3.025641505907837351766241552783840055348710559239450674782e+55", "30256415059078373517662415527838400553487105592394506747.8290423981807724122", 2, 0); + round_test_opt ("2.13711849954694553100660878052886279077189600979e+41", "213711849954694553100660878052886279077189.60097919245167946502003", 6, 0); + round_test_opt ("-7.0745670674096135006113419526707798056656926944e+46", "-70745670674096135006113419526707798056656926944.21", 0, 0); + round_test_opt ("-15229799310101156.043667205", "-15229799310101156.04366720568297383189340788345705720764931939894579214", 9, 0); + round_test_opt ("-0.04402792", "-0.0440279252399474662093512884982084310150480290636938800967448604460967483", 8, 0); + round_test_opt ("-250047500.21", "-250047500.21005", 3, 0); + round_test_opt ("-0.027", "-0.02708", 3, 0); + round_test_opt ("-491", "-491.5737", 0, 0); + round_test_opt ("769007.341147", "769007.34114777", 6, 0); + + round_test_opt ("4", "3.54", 0, 1); + round_test_opt ("9.469329375", "9.4693293752", 9, 1); + round_test_opt ("-0.00001", "-0.0000123411488", 5, 1); + round_test_opt ("-245", "-245.39", 0, 1); + round_test_opt ("15798541.64", "15798541.6399048", 2, 1); + round_test_opt ("0.001", "0.00091997", 3, 1); + round_test_opt ("2272", "2271.52", 0, 1); + round_test_opt ("35", "35.23", 0, 1); + round_test_opt ("-683818066864", "-683818066864.1", 0, 1); + round_test_opt ("10933231", "10933230.697", 0, 1); + round_test_opt ("5.2609", "5.260857", 4, 1); + round_test_opt ("0.000008", "0.000007821", 6, 1); + round_test_opt ("0.0000491", "0.00004910447048", 8, 1); + round_test_opt ("12186", "12186.0", 0, 1); + round_test_opt ("21", "20.9", 0, 1); + round_test_opt ("3825954", "3825954.03", 0, 1); + round_test_opt ("118288288.5", "118288288.46", 1, 1); + round_test_opt ("1125779", "1125779.2", 0, 1); + round_test_opt ("-1.734", "-1.7341669", 3, 1); + round_test_opt ("0", "0.000000459562", 4, 1); + round_test_opt ("16.592754", "16.59275402", 7, 1); + round_test_opt ("-28.25", "-28.251", 2, 1); + round_test_opt ("5099463.3", "5099463.33", 1, 1); + round_test_opt ("-0.001", "-0.00104", 4, 1); + round_test_opt ("-287109280612", "-287109280612.15", 0, 1); + round_test_opt ("-2", "-1.758", 0, 1); + round_test_opt ("-6", "-6", 0, 1); + round_test_opt ("-21.276619", "-21.2766193", 6, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-144", "-143.53", 0, 1); + round_test_opt ("-3.2", "-3.159", 1, 1); + round_test_opt ("-3", "-3.34", 0, 1); + round_test_opt ("12497685.01731", "12497685.0173061", 5, 1); + round_test_opt ("8889.428", "8889.42787", 3, 1); + round_test_opt ("0", "-0.00000001830584505", 2, 1); + round_test_opt ("3598678", "3598677.7", 0, 1); + round_test_opt ("-41", "-40.90742", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("2021953.19", "2021953.18947", 2, 1); + round_test_opt ("2", "2", 0, 1); + round_test_opt ("-12", "-12.125", 0, 1); + round_test_opt ("-2", "-2.2", 0, 1); + round_test_opt ("-2115", "-2115.00054", 0, 1); + round_test_opt ("0.134", "0.13369", 3, 1); + round_test_opt ("-38", "-38.38", 0, 1); + round_test_opt ("0.42145318", "0.4214531777643", 8, 1); + round_test_opt ("0", "-0.0001878654916842", 3, 1); + round_test_opt ("741", "741.04", 1, 1); + round_test_opt ("3606", "3605.93", 0, 1); + round_test_opt ("-544", "-544.1", 0, 1); + round_test_opt ("-3809", "-3808.737", 0, 1); + round_test_opt ("3951799", "3951798.7", 0, 1); + round_test_opt ("2799.97", "2799.9674", 2, 1); + round_test_opt ("47333.42", "47333.4176", 2, 1); + round_test_opt ("-55.924280361", "-55.92428036145", 9, 1); + round_test_opt ("-0.000001", "-0.00000052824264", 6, 1); + round_test_opt ("8090504333", "8090504333.3", 0, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("-230049481", "-230049480.590878", 0, 1); + round_test_opt ("0", "-0.00000001200602888520", 0, 1); + round_test_opt ("0", "0.000000099", 3, 1); + round_test_opt ("45556093.78", "45556093.7798", 2, 1); + round_test_opt ("-401.4", "-401.401", 1, 1); + round_test_opt ("-44571", "-44570.52", 0, 1); + round_test_opt ("1243358.922", "1243358.921638", 3, 1); + round_test_opt ("11494.70637742", "11494.706377423", 8, 1); + round_test_opt ("-874.7", "-874.704544", 1, 1); + round_test_opt ("-24401396920", "-24401396920.00", 1, 1); + round_test_opt ("-4", "-4", 0, 1); + round_test_opt ("0.383788308", "0.38378830829645", 9, 1); + round_test_opt ("122", "122.23", 0, 1); + round_test_opt ("0", "0.0014", 2, 1); + round_test_opt ("-289508.068", "-289508.06805116", 3, 1); + round_test_opt ("59.3", "59.265", 1, 1); + round_test_opt ("0", "-0.0000002026086826898", 1, 1); + round_test_opt ("0", "-0.11", 0, 1); + round_test_opt ("0", "0.000000047207", 2, 1); + round_test_opt ("0", "0.000000434103949485954", 5, 1); + round_test_opt ("-37065", "-37065.1171", 0, 1); + round_test_opt ("0", "-0.000031", 0, 1); + round_test_opt ("-82998.083585", "-82998.0835851", 6, 1); + round_test_opt ("323933.4", "323933.420", 1, 1); + round_test_opt ("-9", "-9", 0, 1); + round_test_opt ("-2172", "-2172.3", 0, 1); + round_test_opt ("-60690.7132", "-60690.713158", 4, 1); + round_test_opt ("-24642", "-24642.1", 0, 1); + round_test_opt ("0", "0.007112335", 0, 1); + round_test_opt ("0.1594031", "0.159403096880", 8, 1); + round_test_opt ("-4160", "-4160.351", 0, 1); + round_test_opt ("-2", "-1.705", 0, 1); + round_test_opt ("50634015", "50634015.2824", 0, 1); + round_test_opt ("-3339", "-3338.7", 0, 1); + round_test_opt ("-67.7", "-67.668902665", 1, 1); + round_test_opt ("-154279.4526", "-154279.452649", 4, 1); + round_test_opt ("-1.168", "-1.16773", 3, 1); + round_test_opt ("365", "365.08", 0, 1); + round_test_opt ("-20", "-19.6", 0, 1); + round_test_opt ("1.58", "1.5776", 2, 1); + round_test_opt ("-8.25", "-8.248", 2, 1); + round_test_opt ("-0.04581", "-0.0458084604321", 5, 1); + round_test_opt ("117389", "117388.6", 0, 1); + round_test_opt ("212.065", "212.06493", 3, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("29.4", "29.3577", 1, 1); + round_test_opt ("3685491.07096", "3685491.07096275", 5, 1); + round_test_opt ("0", "-0.00000011", 4, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("-13950.078", "-13950.07841", 3, 1); + round_test_opt ("1.4e-7", "0.000000140308463652314", 9, 1); + round_test_opt ("-11428646", "-11428645.8", 0, 1); + round_test_opt ("0.0223918", "0.0223917956214", 7, 1); + round_test_opt ("32.7904", "32.79037393", 4, 1); + round_test_opt ("-14", "-14.299", 0, 1); + round_test_opt ("6586.89603", "6586.896032", 5, 1); + round_test_opt ("-5", "-5.038658", 1, 1); + round_test_opt ("0.0317341185", "0.03173411854312", 10, 1); + round_test_opt ("0", "-0.0000000487", 0, 1); + round_test_opt ("-0.0345", "-0.03449922", 5, 1); + round_test_opt ("-17", "-16.59", 0, 1); + round_test_opt ("2", "1.5", 0, 1); + round_test_opt ("48518.42", "48518.4152", 2, 1); + round_test_opt ("-5001", "-5000.96", 0, 1); + round_test_opt ("1.725e-7", "0.0000001725037994167", 11, 1); + round_test_opt ("603", "603.0", 0, 1); + round_test_opt ("88353.4724", "88353.47237057", 4, 1); + round_test_opt ("332.16464", "332.16463927", 5, 1); + round_test_opt ("-32417545529", "-32417545528.9", 0, 1); + round_test_opt ("1.27", "1.2748049", 2, 1); + round_test_opt ("-182998", "-182998.2", 0, 1); + round_test_opt ("-432", "-431.53", 0, 1); + round_test_opt ("3384", "3383.5", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-0.00038305", "-0.0003830543", 8, 1); + round_test_opt ("0", "0.0000000557126451001", 5, 1); + round_test_opt ("117564754", "117564753.54747", 0, 1); + round_test_opt ("-1", "-1.40", 0, 1); + round_test_opt ("7.9", "7.923121", 1, 1); + round_test_opt ("0", "0.00000054132", 5, 1); + round_test_opt ("-0.07958882602", "-0.07958882601561", 11, 1); + round_test_opt ("1", "1.2", 0, 1); + round_test_opt ("-3", "-3", 0, 1); + round_test_opt ("8", "7.7", 0, 1); + round_test_opt ("-71.7", "-71.71", 1, 1); + round_test_opt ("-728", "-728.46", 0, 1); + round_test_opt ("1", "1.4", 0, 1); + round_test_opt ("-1", "-1.35", 0, 1); + round_test_opt ("3", "3", 0, 1); + round_test_opt ("-8", "-7.6", 0, 1); + round_test_opt ("25", "25.0", 0, 1); + round_test_opt ("-233815", "-233814.57", 0, 1); + round_test_opt ("0", "0.000070465023556944", 2, 1); + round_test_opt ("-47", "-47.253", 0, 1); + round_test_opt ("6052", "6052.0", 0, 1); + round_test_opt ("8.059", "8.058982", 3, 1); + round_test_opt ("4079021608", "4079021608.24", 0, 1); + round_test_opt ("-4", "-3.8", 0, 1); + round_test_opt ("-1493.68", "-1493.68006", 3, 1); + round_test_opt ("36252.56", "36252.5563", 2, 1); + round_test_opt ("-30537452.369", "-30537452.3689598", 4, 1); + round_test_opt ("3", "2.8", 0, 1); + round_test_opt ("0", "-0.000002949", 1, 1); + round_test_opt ("-9", "-8.7", 0, 1); + round_test_opt ("1e-8", "0.0000000116199", 8, 1); + round_test_opt ("-0.0230056", "-0.02300560354353", 7, 1); + round_test_opt ("-0.01714", "-0.01714395921115", 5, 1); + round_test_opt ("8.17", "8.174653754", 2, 1); + round_test_opt ("9", "9", 0, 1); + round_test_opt ("1337", "1337.29", 0, 1); + round_test_opt ("0.105", "0.105175", 3, 1); + round_test_opt ("0.0275", "0.027464", 4, 1); + round_test_opt ("-11", "-10.5", 0, 1); + round_test_opt ("-71", "-71.2", 0, 1); + round_test_opt ("77510.70416", "77510.704160068", 6, 1); + round_test_opt ("-162", "-161.6707", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-0.001037464", "-0.001037464042", 10, 1); + round_test_opt ("84", "83.8", 0, 1); + round_test_opt ("-0.00592135", "-0.005921353", 8, 1); + round_test_opt ("7", "6.99", 0, 1); + round_test_opt ("0", "0.0000049", 1, 1); + round_test_opt ("-7", "-6.51", 0, 1); + round_test_opt ("-5.5131360655", "-5.51313606545899", 10, 1); + round_test_opt ("-0.0001", "-0.0000751", 4, 1); + round_test_opt ("-104.1", "-104.1261", 1, 1); + round_test_opt ("-1", "-1.3", 0, 1); + round_test_opt ("-23673", "-23672.63", 0, 1); + round_test_opt ("-284889898", "-284889898.042415", 0, 1); + round_test_opt ("1", "1.196", 0, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("28458387", "28458386.54337", 0, 1); + round_test_opt ("-1160674293", "-1160674292.62", 0, 1); + round_test_opt ("-0.000255348", "-0.0002553481995", 9, 1); + round_test_opt ("-130897.86507", "-130897.865070415", 5, 1); + round_test_opt ("0.01", "0.00636836", 2, 1); + round_test_opt ("695862", "695861.98280567", 1, 1); + round_test_opt ("17", "17.25", 0, 1); + round_test_opt ("0", "0.026", 0, 1); + round_test_opt ("3212075.025", "3212075.02501", 3, 1); + round_test_opt ("4", "4", 0, 1); + round_test_opt ("-1151", "-1150.8244355257", 0, 1); + round_test_opt ("-8e-7", "-0.0000007534893580", 7, 1); + round_test_opt ("3382", "3381.713", 0, 1); + round_test_opt ("2e-7", "0.00000019647604646674", 8, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("9008915726", "9008915725.5231", 0, 1); + round_test_opt ("-0.00001", "-0.0000096379", 5, 1); + round_test_opt ("6.72", "6.721", 2, 1); + round_test_opt ("2136.074", "2136.073710", 3, 1); + round_test_opt ("0.00605847", "0.006058471", 8, 1); + round_test_opt ("-292", "-292.1", 0, 1); + round_test_opt ("0", "-0.000000139814030017060", 4, 1); + round_test_opt ("13754822793593", "13754822793592.9", 0, 1); + round_test_opt ("-179980965", "-179980964.61363", 0, 1); + round_test_opt ("-29", "-28.51", 0, 1); + round_test_opt ("698.80091", "698.8009100925", 6, 1); + round_test_opt ("-8.1187", "-8.11873", 4, 1); + round_test_opt ("1602.33", "1602.32753", 2, 1); + round_test_opt ("-15", "-14.99", 0, 1); + round_test_opt ("-5", "-4.5", 0, 1); + round_test_opt ("-0.000005", "-0.00000545", 6, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0", "0.00100", 1, 1); + round_test_opt ("0.2", "0.2003034", 1, 1); + round_test_opt ("105.41", "105.4104", 2, 1); + round_test_opt ("1", "1.4", 0, 1); + round_test_opt ("0", "-0.000050930947634381", 3, 1); + round_test_opt ("7.48139", "7.481390", 5, 1); + round_test_opt ("17090.1", "17090.140748", 1, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-9", "-9.42", 0, 1); + round_test_opt ("2", "1.673", 0, 1); + round_test_opt ("1885.1", "1885.063", 1, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("357.4774", "357.477414", 4, 1); + round_test_opt ("-1.327", "-1.32675724197", 3, 1); + round_test_opt ("-0.00011277", "-0.000112772492448619", 8, 1); + round_test_opt ("-2", "-2", 0, 1); + round_test_opt ("0.15", "0.1546", 2, 1); + round_test_opt ("35", "35.3", 0, 1); + round_test_opt ("763177.3511", "763177.3511416", 4, 1); + round_test_opt ("-3.70037", "-3.70037205114696", 5, 1); + round_test_opt ("-3797014.351144", "-3797014.35114432", 6, 1); + round_test_opt ("8.08", "8.07957", 3, 1); + round_test_opt ("24384.3412", "24384.3412018", 5, 1); + round_test_opt ("67.306832434", "67.3068324339", 9, 1); + round_test_opt ("-4040528.764098", "-4040528.76409829", 6, 1); + round_test_opt ("-1", "-1.01940037", 0, 1); + round_test_opt ("0.0000512526", "0.00005125258015", 10, 1); + round_test_opt ("-290889556", "-290889556.41", 0, 1); + round_test_opt ("123", "123.01", 0, 1); + round_test_opt ("-2", "-2.3", 0, 1); + round_test_opt ("-34811.594", "-34811.59385", 3, 1); + round_test_opt ("0", "-0.0000005950445", 4, 1); + round_test_opt ("0", "-0.00000082", 0, 1); + round_test_opt ("6", "6.3", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("1.68157826653", "1.6815782665335", 11, 1); + round_test_opt ("-2837.586", "-2837.58566843817", 3, 1); + round_test_opt ("8416.064", "8416.06355596086", 3, 1); + round_test_opt ("0", "0.00000236731", 5, 1); + round_test_opt ("-26125699736", "-26125699736.353", 0, 1); + round_test_opt ("18959.6", "18959.611157", 1, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-153", "-152.64414243011", 0, 1); + round_test_opt ("45", "44.7", 0, 1); + round_test_opt ("0", "0.285", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("522.0525552", "522.0525552014", 7, 1); + round_test_opt ("246398", "246398.1013", 0, 1); + round_test_opt ("-4.70615764", "-4.7061576418", 8, 1); + round_test_opt ("-0.021", "-0.0213884", 3, 1); + round_test_opt ("2513257", "2513257.0", 0, 1); + round_test_opt ("2", "2.018", 0, 1); + round_test_opt ("30.62311", "30.6231080", 5, 1); + round_test_opt ("-11", "-10.8", 0, 1); + round_test_opt ("5800384499", "5800384498.51", 0, 1); + round_test_opt ("0", "0.00017579381086966", 0, 1); + round_test_opt ("657004656", "657004656.1", 0, 1); + round_test_opt ("-35", "-34.6", 0, 1); + round_test_opt ("21404600819", "21404600819.44", 0, 1); + round_test_opt ("349.5", "349.507", 1, 1); + round_test_opt ("-2.7", "-2.71078800784", 1, 1); + round_test_opt ("1", "1.0", 0, 1); + round_test_opt ("4.10089", "4.10089097", 5, 1); + round_test_opt ("-2", "-2", 0, 1); + round_test_opt ("-202", "-202.3", 0, 1); + round_test_opt ("1767", "1766.741", 0, 1); + round_test_opt ("82.466061", "82.46606111510", 6, 1); + round_test_opt ("0.008", "0.008015", 3, 1); + round_test_opt ("16.9", "16.8951", 2, 1); + round_test_opt ("4", "4.4", 0, 1); + round_test_opt ("-12139", "-12139.4", 0, 1); + round_test_opt ("1123.228", "1123.22775794", 3, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0", "-0.015", 0, 1); + round_test_opt ("-38", "-37.79829", 0, 1); + round_test_opt ("-34", "-34.1", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0.10602", "0.10601990", 6, 1); + round_test_opt ("2", "2", 0, 1); + round_test_opt ("0", "-0.00000006432774459198", 4, 1); + round_test_opt ("0.4", "0.39537509450253", 2, 1); + round_test_opt ("0.01", "0.011214357", 2, 1); + round_test_opt ("0", "0.0005905773", 0, 1); + round_test_opt ("253647.4208", "253647.42081", 4, 1); + round_test_opt ("-33.39", "-33.388186842", 2, 1); + round_test_opt ("-0.005", "-0.00504754237505", 3, 1); + round_test_opt ("0", "0.0017685649868078", 2, 1); + round_test_opt ("-3", "-2.964957", 1, 1); + round_test_opt ("1212124629", "1212124629.2", 0, 1); + round_test_opt ("2858", "2857.54", 0, 1); + round_test_opt ("625", "624.7", 0, 1); + round_test_opt ("-3916620", "-3916619.9775", 0, 1); + round_test_opt ("30.6", "30.5902", 1, 1); + round_test_opt ("11834.705", "11834.70498", 3, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-3773880428", "-3773880428.05", 0, 1); + round_test_opt ("-0.000001", "-0.0000005856634", 6, 1); + round_test_opt ("0.0005", "0.00049843937125", 4, 1); + round_test_opt ("-442", "-442.4", 0, 1); + round_test_opt ("386", "385.98", 0, 1); + round_test_opt ("5819920498", "5819920497.9", 0, 1); + round_test_opt ("-46791.40369", "-46791.4036938", 5, 1); + round_test_opt ("0", "0.00000125362", 1, 1); + round_test_opt ("75148", "75147.57", 0, 1); + round_test_opt ("4e-8", "0.000000040010", 9, 1); + round_test_opt ("-153", "-152.56", 0, 1); + round_test_opt ("-117629583.114", "-117629583.11409", 3, 1); + round_test_opt ("7594.3", "7594.251", 1, 1); + round_test_opt ("2", "1.594", 0, 1); + round_test_opt ("6", "5.9", 0, 1); + round_test_opt ("-4.1", "-4.105626", 1, 1); + round_test_opt ("0", "-0.0000015417", 4, 1); + round_test_opt ("3.3", "3.26", 1, 1); + round_test_opt ("-221647.193", "-221647.1931266", 3, 1); + round_test_opt ("-6", "-6", 0, 1); + round_test_opt ("-7449.38", "-7449.37982840", 3, 1); + round_test_opt ("-0.0248", "-0.02475807590", 4, 1); + round_test_opt ("-149481", "-149481.0", 0, 1); + round_test_opt ("11", "10.8", 0, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("1778.86324386", "1778.8632438600", 8, 1); + round_test_opt ("114", "113.55", 0, 1); + round_test_opt ("-8", "-8.2", 0, 1); + round_test_opt ("-302", "-301.550001962", 0, 1); + round_test_opt ("9387795", "9387794.6", 0, 1); + round_test_opt ("-1", "-1.08980", 0, 1); + round_test_opt ("-1705229.851", "-1705229.85058600", 3, 1); + round_test_opt ("-0.0000033", "-0.0000032605738", 7, 1); + round_test_opt ("275467468", "275467468.18013", 0, 1); + round_test_opt ("-598", "-597.51", 0, 1); + round_test_opt ("-156", "-155.80", 0, 1); + round_test_opt ("-356", "-356.2300", 0, 1); + round_test_opt ("-2456.55", "-2456.5548", 2, 1); + round_test_opt ("50.7", "50.68557486224", 1, 1); + round_test_opt ("-17014379.8342", "-17014379.834214", 4, 1); + round_test_opt ("11.2395", "11.23949375", 4, 1); + round_test_opt ("-7", "-6.8", 0, 1); + round_test_opt ("-7", "-7.0", 0, 1); + round_test_opt ("-19115.826", "-19115.82586923", 3, 1); + round_test_opt ("344958.07", "344958.07497121", 2, 1); + round_test_opt ("3167.5417", "3167.54171", 4, 1); + round_test_opt ("-2119.391", "-2119.39075", 3, 1); + round_test_opt ("-26336.3", "-26336.284", 1, 1); + round_test_opt ("0", "-0.0028819832496059", 0, 1); + round_test_opt ("683027", "683027.49662710", 0, 1); + round_test_opt ("0", "-0.01696979", 1, 1); + round_test_opt ("-0.0000153521", "-0.000015352093", 10, 1); + round_test_opt ("0", "-0.00000059", 5, 1); + round_test_opt ("0", "-0.000000108630053168", 4, 1); + round_test_opt ("3", "2.8", 0, 1); + round_test_opt ("0", "-0.0574", 0, 1); + round_test_opt ("0", "0.00000048434", 3, 1); + round_test_opt ("72", "72.0563438327", 0, 1); + round_test_opt ("-16003037", "-16003037.3", 0, 1); + round_test_opt ("3055.3", "3055.321", 1, 1); + round_test_opt ("-2", "-2", 0, 1); + round_test_opt ("207928569", "207928568.877", 0, 1); + round_test_opt ("0.00122847", "0.00122847183", 8, 1); + round_test_opt ("-159442", "-159442.45", 0, 1); + round_test_opt ("-564018", "-564017.60", 0, 1); + round_test_opt ("0.0004064", "0.0004063768", 7, 1); + round_test_opt ("0", "-0.00000107578", 0, 1); + round_test_opt ("-7e-7", "-0.0000007033082032", 7, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-16192390.6856", "-16192390.685644", 4, 1); + round_test_opt ("189", "188.508", 0, 1); + round_test_opt ("-0.000001938", "-0.00000193843231", 9, 1); + round_test_opt ("-917365.61922217", "-917365.619222172", 8, 1); + round_test_opt ("33.77562", "33.775620223", 5, 1); + round_test_opt ("549361", "549360.583612", 0, 1); + round_test_opt ("0", "0.000033771", 1, 1); + round_test_opt ("1", "1.1", 0, 1); + round_test_opt ("0.00128028", "0.001280277", 8, 1); + round_test_opt ("-75794.07", "-75794.07428", 2, 1); + round_test_opt ("274278258209", "274278258208.65", 0, 1); + round_test_opt ("1821", "1820.7", 0, 1); + round_test_opt ("2.1437329601", "2.14373296009861", 11, 1); + round_test_opt ("-73602905270", "-73602905269.79", 0, 1); + round_test_opt ("0", "0.000000047", 7, 1); + round_test_opt ("0", "-0.0000454008553081", 1, 1); + round_test_opt ("1202.03", "1202.02784", 2, 1); + round_test_opt ("-204745093", "-204745093.149", 0, 1); + round_test_opt ("0.15143502", "0.1514350178", 8, 1); + round_test_opt ("-2.8", "-2.753", 1, 1); + round_test_opt ("-1.96046619", "-1.9604661896", 8, 1); + round_test_opt ("107244555.3", "107244555.29808", 2, 1); + round_test_opt ("310106298", "310106298.2", 0, 1); + round_test_opt ("2574227639", "2574227638.973", 0, 1); + round_test_opt ("-0.71332", "-0.7133198793", 5, 1); + round_test_opt ("-9", "-9.307339", 0, 1); + round_test_opt ("-5e-8", "-0.00000005035516793", 9, 1); + round_test_opt ("1754538.0548", "1754538.054780", 4, 1); + round_test_opt ("3", "2.53", 0, 1); + round_test_opt ("3800509207", "3800509207.05", 0, 1); + round_test_opt ("-0.09", "-0.0862263", 2, 1); + round_test_opt ("3", "2.7", 0, 1); + round_test_opt ("-712", "-711.7", 0, 1); + round_test_opt ("0.495", "0.495022", 3, 1); + round_test_opt ("19.6278", "19.627796", 5, 1); + round_test_opt ("-919", "-919.2", 0, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("-1289", "-1289.00020552", 2, 1); + round_test_opt ("1630500.34744", "1630500.347435", 5, 1); + round_test_opt ("0", "-0.000054042861262", 2, 1); + round_test_opt ("0", "0.000029500146408", 2, 1); + round_test_opt ("0", "-0.00000002030148260", 3, 1); + round_test_opt ("34", "33.71", 0, 1); + round_test_opt ("5", "5.3", 0, 1); + round_test_opt ("0", "-0.0003208256", 0, 1); + round_test_opt ("-113.9191", "-113.919080", 4, 1); + round_test_opt ("28", "27.50", 0, 1); + round_test_opt ("75", "74.73", 0, 1); + round_test_opt ("2892.79", "2892.7902130", 2, 1); + round_test_opt ("384", "384.0040452", 0, 1); + round_test_opt ("-1", "-1.2622", 0, 1); + round_test_opt ("-2", "-1.75618", 0, 1); + round_test_opt ("1444", "1443.6", 0, 1); + round_test_opt ("-11", "-10.64424", 0, 1); + round_test_opt ("0", "-0.0001113", 2, 1); + round_test_opt ("-2", "-2.35", 0, 1); + round_test_opt ("275.5", "275.498", 1, 1); + round_test_opt ("0", "-0.0000207139508", 2, 1); + round_test_opt ("-1077", "-1077.18", 0, 1); + round_test_opt ("-5", "-5", 0, 1); + round_test_opt ("2.1336", "2.1335903", 4, 1); + round_test_opt ("0.00000111", "0.00000110529701", 8, 1); + round_test_opt ("2", "2", 0, 1); + round_test_opt ("-5447.148", "-5447.14813", 3, 1); + round_test_opt ("1665584192005", "1665584192004.9", 0, 1); + round_test_opt ("6", "5.9", 0, 1); + round_test_opt ("-0.077401", "-0.07740113239", 6, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("1454.2", "1454.20728", 1, 1); + round_test_opt ("0", "-0.000190882119683", 3, 1); + round_test_opt ("-6", "-6", 0, 1); + round_test_opt ("-865267397666.5", "-865267397666.486", 1, 1); + round_test_opt ("-1", "-1.2", 0, 1); + round_test_opt ("-134211958.607", "-134211958.6072", 3, 1); + round_test_opt ("-0.21207728037", "-0.21207728036525", 11, 1); + round_test_opt ("71135.5558", "71135.55576459", 4, 1); + round_test_opt ("386265132.455", "386265132.4551", 3, 1); + round_test_opt ("778233889", "778233888.5311", 0, 1); + round_test_opt ("0.000719", "0.0007189512437178", 7, 1); + round_test_opt ("0", "0.0000171", 3, 1); + round_test_opt ("-410994", "-410993.83", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0.00000441", "0.00000440527", 8, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0.1662581", "0.16625812962245", 7, 1); + round_test_opt ("-11.696829", "-11.6968294515", 6, 1); + round_test_opt ("1.361", "1.3612841282", 3, 1); + round_test_opt ("-336185", "-336184.61", 0, 1); + round_test_opt ("-122", "-121.8", 0, 1); + round_test_opt ("620.39", "620.3909", 2, 1); + round_test_opt ("-0.91", "-0.9105636", 2, 1); + round_test_opt ("0", "0.034", 0, 1); + round_test_opt ("769", "769.1", 0, 1); + round_test_opt ("526.29", "526.29171618", 2, 1); + round_test_opt ("0.1", "0.116916674", 1, 1); + round_test_opt ("-3", "-3.0", 0, 1); + round_test_opt ("-2021000", "-2020999.5", 0, 1); + round_test_opt ("5", "5", 0, 1); + round_test_opt ("-7", "-6.82842", 0, 1); + round_test_opt ("18642.374", "18642.374031", 4, 1); + round_test_opt ("0.001623", "0.0016232841612", 6, 1); + round_test_opt ("0.00007", "0.0000704", 5, 1); + round_test_opt ("-1884042142", "-1884042142.3", 0, 1); + round_test_opt ("1.00467076", "1.004670762", 8, 1); + round_test_opt ("8", "8", 0, 1); + round_test_opt ("-3", "-3", 0, 1); + round_test_opt ("77", "76.8614", 0, 1); + round_test_opt ("-35", "-34.61", 0, 1); + round_test_opt ("0.00005", "0.000045472900016655", 5, 1); + round_test_opt ("9543", "9542.76576", 0, 1); + round_test_opt ("0.32221017", "0.32221016668", 8, 1); + round_test_opt ("35.8", "35.806", 1, 1); + round_test_opt ("-14234918948", "-14234918947.7", 0, 1); + round_test_opt ("-156.603862", "-156.60386225", 6, 1); + round_test_opt ("-0.1", "-0.124", 1, 1); + round_test_opt ("12284", "12283.5032", 0, 1); + round_test_opt ("-10975.98", "-10975.9844", 2, 1); + round_test_opt ("8", "7.575", 0, 1); + round_test_opt ("-4.13461", "-4.134609080", 5, 1); + round_test_opt ("179204391", "179204390.719054", 0, 1); + round_test_opt ("-5.662e-7", "-0.0000005661820", 10, 1); + round_test_opt ("380.537", "380.5370279291", 4, 1); + round_test_opt ("-0.0010019", "-0.00100193", 7, 1); + round_test_opt ("-0.0000122", "-0.000012165594", 7, 1); + round_test_opt ("943546.71327", "943546.713265", 5, 1); + round_test_opt ("-2669453.3", "-2669453.345", 1, 1); + round_test_opt ("0", "0.004864560344", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("9", "9", 0, 1); + round_test_opt ("-0.1493", "-0.14926753011132", 4, 1); + round_test_opt ("3897025593.357", "3897025593.3573", 3, 1); + round_test_opt ("-37", "-37.4", 0, 1); + round_test_opt ("46", "46.3", 0, 1); + round_test_opt ("20.6", "20.550", 1, 1); + round_test_opt ("1680", "1680.17658", 0, 1); + round_test_opt ("607.2", "607.24238", 1, 1); + round_test_opt ("0", "-0.0000268383808", 4, 1); + round_test_opt ("-425", "-424.590", 0, 1); + round_test_opt ("15.5", "15.504414", 1, 1); + round_test_opt ("-4464038280", "-4464038280.1", 0, 1); + round_test_opt ("-4", "-3.6844471", 0, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-11.8635530882", "-11.863553088174", 10, 1); + round_test_opt ("139", "138.7558620", 0, 1); + round_test_opt ("-80538.44", "-80538.435066403", 2, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-2666311731291", "-2666311731291.1", 0, 1); + round_test_opt ("2", "2.31", 0, 1); + round_test_opt ("64643770", "64643770.19", 0, 1); + round_test_opt ("-19.56", "-19.56215", 2, 1); + round_test_opt ("-0.000035525", "-0.00003552532514", 9, 1); + round_test_opt ("9", "9.27", 0, 1); + round_test_opt ("-7415.88", "-7415.87912", 2, 1); + round_test_opt ("-316220238.7", "-316220238.72", 1, 1); + round_test_opt ("0", "0.0115691059", 0, 1); + round_test_opt ("60.8", "60.81", 1, 1); + round_test_opt ("2", "1.8", 0, 1); + round_test_opt ("-1224373557.72", "-1224373557.72346", 2, 1); + round_test_opt ("0", "0.006564652", 0, 1); + round_test_opt ("-1183009315275", "-1183009315274.74", 0, 1); + round_test_opt ("-0.962", "-0.9620066507", 3, 1); + round_test_opt ("5424049.3261", "5424049.3261228", 4, 1); + round_test_opt ("2957265327.84", "2957265327.8373", 2, 1); + round_test_opt ("-2", "-2.2", 0, 1); + round_test_opt ("-26", "-25.99", 0, 1); + round_test_opt ("-266.29018764", "-266.29018763899", 8, 1); + round_test_opt ("75.689732", "75.6897322", 6, 1); + round_test_opt ("188", "188.4", 0, 1); + round_test_opt ("-349", "-348.79", 0, 1); + round_test_opt ("-0.000003", "-0.0000030322124916", 7, 1); + round_test_opt ("-309973085817", "-309973085816.91", 0, 1); + round_test_opt ("-42.7", "-42.67490756", 1, 1); + round_test_opt ("-75705485", "-75705485.3", 0, 1); + round_test_opt ("0.00049132155", "0.0004913215513505", 11, 1); + round_test_opt ("-106.24", "-106.24477", 2, 1); + round_test_opt ("5", "4.64", 0, 1); + round_test_opt ("0", "0.00024421", 3, 1); + round_test_opt ("28659.74", "28659.74024", 3, 1); + round_test_opt ("-149697181.5", "-149697181.47357", 1, 1); + round_test_opt ("997", "997.1", 0, 1); + round_test_opt ("-541", "-540.85693061", 0, 1); + round_test_opt ("86", "86.1858325", 0, 1); + round_test_opt ("3", "2.5", 0, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("-542", "-542.2", 0, 1); + round_test_opt ("-1431.8924", "-1431.89244", 4, 1); + round_test_opt ("0", "-0.000004896", 5, 1); + round_test_opt ("49531304", "49531304.0", 0, 1); + round_test_opt ("-10102.6665", "-10102.66645", 4, 1); + round_test_opt ("65875", "65874.66", 0, 1); + round_test_opt ("0.0023", "0.0022917848", 4, 1); + round_test_opt ("1935365", "1935365.22", 0, 1); + round_test_opt ("135733326.2", "135733326.1591", 1, 1); + round_test_opt ("-0.0707371128", "-0.0707371127503952", 10, 1); + round_test_opt ("0", "-0.00000142", 5, 1); + round_test_opt ("-233036262.8", "-233036262.753067", 1, 1); + round_test_opt ("2757.9", "2757.906", 1, 1); + round_test_opt ("-427.2", "-427.2133", 1, 1); + round_test_opt ("0", "0", 1, 1); + round_test_opt ("-108737.43", "-108737.43024", 3, 1); + round_test_opt ("146", "146.1", 0, 1); + round_test_opt ("-2", "-1.583477702", 0, 1); + round_test_opt ("-0.71474", "-0.7147426", 5, 1); + round_test_opt ("-110342266440.2", "-110342266440.225", 1, 1); + round_test_opt ("200212.8", "200212.777698349", 1, 1); + round_test_opt ("-304", "-303.74", 0, 1); + round_test_opt ("0.00001917", "0.0000191730", 8, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-9", "-9", 0, 1); + round_test_opt ("-18.663", "-18.66330", 3, 1); + round_test_opt ("-2", "-1.907", 0, 1); + round_test_opt ("0", "0.0000000203965335", 7, 1); + round_test_opt ("-2", "-2.1", 0, 1); + round_test_opt ("-3567227766911", "-3567227766910.6", 0, 1); + round_test_opt ("-1573865.79336", "-1573865.7933632", 5, 1); + round_test_opt ("0", "0.0488", 1, 1); + round_test_opt ("-1", "-1.23", 0, 1); + round_test_opt ("271", "271.21", 0, 1); + round_test_opt ("19781", "19780.99", 0, 1); + round_test_opt ("-0.0056", "-0.0056298804", 4, 1); + round_test_opt ("1025931", "1025931.3", 0, 1); + round_test_opt ("-3", "-3", 0, 1); + round_test_opt ("-0.000449409", "-0.00044940932", 9, 1); + round_test_opt ("0.00001136", "0.000011363008", 8, 1); + round_test_opt ("7.2e-8", "0.000000071857073", 9, 1); + round_test_opt ("156530.89", "156530.88737", 2, 1); + round_test_opt ("40052", "40052.3", 0, 1); + round_test_opt ("685705157", "685705157.1", 0, 1); + round_test_opt ("0.012", "0.01193466", 3, 1); + round_test_opt ("3696898.357", "3696898.3570351", 4, 1); + round_test_opt ("-477186", "-477186.2", 0, 1); + round_test_opt ("2.4", "2.43185", 1, 1); + round_test_opt ("-20", "-19.60955", 0, 1); + round_test_opt ("-669.4", "-669.360", 1, 1); + round_test_opt ("3", "3", 0, 1); + round_test_opt ("-8.351363", "-8.35136301", 6, 1); + round_test_opt ("54561127852", "54561127852.3", 0, 1); + round_test_opt ("16.6", "16.608", 1, 1); + round_test_opt ("262", "262.433", 0, 1); + round_test_opt ("-1379", "-1378.7221328", 0, 1); + round_test_opt ("-5", "-5.09", 0, 1); + round_test_opt ("0", "0.000003547", 1, 1); + round_test_opt ("-0.005884", "-0.0058840863", 6, 1); + round_test_opt ("-86669.6", "-86669.64", 1, 1); + round_test_opt ("-3160538", "-3160537.9", 0, 1); + round_test_opt ("0", "-0.0000002055499", 4, 1); + round_test_opt ("-2.7", "-2.70201", 1, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-2", "-2.3", 0, 1); + round_test_opt ("0", "0.000000620171758", 5, 1); + round_test_opt ("0", "-0.0045737044781", 2, 1); + round_test_opt ("-6064679.7", "-6064679.701029", 2, 1); + round_test_opt ("0", "-0.0000026439", 3, 1); + round_test_opt ("47.46", "47.458425", 2, 1); + round_test_opt ("-4.969e-8", "-0.000000049690", 11, 1); + round_test_opt ("-10830688519.15", "-10830688519.1499", 3, 1); + round_test_opt ("949637", "949636.6", 0, 1); + round_test_opt ("158824226", "158824225.6", 0, 1); + round_test_opt ("2046", "2045.9618", 1, 1); + round_test_opt ("4", "4.3", 0, 1); + round_test_opt ("0", "0.026593", 1, 1); + round_test_opt ("0.855089", "0.855088838", 6, 1); + round_test_opt ("-2.0981254126", "-2.09812541257", 10, 1); + round_test_opt ("190", "190.20", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("14484746413", "14484746412.809", 0, 1); + round_test_opt ("7", "7.0", 0, 1); + round_test_opt ("-115.75", "-115.7492209", 2, 1); + round_test_opt ("23172876854.6", "23172876854.649", 1, 1); + round_test_opt ("-5.4116e-7", "-0.00000054115736547", 11, 1); + round_test_opt ("767576990", "767576990.4", 0, 1); + round_test_opt ("6960", "6959.82", 0, 1); + round_test_opt ("-811632.5249", "-811632.52490259", 4, 1); + round_test_opt ("-72.879", "-72.878784", 3, 1); + round_test_opt ("-11320.669", "-11320.66879647", 3, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-0.015", "-0.0145205240695404", 3, 1); + round_test_opt ("-457", "-457.04", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("0", "-0.000000013081857748", 1, 1); + round_test_opt ("1408763955", "1408763955.16", 0, 1); + round_test_opt ("488.7651", "488.765079", 4, 1); + round_test_opt ("-0.0007", "-0.000659", 4, 1); + round_test_opt ("2", "2", 0, 1); + round_test_opt ("-1.7", "-1.694", 1, 1); + round_test_opt ("0", "-0.000000011514", 1, 1); + round_test_opt ("24.05", "24.0464192", 2, 1); + round_test_opt ("-2344335.93", "-2344335.92778", 2, 1); + round_test_opt ("372717", "372716.9", 0, 1); + round_test_opt ("5974", "5974.4", 0, 1); + round_test_opt ("0", "0.000185812", 3, 1); + round_test_opt ("386710062.02", "386710062.023", 2, 1); + round_test_opt ("1968589867033", "1968589867032.95", 0, 1); + round_test_opt ("4", "4.4", 0, 1); + round_test_opt ("495791305", "495791305.04589", 0, 1); + round_test_opt ("-84192051.9", "-84192051.8927", 1, 1); + round_test_opt ("-130.9", "-130.93299058", 1, 1); + round_test_opt ("-4", "-4.2", 0, 1); + round_test_opt ("-519296", "-519295.5", 0, 1); + round_test_opt ("243", "242.979552", 0, 1); + round_test_opt ("-7", "-7", 0, 1); + round_test_opt ("0", "0.0000060536747", 3, 1); + round_test_opt ("71", "71.1", 0, 1); + round_test_opt ("-323.8", "-323.8429505864", 1, 1); + round_test_opt ("2.87556352", "2.875563522", 8, 1); + round_test_opt ("-63046180.41", "-63046180.410407", 3, 1); + round_test_opt ("0", "-0.00000027", 0, 1); + round_test_opt ("83564", "83563.57717", 0, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("0", "0.00022535", 2, 1); + round_test_opt ("7", "6.9", 0, 1); + round_test_opt ("0", "-0.00042", 1, 1); + round_test_opt ("0.0000016226", "0.00000162258", 10, 1); + round_test_opt ("6", "6", 0, 1); + round_test_opt ("-24656750", "-24656749.8", 0, 1); + round_test_opt ("-4", "-4.1", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-4.3911231", "-4.39112307844", 7, 1); + round_test_opt ("-54750.71661998", "-54750.716619979", 8, 1); + round_test_opt ("-1256.1", "-1256.1232", 1, 1); + round_test_opt ("-3", "-3", 0, 1); + round_test_opt ("-3", "-2.8", 0, 1); + round_test_opt ("0.093539", "0.093539384842", 6, 1); + round_test_opt ("-0.08035759", "-0.080357592", 8, 1); + round_test_opt ("-32.962", "-32.96185263111", 3, 1); + round_test_opt ("0", "-0.001255", 1, 1); + round_test_opt ("1271", "1270.6", 0, 1); + round_test_opt ("-60823", "-60822.84374", 0, 1); + round_test_opt ("-32299.7829", "-32299.7828637", 4, 1); + round_test_opt ("9", "8.54", 0, 1); + round_test_opt ("0.0017", "0.001703173", 5, 1); + round_test_opt ("5148433662740", "5148433662739.80", 0, 1); + round_test_opt ("-2388.07167", "-2388.071668", 5, 1); + round_test_opt ("0", "-0.2139779365881", 0, 1); + round_test_opt ("2955789058628", "2955789058627.9", 0, 1); + round_test_opt ("-0.00011879", "-0.000118787975513795", 8, 1); + round_test_opt ("-0.0156", "-0.01560295", 4, 1); + round_test_opt ("-72925", "-72925.496", 0, 1); + round_test_opt ("-0.6", "-0.60497", 1, 1); + round_test_opt ("3", "2.646383445", 0, 1); + round_test_opt ("5", "5", 0, 1); + round_test_opt ("733990.9", "733990.92824161", 1, 1); + round_test_opt ("-846", "-846.396", 0, 1); + round_test_opt ("36708548", "36708548.322", 0, 1); + round_test_opt ("0.00507", "0.0050707064636", 5, 1); + round_test_opt ("-15", "-14.6", 0, 1); + round_test_opt ("4", "4.49", 0, 1); + round_test_opt ("33", "32.87", 0, 1); + round_test_opt ("-18.1995848878", "-18.19958488777", 10, 1); + round_test_opt ("0", "0.00000004118736618", 0, 1); + round_test_opt ("465660955.77", "465660955.7698", 2, 1); + round_test_opt ("2105671.9997", "2105671.99972582", 4, 1); + round_test_opt ("0.4255077577", "0.42550775772", 10, 1); + round_test_opt ("-178112", "-178111.9", 0, 1); + round_test_opt ("-17", "-16.9", 0, 1); + round_test_opt ("-6577867.32", "-6577867.32435442", 2, 1); + round_test_opt ("-1.9", "-1.886", 1, 1); + round_test_opt ("-5", "-5.24716", 0, 1); + round_test_opt ("2", "1.837257", 0, 1); + round_test_opt ("0", "-0.000202344", 2, 1); + round_test_opt ("-0.0375", "-0.037548490", 4, 1); + round_test_opt ("-19", "-19.02", 0, 1); + round_test_opt ("-13207696039", "-13207696038.939", 0, 1); + round_test_opt ("-5.9", "-5.913382", 1, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("2", "2.0", 0, 1); + round_test_opt ("-1.448033", "-1.448032647880", 6, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("-159", "-158.7", 0, 1); + round_test_opt ("50.79716", "50.7971630", 5, 1); + round_test_opt ("0", "0.07632", 0, 1); + round_test_opt ("986184", "986183.5", 0, 1); + round_test_opt ("9", "9", 0, 1); + round_test_opt ("-3114.504", "-3114.5043868", 3, 1); + round_test_opt ("87802", "87801.7603237", 0, 1); + round_test_opt ("0.0033", "0.00328654370742", 4, 1); + round_test_opt ("51.98", "51.983123357948", 2, 1); + round_test_opt ("-7", "-7", 0, 1); + round_test_opt ("-2", "-1.571", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("2801596", "2801596.0", 0, 1); + round_test_opt ("0.00234", "0.0023350528619", 5, 1); + round_test_opt ("-122", "-122.107", 0, 1); + round_test_opt ("-3", "-3.36", 0, 1); + round_test_opt ("-172", "-172.0", 0, 1); + round_test_opt ("0.0032", "0.0032122465642733", 4, 1); + round_test_opt ("3", "3", 0, 1); + round_test_opt ("-25.4957", "-25.495733", 4, 1); + round_test_opt ("-5e-7", "-0.000000499", 8, 1); + round_test_opt ("-0.000001", "-0.0000005380105", 6, 1); + round_test_opt ("-9.76e-7", "-0.000000975981503729640", 10, 1); + round_test_opt ("0", "-0.000000070477667823983", 6, 1); + round_test_opt ("71744", "71743.7", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("95", "95.2", 0, 1); + round_test_opt ("-0.01", "-0.01111683", 2, 1); + round_test_opt ("5.03", "5.03281", 2, 1); + round_test_opt ("0.8", "0.75779", 1, 1); + round_test_opt ("0.001", "0.0006057", 3, 1); + round_test_opt ("-2", "-2.31", 0, 1); + round_test_opt ("0", "-0.00000056", 0, 1); + round_test_opt ("0.000003", "0.000003294251178582", 6, 1); + round_test_opt ("6619689722", "6619689721.6", 0, 1); + round_test_opt ("0", "-0.00000001018341357041540", 3, 1); + round_test_opt ("-10", "-9.874", 0, 1); + round_test_opt ("69", "68.7074152722", 0, 1); + round_test_opt ("1.2", "1.16", 1, 1); + round_test_opt ("0", "0.00000014850981636", 6, 1); + round_test_opt ("0.36157", "0.36157063", 5, 1); + round_test_opt ("-0.0681", "-0.068115905086", 4, 1); + round_test_opt ("-3", "-2.9", 0, 1); + round_test_opt ("-3", "-3.0", 0, 1); + round_test_opt ("0.01", "0.010156", 2, 1); + round_test_opt ("0.11809", "0.118093", 5, 1); + round_test_opt ("260130.08036", "260130.08035520", 5, 1); + round_test_opt ("-3", "-3", 0, 1); + round_test_opt ("43757924", "43757924.4", 0, 1); + round_test_opt ("1021503432084.6", "1021503432084.62", 1, 1); + round_test_opt ("-299", "-298.7", 0, 1); + round_test_opt ("-6963749493.6", "-6963749493.6458", 1, 1); + round_test_opt ("-174", "-174.19", 0, 1); + round_test_opt ("298408", "298407.7", 0, 1); + round_test_opt ("69316.45", "69316.446", 2, 1); + round_test_opt ("0", "0.41096", 0, 1); + round_test_opt ("-1357152", "-1357151.9", 0, 1); + round_test_opt ("29.822731709", "29.82273170936", 9, 1); + round_test_opt ("-1.3", "-1.270", 1, 1); + round_test_opt ("6422.76", "6422.7577", 2, 1); + round_test_opt ("9410320", "9410320.3", 0, 1); + round_test_opt ("3", "3", 0, 1); + round_test_opt ("-23359", "-23358.8559", 0, 1); + round_test_opt ("-247.3", "-247.266", 1, 1); + round_test_opt ("-2331", "-2331.063", 0, 1); + round_test_opt ("-373439751221.1", "-373439751221.070", 1, 1); + round_test_opt ("9.2", "9.196524", 2, 1); + round_test_opt ("0", "0.0036554524385", 1, 1); + round_test_opt ("0", "-0.00000063618822", 0, 1); + round_test_opt ("-5", "-4.9", 0, 1); + round_test_opt ("17", "17.2117810", 0, 1); + round_test_opt ("1639293", "1639293.26", 0, 1); + round_test_opt ("-0.253461", "-0.2534610319511", 7, 1); + round_test_opt ("-23336833", "-23336833.23", 0, 1); + round_test_opt ("-98776423.47", "-98776423.4662929", 2, 1); + round_test_opt ("-568985020.026", "-568985020.0263", 3, 1); + round_test_opt ("53.881", "53.8814996", 3, 1); + round_test_opt ("789", "788.8", 0, 1); + round_test_opt ("-0.0030614", "-0.003061380710", 7, 1); + round_test_opt ("-5", "-5", 1, 1); + round_test_opt ("1", "1.06", 0, 1); + round_test_opt ("-2537823638", "-2537823637.5", 0, 1); + round_test_opt ("-695603331.0329", "-695603331.03289", 4, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("6.3432", "6.3432491", 4, 1); + round_test_opt ("75", "74.8158", 0, 1); + round_test_opt ("-13", "-12.6", 0, 1); + round_test_opt ("18.3", "18.308319", 1, 1); + round_test_opt ("165654144811", "165654144810.883", 0, 1); + round_test_opt ("4102", "4102.044757", 0, 1); + round_test_opt ("1.8", "1.809", 1, 1); + round_test_opt ("-298452487", "-298452487.1695", 0, 1); + round_test_opt ("0.1", "0.053", 1, 1); + round_test_opt ("-0.00008", "-0.000076", 5, 1); + round_test_opt ("-447681", "-447681.37", 0, 1); + round_test_opt ("-7", "-6.95", 0, 1); + round_test_opt ("351", "350.9", 0, 1); + round_test_opt ("3", "2.8", 0, 1); + round_test_opt ("0", "0", 1, 1); + round_test_opt ("31771920", "31771919.6412", 0, 1); + round_test_opt ("1", "0.80", 0, 1); + round_test_opt ("-4", "-4.1613", 0, 1); + round_test_opt ("0", "0.00105", 2, 1); + round_test_opt ("-61", "-60.6", 0, 1); + round_test_opt ("-9768788109241", "-9768788109240.65", 0, 1); + round_test_opt ("-1470.307877", "-1470.30787672", 6, 1); + round_test_opt ("-0.0000157963", "-0.00001579626298", 10, 1); + round_test_opt ("-23", "-22.9979140212", 1, 1); + round_test_opt ("-6045846.1", "-6045846.08424", 1, 1); + round_test_opt ("0", "-0.0000001962", 3, 1); + round_test_opt ("-1.745e-8", "-0.000000017453524440675", 11, 1); + round_test_opt ("0", "-0.000213", 2, 1); + round_test_opt ("-3487156.6", "-3487156.607", 1, 1); + round_test_opt ("2982.44", "2982.4384228", 2, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("0", "0.000000070148692065", 1, 1); + round_test_opt ("145066", "145065.9572", 0, 1); + round_test_opt ("9", "8.9", 0, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("-902.7", "-902.6736", 1, 1); + round_test_opt ("-780", "-779.6", 0, 1); + round_test_opt ("0", "-0.393186057405", 0, 1); + round_test_opt ("6", "5.70", 0, 1); + round_test_opt ("-99", "-98.64", 0, 1); + round_test_opt ("-1.27", "-1.2704", 3, 1); + round_test_opt ("-690973732155", "-690973732155.469", 0, 1); + round_test_opt ("722.4", "722.406", 1, 1); + round_test_opt ("0", "-0.00000002880164", 7, 1); + round_test_opt ("-0.3672915204", "-0.3672915203791", 10, 1); + round_test_opt ("6", "5.7", 0, 1); + round_test_opt ("-7.8", "-7.794810", 1, 1); + round_test_opt ("-4", "-4", 0, 1); + round_test_opt ("0", "-0.00000004432", 0, 1); + round_test_opt ("-2.876e-8", "-0.00000002875518", 11, 1); + round_test_opt ("-4809617.494", "-4809617.4942825", 3, 1); + round_test_opt ("0", "-0.00059268", 2, 1); + round_test_opt ("58.98", "58.978039", 2, 1); + round_test_opt ("0", "-0.016", 0, 1); + round_test_opt ("-2.47e-8", "-0.00000002471605291", 10, 1); + round_test_opt ("-6", "-6", 0, 1); + round_test_opt ("-160.1", "-160.133738", 1, 1); + round_test_opt ("-46.47", "-46.4710664927", 2, 1); + round_test_opt ("-42132", "-42131.8", 0, 1); + round_test_opt ("-177078565", "-177078565.1", 0, 1); + round_test_opt ("-13", "-12.96", 0, 1); + round_test_opt ("-2466194887576", "-2466194887576.07", 0, 1); + round_test_opt ("85817.5", "85817.5257", 1, 1); + round_test_opt ("0.000001", "0.000001096", 6, 1); + round_test_opt ("2721.28259362", "2721.2825936208", 8, 1); + round_test_opt ("-666.8", "-666.7638629", 1, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("3", "3.05", 0, 1); + round_test_opt ("2.8305", "2.83053418", 4, 1); + round_test_opt ("107747209344", "107747209343.65", 0, 1); + round_test_opt ("-19516.877", "-19516.87709", 3, 1); + round_test_opt ("24906462", "24906462.2", 0, 1); + round_test_opt ("-1647073.3", "-1647073.28763752", 1, 1); + round_test_opt ("11.97377477611", "11.9737747761098", 11, 1); + round_test_opt ("229.9", "229.8997488", 2, 1); + round_test_opt ("-155", "-155.42068", 0, 1); + round_test_opt ("1455.6", "1455.596", 1, 1); + round_test_opt ("0", "-0.094530", 0, 1); + round_test_opt ("482996.4", "482996.375", 1, 1); + round_test_opt ("3435.41656999", "3435.4165699855", 8, 1); + round_test_opt ("5.4335589802", "5.43355898018699", 10, 1); + round_test_opt ("0", "0.00000001719440", 5, 1); + round_test_opt ("5", "4.69", 0, 1); + round_test_opt ("1193970209.03", "1193970209.0299", 2, 1); + round_test_opt ("27", "26.8", 0, 1); + round_test_opt ("-13.3", "-13.332", 1, 1); + round_test_opt ("8.8568097543", "8.85680975426", 10, 1); + round_test_opt ("-124", "-124.154", 0, 1); + round_test_opt ("427249", "427248.78", 0, 1); + round_test_opt ("83973094.3", "83973094.318", 1, 1); + round_test_opt ("-7", "-7", 0, 1); + round_test_opt ("3881136", "3881136.2057221", 0, 1); + round_test_opt ("4.18237401733", "4.18237401732936", 11, 1); + round_test_opt ("0.4177077", "0.4177076950138", 8, 1); + round_test_opt ("3513833", "3513832.82", 0, 1); + round_test_opt ("7288384.112", "7288384.11222", 3, 1); + round_test_opt ("0.000322", "0.0003217517162", 6, 1); + round_test_opt ("0", "-0.000007719562365530", 3, 1); + round_test_opt ("-10", "-10.4", 0, 1); + round_test_opt ("0", "-0.00000224787930800899", 1, 1); + round_test_opt ("-97", "-96.86", 0, 1); + round_test_opt ("-3", "-3", 1, 1); + round_test_opt ("637366619", "637366618.9", 0, 1); + round_test_opt ("-2.616e-8", "-0.00000002616200290", 11, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("5557040", "5557039.99142487", 1, 1); + round_test_opt ("-37424", "-37424.4", 0, 1); + + round_test_opt ("-875092", "-875092.35", 0, 1); + round_test_opt ("-0.0000227976", "-0.0000227975639550678262017478129916576433201220848434842725874939487930664284021", 10, 1); + round_test_opt ("2.2538758714350806283686432935115171705361713946e+42", "2253875871435080628368643293511517170536171.39460291655003180", 4, 1); + round_test_opt ("389519057522885070", "389519057522885069.86441361857796786", 0, 1); + round_test_opt ("-0.0001604003", "-0.0001604003427736412297055604178957447533846320505", 10, 1); + round_test_opt ("0", "-0.0003759237499866949805539122027066706346375", 3, 1); + round_test_opt ("2.9595687120678047014195596e+23", "295956871206780470141955.9555269914541454552900717667176906633518", 2, 1); + round_test_opt ("0", "-0.0057349186548783089088994765859209750489356748290335702491795", 0, 1); + round_test_opt ("-1.989050624377365882377141710271815800678153946676651e+50", "-198905062437736588237714171027181580067815394667665.11419329795371", 1, 1); + round_test_opt ("-1515214549716.139", "-1515214549716.1393042", 3, 1); + round_test_opt ("31556.85078252", "31556.8507825226", 8, 1); + round_test_opt ("-1.64115375742136036300482707547256589139e+35", "-164115375742136036300482707547256589.138771", 3, 1); + round_test_opt ("0.01423", "0.01422573", 5, 1); + round_test_opt ("-0.000232456", "-0.000232455943624282993507882240453744242293713800574665111", 9, 1); + round_test_opt ("0", "-0.000025617812904936793014356691660353526050603873148471115025", 4, 1); + round_test_opt ("-0.01", "-0.010262775046489756235913496198266450161035343642295161", 2, 1); + round_test_opt ("3259083251662243.322196728", "3259083251662243.3221967278882", 9, 1); + round_test_opt ("6641773.697", "6641773.6965111", 3, 1); + round_test_opt ("-0.000237281", "-0.0002372812954013189833260110975097715969010825213646853232862206931548464821", 9, 1); + round_test_opt ("-1431262931.5956088095", "-1431262931.595608809490355795145672584199277613148822", 10, 1); + round_test_opt ("1.85211665460405609612572e+23", "185211665460405609612572.0", 0, 1); + round_test_opt ("-4.54754727912822904642311229824179969700406514678997829227e+53", "-454754727912822904642311229824179969700406514678997829.22679916651460596", 3, 1); + round_test_opt ("-7583395067147", "-7583395067147.46131", 0, 1); + round_test_opt ("-1175993156896.913", "-1175993156896.91292304118629937255798554", 3, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-28774002381919556", "-28774002381919556.212086401514914505706498255002845429415", 0, 1); + round_test_opt ("35004312889918", "35004312889918.160769768247981", 0, 1); + round_test_opt ("-1237177071444512515.4528141742", "-1237177071444512515.4528141741787326270587113205375195611793", 10, 1); + round_test_opt ("-37672320944258.356912", "-37672320944258.356911524821222943551002336", 6, 1); + round_test_opt ("-38144110276257609.449768698", "-38144110276257609.4497686977075226897463", 9, 1); + round_test_opt ("0", "0.000000046547346405619925578246092071968538873393319160460", 2, 1); + round_test_opt ("0", "0.00001838576431325940902832914928959039483389269847319076396485901145650900", 1, 1); + round_test_opt ("49501837517.214069742", "49501837517.21406974209598582965535114994486454740290406795", 9, 1); + round_test_opt ("-1.10094639313007538634258872002416492596260417033e+43", "-11009463931300753863425887200241649259626041.703327237", 4, 1); + round_test_opt ("-15079320729.1894", "-15079320729.1893812032633172481133077974162581453005755313218284", 4, 1); + round_test_opt ("-564880", "-564879.81730188296827284760142", 0, 1); + round_test_opt ("0", "-0.00000044710415335926612475456733757920412327813375556836787988595622211127775", 5, 1); + round_test_opt ("-5.0892251246766458444912241643674812585582e+31", "-50892251246766458444912241643674.81258558217344932428492833748374386935", 9, 1); + round_test_opt ("-0.4", "-0.39773938360585457515044562142137000481695128784849", 2, 1); + round_test_opt ("-59877098075549.9", "-59877098075549.871", 1, 1); + round_test_opt ("7.01425197216637438530506871997325620997125812e+37", "70142519721663743853050687199732562099.71258120285569129579872914365", 7, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("1170960728043781", "1170960728043780.52", 0, 1); + round_test_opt ("-158679923.8", "-158679923.83895211051855", 1, 1); + round_test_opt ("-1312134.4", "-1312134.37262", 1, 1); + round_test_opt ("339.90300146", "339.90300146396785894119726", 8, 1); + round_test_opt ("313.99394909", "313.9939490905555364316583381093179922478", 8, 1); + round_test_opt ("100", "100.43539989895095793026558070", 0, 1); + round_test_opt ("0.0005", "0.000511967049034719202427396", 4, 1); + round_test_opt ("1.3826292", "1.38262918376398535955329100656900617", 7, 1); + round_test_opt ("-3376864609027", "-3376864609027.31", 0, 1); + round_test_opt ("0", "-0.00022742631720238953606664846536638238892593836630193", 2, 1); + round_test_opt ("0.04", "0.03644343194033728170638539939055404195454217128924", 2, 1); + round_test_opt ("1.85079020372598370434938839203919481797033266247609133021349427255e+54", "1850790203725983704349388392039194817970332662476091330.2134942725494346", 11, 1); + round_test_opt ("-1019472.7374745413", "-1019472.7374745412966658065097247388402969329", 11, 1); + round_test_opt ("-7.7219209467723723861814313230702956157e+32", "-772192094677237238618143132307029.561567998790593083720", 5, 1); + round_test_opt ("0", "0.0002250988428774989303333158578906535198611417", 0, 1); + round_test_opt ("3818042524114368270.55990696309", "3818042524114368270.559906963093970691750518438534274907246771762349334", 11, 1); + round_test_opt ("5.5317765055734350936674694588551855966580241138435936153803855e+51", "5531776505573435093667469458855185596658024113843593.615380385499", 10, 1); + round_test_opt ("1.210324318102871018749790888251e+25", "12103243181028710187497908.882505631762785050909329", 5, 1); + round_test_opt ("-32489581947553187.65", "-32489581947553187.64937178976559783298752043613654217187748263824", 2, 1); + round_test_opt ("-5.819668587356525630435934798507394021971300298e+44", "-581966858735652563043593479850739402197130029.76011", 1, 1); + round_test_opt ("47225831.900305649", "47225831.900305649147437954583710923866999871", 9, 1); + round_test_opt ("-17361443874.82", "-17361443874.82050042729914650794408003097403090226747628770292154158", 2, 1); + round_test_opt ("808432127545768", "808432127545767.5672", 0, 1); + round_test_opt ("-3.5872396370964479081510988473876e+23", "-358723963709644790815109.8847387592291366949137370811246555449", 8, 1); + round_test_opt ("0.00116173203", "0.0011617320255535260635480469459847025228266492036602115184031567", 11, 1); + round_test_opt ("-4.3404695776587808601814031692728177e+33", "-4340469577658780860181403169272817.665240", 1, 1); + round_test_opt ("-1.897193503573543819793095470929478770084696029189486852137e+58", "-18971935035735438197930954709294787700846960291894868521370.024409953", 1, 1); + round_test_opt ("-5292241017779477.09658543", "-5292241017779477.09658543045290622741062294257", 9, 1); + round_test_opt ("-35.1", "-35.13905", 1, 1); + round_test_opt ("235.1", "235.148", 1, 1); + round_test_opt ("-1.200691371507463776806656069591490050554246628537520819692e+55", "-12006913715074637768066560695914900505542466285375208196.91755077", 2, 1); + round_test_opt ("-5.418204419424594214395334985560184016e+29", "-541820441942459421439533498556.018401564186863579641277488705", 7, 1); + round_test_opt ("5.444163340153691434331171778822781944798016655625e+44", "544416334015369143433117177882278194479801665.562468836", 4, 1); + round_test_opt ("-131626533038183601", "-131626533038183601.081", 0, 1); + round_test_opt ("9.6611510968833617556877072868245e+28", "96611510968833617556877072868.24499", 3, 1); + round_test_opt ("642", "642.15", 0, 1); + round_test_opt ("2.8", "2.7839951081005608001358255", 1, 1); + round_test_opt ("1575660085.637500732", "1575660085.63750073184325110547601", 9, 1); + round_test_opt ("343795539312454947078.5379", "343795539312454947078.5379263", 4, 1); + round_test_opt ("230493558539330961.46", "230493558539330961.4583404314830897111138533096929011660", 2, 1); + round_test_opt ("3485954.87640169", "3485954.876401687900086645288006479385774", 8, 1); + round_test_opt ("-424.180135", "-424.180134765132172292603759715197331411088421809167963657362", 6, 1); + round_test_opt ("664762188525820.19", "664762188525820.193954602032806708897222883562127550899924400644608688950", 2, 1); + round_test_opt ("-245", "-245.08", 0, 1); + round_test_opt ("2", "2.1", 0, 1); + round_test_opt ("0", "-0.00000016680630368737512629184", 5, 1); + round_test_opt ("0.0014", "0.00137262324057619148068114213992452771542833", 4, 1); + round_test_opt ("-48560891683776.102059", "-48560891683776.1020585782570631379694154", 6, 1); + round_test_opt ("-49037303691146507.15961", "-49037303691146507.15961048922934", 6, 1); + round_test_opt ("6504.5", "6504.4995059409990113", 2, 1); + round_test_opt ("-68194.4", "-68194.445299", 1, 1); + round_test_opt ("36548.079", "36548.0786291685788403454784765575946380627330", 3, 1); + round_test_opt ("-3632", "-3631.57593", 0, 1); + round_test_opt ("-5.404924165184979293599519181266283024e+31", "-54049241651849792935995191812662.830235709335668296987713", 5, 1); + round_test_opt ("-94446.93049594", "-94446.93049594035645149897427911523049241547775", 9, 1); + round_test_opt ("-285", "-285.21", 0, 1); + round_test_opt ("-8.4798376467830902363925009423294054760926150920484621224536e+49", "-84798376467830902363925009423294054760926150920484.6212245356", 9, 1); + round_test_opt ("3567332.2", "3567332.154085633406700981", 1, 1); + round_test_opt ("0", "-0.00000027090925348557045641317523", 6, 1); + round_test_opt ("-615.27093117", "-615.2709311718156906735", 8, 1); + round_test_opt ("6.1466191709", "6.14661917089102448242483866840892371", 10, 1); + round_test_opt ("-81430605431426", "-81430605431425.9818", 1, 1); + round_test_opt ("-2228410971.21211174", "-2228410971.212111738403506", 8, 1); + round_test_opt ("14.56", "14.559163589685051018706820831355074258529053190436", 2, 1); + round_test_opt ("10112.991", "10112.99134", 3, 1); + round_test_opt ("-1.549654744079498361988855705e+26", "-154965474407949836198885570.532", 1, 1); + round_test_opt ("-1.9612603016946628003179519291841508116446683884444e+49", "-19612603016946628003179519291841508116446683884444.16", 0, 1); + round_test_opt ("47508.546", "47508.5464269", 3, 1); + round_test_opt ("-112738828416.39520687878", "-112738828416.3952068787790118880227555103034032188186027302206954847064305", 11, 1); + round_test_opt ("1770382", "1770382.1", 0, 1); + round_test_opt ("0.00395", "0.00394974463050177539372800127529601980689844112635569413483705289912", 6, 1); + round_test_opt ("17773256759265862.69901967", "17773256759265862.6990196665850794629027119693414326654199282580563866916", 8, 1); + round_test_opt ("2196971", "2196971.18126", 0, 1); + round_test_opt ("25359251738269721822.5", "25359251738269721822.4955044", 2, 1); + round_test_opt ("0.00000627", "0.00000627003230463190432200378605149422479671069336272160735", 8, 1); + round_test_opt ("-4369010.49267486", "-4369010.49267486025", 8, 1); + round_test_opt ("3.9165171265879219556625e+23", "391651712658792195566249.5145649", 0, 1); + round_test_opt ("-0.00567994759", "-0.0056799475886137751344765089598966788653731735", 11, 1); + round_test_opt ("15781.9", "15781.92058136698346", 1, 1); + round_test_opt ("-7907913721716.3105685344", "-7907913721716.31056853439", 10, 1); + round_test_opt ("-9693450511.4", "-9693450511.4364345502415098763692791003398494225455326915628", 1, 1); + round_test_opt ("105.94", "105.941073626", 2, 1); + round_test_opt ("90569738206088032", "90569738206088031.56735007529169388144464377571473516086", 0, 1); + round_test_opt ("0", "0.0000064104086163561537456510584567812011298386884368729071232", 4, 1); + round_test_opt ("-275676888204082", "-275676888204081.7", 0, 1); + round_test_opt ("-0.418899", "-0.4188990517551812147580279209347258", 6, 1); + round_test_opt ("1446561555475694130.0307", "1446561555475694130.030741065760666433164798040501502060845671885", 4, 1); + round_test_opt ("312", "311.87", 0, 1); + round_test_opt ("1.9314131082464092998121719755669499e+31", "19314131082464092998121719755669.4985129906527231922243980692884", 3, 1); + round_test_opt ("-1.438964102525355362357420633e+26", "-143896410252535536235742063.2929", 1, 1); + round_test_opt ("6.3466257031691681890016112674760177105555569494998930013143741215e+64", "63466257031691681890016112674760177105555569494998930013143741215.3", 0, 1); + round_test_opt ("-1075991106231353", "-1075991106231352.85897436863706283122368232494927841291088", 0, 1); + round_test_opt ("3e-7", "0.0000003025771858567905454701894144820622844125524179484777759969900546341907", 8, 1); + round_test_opt ("0.26924219819", "0.26924219818549771642", 11, 1); + round_test_opt ("-8015635148902724631.2", "-8015635148902724631.203", 1, 1); + round_test_opt ("-18.71632606", "-18.7163260579908078250564735368880998343628734869184299960015055535449864", 8, 1); + round_test_opt ("-3231.50987", "-3231.50987067", 5, 1); + round_test_opt ("0.0014", "0.00138483199605699422972312", 4, 1); + round_test_opt ("592524956077", "592524956077.36", 0, 1); + round_test_opt ("46161060214305611.9", "46161060214305611.905923999914", 1, 1); + round_test_opt ("-118050105415060868265", "-118050105415060868265.17452270162067", 0, 1); + round_test_opt ("0", "-0.0000419150096503208194115355041221223877284254", 0, 1); + round_test_opt ("349643647.767", "349643647.7667443874073380083108205387951569802697884386818", 3, 1); + round_test_opt ("-5.916267067947468161184058954565920177652319e+39", "-5916267067947468161184058954565920177652.3190639778650036234024469031012137", 3, 1); + round_test_opt ("-3198422718124818925.9566145386", "-3198422718124818925.9566145385798592", 10, 1); + round_test_opt ("2163180.515", "2163180.5147178519745943148334645411750862330805", 3, 1); + round_test_opt ("-6e-8", "-0.0000000602928973647126340509049", 8, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-12720", "-12720.0628", 0, 1); + round_test_opt ("-4.429398854150809254887788137e+21", "-4429398854150809254887.788137417", 6, 1); + round_test_opt ("15464660106717031389.9", "15464660106717031389.8986987488731481357154523657013368570628985336477649", 2, 1); + round_test_opt ("-63154186749142214876.8218779201", "-63154186749142214876.821877920128863", 10, 1); + round_test_opt ("-11290260.5995255858", "-11290260.599525585841162466997053750802235950453228408340883", 10, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("15659433", "15659432.8", 0, 1); + round_test_opt ("-11075372.2", "-11075372.1591", 1, 1); + round_test_opt ("-0.000012542", "-0.000012541956961791973704249225434244498747029492497449809114722830404507", 10, 1); + round_test_opt ("0.0001", "0.000069237492968208049866", 4, 1); + round_test_opt ("1749887008.40093843044", "1749887008.4009384304368250420327", 11, 1); + round_test_opt ("-1411686.7", "-1411686.7427308578723", 1, 1); + round_test_opt ("-0.00049580939", "-0.00049580939113687167275006000995373385414454730", 11, 1); + round_test_opt ("-0.001", "-0.0010958004592288185", 3, 1); + round_test_opt ("1.1330767787768417637020668947e+22", "11330767787768417637020.6689469575538839155167073739", 6, 1); + round_test_opt ("0", "-0.0000000719730809474333956442093395372329599094726657137", 5, 1); + round_test_opt ("-1030434920.125023", "-1030434920.125023292041", 6, 1); + round_test_opt ("-0.01615", "-0.01614727974310057130602783119679271773492084831215117999332526354", 5, 1); + round_test_opt ("1.5", "1.457", 1, 1); + round_test_opt ("90289522.6216297603", "90289522.621629760293727149784155", 10, 1); + round_test_opt ("-28505223886234442.6", "-28505223886234442.613673188963701636152740", 1, 1); + round_test_opt ("0.00316398", "0.00316398058542186042159127483357911190755734894117002", 8, 1); + round_test_opt ("445420392002161617.72463", "445420392002161617.724630448638", 5, 1); + round_test_opt ("-10480899895139690.8", "-10480899895139690.79396842787", 1, 1); + round_test_opt ("242029030401", "242029030400.76", 0, 1); + round_test_opt ("8819268473.84598", "8819268473.8459776656713794401718879712350433244017515003765201823", 5, 1); + round_test_opt ("-18.7", "-18.7175", 1, 1); + round_test_opt ("665", "664.7167725818441030647033402651", 0, 1); + round_test_opt ("-9075411967.293", "-9075411967.292692099", 3, 1); + round_test_opt ("-0.02505900376", "-0.0250590037593497067153442190787824933811766014832125232373883316645974", 11, 1); + round_test_opt ("-307", "-307.2", 0, 1); + round_test_opt ("-78.32", "-78.316911", 2, 1); + round_test_opt ("-55750170", "-55750169.739447352", 0, 1); + round_test_opt ("0", "-0.0000706446718743070077386709316943343947210934751081", 2, 1); + round_test_opt ("-154366721494737499158.11581191", "-154366721494737499158.115811914880280741724525821345", 8, 1); + round_test_opt ("0", "0.000000244176706193853848", 5, 1); + round_test_opt ("3.02854522355334928443125776956621576e+29", "302854522355334928443125776956.621575508273376267512685902226959421411562874", 6, 1); + round_test_opt ("0", "0.000000038454633084227435", 5, 1); + round_test_opt ("-47.498579", "-47.49857933", 6, 1); + round_test_opt ("-5845057724680625.629", "-5845057724680625.6286483975495329281801633904425921895179286141302705", 3, 1); + round_test_opt ("0", "-0.0000001753", 1, 1); + round_test_opt ("6.304937094670304432147673713077936562995e+39", "6304937094670304432147673713077936562994.6290684312675815393937", 0, 1); + round_test_opt ("-4.4148160945578821446429e+21", "-4414816094557882144642.899533371", 2, 1); + round_test_opt ("0.0000015", "0.000001544907", 7, 1); + round_test_opt ("0.51054077", "0.51054076847", 8, 1); + round_test_opt ("-837298723.6827", "-837298723.68271037290095959146346996164686705661213188582911407844898522", 4, 1); + round_test_opt ("5.75868113138888770811211463843096239187e+38", "575868113138888770811211463843096239186.60", 0, 1); + round_test_opt ("189720.9", "189720.884", 1, 1); + round_test_opt ("-9996", "-9996.4", 0, 1); + round_test_opt ("-2936836337860435881.21", "-2936836337860435881.2063", 2, 1); + round_test_opt ("69774091268.49603997188", "69774091268.4960399718783250836608642488956447749899414465", 11, 1); + round_test_opt ("231847185", "231847185.2", 0, 1); + round_test_opt ("1.6476540181976483178382e+21", "1647654018197648317838.156494", 1, 1); + round_test_opt ("83436958727485935716.8457886", "83436958727485935716.8457885824037214853084354008586010224909377289371", 7, 1); + round_test_opt ("2199.246181618", "2199.24618161841666879186451139376780483414384051259408415945", 9, 1); + round_test_opt ("0", "-0.00014190990205091919220", 3, 1); + round_test_opt ("2.257358496396596635167063887366480385039047331567239793599971428933e+59", "225735849639659663516706388736648038503904733156723979359997.14289330399", 8, 1); + round_test_opt ("0", "0.000000038390688774835136785769346544535597804407691090", 4, 1); + round_test_opt ("-4", "-4", 0, 1); + round_test_opt ("-9.52697169829242933400467627255600447579e+38", "-952697169829242933400467627255600447579.14375759", 0, 1); + round_test_opt ("-665091398016.58953737686", "-665091398016.589537376861890998062838", 11, 1); + round_test_opt ("-4.23e-8", "-0.000000042328577200854267846657373266299411791629974587715258557194", 10, 1); + round_test_opt ("5.9202052490969753231227267184e+26", "592020524909697532312272671.83500966963327664391287246", 2, 1); + round_test_opt ("0", "0.0000000179149807345230640185816994822819392", 6, 1); + round_test_opt ("0", "-0.0057021237827481286659368552", 1, 1); + round_test_opt ("7.27e-7", "0.00000072673060039794461103", 9, 1); + round_test_opt ("-99439407.8895458356", "-99439407.8895458356434576964403463752975283874335863794282435580132707", 10, 1); + round_test_opt ("-13543275287842646375.6476439176", "-13543275287842646375.64764391760373455801804429729964426098924216", 11, 1); + round_test_opt ("-7152493.81324903", "-7152493.81324903009331429108422125949333353411541802", 8, 1); + round_test_opt ("3730694.65583999", "3730694.65583999002916799352994988975876027309978210", 8, 1); + round_test_opt ("6762015.02820054", "6762015.028200543434317056809442137716", 8, 1); + round_test_opt ("-530.65", "-530.65132", 2, 1); + round_test_opt ("-18845.7", "-18845.705", 1, 1); + round_test_opt ("-2946719567247740755.91", "-2946719567247740755.91206221173742948424654685827676871308445", 2, 1); + round_test_opt ("1", "1.35682667671002126192513305875792506665133376", 0, 1); + round_test_opt ("7451608379.73", "7451608379.732177", 2, 1); + round_test_opt ("-178.94246554", "-178.942465543951964859810274753961730897866488075435062964868431", 8, 1); + round_test_opt ("-975010", "-975010.049", 0, 1); + round_test_opt ("-0.001684183", "-0.0016841832970762709660330762585224913289348880089336173", 9, 1); + round_test_opt ("-8987761465620025443.38965", "-8987761465620025443.38964962728592015354299860", 5, 1); + round_test_opt ("-83909014414.25986651154", "-83909014414.25986651154355041127298613275", 11, 1); + round_test_opt ("-13.15975", "-13.1597524", 5, 1); + round_test_opt ("-4748943070009072355.1311048839", "-4748943070009072355.1311048839000", 10, 1); + round_test_opt ("6793530.7148", "6793530.714800700602741845216", 4, 1); + round_test_opt ("0.2", "0.19336656929824273029867332405424043809017452815309723830415986704865", 1, 1); + round_test_opt ("-1.529759780960691402489076959e+22", "-15297597809606914024890.7695883863359671729177926128456053", 5, 1); + round_test_opt ("0.7", "0.6812493081411867995961743", 1, 1); + round_test_opt ("-61609", "-61609.480", 0, 1); + round_test_opt ("0.3686942377", "0.36869423769948576020183350690479101310831768153121393758423171728318", 10, 1); + round_test_opt ("-29110961878245122977", "-29110961878245122976.5", 0, 1); + round_test_opt ("59419992370876.94", "59419992370876.9376440531529836730761352971301958944171895380455574", 2, 1); + round_test_opt ("-56.4335458161", "-56.43354581607959408247951", 10, 1); + round_test_opt ("6.8442509224929872472789618828612411616418e+38", "684425092249298724727896188286124116164.184", 2, 1); + round_test_opt ("0", "-0.00015", 3, 1); + round_test_opt ("80881689696778642420", "80881689696778642419.9263", 0, 1); + round_test_opt ("0", "0.0577940327113659086419745424518100", 0, 1); + round_test_opt ("0.383", "0.3832620286", 3, 1); + round_test_opt ("0.01464495748", "0.0146449574801145651434409145562996188668883420", 11, 1); + round_test_opt ("877.62221989", "877.622219891131514106177614702356642546765977763219997467246016352100684739", 8, 1); + round_test_opt ("1343135299012.954", "1343135299012.95398", 3, 1); + round_test_opt ("-9644346592838", "-9644346592838.386961952575164137732494766797778853886", 0, 1); + round_test_opt ("-521841889561.949541", "-521841889561.94954093936232905402428381282", 6, 1); + round_test_opt ("0", "-0.00244105708420249163090854919205183356655994092461832624561939981104901", 1, 1); + round_test_opt ("-5.8234798002248768024638353003946549132832898986453211886549627133e+58", "-58234798002248768024638353003946549132832898986453211886549.62713286235574", 6, 1); + round_test_opt ("3139", "3138.62", 0, 1); + round_test_opt ("0", "0.0001198056967084273101161036010098247178", 1, 1); + round_test_opt ("0", "0.000000282232416431871002402", 4, 1); + round_test_opt ("-3.5267693422143770971710572e+24", "-3526769342214377097171057.1982128651", 1, 1); + round_test_opt ("0", "-0.00028366966937563882731517577864263710585186525623549589863418077071", 3, 1); + round_test_opt ("91693087570352.600817", "91693087570352.6008170206439979060334911", 6, 1); + round_test_opt ("-1.69938495608143495608548828108517535172348930633049530716e+53", "-169938495608143495608548828108517535172348930633049530.7159", 3, 1); + round_test_opt ("4.109778740139187954868003044968718135913437529519e+38", "410977874013918795486800304496871813591.3437529518848865335260867216", 10, 1); + round_test_opt ("-7398274144471934.6", "-7398274144471934.563218249107642055", 1, 1); + round_test_opt ("-8", "-7.784310170693", 0, 1); + round_test_opt ("-571890306374296407.9", "-571890306374296407.943", 1, 1); + round_test_opt ("-6.633e-8", "-0.0000000663307924548045646890186879751708423426975624666424084662", 11, 1); + round_test_opt ("0", "-0.000126", 0, 1); + round_test_opt ("3264.1143148", "3264.114314761262198", 7, 1); + round_test_opt ("21.5154476", "21.515447580538608939378147773244405078958206375602341252932027644734460969", 7, 1); + round_test_opt ("1.114224824217252451210400841289249056735851e+36", "1114224824217252451210400841289249056.735850704960510381246929960356", 6, 1); + round_test_opt ("-10438.45", "-10438.4493", 2, 1); + round_test_opt ("0.00003350151", "0.0000335015134639164447942467980070763509369044498665883910186335362012066", 11, 1); + round_test_opt ("-0.0884527694", "-0.0884527693877831112215937398", 10, 1); + round_test_opt ("-9935322316284.355228", "-9935322316284.35522848745770884435562183155801", 6, 1); + round_test_opt ("4.77736147637228277582670683345723181411748305340671501670241970309124008e+64", "47773614763722827758267068334572318141174830534067150167024197030.912400806", 7, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("1.75483559835859910986230669030376449279e+38", "175483559835859910986230669030376449279.2", 0, 1); + round_test_opt ("9.482403377529181690360444118e+21", "9482403377529181690360.44411775742580", 6, 1); + round_test_opt ("0", "-0.0000917695370689692068175190", 2, 1); + round_test_opt ("1.1302e-7", "0.0000001130227102566118673161208090824479165834097561628587177919563228", 11, 1); + round_test_opt ("-0.0002", "-0.000220386", 4, 1); + round_test_opt ("-6.23360780006710623107814475832835e+28", "-62336078000671062310781447583.283496871701917", 5, 1); + round_test_opt ("0", "-0.0000014859262806322324908123019207978267246752674585719916413874449", 1, 1); + round_test_opt ("-2.945454781472201940260256266752003181661017e+39", "-2945454781472201940260256266752003181661.01729363", 3, 1); + round_test_opt ("1", "1.12", 0, 1); + round_test_opt ("16028", "16028.2", 0, 1); + round_test_opt ("8.719946816447055084159323587485285e+30", "8719946816447055084159323587485.28493012926755972043", 3, 1); + round_test_opt ("10257341.1", "10257341.1479881", 1, 1); + round_test_opt ("17013817361.935264454", "17013817361.935264453943321310979871994304292123382", 9, 1); + round_test_opt ("-22720931.7016855", "-22720931.70168547339", 7, 1); + round_test_opt ("3.13680917716151905744790064171349024e+33", "3136809177161519057447900641713490.236469555306636", 2, 1); + round_test_opt ("896720586914166855.9", "896720586914166855.879365970680029002", 1, 1); + round_test_opt ("4.2837750290481535203021258140802312695249833551461558872789566e+54", "4283775029048153520302125814080231269524983355146155887.278956615", 7, 1); + round_test_opt ("-251712843580128455922.68527733", "-251712843580128455922.6852773326", 8, 1); + round_test_opt ("-624702.3385486386", "-624702.33854863863132162134480885", 10, 1); + round_test_opt ("-3111028.772", "-3111028.771629280", 3, 1); + round_test_opt ("1.5343442398130900316772821216965e+27", "1534344239813090031677282121.69646067091128951374385916873", 4, 1); + round_test_opt ("-207638921.484075", "-207638921.484074779969497112988694629164072981085440065565", 6, 1); + round_test_opt ("-4", "-4.3", 0, 1); + round_test_opt ("-7.667993", "-7.6679930877344994", 6, 1); + round_test_opt ("-638028799.23148337", "-638028799.2314833708135163919329621483224070827", 8, 1); + round_test_opt ("5372711.93472769", "5372711.93472768979", 9, 1); + round_test_opt ("-0.0228", "-0.0227676793924317452083619", 4, 1); + round_test_opt ("5.895022660661795448320177250831188412885e+38", "589502266066179544832017725083118841288.4650055461695021762815742647767", 1, 1); + round_test_opt ("-1", "-0.7028672167258748238236251776154", 0, 1); + round_test_opt ("9.3569549641456163006343855549325267324958e+30", "9356954964145616300634385554932.52673249577170209357953905386683330", 10, 1); + round_test_opt ("-190569.83", "-190569.830208369225650606809797066267262066949682411309676855800407968002", 3, 1); + round_test_opt ("8682386157181739.244674", "8682386157181739.2446743748113687131975267001211320111334608550775773", 6, 1); + round_test_opt ("-6.117412690975843613242144918158874790952e+37", "-61174126909758436132421449181588747909.5246006273", 2, 1); + round_test_opt ("100.5", "100.451", 1, 1); + round_test_opt ("8493144.5932861", "8493144.593286139", 7, 1); + round_test_opt ("-0.0012", "-0.0011504742593558933405586716859068329652410", 4, 1); + round_test_opt ("-69770724.00678", "-69770724.00678127", 5, 1); + round_test_opt ("2.887811613235232046989e+21", "2887811613235232046989.45", 0, 1); + round_test_opt ("0", "0.000043543", 0, 1); + round_test_opt ("-2.570662211618339726384438457073655042907038603795501596304531612785165e+69", "-2570662211618339726384438457073655042907038603795501596304531612785165.2", 0, 1); + round_test_opt ("-635143350251489038.32065", "-635143350251489038.32064982758220679977", 6, 1); + round_test_opt ("-0.5216032", "-0.521603168503201998", 7, 1); + round_test_opt ("7.361869542409565631617120379371892080532e+34", "73618695424095656316171203793718920.8053198250586090", 5, 1); + round_test_opt ("0.0533664", "0.053366386047511479307547893533547909227", 7, 1); + round_test_opt ("209228370892404117.98739530602", "209228370892404117.98739530602036548608540", 11, 1); + round_test_opt ("2.91e-7", "0.00000029126796883406907292121569232822875536053044", 9, 1); + round_test_opt ("-359391.75092346007", "-359391.75092346007356230407272", 11, 1); + round_test_opt ("-163.5735689", "-163.5735688760734090660", 7, 1); + round_test_opt ("-1", "-1", 0, 1); + round_test_opt ("40004210.5582584224", "40004210.558258422361333", 10, 1); + round_test_opt ("25597650.3", "25597650.2731", 1, 1); + round_test_opt ("1.001657661088558240100760821561e+21", "1001657661088558240100.76082156119896270760831812226297", 9, 1); + round_test_opt ("22597.5713590881", "22597.5713590881338521413164246977885071809826288008051430179570", 10, 1); + round_test_opt ("-2.82507338465291476336051705148451643477094428073974e+47", "-282507338465291476336051705148451643477094428073.973872167", 3, 1); + round_test_opt ("-5.46787453939454578640208e+24", "-5467874539394545786402079.84219678844129055803", 0, 1); + round_test_opt ("349932064648365", "349932064648365.2444292", 0, 1); + round_test_opt ("0.000043", "0.00004265910947358020415348499125067179010441889634366697337077133466552", 6, 1); + round_test_opt ("0.00005674972", "0.0000567497239128431129600124874784", 11, 1); + round_test_opt ("-2", "-1.75", 0, 1); + round_test_opt ("9.06961775964308196048869225134891040528806077e+37", "90696177596430819604886922513489104052.8806076658528638816991", 7, 1); + round_test_opt ("-55.6622823345", "-55.6622823345398", 10, 1); + round_test_opt ("7.946152863153624318328619951066698613611636717991127e+50", "794615286315362431832861995106669861361163671799112.68315099693185752514234", 1, 1); + round_test_opt ("3.32126600038407214285810665582386e+23", "332126600038407214285810.6655823860401336492892313979965330510658024", 10, 1); + round_test_opt ("-5.0801669389908910140721e+21", "-5080166938990891014072.064473841803788707044", 1, 1); + round_test_opt ("-5.471319410437490768688847166e+22", "-54713194104374907686888.4716622264607577782175537678600733957195788", 5, 1); + round_test_opt ("-3.91637553952", "-3.916375539522145012433961993251468641359348985354768027", 11, 1); + round_test_opt ("0.6217", "0.621707002873765311594634770374556488042204123528621863966092999736483975597", 4, 1); + round_test_opt ("-38877", "-38876.91927046902154631", 0, 1); + round_test_opt ("-1.59537635340599267825283316569238823e+25", "-15953763534059926782528331.6569238822674194186084410", 10, 1); + round_test_opt ("0.26134768", "0.26134768471794575538600112", 8, 1); + round_test_opt ("8.6611482787553463490740035e+24", "8661148278755346349074003.478", 1, 1); + round_test_opt ("1.527e-7", "0.0000001526709669983697775532674726749547571621689512122876", 10, 1); + round_test_opt ("229699.4869", "229699.486895620", 4, 1); + round_test_opt ("-1.57168680038064574877849491149787045545806678876e+40", "-15716868003806457487784949114978704554580.667887604957629728485973024547", 8, 1); + round_test_opt ("-1.9363323745510392836429671043085943741188929973006010284961057744e+57", "-1936332374551039283642967104308594374118892997300601028496.105774437", 7, 1); + round_test_opt ("0.00000339", "0.00000338786070575526629053749300687308748454084326619224482154043951477723217", 8, 1); + round_test_opt ("-168", "-167.7", 0, 1); + round_test_opt ("1107464196.5228165", "1107464196.522816523319516305242786613554977896352538090021010422838102", 7, 1); + round_test_opt ("-0.0211121421", "-0.0211121420805180091655019083761316294", 10, 1); + round_test_opt ("0.4", "0.388649053814232307126", 1, 1); + round_test_opt ("34301146", "34301145.8263498894841911363070431836655336743157323418701425822", 0, 1); + round_test_opt ("-0.079", "-0.078564204260789475382083885352759745950294802666611880", 3, 1); + round_test_opt ("9.565473502896567600791678352422525063839825352974916607e+45", "9565473502896567600791678352422525063839825352.9749166072654879552027", 9, 1); + round_test_opt ("626792265339.1", "626792265339.145094", 1, 1); + round_test_opt ("-235448.9", "-235448.88036", 1, 1); + round_test_opt ("-78103.28622", "-78103.28622457354649", 5, 1); + round_test_opt ("-6.62390578590572068579674362431595353e+32", "-662390578590572068579674362431595.3525277518970626510774282", 3, 1); + round_test_opt ("-48122945326168143882", "-48122945326168143882.3", 0, 1); + round_test_opt ("8363.564", "8363.56446", 3, 1); + round_test_opt ("-3.637652544552061090930479659378147190018883689027726e+51", "-3637652544552061090930479659378147190018883689027725.92109964841073608596", 0, 1); + round_test_opt ("3.227685372039569033997527213105091722187242619167e+48", "3227685372039569033997527213105091722187242619166.73", 0, 1); + round_test_opt ("2.137566384682188124535023473201797095886638943949510144621567457e+60", "2137566384682188124535023473201797095886638943949510144621567.45671", 3, 1); + round_test_opt ("-3.315687716997812844093088662218228e+32", "-331568771699781284409308866221822.7927192992469250739427210961811703051307", 1, 1); + round_test_opt ("-725", "-725.1", 0, 1); + round_test_opt ("2.395404566051884918577591156726042015580751407749133e+48", "2395404566051884918577591156726042015580751407749.1334606336477794", 3, 1); + round_test_opt ("-0.000001", "-0.00000053696558009", 6, 1); + round_test_opt ("40213632702173443471.6121383", "40213632702173443471.6121383204029486849806851441038805518711333048462529", 7, 1); + round_test_opt ("25226864323.2136106", "25226864323.213610598425", 7, 1); + round_test_opt ("3.0702662350049631116943484739443862479174483359e+43", "30702662350049631116943484739443862479174483.3590074655360144", 3, 1); + round_test_opt ("-6.4529061793389722113117862297e+26", "-645290617933897221131178622.96763376", 2, 1); + round_test_opt ("-1565949460821", "-1565949460821.07", 0, 1); + round_test_opt ("-1.3", "-1.306823", 1, 1); + round_test_opt ("0", "0.000000035648743249682144080763704181744851219816495062903160470498752497919821006", 0, 1); + round_test_opt ("-8.4726254302913882251462863225390460912013610876e+37", "-84726254302913882251462863225390460912.013610876011727", 10, 1); + round_test_opt ("6.2203816355011871081767811814183e+30", "6220381635501187108176781181418.34", 1, 1); + round_test_opt ("-0.163", "-0.1626680061048713", 3, 1); + round_test_opt ("-2.54188403069862540205970518461756e+32", "-254188403069862540205970518461756.3", 0, 1); + round_test_opt ("0", "0.00000002604390158484059660660648738134281026698213903426210929194225657081623", 2, 1); + round_test_opt ("-346152.58", "-346152.582714163729795", 2, 1); + round_test_opt ("-12996.7280474", "-12996.728047390422147964", 7, 1); + round_test_opt ("-154760705.346333", "-154760705.3463329890689", 6, 1); + round_test_opt ("2.9526e-7", "0.000000295263521260395666244956353272273501719081318063362632", 11, 1); + round_test_opt ("-3.9091117425141622418826610429537228643488274e+42", "-3909111742514162241882661042953722864348827.4471", 1, 1); + round_test_opt ("1654", "1653.9979", 1, 1); + round_test_opt ("2773217368", "2773217367.80812", 0, 1); + round_test_opt ("-23501672596", "-23501672595.53", 0, 1); + round_test_opt ("0", "-0.000045990856191673263477331211915840285633", 3, 1); + round_test_opt ("-4.5480197585398187814583347799356579e+24", "-4548019758539818781458334.77993565788611620044739214590767274535417774609", 10, 1); + round_test_opt ("0", "-0.000045554559303731", 4, 1); + round_test_opt ("-12632.80348310909", "-12632.80348310908730561124183308842973815319952", 11, 1); + round_test_opt ("-1.18138082285988940681765555e+25", "-11813808228598894068176555.45553076656681573765904427280530513256977948", 1, 1); + round_test_opt ("-479", "-478.9874771448950756650422818619215246639689281", 1, 1); + round_test_opt ("1", "1.2", 0, 1); + round_test_opt ("6.0041499420870181363520308772719e+31", "60041499420870181363520308772718.5", 0, 1); + round_test_opt ("-6662877696.4", "-6662877696.37391335730576604739334748253185681", 1, 1); + round_test_opt ("0.00117", "0.0011726235472768599281043101323482392891852", 5, 1); + round_test_opt ("-939.4", "-939.3730961", 1, 1); + round_test_opt ("99159.39", "99159.38873", 2, 1); + round_test_opt ("-359", "-359.47288627064601781627496", 0, 1); + round_test_opt ("890117.08", "890117.08289778434200510019632397889822517753431431", 2, 1); + round_test_opt ("6.63375816371156968457041e+23", "663375816371156968457041.28423899", 0, 1); + round_test_opt ("-4.10982057418276081462637206727837458797467583857e+47", "-410982057418276081462637206727837458797467583856.7630608288", 0, 1); + round_test_opt ("-397", "-396.6", 0, 1); + round_test_opt ("3.11294746158246369823126325149e+21", "3112947461582463698231.263251491762277", 8, 1); + round_test_opt ("7746", "7746.23", 0, 1); + round_test_opt ("-0.00003", "-0.000026912239767670597962773", 5, 1); + round_test_opt ("-3778", "-3777.9522", 1, 1); + round_test_opt ("-4.97684852436124361495527801648e+28", "-49768485243612436149552780164.8009875", 2, 1); + round_test_opt ("7.73491171036745726904923118841780876822672534265838323731111e+58", "77349117103674572690492311884178087682267253426583832373111.113", 1, 1); + round_test_opt ("9.8966431653240771996047279226027e+22", "98966431653240771996047.279226027028594", 9, 1); + round_test_opt ("23908641.31", "23908641.3117499867219846081522558794662902490122", 2, 1); + round_test_opt ("4", "3.9859", 0, 1); + round_test_opt ("90", "90.0", 0, 1); + round_test_opt ("-32222.00196243", "-32222.001962426278", 8, 1); + round_test_opt ("-1.518812829487247562216e+21", "-1518812829487247562215.50", 0, 1); + round_test_opt ("-3.2", "-3.205808906", 1, 1); + round_test_opt ("-208770543038.898211507", "-208770543038.89821150705007918491104570836293773169717074580960456468", 9, 1); + round_test_opt ("0", "0.000000390429", 4, 1); + round_test_opt ("-0.139785", "-0.1397846918276028134595856546868795675545305896587195631099738048047", 6, 1); + round_test_opt ("-1.84389766241608422523501200650754496059404401530264148e+50", "-184389766241608422523501200650754496059404401530264.147603644835863734115", 3, 1); + round_test_opt ("-7.68712094018412860572676017845484411481069908369e+43", "-76871209401841286057267601784548441148106990.83687622", 4, 1); + round_test_opt ("6900142030817.429259765", "6900142030817.4292597646130999967607639644490993092155806195853800514", 9, 1); + round_test_opt ("0", "-0.0000030105518225", 4, 1); + round_test_opt ("-6.714055800144920951764125282793656980593253819271136670806e+54", "-6714055800144920951764125282793656980593253819271136670.80600816", 3, 1); + round_test_opt ("-4653189416537390728.885", "-4653189416537390728.8845285", 3, 1); + round_test_opt ("-3.260638535748528452047650918e+27", "-3260638535748528452047650917.7", 0, 1); + round_test_opt ("26", "26.0", 0, 1); + round_test_opt ("-8.37538727256099503145610141e+23", "-837538727256099503145610.141001640509967520511", 3, 1); + round_test_opt ("99196567204778640861", "99196567204778640860.9", 0, 1); + round_test_opt ("-8.314138986470814691119031485199361807215508368060178444673010328e+63", "-8314138986470814691119031485199361807215508368060178444673010328.0", 0, 1); + round_test_opt ("-0.00023051", "-0.0002305104687388081214425409647589066479519914620169527", 9, 1); + round_test_opt ("-297660548619", "-297660548618.87868055700832812526230847743363886232739754318064", 0, 1); + round_test_opt ("3464007694860431.3", "3464007694860431.262227463683", 1, 1); + round_test_opt ("-2.54786099963234047754453248094241328707387393361512773860762408e+62", "-254786099963234047754453248094241328707387393361512773860762408.00232010", 0, 1); + round_test_opt ("9.2446412511027120407547836502910175913797442684210761625379e+47", "924464125110271204075478365029101759137974426842.107616253789853128", 11, 1); + round_test_opt ("-0.0387", "-0.0387128076266330873519195800285655071301555834", 4, 1); + round_test_opt ("480.9188452863", "480.9188452863468446164206625079058768955271449097704906073506311", 10, 1); + round_test_opt ("-1", "-0.86630884300516744402803291780220945152", 0, 1); + round_test_opt ("231", "230.92", 0, 1); + round_test_opt ("3071350172608341", "3071350172608340.582294", 0, 1); + round_test_opt ("-0.00579", "-0.005789503974483376471867887936688850815456010473859463666368", 6, 1); + round_test_opt ("-10405.57708", "-10405.577077443128366832013822", 5, 1); + round_test_opt ("-233021510458372.09", "-233021510458372.0871487752298159597491435", 2, 1); + round_test_opt ("-0.745", "-0.7446916142342546383", 3, 1); + round_test_opt ("-7.183748714068453807909078219515115338295556607578058e+46", "-71837487140684538079090782195151153382955566075.78058204639491751222475", 5, 1); + round_test_opt ("-420.688253944", "-420.68825394427265204", 9, 1); + round_test_opt ("0", "-0.0000000184", 5, 1); + round_test_opt ("-1450.5", "-1450.52789867375960865669661274621776039770235088108", 1, 1); + round_test_opt ("2519.499011", "2519.4990105028243887459", 6, 1); + round_test_opt ("-1.1579003534187508725179188871520283529038877369575333e+41", "-115790035341875087251791888715202835290388.77369575333378444006", 11, 1); + round_test_opt ("9.1337739219127354631923706483787555165493265605427231e+52", "91337739219127354631923706483787555165493265605427231.118070308970", 0, 1); + round_test_opt ("-3.438376250556765725696862916053630521463884474650422e+51", "-3438376250556765725696862916053630521463884474650422.3059", 0, 1); + round_test_opt ("8.96012359366431497668176957569850445552446405905713945659589e+54", "8960123593664314976681769575698504455524464059057139456.59588917555775872", 5, 1); + round_test_opt ("-6.262", "-6.261991", 4, 1); + round_test_opt ("-1923282567571543", "-1923282567571543.0", 0, 1); + round_test_opt ("-277519680026359854845.783", "-277519680026359854845.78298210824", 3, 1); + round_test_opt ("-1.3864797947640414885611300634734495921516466e+32", "-138647979476404148856113006347344.959215164664547445239359524502584", 11, 1); + round_test_opt ("-2.87681272861729467781784585784825522e+35", "-287681272861729467781784585784825522.17", 0, 1); + round_test_opt ("0", "-0.00000001524207549800724296881028", 0, 1); + round_test_opt ("233745.664117498", "233745.66411749814175074770422796212482624286110", 9, 1); + round_test_opt ("0.0605867", "0.06058668571", 7, 1); + round_test_opt ("4.25642795850019500221778960004785372318e+27", "4256427958500195002217789600.0478537231827990952214326842205373895208090", 11, 1); + round_test_opt ("-1.293060165483310538998170050182112181287293136e+40", "-12930601654833105389981700501821121812872.93135723", 5, 1); + round_test_opt ("-3.702699384156750832389352255401551076630250622317e+48", "-3702699384156750832389352255401551076630250622316.61", 0, 1); + round_test_opt ("1.2562980355543511178621443709616584e+30", "1256298035554351117862144370961.6583506281536131516066898334442154061619", 4, 1); + round_test_opt ("-2.95109741336962946655925352405421607192048673035597695624029e+57", "-2951097413369629466559253524054216071920486730355976956240.2937587220684923", 2, 1); + round_test_opt ("0", "0.000000354302718125605329359047449071913792856192407017510430841042020", 2, 1); + round_test_opt ("-4.1886828855896969785562283060471713726327e+31", "-41886828855896969785562283060471.713726326922976134142", 9, 1); + round_test_opt ("212.36103954", "212.36103953965351449195537664336809100212801284487487", 9, 1); + round_test_opt ("312987948072725355.731", "312987948072725355.73110", 3, 1); + round_test_opt ("0", "0.0022285232415869089", 0, 1); + round_test_opt ("8.41103077595298166624326704393352e+22", "84110307759529816662432.67043933515175794884796241628149632964385", 10, 1); + round_test_opt ("1.6181570850366653393085559862269258983714718422352e+40", "16181570850366653393085559862269258983714.7184223522496148795709977", 9, 1); + round_test_opt ("-3.545357198162377086150366549612e+23", "-354535719816237708615036.654961160450023393989037709", 7, 1); + round_test_opt ("4.85672619573002901257927271256214712389417099731862402683e+58", "48567261957300290125792727125621471238941709973186240268300.24", 0, 1); + round_test_opt ("-1.289502824605541590536763565385582220044069170707581501639e+51", "-1289502824605541590536763565385582220044069170707581.5016394828165246", 6, 1); + round_test_opt ("1448196.228316", "1448196.228316069023212965555019856731002229021164196810243253", 6, 1); + round_test_opt ("-8.080041750568999820868791787555178724453992774828388516549513376e+57", "-8080041750568999820868791787555178724453992774828388516549.51337567", 6, 1); + round_test_opt ("-1.01055281005365912493269566e+25", "-10105528100536591249326956.581283197818463383", 1, 1); + round_test_opt ("-12.624", "-12.623767", 3, 1); + round_test_opt ("-7.84933169263129008291480512506622e+32", "-784933169263129008291480512506622.23", 0, 1); + round_test_opt ("-128786713.43", "-128786713.426987", 2, 1); + round_test_opt ("-420168758265445.657953646", "-420168758265445.6579536462520299", 9, 1); + round_test_opt ("0", "0", 1, 1); + round_test_opt ("134172.7683330327", "134172.7683330326699243976976191874309135530063216675297", 10, 1); + round_test_opt ("-0.00002", "-0.0000156861682310722089669532", 5, 1); + round_test_opt ("0.4039235", "0.40392349884638953158868927159351683622934", 7, 1); + round_test_opt ("-0.655", "-0.6546433013", 3, 1); + round_test_opt ("-5896336262907.79", "-5896336262907.7884", 2, 1); + round_test_opt ("1300317344730.259780862", "1300317344730.2597808619", 9, 1); + round_test_opt ("1.3164177199643139680812653361907748673532016952e+35", "131641771996431396808126533619077486.73532016951620119242012156406441440426", 11, 1); + round_test_opt ("-145", "-144.97", 0, 1); + round_test_opt ("-94", "-93.9299", 0, 1); + round_test_opt ("-379619", "-379618.6", 0, 1); + round_test_opt ("0", "0.0116337344716633718843866952096", 0, 1); + round_test_opt ("0", "-0.0000034855964717763280140903715489653", 4, 1); + round_test_opt ("2.7994709479081275481235098788288226563182e+38", "279947094790812754812350987882882265631.81569392", 2, 1); + round_test_opt ("15483520831504428.7", "15483520831504428.71185556292487488", 1, 1); + round_test_opt ("3938497355403603664.38966923245", "3938497355403603664.389669232448583858628040351059", 11, 1); + round_test_opt ("3.49655882970990547552385877397868e+23", "349655882970990547552385.8773978677153", 9, 1); + round_test_opt ("-9.5314113588574107571253229194237285440827882316e+38", "-953141135885741075712532291942372854408.2788231629758128487", 8, 1); + round_test_opt ("-224636067269702735000.8672514296", "-224636067269702735000.86725142959778", 10, 1); + round_test_opt ("0.3695925", "0.36959252", 7, 1); + round_test_opt ("1.185290463414173095654799796718546626342254428225e+39", "1185290463414173095654799796718546626342.25442822457028904", 9, 1); + round_test_opt ("-0.00024", "-0.0002445248283", 5, 1); + round_test_opt ("0.0002", "0.0002035773", 4, 1); + round_test_opt ("-67561.881", "-67561.88140", 3, 1); + round_test_opt ("-382.63", "-382.62760", 2, 1); + round_test_opt ("0.00555607448", "0.00555607447955739905806214891", 11, 1); + round_test_opt ("0", "-0.025116267790149342121433040975769563203802094834366406896379339054223842542", 0, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("28429490195.57", "28429490195.5708216404077", 2, 1); + round_test_opt ("-1521445298207930.98", "-1521445298207930.982620841330373025", 2, 1); + round_test_opt ("8.88171462946985916159853167638395740134495541340377982037213559e+61", "88817146294698591615985316763839574013449554134037798203721355.9382", 1, 1); + round_test_opt ("-1531412194183093824", "-1531412194183093824.10", 0, 1); + round_test_opt ("-3.363e-7", "-0.000000336320797303583625836661743", 10, 1); + round_test_opt ("-194473.19", "-194473.18603590896099", 2, 1); + round_test_opt ("19.01217085652", "19.01217085651954495368001976", 11, 1); + round_test_opt ("1.5379458966028217243205838105736021447587584029506112e+51", "1537945896602821724320583810573602144758758402950611.195448438", 2, 1); + round_test_opt ("41624098749768620074.1", "41624098749768620074.0540229620361", 1, 1); + round_test_opt ("-1.38", "-1.379301328311813", 2, 1); + round_test_opt ("17720451681.157", "17720451681.15700740385172996037168075", 4, 1); + round_test_opt ("-73387.81468935876", "-73387.8146893587610025733427447949657007667886", 11, 1); + round_test_opt ("414.736", "414.735957", 4, 1); + round_test_opt ("1.2e-8", "0.00000001212553313934520327766598", 9, 1); + round_test_opt ("0", "-0.00001275652831810138570098622005202939166281601580172628549356898902900808543816", 4, 1); + round_test_opt ("-2.36917074377733585116586726e+25", "-23691707437773358511658672.587", 1, 1); + round_test_opt ("93174923.4184308", "93174923.41843076742677981590825039", 7, 1); + round_test_opt ("-862199924941.95", "-862199924941.9474", 2, 1); + round_test_opt ("3.52866519632116536288396957497481880361281627440312e+44", "352866519632116536288396957497481880361281627.44031247032904531753968261", 6, 1); + round_test_opt ("-1.6563049865205455344453409124683468977856587003665369e+52", "-16563049865205455344453409124683468977856587003665368.9025730603", 0, 1); + round_test_opt ("-5.477737070119550239652450301897710710356e+39", "-5477737070119550239652450301897710710355.989", 0, 1); + round_test_opt ("-4.2418934307630353668205727885634470772201281227805e+39", "-4241893430763035366820572788563447077220.1281227804520966330964", 10, 1); + round_test_opt ("4.07049387418768102471806544437519776093375362941725263411168615944e+56", "407049387418768102471806544437519776093375362941725263411.1686159435942537", 9, 1); + round_test_opt ("0", "0.000000019057584769480004695230149267550830622691165", 3, 1); + round_test_opt ("122391892.536722961", "122391892.53672296148271940362017147176012184701554664942474075", 9, 1); + round_test_opt ("-44313153771648852027", "-44313153771648852027.3692806353020656219927765849305557248", 0, 1); + round_test_opt ("38153.9053", "38153.90529104833668124228664435", 4, 1); + round_test_opt ("0.236", "0.23634083366008638136639627501128685101991305893232329", 3, 1); + round_test_opt ("0.0186693076", "0.018669307645557655917520540823302957385770316520650838282", 10, 1); + round_test_opt ("-0.34449", "-0.34448900654968710762200791169829886245515492178837315", 5, 1); + round_test_opt ("31", "31.1", 0, 1); + round_test_opt ("-1.29792351657689538346132624656000780523205305846628988682e+55", "-12979235165768953834613262465600078052320530584662898868.17500889", 1, 1); + round_test_opt ("0", "-0.000046", 4, 1); + round_test_opt ("-20010813478.64083664", "-20010813478.6408366361070", 8, 1); + round_test_opt ("2951941912470115.5974", "2951941912470115.59736435", 4, 1); + round_test_opt ("-9", "-9.4", 0, 1); + round_test_opt ("0.0000153", "0.000015343066761846151730356902050688028263924987670784747252051", 7, 1); + round_test_opt ("30961311756.32", "30961311756.3151291446832973999719296714620432793509265", 2, 1); + round_test_opt ("-1.0948418039170141673217e+21", "-1094841803917014167321.7124134094809311874868523809918", 1, 1); + round_test_opt ("4.687736212830129016257021000471e+26", "468773621283012901625702100.047107777750192", 4, 1); + round_test_opt ("1.19582955451758313109936852523330173839437623635495402711234119426414e+65", "119582955451758313109936852523330173839437623635495402711234119426.4138495", 3, 1); + round_test_opt ("-7.013548124129147436389337e+21", "-7013548124129147436389.3373035690248269593583176320179096", 3, 1); + round_test_opt ("-1.344991799425954638800919469e+27", "-1344991799425954638800919468.9399", 0, 1); + round_test_opt ("-11", "-10.9", 0, 1); + round_test_opt ("-107", "-107.22976913758305862", 0, 1); + round_test_opt ("9.8904744098946133271435843964e+27", "9890474409894613327143584396.4001262431581123694271153317170128001773690", 3, 1); + round_test_opt ("0", "-0.0000000108336519389576646838131755873813163905060581182032693", 0, 1); + round_test_opt ("-5.5918627371723343369781004783977834030666019473e+36", "-5591862737172334336978100478397783403.0666019472687818522119057", 10, 1); + round_test_opt ("8.362497831801355477859900044042767114289e+31", "83624978318013554778599000440427.6711428894", 8, 1); + round_test_opt ("137.3", "137.341112600854", 1, 1); + round_test_opt ("17379904590994.27725043", "17379904590994.277250429976337", 8, 1); + round_test_opt ("-0.60621", "-0.606208881308", 5, 1); + round_test_opt ("38744", "38744.390233505840778545660298168992325038", 0, 1); + round_test_opt ("170533872573340181578.91004924", "170533872573340181578.9100492413121007055651272048219539395306", 8, 1); + round_test_opt ("0", "0.0000047362", 2, 1); + round_test_opt ("-1523936.7405885338", "-1523936.7405885337867719583950329482600383855327226", 10, 1); + round_test_opt ("-58446089958131727.025373", "-58446089958131727.025373434060170797492892", 6, 1); + round_test_opt ("-4729094181.1", "-4729094181.11778391", 1, 1); + round_test_opt ("1.01979778733735830237359817251e+24", "1019797787337358302373598.1725095410658909952834115082909671", 5, 1); + round_test_opt ("-0.02128", "-0.0212811283274298550900009544", 5, 1); + round_test_opt ("-9425489893588.98", "-9425489893588.9800401269333270769217550783", 2, 1); + round_test_opt ("622587997.5626", "622587997.56256", 4, 1); + round_test_opt ("3.7845328654165150700873884718853005151641384472585888545284e+54", "3784532865416515070087388471885300515164138447258588854.52836180967222074", 4, 1); + round_test_opt ("-74.7", "-74.71697", 1, 1); + round_test_opt ("-3.740882736979288061669172e+24", "-3740882736979288061669171.7", 0, 1); + round_test_opt ("-1.343570291469338269679843664e+24", "-1343570291469338269679843.6637213713796529056849612263771571", 3, 1); + round_test_opt ("0", "0.00005192083176237492100788000786884053842625", 1, 1); + round_test_opt ("5260897810132.282564", "5260897810132.282563799600362294070", 6, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("2.060230767965580990040251487e+25", "20602307679655809900402514.869837307561474090776325879651263627244518872", 3, 1); + round_test_opt ("-34", "-33.8594", 0, 1); + round_test_opt ("-7", "-7.49", 0, 1); + round_test_opt ("-0.000001639", "-0.00000163942310692491434432346648257477465124", 9, 1); + round_test_opt ("-9.9021626373043956053556011585899140945874e+39", "-9902162637304395605355601158589914094587.4058805767590884741", 1, 1); + round_test_opt ("-0.17149767", "-0.171497674765951662417692129904134", 8, 1); + round_test_opt ("-7.68657764", "-7.686577641177065448311154300", 8, 1); + round_test_opt ("-5463089078.55", "-5463089078.5499", 2, 1); + round_test_opt ("0", "0.00009765108167483017723523200360038472782500342095634165", 3, 1); + round_test_opt ("-60066284653119421907", "-60066284653119421907.02", 0, 1); + round_test_opt ("18267219965812161.682716417", "18267219965812161.68271641735116607850169066422401918", 9, 1); + round_test_opt ("-359823075.05", "-359823075.05184", 2, 1); + round_test_opt ("7553178939.34286302152", "7553178939.342863021518180187118100472170706733103", 11, 1); + round_test_opt ("37.66", "37.6629626", 2, 1); + round_test_opt ("195129678672654.67533159826", "195129678672654.6753315982644258458702074835530772564", 11, 1); + round_test_opt ("-3657626963769.5", "-3657626963769.536269724966", 1, 1); + round_test_opt ("5.717653721376967382317720776658856639880399732296360651499406725e+62", "571765372137696738231772077665885663988039973229636065149940672.461780433870", 1, 1); + round_test_opt ("-2.407349719715028091951237560575371262545331e+34", "-24073497197150280919512375605753712.625453314608", 8, 1); + round_test_opt ("-6.4622277965591985368834499222516637572362747e+43", "-64622277965591985368834499222516637572362747.4", 0, 1); + round_test_opt ("3012466875327212", "3012466875327212.4", 0, 1); + round_test_opt ("1.673176376655786719519141454337050776069611476662e+42", "1673176376655786719519141454337050776069611.4766618332251964145156295512", 6, 1); + round_test_opt ("1.13e-8", "0.0000000112567111305945", 10, 1); + round_test_opt ("-135286346.87", "-135286346.86596090987128112491", 2, 1); + round_test_opt ("116995056244446790768.91471", "116995056244446790768.914706121681375140971854835080239124462777", 5, 1); + round_test_opt ("-33088.39496454", "-33088.394964535359912440962286892244713859961860774966", 8, 1); + round_test_opt ("0.0029", "0.002885193676601631297646225699780092258488825849283430", 4, 1); + round_test_opt ("-0.001", "-0.000704030345270927068850442923020087083", 3, 1); + round_test_opt ("-1.51407647126853483913342837463e+26", "-151407647126853483913342837.463345209492150873648385567790658360709", 3, 1); + round_test_opt ("0", "0", 0, 1); + round_test_opt ("-5398341.98066801", "-5398341.98066800959", 8, 1); + round_test_opt ("-8.288708420223118829114238753638493767494917749638444493534e+48", "-8288708420223118829114238753638493767494917749638.4444935337702366748194786", 9, 1); + round_test_opt ("192907781641736378215.146", "192907781641736378215.14610049857389471404", 3, 1); + round_test_opt ("78329278074221693.3", "78329278074221693.3133941436516666426043", 1, 1); + round_test_opt ("-3.844371790823678015597142559385e+23", "-384437179082367801559714.25593849", 7, 1); + round_test_opt ("21074805308.5927422", "21074805308.592742178918130048041802940662", 7, 1); + round_test_opt ("-1930.9", "-1930.942124", 1, 1); + round_test_opt ("-0.97293629", "-0.972936285382", 8, 1); + round_test_opt ("-9.709400309860657906797403790106462e+22", "-97094003098606579067974.03790106462449351025312764568284545139277106780292", 11, 1); + round_test_opt ("17831", "17830.98", 1, 1); + round_test_opt ("-46544753121703122265.2713", "-46544753121703122265.27125112", 4, 1); + round_test_opt ("-5.991334435581337500054321597e+28", "-59913344355813375000543215970.16537373853", 0, 1); + round_test_opt ("0", "-0.0000001946909", 6, 1); + round_test_opt ("233.7368876", "233.7368876445806317007863917653462120868746636783056773", 7, 1); + round_test_opt ("1769.3998", "1769.3997977335036784261487149795516611933958166076767121595", 4, 1); + round_test_opt ("-95018518199868.632", "-95018518199868.631881346636866877542576474815981572784160735439977118453", 3, 1); + round_test_opt ("158147928.1317846256", "158147928.131784625606882039773678202142661445683308834511212124861965028525", 10, 1); + round_test_opt ("-14.139240057", "-14.13924005743791", 9, 1); + round_test_opt ("-125724980377360443.5580642", "-125724980377360443.55806419977907634317200", 7, 1); + round_test_opt ("-73.034", "-73.0340", 3, 1); + round_test_opt ("1681866.99", "1681866.986085", 2, 1); + round_test_opt ("1.33601798152535223780330576969005726785169583538640675408963899841e+62", "133601798152535223780330576969005726785169583538640675408963899.84057", 3, 1); + round_test_opt ("111", "110.6555", 0, 1); + round_test_opt ("9", "9.099125417327897365947614504895516342775008058", 0, 1); + round_test_opt ("-0.052016776", "-0.0520167761116816871032925156655990097", 9, 1); + round_test_opt ("18229450755648.712341", "18229450755648.712340831354", 6, 1); + round_test_opt ("2.6e-8", "0.000000026160038294472688099667", 9, 1); + round_test_opt ("-1.7206688854743220363372359758867079461161087627710638664433972736242e+61", "-17206688854743220363372359758867079461161087627710638664433972.736241983", 6, 1); + round_test_opt ("1", "1", 0, 1); + round_test_opt ("1.2695107004330982000745571550387e+31", "12695107004330982000745571550387.32", 0, 1); + round_test_opt ("0", "0.0005939767670372974905583467", 2, 1); + round_test_opt ("8.02652023220212325908046032809925190557e+38", "802652023220212325908046032809925190556.5", 0, 1); + round_test_opt ("-245.3", "-245.33097066", 1, 1); + round_test_opt ("1.090226389834921673230331e+21", "1090226389834921673230.3310", 3, 1); + round_test_opt ("1.401837692724662712631988597540334132135480114016365507751445200334e+59", "140183769272466271263198859754033413213548011401636550775144.52003338757", 7, 1); + round_test_opt ("-0.0429803", "-0.0429803041", 7, 1); + round_test_opt ("-837484961", "-837484960.51", 0, 1); + round_test_opt ("-557608372863.374", "-557608372863.373921081728019772120728554175942502425671364031130", 3, 1); + round_test_opt ("6.825202084728211879663190567e+25", "68252020847282118796631905.67084676539398210188429", 2, 1); + round_test_opt ("33948609923840755629.304218", "33948609923840755629.304218064480684384308", 6, 1); + round_test_opt ("-0.0357", "-0.03571534747616285470841646879235954336063067311362", 4, 1); + round_test_opt ("-439747322686", "-439747322686.1", 0, 1); + round_test_opt ("0", "0.000000822481121469906323328750556698695469952901211", 4, 1); + round_test_opt ("95444.6519867", "95444.6519866587190337", 7, 1); + round_test_opt ("-7.17015621327183952499082564e+22", "-71701562132718395249908.2563957094740145854388", 4, 1); + round_test_opt ("-81132060708306341.811681685", "-81132060708306341.81168168450289157", 9, 1); + round_test_opt ("-9.08360793483831940102708651965451e+28", "-90836079348383194010270865196.545143", 4, 1); + round_test_opt ("-9.11354679479764129316286471970162778677559818557738185522798977e+57", "-9113546794797641293162864719701627786775598185577381855227.9897652", 5, 1); + round_test_opt ("-1.20107336023", "-1.2010733602307560002266486134910603189900978971328542457027197223", 11, 1); + round_test_opt ("-15955570843522957.816", "-15955570843522957.8160770200916500451217450313739195578676", 3, 1); + round_test_opt ("-111.4943366", "-111.4943365989469234", 7, 1); + round_test_opt ("393.45234", "393.452340", 5, 1); + round_test_opt ("1987200778481096003", "1987200778481096003.16", 0, 1); + round_test_opt ("-7202.8", "-7202.80351", 2, 1); + round_test_opt ("1732487169109154", "1732487169109153.52627277901881882865792751811312733979132760882", 0, 1); + round_test_opt ("-8.770612191350956121181448768884081992044658126083387868221336e+56", "-877061219135095612118144876888408199204465812608338786822.13364626776086839", 4, 1); + round_test_opt ("-76.350859562", "-76.350859561627852755222958", 9, 1); + round_test_opt ("14355.401", "14355.401447712201680807651283669170933318382087626825204", 3, 1); + round_test_opt ("-1449378859710864758.26773", "-1449378859710864758.26773309601951175854071779292282", 5, 1); + round_test_opt ("369802.55569961", "369802.555699610300566368213049437766039899940979268573160115903", 8, 1); + round_test_opt ("-8988273856", "-8988273855.87818747196544722", 0, 1); + round_test_opt ("3.7490866818249648752537859531214733687327658435e+37", "37490866818249648752537859531214733687.3276584345286843889253209929", 9, 1); + round_test_opt ("-425752860.9332964", "-425752860.93329641196271410201809839254840862905389622", 7, 1); + round_test_opt ("-4.60654192082043464308466467412e+28", "-46065419208204346430846646741.236632587152498106407144958650724081014624394", 1, 1); + round_test_opt ("296346.3", "296346.25871", 1, 1); + round_test_opt ("250685207", "250685206.77", 0, 1); + round_test_opt ("-1.7537550489691833353467395256e+21", "-1753755048969183335346.73952559599863783171656860631880307873", 8, 1); + round_test_opt ("-0.02358678", "-0.02358678465099879980932281725020008846931303833", 8, 1); + round_test_opt ("-212.254562139", "-212.2545621390394289", 10, 1); + round_test_opt ("-1311853939632005.3", "-1311853939632005.33217525413262599600344107894549742882485", 1, 1); + round_test_opt ("-3.539793727968227919261506653423576395e+34", "-35397937279682279192615066534235763.946493594243196971211943568615379", 2, 1); + round_test_opt ("529181484178613", "529181484178613.09", 0, 1); + round_test_opt ("0", "0.0000008378207217740230407452", 1, 1); + round_test_opt ("-3170391159000754.962", "-3170391159000754.9623327991753934895846400678", 3, 1); + round_test_opt ("-1166.1865647", "-1166.186564702", 7, 1); + round_test_opt ("0", "0.0000005065", 2, 1); + round_test_opt ("-239408324760819.699", "-239408324760819.69896", 3, 1); + round_test_opt ("-150", "-149.54", 0, 1); + round_test_opt ("-6", "-5.7", 0, 1); + round_test_opt ("5.982178131653128642563607607479e+30", "5982178131653128642563607607478.51598", 0, 1); + round_test_opt ("114194344839831508.94887", "114194344839831508.9488704", 5, 1); + round_test_opt ("-3", "-2.96948140508", 0, 1); + round_test_opt ("0", "-0.00000178", 2, 1); + round_test_opt ("-5.49560861202813506376830616e+22", "-54956086120281350637683.06157838610270962981835747228080444707773438697951", 4, 1); + round_test_opt ("-1130", "-1129.7", 0, 1); + round_test_opt ("-1.09622390091172445433959e+22", "-10962239009117244543395.87", 1, 1); + round_test_opt ("4.1967409516931539323376833501876e+25", "41967409516931539323376833.50187593", 6, 1); + round_test_opt ("488.4431", "488.443058881421", 4, 1); + round_test_opt ("-3.341081197947358283406856754935400152922716824359441832062252350337092e+63", "-3341081197947358283406856754935400152922716824359441832062252350.33709238596", 6, 1); + round_test_opt ("-0.0001", "-0.000131", 4, 1); + round_test_opt ("-2811137", "-2811137.0", 0, 1); + round_test_opt ("-6.8518242119095136588703752785064861293918e+33", "-6851824211909513658870375278506486.12939181706060680111320378931", 7, 1); + round_test_opt ("0", "-0.000001158412390171247036611398535301441492397427860549381", 1, 1); + round_test_opt ("-1.8457310857905680733220158103e+26", "-184573108579056807332201581.03157560162525421016385805", 2, 1); + round_test_opt ("26035515.3765696", "26035515.3765696412799599329272502540947186361836163857925494614375654502", 7, 1); + round_test_opt ("-0.00015697544", "-0.00015697544492028121161565046082349574494206132949", 11, 1); + round_test_opt ("0", "-0.00000922", 4, 1); + round_test_opt ("-2.9710955860835260512433819239889924e+30", "-2971095586083526051243381923988.9923792511653901141196", 4, 1); + round_test_opt ("4812", "4812.08", 0, 1); + round_test_opt ("323873569.9", "323873569.8538583293929536318", 1, 1); + round_test_opt ("-0.05", "-0.0525345488873151519197355747109516567762564531998894232967588627795646124839", 2, 1); + round_test_opt ("-3.749856289691268920412813776399690267e+25", "-37498562896912689204128137.7639969026712577799317", 11, 1); + round_test_opt ("15760520075", "15760520075.2077272585674595951", 0, 1); + round_test_opt ("0.000002", "0.000002047301347967023214702141475464067271617001839618440963176162442171", 7, 1); + round_test_opt ("-37958888589732.18", "-37958888589732.17646343", 2, 1); + round_test_opt ("0.00038335414", "0.00038335414145913803544666166332132", 11, 1); + round_test_opt ("412", "412.115631", 0, 1); + round_test_opt ("0.7858", "0.78583053497689849277819", 4, 1); + round_test_opt ("12145011.6834", "12145011.683373", 4, 1); + round_test_opt ("-2599841469120502", "-2599841469120502.30054715279289266251072312479714125516139560932248677", 0, 1); + round_test_opt ("-1.9e-8", "-0.00000001915099862196171556902231592931", 9, 1); + round_test_opt ("-1360750129010445875", "-1360750129010445875.3", 0, 1); + + round_test_opt ("5667.86424", "5667.86423613606", 5, 2); + round_test_opt ("77064.18", "77064.1808", 2, 2); + round_test_opt ("-16", "-15.6194", 0, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("0", "-0.0198831139", 1, 2); + round_test_opt ("0.000001", "0.0000010773756787", 6, 2); + round_test_opt ("1.664e-7", "0.000000166404881860", 11, 2); + round_test_opt ("-4992.662407", "-4992.66240693950", 6, 2); + round_test_opt ("0.000005", "0.000005323614362503", 6, 2); + round_test_opt ("0", "0.000045730652367143", 4, 2); + round_test_opt ("86122.4", "86122.381", 1, 2); + round_test_opt ("0.0006972", "0.00069715250388650", 7, 2); + round_test_opt ("-0.00307929", "-0.00307929245183", 8, 2); + round_test_opt ("-1", "-1", 0, 2); + round_test_opt ("114897406", "114897405.57", 0, 2); + round_test_opt ("-511095586.0277", "-511095586.027694", 4, 2); + round_test_opt ("-2439169322144", "-2439169322144.0", 0, 2); + round_test_opt ("192429067", "192429067.3", 0, 2); + round_test_opt ("1.6075e-7", "0.00000016074832889101", 11, 2); + round_test_opt ("-66", "-66.35", 0, 2); + round_test_opt ("567704214424", "567704214424.05", 1, 2); + round_test_opt ("-98", "-97.61165691706", 0, 2); + round_test_opt ("50611.68", "50611.681", 2, 2); + round_test_opt ("-11781.4", "-11781.4484", 1, 2); + round_test_opt ("0.353525", "0.3535253268", 6, 2); + round_test_opt ("-5156552075", "-5156552075.0", 0, 2); + round_test_opt ("6.3", "6.290", 1, 2); + round_test_opt ("-35.18471", "-35.18471189", 5, 2); + round_test_opt ("0", "-0.00000020599568", 4, 2); + round_test_opt ("0", "-0.0000032547092901614", 1, 2); + round_test_opt ("43415", "43415.078", 0, 2); + round_test_opt ("145", "145.07", 0, 2); + round_test_opt ("18511", "18510.93", 0, 2); + round_test_opt ("-126", "-125.705879", 0, 2); + round_test_opt ("-1", "-1", 0, 2); + round_test_opt ("84", "84.41", 0, 2); + round_test_opt ("-632", "-631.8801", 0, 2); + round_test_opt ("-918.8", "-918.828", 1, 2); + round_test_opt ("24537", "24536.7774", 0, 2); + round_test_opt ("649.3", "649.3069", 1, 2); + round_test_opt ("-0.00054", "-0.0005358424700", 5, 2); + round_test_opt ("-252098.69483", "-252098.6948257", 5, 2); + round_test_opt ("-2", "-1.83", 0, 2); + round_test_opt ("-2602891.6709", "-2602891.67089836", 4, 2); + round_test_opt ("-111", "-110.70", 0, 2); + round_test_opt ("0", "0.0000000205365", 0, 2); + round_test_opt ("756162.23", "756162.234812", 2, 2); + round_test_opt ("-9.5", "-9.456", 1, 2); + round_test_opt ("-4347477", "-4347477.0", 0, 2); + round_test_opt ("-194481859.7", "-194481859.7352", 1, 2); + round_test_opt ("19.39", "19.3874", 2, 2); + round_test_opt ("3", "3.28", 0, 2); + round_test_opt ("4689610.3", "4689610.2868", 1, 2); + round_test_opt ("1.63784942", "1.63784942078", 8, 2); + round_test_opt ("-52", "-52.07", 0, 2); + round_test_opt ("151664", "151664.282", 0, 2); + round_test_opt ("654516815715", "654516815714.8", 0, 2); + round_test_opt ("155", "155.298", 0, 2); + round_test_opt ("129895589", "129895589.16", 0, 2); + round_test_opt ("3", "3", 0, 2); + round_test_opt ("-4", "-3.8", 0, 2); + round_test_opt ("0", "0.0000003065761", 3, 2); + round_test_opt ("-1166.691", "-1166.69117213", 3, 2); + round_test_opt ("143367", "143366.6367", 0, 2); + round_test_opt ("4", "3.78", 0, 2); + round_test_opt ("5879635", "5879635.3", 0, 2); + round_test_opt ("-28637", "-28636.732841956", 0, 2); + round_test_opt ("85", "84.8", 0, 2); + round_test_opt ("-110332204", "-110332204.4", 0, 2); + round_test_opt ("-11", "-10.78", 0, 2); + round_test_opt ("43.13178", "43.131779781", 6, 2); + round_test_opt ("-24518", "-24518.0", 0, 2); + round_test_opt ("0", "0.000000037550093872", 0, 2); + round_test_opt ("-2826.714", "-2826.71372", 3, 2); + round_test_opt ("0", "0.0000016424239140301", 2, 2); + round_test_opt ("3e-7", "0.0000002551065510", 7, 2); + round_test_opt ("0.005", "0.0045833", 3, 2); + round_test_opt ("-5344653.4", "-5344653.399", 1, 2); + round_test_opt ("-0.0714449199", "-0.07144491994", 10, 2); + round_test_opt ("-44", "-44.3", 0, 2); + round_test_opt ("-3", "-2.8", 0, 2); + round_test_opt ("525726486.328", "525726486.32840", 3, 2); + round_test_opt ("-48786108.8837", "-48786108.8837116", 4, 2); + round_test_opt ("519553", "519552.96837", 1, 2); + round_test_opt ("3", "2.51", 0, 2); + round_test_opt ("3", "3", 0, 2); + round_test_opt ("-0.003", "-0.00252341812981132", 3, 2); + round_test_opt ("72.156", "72.15606", 3, 2); + round_test_opt ("-7.2", "-7.206", 1, 2); + round_test_opt ("0", "0.000000470", 4, 2); + round_test_opt ("0", "-0.015210270", 0, 2); + round_test_opt ("6", "6.377", 0, 2); + round_test_opt ("0", "0.0243542304268736", 0, 2); + round_test_opt ("3173.4", "3173.3541", 1, 2); + round_test_opt ("-14.01", "-14.0131", 2, 2); + round_test_opt ("-11", "-11.2", 0, 2); + round_test_opt ("-39323844147.9", "-39323844147.8556", 1, 2); + round_test_opt ("0", "0.0000025984686009", 1, 2); + round_test_opt ("2.121038", "2.1210379", 6, 2); + round_test_opt ("-0.032298452", "-0.03229845202271", 9, 2); + round_test_opt ("-2231", "-2230.6", 0, 2); + round_test_opt ("-0.10617305", "-0.106173047187", 8, 2); + round_test_opt ("-0.07914", "-0.079142689", 5, 2); + round_test_opt ("3.6", "3.63105", 1, 2); + round_test_opt ("-105", "-104.749", 0, 2); + round_test_opt ("8608", "8607.64", 0, 2); + round_test_opt ("0", "-0.000000036533159941", 3, 2); + round_test_opt ("-9024.69", "-9024.69428198619", 2, 2); + round_test_opt ("-2.62", "-2.6230644095", 2, 2); + round_test_opt ("-157089.64", "-157089.63972", 2, 2); + round_test_opt ("10996853", "10996853.27", 0, 2); + round_test_opt ("17310821", "17310821.17", 0, 2); + round_test_opt ("553164825599", "553164825598.9", 0, 2); + round_test_opt ("-439409.7903", "-439409.79027156", 4, 2); + round_test_opt ("1", "1.4", 0, 2); + round_test_opt ("0", "0.00000283594273", 1, 2); + round_test_opt ("-3160627.8", "-3160627.79", 1, 2); + round_test_opt ("0", "-0.0000000122", 3, 2); + round_test_opt ("13.09", "13.0947284881", 2, 2); + round_test_opt ("7.6", "7.611", 1, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("-4", "-3.9", 0, 2); + round_test_opt ("-3.8e-7", "-0.000000380008000605611", 9, 2); + round_test_opt ("0", "-0.03867276", 1, 2); + round_test_opt ("-0.0000013587", "-0.0000013587446", 10, 2); + round_test_opt ("0", "0.000013922335687903", 4, 2); + round_test_opt ("6336358769268", "6336358769268.1", 0, 2); + round_test_opt ("-662049", "-662048.52", 0, 2); + round_test_opt ("-14691.03", "-14691.0266", 2, 2); + round_test_opt ("0", "-0.000000111042466941", 0, 2); + round_test_opt ("-0.08", "-0.08023", 3, 2); + round_test_opt ("13.65", "13.64845611", 2, 2); + round_test_opt ("0", "0.0000003093585", 2, 2); + round_test_opt ("-107.797", "-107.797035141", 4, 2); + round_test_opt ("29", "28.951", 0, 2); + round_test_opt ("1546.85541", "1546.855413", 5, 2); + round_test_opt ("0", "0.00000001346", 7, 2); + round_test_opt ("-7090.7", "-7090.6973785", 1, 2); + round_test_opt ("-0.0000014", "-0.0000013773530", 7, 2); + round_test_opt ("199960", "199960.1", 0, 2); + round_test_opt ("3798", "3798.09", 0, 2); + round_test_opt ("-1798.64605", "-1798.6460536", 5, 2); + round_test_opt ("7.3", "7.255058", 1, 2); + round_test_opt ("5619255", "5619254.78958842", 0, 2); + round_test_opt ("-1.55", "-1.549", 2, 2); + round_test_opt ("42954.2807", "42954.2806920", 4, 2); + round_test_opt ("-0.1", "-0.12145613", 1, 2); + round_test_opt ("130095.1664", "130095.16644", 4, 2); + round_test_opt ("0.001", "0.00080", 3, 2); + round_test_opt ("-0.01361", "-0.0136069442553064", 5, 2); + round_test_opt ("0", "0.000323", 3, 2); + round_test_opt ("5", "4.8", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("-38443", "-38443.3", 0, 2); + round_test_opt ("7068981", "7068981.4", 0, 2); + round_test_opt ("1254", "1253.9", 0, 2); + round_test_opt ("94", "93.97", 0, 2); + round_test_opt ("225319314", "225319313.982", 1, 2); + round_test_opt ("43188727.7496", "43188727.749556", 4, 2); + round_test_opt ("30.68", "30.68362777706", 2, 2); + round_test_opt ("-28688.6", "-28688.607192", 1, 2); + round_test_opt ("5", "5.397", 0, 2); + round_test_opt ("80905094745458", "80905094745457.7", 0, 2); + round_test_opt ("0", "-0.000000501548601278879", 0, 2); + round_test_opt ("0", "0.009603", 0, 2); + round_test_opt ("3", "3", 0, 2); + round_test_opt ("11.9653", "11.9652973", 4, 2); + round_test_opt ("12", "12.28128", 0, 2); + round_test_opt ("473038.6", "473038.60250505", 2, 2); + round_test_opt ("581.9327851756", "581.932785175634", 10, 2); + round_test_opt ("7e-8", "0.0000000709", 8, 2); + round_test_opt ("-7.55e-7", "-0.000000755476359308", 9, 2); + round_test_opt ("1359295.232", "1359295.23220", 3, 2); + round_test_opt ("206514", "206514.058", 0, 2); + round_test_opt ("6227", "6226.64", 0, 2); + round_test_opt ("11458.71", "11458.7128784935", 2, 2); + round_test_opt ("0", "-0.000000463030076", 0, 2); + round_test_opt ("-68498", "-68497.90318", 0, 2); + round_test_opt ("0", "-0.000000052923214", 4, 2); + round_test_opt ("-47276919", "-47276918.6", 0, 2); + round_test_opt ("-1.5", "-1.498618", 2, 2); + round_test_opt ("-1227652019", "-1227652018.70982", 0, 2); + round_test_opt ("0", "0.0000076395117470", 3, 2); + round_test_opt ("606", "606.2", 0, 2); + round_test_opt ("-31.1", "-31.053", 1, 2); + round_test_opt ("1241258.5419", "1241258.54190", 4, 2); + round_test_opt ("0", "0.0000000199335", 2, 2); + round_test_opt ("-0.000012511", "-0.0000125113106926", 9, 2); + round_test_opt ("25", "24.53659035", 0, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("70.08", "70.0755513", 2, 2); + round_test_opt ("13.564", "13.5640339577", 4, 2); + round_test_opt ("0", "-0.0011", 0, 2); + round_test_opt ("-452388079", "-452388079.23774", 0, 2); + round_test_opt ("-3662306", "-3662305.7", 0, 2); + round_test_opt ("668443163.952", "668443163.9523", 3, 2); + round_test_opt ("238", "237.55", 0, 2); + round_test_opt ("5180946", "5180946.29", 0, 2); + round_test_opt ("0.01055950429", "0.0105595042884", 11, 2); + round_test_opt ("0.00103", "0.00103103380", 5, 2); + round_test_opt ("0", "-0.0000595562092852", 2, 2); + round_test_opt ("304638", "304637.7", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("-2698", "-2698.1", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("21", "20.8", 0, 2); + round_test_opt ("-1056.322598", "-1056.3225978", 6, 2); + round_test_opt ("0", "-0.000046561", 1, 2); + round_test_opt ("-14721", "-14721.41", 0, 2); + round_test_opt ("5", "5.2", 0, 2); + round_test_opt ("0.0003355981", "0.0003355980531", 10, 2); + round_test_opt ("30242.6", "30242.568924", 1, 2); + round_test_opt ("22008", "22007.913", 0, 2); + round_test_opt ("-5", "-5", 0, 2); + round_test_opt ("-4.27838", "-4.278383126", 5, 2); + round_test_opt ("5", "5", 0, 2); + round_test_opt ("38.3127", "38.312706", 4, 2); + round_test_opt ("-3.01", "-3.0087", 2, 2); + round_test_opt ("-0.00000727", "-0.00000727017231697", 8, 2); + round_test_opt ("0", "0.46", 0, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("187.243", "187.242942", 3, 2); + round_test_opt ("9230.5", "9230.541", 1, 2); + round_test_opt ("0", "0.0000001277", 5, 2); + round_test_opt ("-8", "-8.0", 0, 2); + round_test_opt ("6", "6.0", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("-25311.7", "-25311.7440865", 1, 2); + round_test_opt ("-0.0003877", "-0.000387687300056204", 7, 2); + round_test_opt ("-0.00000323316", "-0.0000032331642940", 11, 2); + round_test_opt ("-3579", "-3579.4492471", 0, 2); + round_test_opt ("3", "2.98", 0, 2); + round_test_opt ("8", "8", 0, 2); + round_test_opt ("0.0004405", "0.0004404793064989", 7, 2); + round_test_opt ("1719738619", "1719738618.551", 0, 2); + round_test_opt ("2.0795288519", "2.07952885187153", 10, 2); + round_test_opt ("28", "27.6", 0, 2); + round_test_opt ("0", "-0.000015689532077", 2, 2); + round_test_opt ("1.4", "1.4454", 1, 2); + round_test_opt ("60431664855", "60431664854.62", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("-5023632794932", "-5023632794932.45", 0, 2); + round_test_opt ("-467912.6151184", "-467912.615118399", 8, 2); + round_test_opt ("0", "0.00000002973", 7, 2); + round_test_opt ("1", "1.37623744313", 0, 2); + round_test_opt ("1.315e-7", "0.00000013146985447", 10, 2); + round_test_opt ("-108611.3", "-108611.2508332", 1, 2); + round_test_opt ("-943067401.709", "-943067401.70877", 3, 2); + round_test_opt ("-432.151", "-432.1509", 3, 2); + round_test_opt ("1", "1.1", 0, 2); + round_test_opt ("-7.2231653903", "-7.22316539034098", 10, 2); + round_test_opt ("13244016829", "13244016828.583", 0, 2); + round_test_opt ("84.80426237", "84.80426237130", 8, 2); + round_test_opt ("-2822", "-2821.8", 0, 2); + round_test_opt ("-263.88744", "-263.887436", 5, 2); + round_test_opt ("-10.52978", "-10.529783949205", 5, 2); + round_test_opt ("-384", "-383.855", 0, 2); + round_test_opt ("-2", "-2", 0, 2); + round_test_opt ("-2", "-2", 0, 2); + round_test_opt ("50.8", "50.7962", 2, 2); + round_test_opt ("-3.2", "-3.179", 1, 2); + round_test_opt ("0", "0.000000129191", 6, 2); + round_test_opt ("-20", "-20.4", 0, 2); + round_test_opt ("-10273", "-10273.09414", 0, 2); + round_test_opt ("-0.000002", "-0.00000195206031", 7, 2); + round_test_opt ("1.7", "1.725", 1, 2); + round_test_opt ("0", "-0.000000081111", 2, 2); + round_test_opt ("1051982", "1051981.971507", 1, 2); + round_test_opt ("-791.5", "-791.5303", 1, 2); + round_test_opt ("782.5", "782.50257403", 1, 2); + round_test_opt ("1683.653", "1683.6533622", 3, 2); + round_test_opt ("0", "0.000001830912258987", 0, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("3", "3", 0, 2); + round_test_opt ("0", "0.1979406187210", 0, 2); + round_test_opt ("-1619.03", "-1619.02757", 2, 2); + round_test_opt ("19.818364", "19.81836358", 6, 2); + round_test_opt ("2285", "2285.1", 0, 2); + round_test_opt ("-10.301469014", "-10.3014690136647", 9, 2); + round_test_opt ("-425432259761", "-425432259760.75", 0, 2); + round_test_opt ("-0.00372", "-0.0037240613948967", 5, 2); + round_test_opt ("69860", "69859.9", 0, 2); + round_test_opt ("47", "47.48", 0, 2); + round_test_opt ("-7.339e-7", "-0.000000733890", 10, 2); + round_test_opt ("-972.7579343", "-972.75793426542", 7, 2); + round_test_opt ("-0.000001", "-0.00000149104374921", 6, 2); + round_test_opt ("9", "9", 0, 2); + round_test_opt ("-98.21", "-98.20563090362", 2, 2); + round_test_opt ("2", "2", 0, 2); + round_test_opt ("4509.793", "4509.79347", 3, 2); + round_test_opt ("-1", "-1.480", 0, 2); + round_test_opt ("6", "6", 0, 2); + round_test_opt ("2160.6", "2160.64199500", 1, 2); + round_test_opt ("0", "-0.000000051998", 2, 2); + round_test_opt ("-9001064240", "-9001064240.17", 0, 2); + round_test_opt ("-7", "-7", 0, 2); + round_test_opt ("3", "3.0", 0, 2); + round_test_opt ("0", "-0.05955", 0, 2); + round_test_opt ("0", "-0.00059", 2, 2); + round_test_opt ("-3", "-3.03", 0, 2); + round_test_opt ("23729292333", "23729292333.3", 0, 2); + round_test_opt ("13.196304207", "13.1963042065158", 9, 2); + round_test_opt ("8941.7", "8941.705", 1, 2); + round_test_opt ("-397.2", "-397.248", 1, 2); + round_test_opt ("79974871", "79974870.90", 0, 2); + round_test_opt ("-86.67", "-86.6730", 2, 2); + round_test_opt ("-2", "-2.4", 0, 2); + round_test_opt ("1", "1.24", 0, 2); + round_test_opt ("-0.0046931", "-0.004693142692", 7, 2); + round_test_opt ("-7.55e-7", "-0.000000755159902862", 9, 2); + round_test_opt ("0.000004", "0.0000038816", 6, 2); + round_test_opt ("-88", "-88.4", 0, 2); + round_test_opt ("329004398.76", "329004398.759", 2, 2); + round_test_opt ("443076211", "443076211.10", 0, 2); + round_test_opt ("30.959959", "30.959958807", 6, 2); + round_test_opt ("12758.018", "12758.017742049", 3, 2); + round_test_opt ("-0.0002", "-0.000164638", 4, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("0", "-0.0000000165739", 7, 2); + round_test_opt ("-4.2995384", "-4.29953836", 7, 2); + round_test_opt ("601736976.15", "601736976.150075", 3, 2); + round_test_opt ("-47", "-47.1", 0, 2); + round_test_opt ("1284155", "1284155.04626171", 1, 2); + round_test_opt ("-1135.68", "-1135.6757", 2, 2); + round_test_opt ("0", "0.00028", 1, 2); + round_test_opt ("1.445e-7", "0.00000014454442544152", 10, 2); + round_test_opt ("99022342", "99022342.4", 0, 2); + round_test_opt ("-708723900.986", "-708723900.98621", 3, 2); + round_test_opt ("8", "8", 0, 2); + round_test_opt ("-1", "-1", 0, 2); + round_test_opt ("14277", "14277.32", 0, 2); + round_test_opt ("-57.9", "-57.896496", 2, 2); + round_test_opt ("-18725", "-18724.7876", 0, 2); + round_test_opt ("-1", "-1.19", 0, 2); + round_test_opt ("0", "-0.000000187910472", 0, 2); + round_test_opt ("18459.974", "18459.9742236", 3, 2); + round_test_opt ("-1.9661e-7", "-0.0000001966121396", 11, 2); + round_test_opt ("-4.74729273", "-4.7472927339", 8, 2); + round_test_opt ("10336.224", "10336.22357215", 3, 2); + round_test_opt ("2", "2.453", 0, 2); + round_test_opt ("-25", "-25.38757910", 0, 2); + round_test_opt ("1", "1.3", 0, 2); + round_test_opt ("838324.5", "838324.508", 1, 2); + round_test_opt ("-7.8925", "-7.892491", 4, 2); + round_test_opt ("-2", "-2", 0, 2); + round_test_opt ("-0.5", "-0.50243", 2, 2); + round_test_opt ("0.029", "0.029151", 3, 2); + round_test_opt ("-42", "-42.4", 0, 2); + round_test_opt ("1", "1.0", 0, 2); + round_test_opt ("45912", "45912.2", 0, 2); + round_test_opt ("0", "0.00015657800066464", 1, 2); + round_test_opt ("-1748153.392", "-1748153.3919800", 3, 2); + round_test_opt ("238004.648", "238004.6478", 3, 2); + round_test_opt ("2", "1.5", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("-102311032", "-102311031.74", 0, 2); + round_test_opt ("-4", "-4.0", 0, 2); + round_test_opt ("3", "3", 0, 2); + round_test_opt ("0", "0.000004289664163", 4, 2); + round_test_opt ("7664", "7663.80", 0, 2); + round_test_opt ("0.00001", "0.000009614318297914", 5, 2); + round_test_opt ("-2282479", "-2282478.656", 0, 2); + round_test_opt ("0", "0.000000072841279100687", 0, 2); + round_test_opt ("0.007691", "0.007691210", 6, 2); + round_test_opt ("-6769.1", "-6769.0580574", 1, 2); + round_test_opt ("8.2", "8.1702", 1, 2); + round_test_opt ("-2", "-1.5", 0, 2); + round_test_opt ("0.000001", "0.00000127393387", 6, 2); + round_test_opt ("14.89622241299", "14.896222412990", 11, 2); + round_test_opt ("19.3", "19.329", 1, 2); + round_test_opt ("9", "9", 0, 2); + round_test_opt ("-19173078.84", "-19173078.84450", 2, 2); + round_test_opt ("-8415778", "-8415777.87", 0, 2); + round_test_opt ("-3217.695", "-3217.695232", 3, 2); + round_test_opt ("0.253097", "0.2530971625", 6, 2); + round_test_opt ("11", "11.0", 0, 2); + round_test_opt ("-285.4", "-285.3955790", 1, 2); + round_test_opt ("-12940", "-12939.90", 0, 2); + round_test_opt ("-4546", "-4546.00", 0, 2); + round_test_opt ("16063804427", "16063804427.00", 0, 2); + round_test_opt ("213549801.564", "213549801.5643", 3, 2); + round_test_opt ("0", "0.0000020", 5, 2); + round_test_opt ("-0.001597", "-0.00159656504863", 6, 2); + round_test_opt ("-3", "-3", 0, 2); + round_test_opt ("2789.1258", "2789.12575845882", 4, 2); + round_test_opt ("20", "20.08", 0, 2); + round_test_opt ("-278253", "-278253.335", 0, 2); + round_test_opt ("5155197036", "5155197036.08", 0, 2); + round_test_opt ("0", "0.000090532", 1, 2); + round_test_opt ("0.0000098766", "0.00000987655338039", 10, 2); + round_test_opt ("-140130180.467", "-140130180.466561", 3, 2); + round_test_opt ("641", "640.5733", 0, 2); + + round_test_opt ("-67285786000786430001.84171870243087110299464", "-67285786000786430001.8417187024308711029946448897932826", 23, 2); + round_test_opt ("9.448956481724741409276350694692e+31", "94489564817247414092763506946919.8", 0, 2); + round_test_opt ("3.9859538341143269291710936210864682461858568393e+42", "3985953834114326929171093621086468246185856.839308", 4, 2); + round_test_opt ("0.213160682590482673720123", "0.21316068259048267372012300014571642637779193717", 24, 2); + round_test_opt ("5.72565350402356154220096385167682e+31", "57256535040235615422009638516768.225", 1, 2); + round_test_opt ("9827312", "9827312.47", 0, 2); + round_test_opt ("-2.2564988241271537703332692244064362415604326645258e+32", "-225649882412715377033326922440643.624156043266452575589", 17, 2); + round_test_opt ("1.66707495526148873561077484048960432973187660089798073324972e+43", "16670749552614887356107748404896043297318766.00897980733249721644878650173799", 16, 2); + round_test_opt ("-0.0000071107308186824690925689846775808645266157065951834776704", "-0.00000711073081868246909256898467758086452661570659518347767037593811212465683211", 61, 2); + round_test_opt ("-3", "-2.7", 0, 2); + round_test_opt ("-124072473283894719.8715", "-124072473283894719.87148942", 4, 2); + round_test_opt ("-938632.1357753642335703748125308124878707", "-938632.1357753642335703748125308124878706553070", 34, 2); + round_test_opt ("39285", "39285.4", 0, 2); + round_test_opt ("-45794", "-45793.50873140400806620555552893025547", 0, 2); + round_test_opt ("0.00043", "0.00043106", 5, 2); + round_test_opt ("18", "17.73", 0, 2); + round_test_opt ("6887378876161819.67479130637439655936364361", "6887378876161819.67479130637439655936364361410", 26, 2); + round_test_opt ("-1.1960916e-8", "-0.0000000119609155768816951932628381810701975669492665", 15, 2); + round_test_opt ("1.828237972677109386632976406084191004086430106300561e+36", "1828237972677109386632976406084191004.08643010630056121370", 15, 2); + round_test_opt ("-17303", "-17303.3408", 0, 2); + round_test_opt ("-19559", "-19559.46", 0, 2); + round_test_opt ("-2776522865791539.58044671387378715834122857", "-2776522865791539.580446713873787158341228571654967", 26, 2); + round_test_opt ("0.076856590227331010541737834596785248134670483538", "0.0768565902273310105417378345967852481346704835376204807182192445", 48, 2); + round_test_opt ("0", "0.00245", 1, 2); + round_test_opt ("-3.41389637403613085735112909331883540231314050519e+47", "-341389637403613085735112909331883540231314050519.00860662913317", 0, 2); + round_test_opt ("-368492.440703113657551617159", "-368492.4407031136575516171594705959653971098906752876011", 21, 2); + round_test_opt ("-0.00076499312776788732685735417680687", "-0.000764993127767887326857354176806868723015882585141", 35, 2); + round_test_opt ("10", "9.7", 0, 2); + round_test_opt ("330102494712310331.12306063", "330102494712310331.123060634144064300", 8, 2); + round_test_opt ("-0.000003226553114636545996352307137343217224761657145083011751164580439393196", "-0.0000032265531146365459963523071373432172247616571450830117511645804393931964", 75, 2); + round_test_opt ("1.5702336798860813312183359e+23", "157023367988608133121833.5855612719027316361101408", 2, 2); + round_test_opt ("0.420659864842", "0.4206598648416116", 12, 2); + round_test_opt ("759760850.828060083330170495", "759760850.8280600833301704946713858114861864875449552519487198", 18, 2); + round_test_opt ("1099597660.162386930330972024346573920574311743321057000285499", "1099597660.1623869303309720243465739205743117433210570002854989", 51, 2); + round_test_opt ("3739531.055716347318685950986625837615439", "3739531.05571634731868595098662583761543850359", 33, 2); + round_test_opt ("-0.14543253925259458", "-0.14543253925259457747232564", 17, 2); + round_test_opt ("3.5", "3.50814", 1, 2); + round_test_opt ("-5.41454379798682504099699334458753424877e+37", "-54145437979868250409969933445875342487.6861", 1, 2); + round_test_opt ("205750716.75", "205750716.7462395939087377087656350896709751", 2, 2); + round_test_opt ("0.00066278", "0.000662776584984111370072905287425443201916618952335", 8, 2); + round_test_opt ("0", "0.0000016117928", 5, 2); + round_test_opt ("-0.00003", "-0.000032768380546", 5, 2); + round_test_opt ("0.00496970433228", "0.00496970433228023649", 14, 2); + round_test_opt ("-98855802", "-98855801.857", 0, 2); + round_test_opt ("0.019831116", "0.01983111585118373352634551962622475581387392672786862266", 9, 2); + round_test_opt ("-1.250497797600278700528421637022e+26", "-125049779760027870052842163.7022267607", 4, 2); + round_test_opt ("-1.0703480882326315629356124788024935893e+23", "-107034808823263156293561.24788024935893194454", 14, 2); + round_test_opt ("14.3782725", "14.378272540813426603840567432608467558210983286187231978794388200", 7, 2); + round_test_opt ("0.130309272828", "0.13030927282839862022799474014968156901", 12, 2); + round_test_opt ("-98.2367", "-98.2366524", 4, 2); + round_test_opt ("-9", "-9.334695", 0, 2); + round_test_opt ("-1.51505681615472494415896e+22", "-15150568161547249441589.558", 1, 2); + round_test_opt ("-33996868251851100.585", "-33996868251851100.58496619754005488500403", 4, 2); + round_test_opt ("0", "-0.0000000445570", 4, 2); + round_test_opt ("-8.433637457626482976280018539173129453591e+21", "-8433637457626482976280.01853917312945359095583331656603718400547595544859", 19, 2); + round_test_opt ("1334988745.761857839", "1334988745.761857839379796", 9, 2); + round_test_opt ("-0.022225", "-0.0222249250847738107161776348", 6, 2); + round_test_opt ("8.684754443744498618422872261580837e+34", "86847544437444986184228722615808370.19657421100", 0, 2); + round_test_opt ("2.922024257428597556034287345124912344450293834e+45", "2922024257428597556034287345124912344450293833.8129215408521595652", 0, 2); + round_test_opt ("0.0000648445133383637987208162047581", "0.000064844513338363798720816204758098469664554078934548313142281617460359733", 35, 2); + round_test_opt ("390329802.648019727629713525697316674630011", "390329802.6480197276297135256973166746300111125272836200796445049", 33, 2); + round_test_opt ("-258.7377120823", "-258.7377120823111", 10, 2); + round_test_opt ("-0.0009685", "-0.000968500150771686937989972375065545", 7, 2); + round_test_opt ("0", "0.00001567480449354560092932487475", 1, 2); + round_test_opt ("-39106865762460584826.61", "-39106865762460584826.6134373", 2, 2); + round_test_opt ("-2024356012607685.91210486332", "-2024356012607685.91210486331556459161280069", 11, 2); + round_test_opt ("4.2272584512300583139927e+21", "4227258451230058313992.658", 1, 2); + round_test_opt ("0.0459", "0.0458919371347914920702113541006466518199441673180948648147920516", 4, 2); + round_test_opt ("4.0788686840632834035954963974683420880173963e+35", "407886868406328340359549639746834208.8017396288009080302177256123451", 8, 2); + round_test_opt ("-0.00009", "-0.00008871177", 5, 2); + round_test_opt ("0.0061668373803029681902308465080502801072", "0.006166837380302968190230846508050280107153425", 40, 2); + round_test_opt ("-1040007630812.941015034179", "-1040007630812.94101503417886495", 12, 2); + round_test_opt ("0.000136472595912", "0.0001364725959115254910859356482798544", 15, 2); + round_test_opt ("-0.0153267716907368139410051956675888180198889155020425400611", "-0.01532677169073681394100519566758881801988891550204254006110507", 58, 2); + round_test_opt ("5180625731910.5", "5180625731910.48668196960520", 1, 2); + round_test_opt ("764175553.46592562879911554228354", "764175553.4659256287991155422835439198583518", 23, 2); + round_test_opt ("-49791487687634.462954323763995", "-49791487687634.46295432376399496348733626", 15, 2); + round_test_opt ("-2.075420216421173225959162452422753893506711747533e+25", "-20754202164211732259591624.5242275389350671174753304991285873546862637315407", 24, 2); + round_test_opt ("-5.0054055085399355972769643870056428632554707684e+33", "-5005405508539935597276964387005642.863255470768395", 13, 2); + round_test_opt ("1.951622761635077663716034563192653e+26", "195162276163507766371603456.31926525141507523396", 7, 2); + round_test_opt ("-61836437247095674305", "-61836437247095674304.85", 0, 2); + round_test_opt ("0.00000120046184768718310251206266", "0.00000120046184768718310251206265650997614905779334067390449317101", 32, 2); + round_test_opt ("-1.321291387358977659751752369056414212658859828663888695e+44", "-132129138735897765975175236905641421265885982.8663888695420", 10, 2); + round_test_opt ("-0.0225061581484051054706509", "-0.02250615814840510547065090236991166716445044354", 26, 2); + round_test_opt ("-1.03734592047984313101196852354224e+32", "-103734592047984313101196852354224.3", 0, 2); + round_test_opt ("6.0714968914457709837688505913972e-8", "0.000000060714968914457709837688505913972273472036648067644984631337385932792384", 39, 2); + round_test_opt ("-4.424689440563e-7", "-0.00000044246894405625465334491186253836069633565915798651696937138992", 19, 2); + round_test_opt ("361930101457674.9123152981212660394276621424572552", "361930101457674.91231529812126603942766214245725524852174544050431945", 34, 2); + round_test_opt ("-0.00551777897795307941", "-0.0055177789779530794063565568726718111", 20, 2); + round_test_opt ("1320022156327195304.2862", "1320022156327195304.2862467363", 4, 2); + round_test_opt ("1.393406492071950292273457068e+21", "1393406492071950292273.45706820527079320873560107472", 6, 2); + round_test_opt ("1.0269197e-8", "0.0000000102691965991750033577123127518408689885755178", 15, 2); + round_test_opt ("610.7330267607358798510856", "610.73302676073587985108562182554617995657512357222962606228", 22, 2); + round_test_opt ("475.45356645", "475.4535664469763", 8, 2); + round_test_opt ("39308353.674244163460792", "39308353.67424416346079199508314279800891292", 16, 2); + round_test_opt ("-0.00000111247061906829296287242333901057862623715694", "-0.0000011124706190682929628724233390105786262371569355158932082", 50, 2); + round_test_opt ("0.0036", "0.003600002894710703226857784186834678814556423748484289043243180803", 4, 2); + round_test_opt ("1.4367015106015220124311611649076291214791241904e+43", "14367015106015220124311611649076291214791241.9044067465338279610", 3, 2); + round_test_opt ("-0.0000049", "-0.00000492474514844", 7, 2); + round_test_opt ("-2682.992534525157856663314343338249605843", "-2682.9925345251578566633143433382496058430938", 36, 2); + round_test_opt ("-0.0047789493954347727115716166553271462130155068", "-0.004778949395434772711571616655327146213015506797742", 46, 2); + round_test_opt ("29976620808732.3", "29976620808732.341", 1, 2); + round_test_opt ("34467049.3544601338724540364", "34467049.3544601338724540364064", 19, 2); + round_test_opt ("7", "7", 0, 2); + round_test_opt ("-662133.00465205638", "-662133.0046520563776", 11, 2); + round_test_opt ("2.44788852354438130340107042634297800959715e+40", "24478885235443813034010704263429780095971.50919918", 1, 2); + round_test_opt ("5.5840020568373290858000711571918227643588141e+29", "558400205683732908580007115719.18227643588141420171245503157", 14, 2); + round_test_opt ("-0.06109533751309145375766889907329830495281437343", "-0.0610953375130914537576688990732983049528143734300275841", 49, 2); + round_test_opt ("-3", "-3", 0, 2); + round_test_opt ("0.0000116350328781581323214913277691", "0.0000116350328781581323214913277691443607512", 34, 2); + round_test_opt ("-2433982989070.4", "-2433982989070.403", 1, 2); + round_test_opt ("-7.0167184965701058927533986398937262620399996279594e+33", "-7016718496570105892753398639893726.262039999627959364032", 16, 2); + round_test_opt ("-8.9000106900925293578691833690040840525929e+40", "-89000106900925293578691833690040840525928.91", 0, 2); + round_test_opt ("0.000054203379804599615157434163794162966", "0.000054203379804599615157434163794162965957412837278234", 40, 2); + round_test_opt ("-2127366.224397134733738444", "-2127366.224397134733738443958576561654947612", 19, 2); + round_test_opt ("4.798500859389719185990153286257486251359951905454e+36", "4798500859389719185990153286257486251.35995190545445017015607", 12, 2); + round_test_opt ("8.3200499567357591546481e-8", "0.00000008320049956735759154648073267451497555299882333529487356431749492990511", 30, 2); + round_test_opt ("-4049855209642613.651532624298979", "-4049855209642613.651532624298978612", 15, 2); + round_test_opt ("13.58533", "13.5853339451327021829891", 5, 2); + round_test_opt ("33657408.809293464588458245970704338672790222742028799", "33657408.809293464588458245970704338672790222742028799114506234331", 45, 2); + round_test_opt ("-0.04157606948782812", "-0.0415760694878281231183691167081729081692459541479327758297294103600574911", 17, 2); + round_test_opt ("0.2445904", "0.2445904471913271833048522773906687055584248941", 7, 2); + round_test_opt ("-36537020339", "-36537020339.16141697788090075037424", 0, 2); + round_test_opt ("4.630562796498611773739234434155312293599049865032851482061645e+59", "463056279649861177373923443415531229359904986503285148206164.49901872", 1, 2); + round_test_opt ("1.7617343232685185747636e+22", "17617343232685185747636.4", 0, 2); + round_test_opt ("1.525089712663928023613087842832e+21", "1525089712663928023613.0878428317813976498464747556820657268610", 9, 2); + round_test_opt ("0.00038330994", "0.0003833099373942592", 11, 2); + round_test_opt ("-0.0000015", "-0.000001543435020133316209445585022978853749590080", 7, 2); + round_test_opt ("4.50094710942861848281692841507435565e+26", "450094710942861848281692841.507435564923465551", 9, 2); + round_test_opt ("-0.00035850200532934193061574888771534", "-0.0003585020053293419306157488877153436004542078609868325", 35, 2); + round_test_opt ("1.311043869294805642966391661328043356833640077333494177096852028409847e+69", "1311043869294805642966391661328043356833640077333494177096852028409846.9609", 0, 2); + round_test_opt ("207.2388", "207.2388201250069484", 4, 2); + round_test_opt ("12041993739.97", "12041993739.969781", 2, 2); + round_test_opt ("-2077024113734199269.39343269", "-2077024113734199269.39343269273123", 8, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("5", "4.78577", 0, 2); + round_test_opt ("230585.4224", "230585.4223915054695", 4, 2); + round_test_opt ("-3", "-3", 0, 2); + round_test_opt ("3.810109473503769848973037919997e+23", "381010947350376984897303.79199969464", 7, 2); + round_test_opt ("25", "24.63", 0, 2); + round_test_opt ("-6.716451397589143643551852912381968495578731e+26", "-671645139758914364355185291.238196849557873142082006", 16, 2); + round_test_opt ("3.4571440605914848469882543452079004250591e+24", "3457144060591484846988254.3452079004250590953212", 16, 2); + round_test_opt ("2.07813834137958074056402139226279661163e+37", "20781383413795807405640213922627966116.327287758", 1, 2); + round_test_opt ("2.20811976073009562166804891911561429569e+38", "220811976073009562166804891911561429568.8714048", 0, 2); + round_test_opt ("2821455730331145446.164894864", "2821455730331145446.164894863662", 9, 2); + round_test_opt ("1.20328283658891555052353210123174774597875558777e+42", "1203282836588915550523532101231747745978755.58777211896105829042905229", 5, 2); + round_test_opt ("2094", "2094.5", 0, 2); + round_test_opt ("-1.46309380694124829132018162108068176509032446141953221528591461e+63", "-1463093806941248291320181621080681765090324461419532215285914609.88", 0, 2); + round_test_opt ("0.000001098105705433025064601749605", "0.0000010981057054330250646017496051056659564434089372848599897061", 33, 2); + round_test_opt ("54180309.5737671311731383357", "54180309.5737671311731383356938538", 19, 2); + round_test_opt ("-1.3446620287542373065048354e+24", "-1344662028754237306504835.370385643357826543914532179239449995256077396252", 1, 2); + round_test_opt ("260.21288924583334713616284047849875533", "260.2128892458333471361628404784987553320", 35, 2); + round_test_opt ("1.240425698711451610006525", "1.2404256987114516100065247472595218334587180888317317562184323937", 24, 2); + round_test_opt ("-0.0782583611183", "-0.078258361118346105370946044305759035074", 13, 2); + round_test_opt ("-32251186716.4112827815640577", "-32251186716.411282781564057698891811073", 16, 2); + round_test_opt ("2.30816210064841495287372520638020007782784097576420030091493e+55", "23081621006484149528737252063802000778278409757642003009.149299500630172608", 5, 2); + round_test_opt ("-5.112891963390565799576723527086504197404846e+37", "-51128919633905657995767235270865041974.0484596507", 6, 2); + round_test_opt ("-859338923835148146.135", "-859338923835148146.13524799870184210", 3, 2); + round_test_opt ("-1.5733785884726617471894e+22", "-15733785884726617471894.004", 1, 2); + round_test_opt ("9.076880708431840006783794173382765592057302804e-7", "0.000000907688070843184000678379417338276559205730280366519137475", 52, 2); + round_test_opt ("0.000184", "0.00018380491750345880348", 6, 2); + round_test_opt ("-1.104394255519294295532100240877856139565868e+31", "-11043942555192942955321002408778.561395658677038345808864487", 11, 2); + round_test_opt ("1.929655038148014258102318236820330361e+30", "1929655038148014258102318236820.33036098693678428147522651490925837608203", 7, 2); + round_test_opt ("796749.2546404361275835", "796749.2546404361275834731877", 16, 2); + round_test_opt ("2.974889592421425054232781420528e+30", "2974889592421425054232781420528.1", 0, 2); + round_test_opt ("-1.23614324919504883710249e-7", "-0.00000012361432491950488371024922330362189476329", 30, 2); + round_test_opt ("-3181", "-3181.07", 0, 2); + round_test_opt ("3.8917208641819951832474565153515100204151778558835276e+44", "389172086418199518324745651535151002041517785.5883527577464942528975", 8, 2); + round_test_opt ("-0.00000298000181812078999302622407", "-0.0000029800018181207899930262240706816", 32, 2); + round_test_opt ("132946096.6702637270075111733", "132946096.670263727007511173336921377448", 19, 2); + round_test_opt ("-428601831.9477995", "-428601831.947799514525012592182", 7, 2); + round_test_opt ("-2.752554498061690200289273e+22", "-27525544980616902002892.7324266", 2, 2); + round_test_opt ("-6.9846559437579283716265588667080665496910108842e+45", "-6984655943757928371626558866708066549691010884.200066689038", 2, 2); + round_test_opt ("0.05767389365898215109805122377357", "0.05767389365898215109805122377357153258394222588783481524098710204114978550", 32, 2); + round_test_opt ("-176340385801.100826", "-176340385801.10082602223", 6, 2); + round_test_opt ("-212354390.1497373150863173307463542744189834481800609273373051611", "-212354390.149737315086317330746354274418983448180060927337305161077885", 55, 2); + round_test_opt ("-2336366", "-2336366.26", 0, 2); + round_test_opt ("6916400", "6916399.5", 0, 2); + round_test_opt ("-0.00001071053973792406", "-0.0000107105397379240606378152899980275612107280855733678146", 20, 2); + round_test_opt ("-2.8800409115600482283961113639377e+27", "-2880040911560048228396111363.9377100202168703885798", 4, 2); + round_test_opt ("719367751925625.455637281128703154493011753", "719367751925625.455637281128703154493011752810595216", 27, 2); + round_test_opt ("-11543125764.2541826265", "-11543125764.2541826265147", 10, 2); + round_test_opt ("-1025094.53", "-1025094.53162", 2, 2); + round_test_opt ("3.414285798583205404006180974874484876575212877892246e+35", "341428579858320540400618097487448487.657521287789224624641731579999272111102", 16, 2); + round_test_opt ("0", "0.0000014572444376521826654212106", 2, 2); + round_test_opt ("138707089045.3995889739", "138707089045.399588973894721182131202", 10, 2); + round_test_opt ("-4411008.0233775", "-4411008.0233775422635870874538875351", 7, 2); + round_test_opt ("-0.054423555291247088879390591875", "-0.05442355529124708887939059187495927214269377843771471", 30, 2); + round_test_opt ("1.794247933287349165322647e+24", "1794247933287349165322647.212", 0, 2); + round_test_opt ("825185764736934056.5", "825185764736934056.5024", 1, 2); + round_test_opt ("-47.6231", "-47.62309010745975854", 4, 2); + round_test_opt ("0", "-0.000000252591875309898322973316907158763461535345", 3, 2); + round_test_opt ("-16472044.832801884361170273965818537471011358395588794679268276", "-16472044.8328018843611702739658185374710113583955887946792682757018915517", 54, 2); + round_test_opt ("-658931119.584", "-658931119.584173964276694213675441716", 3, 2); + round_test_opt ("1557121244565546587.92942", "1557121244565546587.929423896", 5, 2); + round_test_opt ("0.064938249930897", "0.06493824993089714978290", 15, 2); + round_test_opt ("1.713241863546246153396280899381097009866937100161073482610902e+53", "171324186354624615339628089938109700986693710016107348.261090242", 7, 2); + round_test_opt ("-5.578460559", "-5.5784605591046843026707381808", 9, 2); + round_test_opt ("3741194380218900599", "3741194380218900598.566", 0, 2); + round_test_opt ("0.013427", "0.0134268306617315971189146092934753081313", 6, 2); + round_test_opt ("-705412423.2481568637873293838", "-705412423.2481568637873293837749115", 19, 2); + round_test_opt ("-551525.36560570912458684574715845895760539616", "-551525.3656057091245868457471584589576053961596968", 38, 2); + round_test_opt ("0.43407983923", "0.43407983922858", 11, 2); + round_test_opt ("-0.0053621296583095859461173544410402795871718180829748123269520233777509", "-0.00536212965830958594611735444104027958717181808297481232695202337775093", 70, 2); + round_test_opt ("-612854611639761420.9751", "-612854611639761420.975055727", 4, 2); + round_test_opt ("0.009", "0.009159714329113076954041356584476951662872164908033765", 3, 2); + round_test_opt ("0.0144", "0.014392639227", 4, 2); + round_test_opt ("8.9471971597833345188972851819e-7", "0.0000008947197159783334518897285181917", 35, 2); + round_test_opt ("96309960.6242", "96309960.624196947", 5, 2); + round_test_opt ("3.990190412077384860236358315842561559323035602004e+45", "3990190412077384860236358315842561559323035602.004402366200415", 3, 2); + round_test_opt ("4.5878993268407879024910318222553e+23", "458789932684078790249103.182225525018445913048224005112808", 8, 2); + round_test_opt ("-0.043393911518", "-0.043393911518220171546273150261643317263998699216946401", 12, 2); + round_test_opt ("89280512232815557.8845", "89280512232815557.884504150030245582494", 4, 2); + round_test_opt ("5", "5", 0, 2); + round_test_opt ("-910.9172", "-910.917230574", 4, 2); + round_test_opt ("0.42098715459", "0.4209871545896056726599642485885413869650885615708279293101172250", 11, 2); + round_test_opt ("-5", "-4.59", 0, 2); + round_test_opt ("8.63547766590626440636295875183622814068766317298135132715426e+56", "863547766590626440636295875183622814068766317298135132715.4258892", 3, 2); + round_test_opt ("-25056083356.8", "-25056083356.7528521", 1, 2); + round_test_opt ("-31990264650008.5551", "-31990264650008.5551366740959556498546697383614518810436455435", 4, 2); + round_test_opt ("-240.8", "-240.79", 1, 2); + round_test_opt ("-0.8", "-0.819788077550378064715432600235770304659408604805555834502173572271862691", 1, 2); + round_test_opt ("-0.00036322200989697788840667", "-0.00036322200989697788840666638881421", 26, 2); + round_test_opt ("0", "-0.000041956450745210", 1, 2); + round_test_opt ("2.207724324015216551375839783778892039172992332e+38", "220772432401521655137583978377889203917.2992332143730922966019906422", 7, 2); + round_test_opt ("0", "-0.000013451648752675131603759357976788", 2, 2); + round_test_opt ("6.185617252064270849867524635742510008139794224628799360982761e+31", "61856172520642708498675246357425.1000813979422462879936098276106", 29, 2); + round_test_opt ("-0.03", "-0.02575", 2, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("10452764153877176428.933378", "10452764153877176428.93337773", 6, 2); + round_test_opt ("-36.615", "-36.61456605", 3, 2); + round_test_opt ("-2.0387765901950670492652649802719075092e+31", "-20387765901950670492652649802719.0750920490551", 6, 2); + round_test_opt ("-5061", "-5061.0395117493112251", 0, 2); + round_test_opt ("-447", "-447.0838536123844", 0, 2); + round_test_opt ("1.67668773581435025020555235868e+22", "16766877358143502502055.5235867892274419949224031229344093405", 7, 2); + round_test_opt ("-49910610812859.81866633684", "-49910610812859.81866633684104514439664504", 11, 2); + round_test_opt ("0.01097590608339462644113174", "0.0109759060833946264411317350132322858382693643512423982897150886", 26, 2); + round_test_opt ("-0.000056", "-0.0000563672528266727098897834991643435408", 6, 2); + round_test_opt ("-9.1780944221871967816919973193794198e+34", "-91780944221871967816919973193794197.84", 0, 2); + round_test_opt ("-4e-8", "-0.00000003927619509409046993765635077890368622748488980141371288668759465104000", 8, 2); + round_test_opt ("-2.7", "-2.740", 1, 2); + round_test_opt ("8918433421.559065", "8918433421.559064961", 6, 2); + round_test_opt ("1959273986162264.956458189069", "1959273986162264.95645818906875430791071589", 12, 2); + round_test_opt ("-0.000006684490569314940458384646312040301083", "-0.00000668449056931494045838464631204030108304026", 43, 2); + round_test_opt ("0", "-0.062369969637330", 0, 2); + round_test_opt ("-0.04614396454006526692", "-0.046143964540065266920289730823802285518", 20, 2); + round_test_opt ("226967505298570612781.54608921", "226967505298570612781.546089208780341376052998273", 8, 2); + round_test_opt ("-10839390.58484", "-10839390.584842942700582", 5, 2); + round_test_opt ("868439994.1320807088007763864778", "868439994.13208070880077638647780008703", 22, 2); + round_test_opt ("-0.005813511531330806757481", "-0.005813511531330806757481313033065203370412581777", 24, 2); + round_test_opt ("-4.424299509301660380785763010084230541184720473378038797e+53", "-442429950930166038078576301008423054118472047337803879.6635", 1, 2); + round_test_opt ("-399213.66312571", "-399213.66312570830186137439274665188508356759499770453283185057603", 8, 2); + round_test_opt ("-335", "-335.392756844", 0, 2); + round_test_opt ("-0.0013343509714277900461842997584952282099183918599632", "-0.0013343509714277900461842997584952282099183918599632329803255851751278", 52, 2); + round_test_opt ("6.04088462513315477231784826871e+27", "6040884625133154772317848268.7102043", 3, 2); + round_test_opt ("2.46950448676711977794768641983309224710220715789654610815105e-8", "0.00000002469504486767119777947686419833092247102207157896546108151052297", 67, 2); + round_test_opt ("-3114.75858614", "-3114.7585861446261919285", 8, 2); + round_test_opt ("-9.0546473738122139172928674929730049459178130055258e-8", "-0.0000000905464737381221391729286749297300494591781300552575245680951971029596426", 57, 2); + round_test_opt ("41.1807899", "41.18078990422433", 8, 2); + round_test_opt ("495750160104586862.5666645", "495750160104586862.566664461528193390556540", 7, 2); + round_test_opt ("-8.98", "-8.9778278167881324073731341", 2, 2); + round_test_opt ("-2116175891812.794", "-2116175891812.7939768426", 4, 2); + round_test_opt ("-3.6182815372059264267232627823e+26", "-361828153720592642672326278.22865114", 2, 2); + round_test_opt ("6.91926698469067732284294462635680557466174970384484191405541e+55", "69192669846906773228429446263568055746617497038448419140.5540615206730888", 4, 2); + round_test_opt ("-0.00419884443471870022", "-0.00419884443471870022468195300780146430411150006777919207216409", 20, 2); + round_test_opt ("-8033878364502.3325365749451346472956677907427748195113826885", "-8033878364502.332536574945134647295667790742774819511382688466", 46, 2); + round_test_opt ("-486962302648.183", "-486962302648.18265374", 3, 2); + round_test_opt ("-7.1", "-7.1095", 1, 2); + round_test_opt ("23.4881799476998144258548955", "23.48817994769981442585489549418579391917433345605175109076155", 25, 2); + round_test_opt ("1362581810314889.01655209391675903989371427684923714702980317", "1362581810314889.016552093916759039893714276849237147029803172658223425843853", 44, 2); + round_test_opt ("38.987", "38.98727817", 3, 2); + round_test_opt ("3.01", "3.0125076", 2, 2); + round_test_opt ("268.71847962", "268.718479615127", 8, 2); + round_test_opt ("6.178281743904239218316327429803948047116222954307162971074534658e+62", "617828174390423921831632742980394804711622295430716297107453465.769589", 1, 2); + round_test_opt ("87985329567746884168.848792423904143996400652033558107", "87985329567746884168.84879242390414399640065203355810695023", 34, 2); + round_test_opt ("-2e-8", "-0.000000016614924", 8, 2); + round_test_opt ("971018573.9351024627", "971018573.93510246274902", 10, 2); + round_test_opt ("9.660185132001915848521737730064490522780766417225527e+42", "9660185132001915848521737730064490522780766.417225526901104328", 9, 2); + round_test_opt ("159.6965435", "159.696543504319408719621608456250975441450767678", 7, 2); + round_test_opt ("-3.367784650526976455147506e+24", "-3367784650526976455147506.423", 0, 2); + round_test_opt ("5.3019770372835752127587110983470447669673154466331963e+51", "5301977037283575212758711098347044766967315446633196.250996", 1, 2); + round_test_opt ("-2.1473013069070408429029131991202812063e+34", "-21473013069070408429029131991202812.063087754465091", 3, 2); + round_test_opt ("766857563160.6960134906032267", "766857563160.6960134906032267315", 16, 2); + round_test_opt ("-191634575485.83277038307369", "-191634575485.83277038307368580580848576144062350195119125466", 14, 2); + round_test_opt ("5", "5.1", 0, 2); + round_test_opt ("2.28746467824105519533886976175e+29", "228746467824105519533886976174.6334005511361836027142563134799536", 0, 2); + round_test_opt ("-9.914795006896482243227593e+21", "-9914795006896482243227.5926229960932853076586763153861896", 3, 2); + round_test_opt ("-9.341346856947225300022135731173159534994013137758e+42", "-9341346856947225300022135731173159534994013.1377576581", 6, 2); + round_test_opt ("-5.0242532844816065799730725158970637072793189719e+38", "-502425328448160657997307251589706370727.931897193433", 8, 2); + round_test_opt ("17731860897715.269", "17731860897715.2688041298936", 3, 2); + round_test_opt ("4.094701538164225721691405859500986303573e+33", "4094701538164225721691405859500986.303573407766838", 6, 2); + round_test_opt ("-9.51675966294231957674538643975454195842613065223609016515519750514e+64", "-95167596629423195767453864397545419584261306522360901651551975051.38324", 1, 2); + round_test_opt ("-5436021.42796103003028402311974489", "-5436021.4279610300302840231197448886479095730", 26, 2); + round_test_opt ("3.135176935382312221625565750722954686146209765653375247224e+52", "31351769353823122216255657507229546861462097656533752.47224074436034", 5, 2); + round_test_opt ("337060357.3", "337060357.26", 1, 2); + round_test_opt ("2.6271954688244100255756219950216841700588972460588924608080129e+54", "2627195468824410025575621995021684170058897246058892460.808012912489", 7, 2); + round_test_opt ("281178997", "281178996.5976", 0, 2); + round_test_opt ("-3.7416365442826426560967132552738483081106546977255172e-8", "-0.0000000374163654428264265609671325527384830811065469772551715662577343", 60, 2); + round_test_opt ("1.3727188410646580349004880859865280446230595500367686727484267353444e+67", "13727188410646580349004880859865280446230595500367686727484267353444.3", 0, 2); + round_test_opt ("-0.00088985146564621", "-0.00088985146564620608048415", 17, 2); + round_test_opt ("3721.5", "3721.537", 1, 2); + round_test_opt ("-0.00219863409103471179790656", "-0.00219863409103471179790655802533", 26, 2); + round_test_opt ("-26781724", "-26781723.5", 0, 2); + round_test_opt ("218.2531799358844460971554", "218.25317993588444609715539650070250824969952622974912", 22, 2); + round_test_opt ("-44", "-43.7", 0, 2); + round_test_opt ("-309335509.9", "-309335509.88533", 1, 2); + round_test_opt ("-5.327045089642836185612088037337020004330131280899e+23", "-532704508964283618561208.8037337020004330131280898730790462324050", 25, 2); + round_test_opt ("984.9856405", "984.9856405049808665054091826958542262554545001404", 8, 2); + round_test_opt ("7.00993519484211940209201083804040269332248869745494333748e+47", "700993519484211940209201083804040269332248869745.494333747965608082", 10, 2); + round_test_opt ("-7885969523014.605058", "-7885969523014.6050580389202970357856", 7, 2); + round_test_opt ("1.52318061844515e-7", "0.000000152318061844515074836771249714094", 21, 2); + round_test_opt ("-64939898415025.305611891697261588794905431448369478634207431", "-64939898415025.305611891697261588794905431448369478634207430633", 45, 2); + round_test_opt ("-258421493773522547.88731715718248", "-258421493773522547.88731715718248046312342736119836225597", 15, 2); + round_test_opt ("1077263095864838.5614104685761771", "1077263095864838.56141046857617709811", 17, 2); + round_test_opt ("6183976", "6183976.5", 0, 2); + round_test_opt ("8.325499741075553695463029798274706310310484455788556341180382100734", "8.32549974107555369546302979827470631031048445578855634118038210073413199", 66, 2); + round_test_opt ("-1.384748229432702348634792951322719911228208889724246e-7", "-0.000000138474822943270234863479295132271991122820888972424581974241818611315594142", 58, 2); + round_test_opt ("1.31374879232602936208030647793555445352291058868647245381778975959e+62", "131374879232602936208030647793555445352291058868647245381778975.95919", 3, 2); + round_test_opt ("-2.447904439806615489965743011142512728568044130197e+46", "-24479044398066154899657430111425127285680441301.96935775323", 2, 2); + round_test_opt ("-10", "-10.19", 0, 2); + round_test_opt ("-3.082910490003966903", "-3.082910490003966903366344671328144204691192545155168776704048986557931103", 18, 2); + round_test_opt ("-5178094814996041.36737972391515", "-5178094814996041.367379723915151269", 14, 2); + round_test_opt ("-3.3249136426221858313725101568537327894468465e+33", "-3324913642622185831372510156853732.789446846492981", 10, 2); + round_test_opt ("-2.06821234777328170719614325051408101131404395e+33", "-2068212347773281707196143250514081.0113140439451", 11, 2); + round_test_opt ("0.0017723350926201", "0.00177233509262007", 16, 2); + round_test_opt ("-0.00002477389977504019349811671283452040427545214076", "-0.00002477389977504019349811671283452040427545214075681713174506192054024371900", 50, 2); + round_test_opt ("0.003263574700561451789363525963469", "0.003263574700561451789363525963469355176633442", 33, 2); + round_test_opt ("449.4", "449.407", 1, 2); + round_test_opt ("-7.85515833325985798644165643742234801824669361504800641625569324e+41", "-785515833325985798644165643742234801824669.361504800641625569324437516", 21, 2); + round_test_opt ("391565662160326402.105640349349073220598869874", "391565662160326402.10564034934907322059886987371427724541769273727750290", 27, 2); + round_test_opt ("1.95650530805972620051683214423789446286353982669544434142938062565718608e+71", "195650530805972620051683214423789446286353982669544434142938062565718607.678", 0, 2); + round_test_opt ("0", "0.0000011565616220409568184786922969644521092946467241340932011354570", 3, 2); + round_test_opt ("0.0025810469", "0.00258104694183287681167959", 10, 2); + round_test_opt ("-0.000073551445570206365577194645100488446054822", "-0.000073551445570206365577194645100488446054821992276396043570369485039867162743", 45, 2); + round_test_opt ("-8515.522791", "-8515.522790910197870982166791876498800311529648071780334553410", 6, 2); + round_test_opt ("-5.4027873737416336758797677286370965e+24", "-5402787373741633675879767.72863709654170463385890907658609160690480", 10, 2); + round_test_opt ("-0.18712986164937532238", "-0.18712986164937532238378410594768", 20, 2); + round_test_opt ("0.00406764031854846408", "0.00406764031854846407555743301", 20, 2); + round_test_opt ("54767628435359.6", "54767628435359.647", 1, 2); + round_test_opt ("-1", "-1", 0, 2); + round_test_opt ("-0.0000124160521778520149603186832111269038867316917357", "-0.00001241605217785201496031868321112690388673169173569688907", 53, 2); + round_test_opt ("0.02488", "0.024876241568684480534625282774663232642673985204690815638313174315453087287", 5, 2); + round_test_opt ("9.2307913348311064049720266690541055e-7", "0.00000092307913348311064049720266690541055153257415986777281062537137664978", 41, 2); + round_test_opt ("-2.326029248740152330270018627545386287825103e+35", "-232602924874015233027001862754538628.78251029676039562", 8, 2); + round_test_opt ("-0.155", "-0.154818", 3, 2); + round_test_opt ("3.32888971852648661581695241275281873259406877781882369077440705711e+33", "3328889718526486615816952412752818.73259406877781882369077440705711338275", 32, 2); + round_test_opt ("-1", "-1.18", 0, 2); + round_test_opt ("39852.10180469", "39852.10180468652181", 8, 2); + round_test_opt ("-6154.6163498", "-6154.6163497932918", 7, 2); + round_test_opt ("896262802773.41075", "896262802773.4107480", 5, 2); + round_test_opt ("-0.03947887960417678654587826821778073915945", "-0.03947887960417678654587826821778073915944585607966087002", 41, 2); + round_test_opt ("-22186.67201", "-22186.6720143178", 5, 2); + round_test_opt ("230407301532455.2", "230407301532455.213219479193124862822701", 1, 2); + round_test_opt ("11549.1105376666724512647835421034452506231739415401592", "11549.11053766667245126478354210344525062317394154015919218401503417306548", 49, 2); + round_test_opt ("2.67563613072690366289383376116991e+30", "2675636130726903662893833761169.9078362", 2, 2); + round_test_opt ("-3.60431581832431502984600113357549e+30", "-3604315818324315029846001133575.48956", 3, 2); + round_test_opt ("-2.0355916610129389785837839086851500365849600725e+46", "-20355916610129389785837839086851500365849600725.0", 0, 2); + round_test_opt ("-310464685005830937017.533844926486699973", "-310464685005830937017.533844926486699973269", 18, 2); + round_test_opt ("-2.80428626744961165115808932541067589351e+38", "-280428626744961165115808932541067589351.26749755", 0, 2); + round_test_opt ("-1.51964478908675307650893356754e+23", "-151964478908675307650893.35675389075", 6, 2); + round_test_opt ("-7.558301852267810891312402861259282675481483297901350599522e+43", "-75583018522678108913124028612592826754814832.979013505995222936290520419", 14, 2); + round_test_opt ("-264932120.0111", "-264932120.01114476143", 4, 2); + round_test_opt ("-1.6536905839710017648662e-7", "-0.000000165369058397100176486622445905719729626842826489257468935375441655120325", 29, 2); + round_test_opt ("-8.2147737713227483991576483809928276302e+22", "-82147737713227483991576.4838099282763016224026377078741614930894975683925", 15, 2); + round_test_opt ("4.6813100042819418792661472235803123843114844e+24", "4681310004281941879266147.2235803123843114843979661704100330", 19, 2); + round_test_opt ("-79917988367898984162.771972375793469188811", "-79917988367898984162.7719723757934691888109506", 21, 2); + round_test_opt ("1.718922894626514564618828855297608701259698e+28", "17189228946265145646188288552.9760870125969820982026694370944058", 14, 2); + round_test_opt ("-2.54235352910879596627611114683e+29", "-254235352910879596627611114682.5197025126180", 0, 2); + round_test_opt ("-0.0006377434246903456401074021835126", "-0.00063774342469034564010740218351255413834921475983267503880750339362350", 34, 2); + round_test_opt ("-0.0000159667176487587863973651015688869543529", "-0.0000159667176487587863973651015688869543528973149424", 43, 2); + round_test_opt ("34787532108017.36264556992459990655727819886040471164", "34787532108017.36264556992459990655727819886040471164049221419", 39, 2); + round_test_opt ("340", "340.22286339861", 0, 2); + round_test_opt ("0.00106256852", "0.0010625685238858429232158574995746825415338378", 11, 2); + round_test_opt ("0", "0.00001987165161745", 4, 2); + round_test_opt ("-1.7227346755016108799363427735780255491574875239296007442923933114215188e+68", "-172273467550161087993634277357802554915748752392960074429239331142151.8750529", 2, 2); + round_test_opt ("-0.002", "-0.0023436690820812", 3, 2); + round_test_opt ("-205142531636.983", "-205142531636.98322", 3, 2); + round_test_opt ("368893219538140.012911230797202785", "368893219538140.0129112307972027849498676929772156806286921", 18, 2); + round_test_opt ("11992026", "11992025.93", 0, 2); + round_test_opt ("-1.46079553133366e-7", "-0.000000146079553133365771702861", 21, 2); + round_test_opt ("173723908.406197485909291320429923309772543", "173723908.406197485909291320429923309772542669793531563804094", 33, 2); + round_test_opt ("-1.154922660890749233253720349837427188882687948198568837064531e+52", "-11549226608907492332537203498374271888826879481985688.370645312714", 8, 2); + round_test_opt ("-2.56512841950156426111553743304e+28", "-25651284195015642611155374330.448", 1, 2); + round_test_opt ("-6.98327849514e-8", "-0.000000069832784951383612151542162363", 19, 2); + round_test_opt ("-0.0017110009470017826865419211", "-0.00171100094700178268654192107985245918748100174134127010194184744376678", 28, 2); + round_test_opt ("-1.2276253886099118409020649116468796300103657e+27", "-1227625388609911840902064911.64687963001036571137", 16, 2); + round_test_opt ("-2.8944397480675756068756995613977603412469774503740809037e+30", "-2894439748067575606875699561397.760341246977450374080903697789", 26, 2); + round_test_opt ("5.3688", "5.36877904", 4, 2); + round_test_opt ("-232713338.53642883", "-232713338.536428834379920", 8, 2); + round_test_opt ("4344159280431.568", "4344159280431.5684058", 3, 2); + round_test_opt ("-0.12888687617900862581", "-0.12888687617900862580859080307904674813760620654970750343447", 20, 2); + round_test_opt ("-9.931812300730398433817144250738676639072235625e-7", "-0.000000993181230073039843381714425073867663907223562501787458182093", 53, 2); + round_test_opt ("1.0886424643522812876217902901080206639337e+40", "10886424643522812876217902901080206639336.682", 0, 2); + round_test_opt ("-3205239391665364.3", "-3205239391665364.302372474", 2, 2); + round_test_opt ("126627439.4530768407472514788", "126627439.4530768407472514787848654587067105226484705", 19, 2); + round_test_opt ("-2.0871953015e-7", "-0.0000002087195301456554284734778681", 17, 2); + round_test_opt ("1", "1.16", 0, 2); + round_test_opt ("-18410333.90802111701277688", "-18410333.908021117012776877288249505896078", 17, 2); + round_test_opt ("-556476.280850791846342285259052294054093579170565778152", "-556476.28085079184634228525905229405409357917056577815200073366", 48, 2); + round_test_opt ("0.000010511333887440339636918374174796481869", "0.00001051133388744033963691837417479648186937531639", 42, 2); + round_test_opt ("0.0001908354257520862348118", "0.00019083542575208623481180843896814014379719629080674990143119907012123719", 25, 2); + round_test_opt ("4.1979130133719944121064126679625602164915e+31", "41979130133719944121064126679625.60216491534764987018912430232370", 9, 2); + round_test_opt ("-1.12159082208216081393178290871e+23", "-112159082208216081393178.2908707994378762172725533364173", 6, 2); + round_test_opt ("0.00000948186537", "0.000009481865369812518108306621137606", 14, 2); + round_test_opt ("4", "4", 0, 2); + round_test_opt ("-9005824104.1516", "-9005824104.1515616681384", 4, 2); + round_test_opt ("-2.07079721270046768129501830480994188e+29", "-207079721270046768129501830480.994188465128030780", 6, 2); + round_test_opt ("-1.0167735305123016026045336422251915908250994613293275e+51", "-1016773530512301602604533642225191590825099461329327.53758399251655036152", 1, 2); + round_test_opt ("2.9879792262079374383688905215957531196451515878102381439097400153322e+62", "298797922620793743836889052159575311964515158781023814390974001.5332199239", 6, 2); + round_test_opt ("-1.1906541440263150209638305613023602610769846122100132e+52", "-11906541440263150209638305613023602610769846122100132.20613889425978288450610", 0, 2); + round_test_opt ("1656450356727943.55248790648750208670947483059", "1656450356727943.552487906487502086709474830589587416422742356778600", 29, 2); + round_test_opt ("0.00584116201333836543", "0.0058411620133383654275523923742199", 20, 2); + round_test_opt ("139521336093419480143.075764112192252501", "139521336093419480143.075764112192252500528467", 18, 2); + round_test_opt ("15921941205.616836836014597152106", "15921941205.61683683601459715210643572915109864749981471190908", 21, 2); + round_test_opt ("-5.7138739956242573873769350866208867234541995982847725785e+37", "-57138739956242573873769350866208867234.541995982847725785340684498", 18, 2); + round_test_opt ("0.61997049", "0.619970489821060978341978409995963688187655653", 9, 2); + round_test_opt ("-7.4090933116680340957603797e+22", "-74090933116680340957603.79708076686080734", 3, 2); + round_test_opt ("-9.21449339309994522855053912036e+26", "-921449339309994522855053912.03593786392160920282481187087", 3, 2); + round_test_opt ("0", "0.000134485282687896367414503278909579", 1, 2); + round_test_opt ("0.007513626757660323436698935", "0.0075136267576603234366989350733", 27, 2); + round_test_opt ("2.418504309070136090748861817695450823889247431456322519642e+48", "2418504309070136090748861817695450823889247431456.32251964194887712776", 9, 2); + round_test_opt ("-1.0740831304248609109039483011910337397782076776913e+45", "-1074083130424860910903948301191033739778207677.6913256458", 4, 2); + round_test_opt ("-245889710.4640159", "-245889710.464015908", 7, 2); + round_test_opt ("0.0000270807652779158", "0.00002708076527791575965334330855704284", 19, 2); + round_test_opt ("-0.177", "-0.17744798878451516443435580962926", 3, 2); + round_test_opt ("-47842851492.434198", "-47842851492.43419824528052515", 6, 2); + round_test_opt ("1.9", "1.910", 1, 2); + round_test_opt ("-4.782877822612973201093718405341579997668805955e+26", "-478287782261297320109371840.53415799976688059546036707291", 19, 2); + round_test_opt ("-1.80524578371278763492143072783999388149754649154264303990817e+38", "-180524578371278763492143072783999388149.75464915426430399081696240812518", 22, 2); + round_test_opt ("1236845809088610.2794764699600434432148", "1236845809088610.2794764699600434432148040", 23, 2); + round_test_opt ("0.0040202140017428665", "0.004020214001742866465799734358693789591244730619907620860", 19, 2); + round_test_opt ("-16793", "-16792.8715", 0, 2); + round_test_opt ("1.52965861113556488627385916764762986725508733133592883159e+39", "1529658611135564886273859167647629867255.0873313359288315908850491", 17, 2); + round_test_opt ("-5.087349825712688842122102763208569189651561678966e+41", "-508734982571268884212210276320856918965156.167896598919", 7, 2); + round_test_opt ("-3231.9", "-3231.90000265106649", 5, 2); + round_test_opt ("-1.1465315194239824701971177006907718578363311185909185e+27", "-1146531519423982470197117700.6907718578363311185909184562520178", 25, 2); + round_test_opt ("4757617552.3896096923197129476314", "4757617552.389609692319712947631449", 22, 2); + round_test_opt ("-203793", "-203793.0", 0, 2); + round_test_opt ("-168500.18931162760872697", "-168500.189311627608726973364", 17, 2); + round_test_opt ("30457207666.3", "30457207666.3324553251054242304", 1, 2); + round_test_opt ("1.498244418624314530236867086028109437e+21", "1498244418624314530236.86708602810943661254704875", 15, 2); + round_test_opt ("7.84330718900954994680701749496822406146865570537444394134e+37", "78433071890095499468070174949682240614.686557053744439413417591", 19, 2); + round_test_opt ("-1.04", "-1.04427224", 2, 2); + round_test_opt ("7037113708", "7037113707.984", 1, 2); + round_test_opt ("-4929432965244.0894241", "-4929432965244.089424107111981528843359732736", 7, 2); + round_test_opt ("-129436110", "-129436109.90", 0, 2); + round_test_opt ("-0.070341048979829406", "-0.07034104897982940646456", 18, 2); + round_test_opt ("1.49943272396148939927855668411581621e+22", "14994327239614893992785.566841158162132", 13, 2); + round_test_opt ("1190.54140478633144808902212491401945", "1190.5414047863314480890221249140194479772152263", 32, 2); + round_test_opt ("-0.1341255157877690453717122", "-0.13412551578776904537171217936255082699597112889615258559768723503470687", 25, 2); + round_test_opt ("-1", "-1", 0, 2); + round_test_opt ("136135415696414", "136135415696414.08550518", 0, 2); + round_test_opt ("2.3984356196072489067857e+21", "2398435619607248906785.723531", 1, 2); + round_test_opt ("0.000004", "0.00000400764400", 6, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("1177485.6564193890627", "1177485.6564193890626947", 13, 2); + round_test_opt ("-7.202452949102316512011204453e+26", "-720245294910231651201120445.30801777", 1, 2); + round_test_opt ("4.3101422046279260292215537982057622949241438129e+40", "43101422046279260292215537982057622949241.4381289316624978163830", 6, 2); + round_test_opt ("5257095714249.9", "5257095714249.912729551", 1, 2); + round_test_opt ("2.54500796000227883387387786619199652728e+30", "2545007960002278833873877866191.9965272796572", 9, 2); + round_test_opt ("-3363827901988953", "-3363827901988953.473705748", 0, 2); + round_test_opt ("1", "1.08", 0, 2); + round_test_opt ("2419647124.91", "2419647124.911418", 2, 2); + round_test_opt ("2.299366039129045865549710422996535398236312843083405235580516e+59", "229936603912904586554971042299653539823631284308340523558051.569", 1, 2); + round_test_opt ("5722684.681", "5722684.6813677939376718642741084181169171", 3, 2); + round_test_opt ("-0.00000856192341374507633260886802913696841959", "-0.0000085619234137450763326088680291369684195858559330551448988", 44, 2); + round_test_opt ("-7.58548454783003165111014981367268951364498366053535072962e+28", "-75854845478300316511101498136.7268951364498366053535072961603962511762", 28, 2); + round_test_opt ("0.00000324516611009", "0.0000032451661100852371849803608939739393154221037228659938551948", 17, 2); + round_test_opt ("-2.826114473479211256275145479739345861003210827006986013438931e+60", "-2826114473479211256275145479739345861003210827006986013438930.781219883", 0, 2); + round_test_opt ("-59.90942754", "-59.9094275437203662198882369814830942846", 8, 2); + round_test_opt ("0.000860247294663", "0.0008602472946629780", 16, 2); + round_test_opt ("726039.4553", "726039.455316", 4, 2); + round_test_opt ("-344792.748100918", "-344792.748100918315152301009123551280977110515759", 9, 2); + round_test_opt ("3828739.47476", "3828739.4747604176", 6, 2); + round_test_opt ("2.89695964235050121935374256321529e+21", "2896959642350501219353.74256321529453390321370577490185448", 11, 2); + round_test_opt ("380769947.3", "380769947.25892873505079229", 1, 2); + round_test_opt ("38169678989947.23576", "38169678989947.235760859572768092936285736019808973853693855", 5, 2); + round_test_opt ("-4.06187689432457626038228989710314707751042296389669167993e+56", "-406187689432457626038228989710314707751042296389669167992.8", 0, 2); + round_test_opt ("-481924652.64390259670068272423214883707740411790013808", "-481924652.64390259670068272423214883707740411790013808242355438761152", 44, 2); + round_test_opt ("111282.2054547745975655973", "111282.20545477459756559734369034164890791116623322446023", 19, 2); + round_test_opt ("3470691625013660234", "3470691625013660234.4763", 0, 2); + round_test_opt ("2.08312991726", "2.0831299172556", 11, 2); + round_test_opt ("2.387443148424699940911355179816280411561516099447117664752029e+34", "23874431484246999409113551798162804.1156151609944711766475202929356839478", 26, 2); + round_test_opt ("96588542901383845829.33260156501449145", "96588542901383845829.3326015650144914520126953878145351036206674277139", 17, 2); + round_test_opt ("0.0859316324", "0.085931632434", 10, 2); + round_test_opt ("-1038117264917677263", "-1038117264917677263.48", 0, 2); + round_test_opt ("994060", "994059.619", 0, 2); + round_test_opt ("-287716469964987525.411706898", "-287716469964987525.411706897688", 9, 2); + round_test_opt ("4.77162062787431764844918594715546716737e+28", "47716206278743176484491859471.55467167370591027180526183", 10, 2); + round_test_opt ("71642268576253.525814396056080396", "71642268576253.52581439605608039599274530156", 18, 2); + round_test_opt ("313777282785849.6186322071434949853", "313777282785849.6186322071434949852781760618262466634950090663078288", 19, 2); + round_test_opt ("363188009.47117", "363188009.4711653397", 5, 2); + round_test_opt ("83060368781968.6414142644071", "83060368781968.6414142644070950280298355193622759", 14, 2); + round_test_opt ("-7702303120.136852544439825139", "-7702303120.136852544439825138516515", 18, 2); + round_test_opt ("3.8", "3.83622775367500005", 1, 2); + round_test_opt ("-44721684418754.23712737855230310641641161565324", "-44721684418754.23712737855230310641641161565323849304032906808562", 32, 2); + round_test_opt ("-0.0008155750709", "-0.0008155750708748847", 13, 2); + round_test_opt ("-2.75382721785528285272368760786023568952e+38", "-275382721785528285272368760786023568951.994", 0, 2); + round_test_opt ("-2.8000095096880195386595483219771267204452292555904067391e+52", "-28000095096880195386595483219771267204452292555904067.391207261584563895229", 3, 2); + round_test_opt ("-1.001169760253693440733497296459537371669409110805225882e+46", "-10011697602536934407334972964595373716694091108.052258817811612769982716034", 8, 2); + round_test_opt ("-4.70440835255452422851805702520870770994551407444852e+50", "-470440835255452422851805702520870770994551407444851.8839101198964", 0, 2); + round_test_opt ("-1.592099961267576755050412627250487620849975e+38", "-159209996126757675505041262725048762084.997510", 4, 2); + round_test_opt ("1.13169626219389933580658128519e+23", "113169626219389933580658.128518765290814133", 6, 2); + round_test_opt ("-0.000001996042366071", "-0.0000019960423660707252777921361106303844720487494502033231614376857313", 18, 2); + round_test_opt ("44677664133649.17601590794953562", "44677664133649.176015907949535616051996589764661448006", 17, 2); + round_test_opt ("-2625167", "-2625167.2", 0, 2); + round_test_opt ("-1369097935757876947.08345", "-1369097935757876947.0834494750736291716753967951584866287030", 5, 2); + round_test_opt ("0", "0.0012981872695081482534598236422959807070892976659044189447", 0, 2); + round_test_opt ("-0.06913235261519", "-0.069132352615194995001048", 14, 2); + round_test_opt ("-3289", "-3289.1848592233982829143952832795959169142723179682122564366573587977", 0, 2); + round_test_opt ("-0.0119100131781", "-0.01191001317811045907293968261648", 13, 2); + round_test_opt ("5.469152717346860798", "5.46915271734686079750212198972765471937753478532657244061627920913334442542", 18, 2); + round_test_opt ("-13418168.272289490519815", "-13418168.2722894905198151456227812736418688544", 15, 2); + round_test_opt ("1.342304082e-7", "0.000000134230408157266765744388589397565836768732", 16, 2); + round_test_opt ("731634.86384", "731634.863839838166272", 5, 2); + round_test_opt ("1.46144970652530879389938587588726189836843273562867854109114402e+58", "14614497065253087938993858758872618983684327356286785410911.4401916", 4, 2); + round_test_opt ("-1.7745469685271046133089050632221225694077927171097050200303e+42", "-1774546968527104613308905063222122569407792.7171097050200303230806", 16, 2); + round_test_opt ("-7.638452469588587535062610011186070367337190042103e+43", "-76384524695885875350626100111860703673371900.421029956551", 6, 2); + round_test_opt ("404", "403.8", 0, 2); + round_test_opt ("-5.98995555082640166786390126510577860651374161094418588e+51", "-5989955550826401667863901265105778606513741610944185.8796234966725", 2, 2); + round_test_opt ("1.1251043524016684780476098638927e+31", "11251043524016684780476098638926.6242", 0, 2); + round_test_opt ("-507666190128601894", "-507666190128601893.822", 0, 2); + round_test_opt ("0.0001205616018589240519093984291668745", "0.0001205616018589240519093984291668745037338709531616484000337021819479121", 37, 2); + round_test_opt ("1.79406094989631079647556900199317784625722467666464760323807e+52", "17940609498963107964755690019931778462572246766646476.0323807012480", 8, 2); + round_test_opt ("4.873e-8", "0.000000048729927235298367812147092890578", 11, 2); + round_test_opt ("17.295832317", "17.295832316629305757", 9, 2); + round_test_opt ("-33.579", "-33.57898", 3, 2); + round_test_opt ("1.28", "1.28393", 2, 2); + round_test_opt ("6220", "6220.39920443806605504575", 0, 2); + round_test_opt ("-6317", "-6316.6", 0, 2); + round_test_opt ("-0.00005848892114937004028325601357030246824024235494762", "-0.00005848892114937004028325601357030246824024235494762337957", 53, 2); + round_test_opt ("12259019880011.692389", "12259019880011.69238875374573107737", 6, 2); + round_test_opt ("5117620.88234", "5117620.88233942444", 5, 2); + round_test_opt ("-5402817113.48355823224028534844314403355889336077490394277592226", "-5402817113.48355823224028534844314403355889336077490394277592226301173", 53, 2); + round_test_opt ("-7", "-7", 0, 2); + round_test_opt ("-174.1", "-174.05877495228", 1, 2); + round_test_opt ("0.0000055438668515535873303968821901982", "0.0000055438668515535873303968821901982019139057562024454394240649190199027054", 37, 2); + round_test_opt ("0.03396514", "0.0339651389413732234059150651011640032028", 8, 2); + round_test_opt ("96627697594272840870.37877815466", "96627697594272840870.37877815465601593169625", 11, 2); + round_test_opt ("-98.47", "-98.472056197178250742", 2, 2); + round_test_opt ("-0.00584475813467750872", "-0.005844758134677508716736867", 20, 2); + round_test_opt ("461383471710858.43694651", "461383471710858.436946511072311907", 8, 2); + round_test_opt ("-1", "-1.4716907181349510132643929384315764239211731726973517515804983721754447810", 0, 2); + round_test_opt ("-9.805355702", "-9.805355702162446301", 9, 2); + round_test_opt ("2.7833783953196266754113271e+24", "2783378395319626675411327.0993787634844", 2, 2); + round_test_opt ("0.00000294628669788757426", "0.000002946286697887574263521448020176957705009159643384865438526", 23, 2); + round_test_opt ("-0.0063693144816", "-0.00636931448160159981555215581788634", 13, 2); + round_test_opt ("-304.4008445147353575743", "-304.400844514735357574331545", 19, 2); + round_test_opt ("0.000005295423638576797037626921333737826535401226", "0.0000052954236385767970376269213337378265354012264706634077258", 48, 2); + round_test_opt ("2381", "2381.1", 0, 2); + round_test_opt ("0", "-0.0000001503080979319766117393755519926784943226068180488290827487323134813", 5, 2); + round_test_opt ("-4413778", "-4413778.42", 0, 2); + round_test_opt ("0.0018", "0.001814326", 4, 2); + round_test_opt ("43275043988264577.5782955700917236306540097299", "43275043988264577.578295570091723630654009729926255882124833989160960", 28, 2); + round_test_opt ("4.073317856779391360450809425491524780764927416736008196948e+38", "407331785677939136045080942549152478076.492741673600819694798494", 20, 2); + round_test_opt ("-1.795997717217889909554206838442196975978e+39", "-1795997717217889909554206838442196975977.7090303", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("1253303751", "1253303751.11", 0, 2); + round_test_opt ("-1.8353538134549708634874726628420313543155591003e+41", "-183535381345497086348747266284203135431555.910027682", 5, 2); + round_test_opt ("1.58271792373595200950913155012871e+29", "158271792373595200950913155012.8712656263", 3, 2); + round_test_opt ("-165357179.3237118032017", "-165357179.32371180320174", 13, 2); + round_test_opt ("-1.07999644036047590963042262814354655551271e+41", "-107999644036047590963042262814354655551271.4414028749232958991", 0, 2); + round_test_opt ("5259080", "5259080.03", 0, 2); + round_test_opt ("3.867", "3.86687", 3, 2); + round_test_opt ("-143436219", "-143436218.96", 0, 2); + round_test_opt ("-3362250861082347264.397", "-3362250861082347264.3967745362450289041114949361", 3, 2); + round_test_opt ("0.000003443327805653865", "0.0000034433278056538651433367179354571545", 21, 2); + round_test_opt ("7", "7", 0, 2); + round_test_opt ("2", "1.9", 0, 2); + round_test_opt ("33", "32.8", 0, 2); + round_test_opt ("18711.053066683178133379575206278", "18711.053066683178133379575206277557088", 27, 2); + round_test_opt ("0.06507750783", "0.06507750782860441213826443046871427392840944", 11, 2); + round_test_opt ("-9.1659242474457515e-7", "-0.0000009165924247445751548548", 23, 2); + round_test_opt ("-3.93473122795752405190113747389790954279680349089920785e+45", "-3934731227957524051901137473897909542796803490.8992078504135489994387", 9, 2); + round_test_opt ("0", "0.00000248274", 3, 2); + round_test_opt ("-1.839213914613e-7", "-0.0000001839213914613028222646989", 20, 2); + round_test_opt ("1.52794815702332565521951549506313217119977e+33", "1527948157023325655219515495063132.171199766472", 8, 2); + round_test_opt ("1.018947329417956797657999460824474028982833986785e+32", "101894732941795679765799946082447.4028982833986785140672", 16, 2); + round_test_opt ("35858452208.19", "35858452208.19000066517865585", 3, 2); + round_test_opt ("-4.9760854838267859701683640123496467e+33", "-4976085483826785970168364012349646.7110", 1, 2); + round_test_opt ("0.1392706914163679322924904087695251375868", "0.1392706914163679322924904087695251375868426732425599523", 40, 2); + round_test_opt ("0.13446494941321870029804759", "0.1344649494132187002980475900304326552736540695179689653394697684703", 27, 2); + round_test_opt ("457.77", "457.76950475", 3, 2); + round_test_opt ("674.47", "674.4659", 2, 2); + round_test_opt ("-1.0937779892070530440639729e+25", "-10937779892070530440639729.1", 0, 2); + round_test_opt ("-0.000132355755", "-0.0001323557553949230602", 12, 2); + round_test_opt ("-0.04482779362729189394578176624022542808410955129244", "-0.044827793627291893945781766240225428084109551292436500115827935157927", 50, 2); + round_test_opt ("-57188906.2368820185002349936363257413916364318456271361984977283", "-57188906.236882018500234993636325741391636431845627136198497728333", 55, 2); + round_test_opt ("-13606797141428053.1721544576048", "-13606797141428053.1721544576047601", 13, 2); + round_test_opt ("-2", "-1.5", 0, 2); + round_test_opt ("3.9786160949676465677728032348367425595031527660811966604e+54", "3978616094967646567772803234836742559503152766081196660.427", 1, 2); + round_test_opt ("-469.3911288", "-469.3911287597434989", 7, 2); + round_test_opt ("-4", "-4.1", 0, 2); + round_test_opt ("-1277.9", "-1277.903", 1, 2); + round_test_opt ("304410650367.36", "304410650367.35664", 2, 2); + round_test_opt ("96399.1012", "96399.1011912", 4, 2); + round_test_opt ("26094.55", "26094.5511", 2, 2); + round_test_opt ("6477056174", "6477056173.6411", 0, 2); + round_test_opt ("-0.486", "-0.486308269217851", 3, 2); + round_test_opt ("-2.78289893084433975153577083884e+22", "-27828989308443397515357.70838836838735242665739067560302801304002", 7, 2); + round_test_opt ("-0.0003823628361791375369489730392166197957616066152954", "-0.000382362836179137536948973039216619795761606615295361372771068223314838565425", 52, 2); + round_test_opt ("3.891433971547872547392046197523607284e+34", "38914339715478725473920461975236072.8395753635577232542318617535489", 3, 2); + round_test_opt ("-1.538170383683e-7", "-0.000000153817038368329506748657969019346481236319269253843", 19, 2); + round_test_opt ("-1.3778153377081407178699920577521464615665209277274e+22", "-13778153377081407178699.92057752146461566520927727394934570834", 27, 2); + round_test_opt ("-3.7068598520902305941197645936643101515587705089472283657927775e+62", "-370685985209023059411976459366431015155877050894722836579277749.633", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("292676496919465.33932", "292676496919465.339320791911", 5, 2); + round_test_opt ("-2", "-2", 0, 2); + round_test_opt ("55944989627", "55944989627.2", 0, 2); + round_test_opt ("0.0001745908758205551186206851627111357216043377299", "0.0001745908758205551186206851627111357216043377298747095684250151", 49, 2); + round_test_opt ("0.00002", "0.000015652", 5, 2); + round_test_opt ("-6308330.4601747264191318343440394995877829678398891", "-6308330.4601747264191318343440394995877829678398890799813", 43, 2); + round_test_opt ("-12", "-11.676050", 0, 2); + round_test_opt ("-3", "-3.235", 0, 2); + round_test_opt ("-215644685.5", "-215644685.495", 1, 2); + round_test_opt ("3461262121564.04", "3461262121564.040233", 2, 2); + round_test_opt ("-0.00014745131941260946021835553943481393698173399807042837569798294", "-0.00014745131941260946021835553943481393698173399807042837569798294009208657", 65, 2); + round_test_opt ("-2.08", "-2.07985990", 3, 2); + round_test_opt ("63744.2073675375", "63744.207367537545", 10, 2); + round_test_opt ("-0.029796769", "-0.029796769466934", 9, 2); + round_test_opt ("-5.8702888709741165230920812798431951e+24", "-5870288870974116523092081.27984319513877039316912356140774746", 10, 2); + round_test_opt ("247022598701.139124275079996064587405002948665338", "247022598701.13912427507999606458740500294866533765359232307077727427265576", 36, 2); + round_test_opt ("0", "-0.00001535574855767881813030028275600548470185898581409854429471545267483", 1, 2); + round_test_opt ("-3.739936850451623270067041648852460725129360951353e+34", "-37399368504516232700670416488524607.2512936095135303", 14, 2); + round_test_opt ("3.28204290000808630525635795159271802716431529e+39", "3282042900008086305256357951592718027164.31528961882273327583170", 5, 2); + round_test_opt ("-466.9529320172758025649894593692191876472", "-466.9529320172758025649894593692191876472497595267", 37, 2); + round_test_opt ("0.01892410898213188428082254311554777266916395226", "0.018924108982131884280822543115547772669163952257024583", 47, 2); + round_test_opt ("0.0049076526493185979809", "0.00490765264931859798089956560752203543779323690451288", 22, 2); + round_test_opt ("-0.127", "-0.127328643383904", 3, 2); + round_test_opt ("0", "0.0000533", 2, 2); + round_test_opt ("90622099140893.8027", "90622099140893.80273068", 4, 2); + round_test_opt ("1064.4615379190056", "1064.461537919005585646809998571315", 13, 2); + round_test_opt ("0", "0.00007759619948403817701724", 1, 2); + round_test_opt ("-1", "-1.0", 0, 2); + round_test_opt ("-1.9694835349821333431993987103324436327515e+40", "-19694835349821333431993987103324436327515.29047", 0, 2); + round_test_opt ("11.543236849694283119077563690234148", "11.5432368496942831190775636902341482878", 33, 2); + round_test_opt ("350.273", "350.2727878", 3, 2); + round_test_opt ("-1.0938060190301544076858679503e+27", "-1093806019030154407685867950.270", 1, 2); + round_test_opt ("-56", "-55.9", 0, 2); + round_test_opt ("0.0000091251974931034584620941259317252498", "0.000009125197493103458462094125931725249773437533979", 40, 2); + round_test_opt ("-1.2765000870625293313844175195581828230390103480747338219e+56", "-127650008706252933138441751955818282303901034807473382189.53", 0, 2); + round_test_opt ("46010765094830.4254989721024557", "46010765094830.4254989721024556606933308", 16, 2); + round_test_opt ("-1.1640698340609127253625e+22", "-11640698340609127253625.18735", 0, 2); + round_test_opt ("-1.4564903187476621039807e+22", "-14564903187476621039806.6", 0, 2); + round_test_opt ("0", "-0.000000083722991559151862209039851326449700021597494648458400616", 4, 2); + round_test_opt ("-6.41e-8", "-0.00000006411083811709488721082917930416624806", 10, 2); + round_test_opt ("1.696580271646251070184e+21", "1696580271646251070184.4430539", 0, 2); + round_test_opt ("1107791439863915.5351", "1107791439863915.535095147027172", 4, 2); + round_test_opt ("-532886977.4329272345712552", "-532886977.432927234571255248498", 16, 2); + round_test_opt ("0.00000405110901100232", "0.0000040511090110023173739194134569067017749467", 20, 2); + round_test_opt ("-0.00948680319971605622505854", "-0.009486803199716056225058540348965741932814789016495565292645244", 27, 2); + round_test_opt ("0", "0.0080318078761344866009", 0, 2); + round_test_opt ("-1.37577559807023391528966414020162389e+26", "-137577559807023391528966414.0201623891925167", 9, 2); + round_test_opt ("-4.5121902412212444901397798054265850634052e+40", "-45121902412212444901397798054265850634051.869727661437134173358890308", 0, 2); + round_test_opt ("7661428532.89", "7661428532.88944", 2, 2); + round_test_opt ("-1.454177252487370323102862188643496189890378635234086314307117507172844192e+72", "-1454177252487370323102862188643496189890378635234086314307117507172844191.68", 0, 2); + round_test_opt ("1", "1", 0, 2); + round_test_opt ("2228091788.094318361964894877792", "2228091788.094318361964894877791728462856", 21, 2); + round_test_opt ("-167212906036730617137", "-167212906036730617137.407", 0, 2); + round_test_opt ("500750302397190800816.91", "500750302397190800816.905746", 2, 2); + round_test_opt ("-0.00000159395903051", "-0.00000159395903050987044005601994219766495204682721341176661305", 17, 2); + round_test_opt ("269475211134.877705293926202935522247619", "269475211134.8777052939262029355222476190098691256", 28, 2); + round_test_opt ("134216893250721.36710032886160507672804", "134216893250721.3671003288616050767280350182737", 23, 2); + round_test_opt ("1786503345716873136.90383439054", "1786503345716873136.9038343905353823339117801", 11, 2); + round_test_opt ("6.033624247158741524363758442046375055019654816766227061e+53", "603362424715874152436375844204637505501965481676622706.0796529943", 1, 2); + round_test_opt ("0", "0.000000891412", 0, 2); + round_test_opt ("1.441272897484758186061077347880712264246610812052e+23", "144127289748475818606107.7347880712264246610812051905", 25, 2); + round_test_opt ("17330641893976318.84564282", "17330641893976318.845642820744162068", 8, 2); + round_test_opt ("-5.05839280161950115929179319311608856947954305e+34", "-50583928016195011592917931931160885.6947954305375437776", 10, 2); + round_test_opt ("-0.0000039098583205503801528049598095573438985499608506137", "-0.00000390985832055038015280495980955734389854996085061369809565645040804908", 56, 2); + round_test_opt ("-4.7619609", "-4.761960944657805969402176136088588439", 7, 2); + round_test_opt ("273458691.286084108782212740242241940302", "273458691.286084108782212740242241940302211220982731343671088", 30, 2); + round_test_opt ("1.31453397792031152952620632607892728680844e+40", "13145339779203115295262063260789272868084.4085", 1, 2); + round_test_opt ("-17357207.2134449642186462093", "-17357207.2134449642186462093120318412401", 19, 2); + round_test_opt ("-868481.451544", "-868481.4515437974", 6, 2); + round_test_opt ("-0.0000176325355611781611", "-0.000017632535561178161068999572586816824236922834327427056531600273135620323", 22, 2); + round_test_opt ("-0.0001587367", "-0.00015873672795035529756886", 10, 2); + round_test_opt ("-1.052739979885063383916533e+21", "-1052739979885063383916.5327087", 3, 2); + round_test_opt ("3216685477704.4611954923596363", "3216685477704.46119549235963631463383616410", 16, 2); + round_test_opt ("-307680530765503.428571437476593", "-307680530765503.42857143747659306575704161814703801353953299558", 15, 2); + round_test_opt ("3037111883.04765", "3037111883.04765194870097922567918686275782297598801628132273755040", 5, 2); + round_test_opt ("-479135.81", "-479135.808320370869", 2, 2); + round_test_opt ("121663.0102985209899925732302728565711", "121663.010298520989992573230272856571102", 31, 2); + round_test_opt ("0.28539648840514488927929634002439242329613582", "0.2853964884051448892792963400243924232961358175446193879397140987732203563", 44, 2); + round_test_opt ("1576592228177973985", "1576592228177973985.3", 0, 2); + round_test_opt ("-0.0107", "-0.0107295665153732185295046079912469331520367", 4, 2); + round_test_opt ("-2.3536900425940950479720519095e+26", "-235369004259409504797205190.9503521429680852294", 3, 2); + round_test_opt ("-2860793.23", "-2860793.2348491781522", 2, 2); + round_test_opt ("-2.85838744565432080413451445337094465696861572528518e+27", "-2858387445654320804134514453.370944656968615725285181979", 23, 2); + round_test_opt ("-3.53421999222748811063287661087586e-7", "-0.000000353421999222748811063287661087586406474414299", 39, 2); + round_test_opt ("-6215", "-6215.34", 0, 2); + round_test_opt ("7.988771220236220007270250634879480023908e+38", "798877122023622000727025063487948002390.773", 1, 2); + round_test_opt ("-1.1569696515e-7", "-0.00000011569696514766369073619293472418", 17, 2); + round_test_opt ("-1115858.4455", "-1115858.44549589161866177375496670794054765702194", 5, 2); + round_test_opt ("-3.896275696361162608951278497483809375561923715889e+49", "-38962756963611626089512784974838093755619237158890.34692", 0, 2); + round_test_opt ("4.3245017042873698864372702101985207690004064e+23", "432450170428736988643727.021019852076900040644009173571", 20, 2); + round_test_opt ("-22170178", "-22170177.70841743", 0, 2); + round_test_opt ("3.6584055292803920957409556278905283081022499041139e+45", "3658405529280392095740955627890528308102249904.113921699", 4, 2); + round_test_opt ("-4.50029396038632669339818689932e+27", "-4500293960386326693398186899.31915520", 2, 2); + round_test_opt ("-141723568.376664689", "-141723568.376664688849", 9, 2); + round_test_opt ("5626070073180771.46", "5626070073180771.464720835351567475739703", 2, 2); + round_test_opt ("-1687579710795354.623048868485609055093667518", "-1687579710795354.623048868485609055093667518014861431377506825969398025", 28, 2); + round_test_opt ("-844251383136295", "-844251383136295.195", 0, 2); + round_test_opt ("-1366.45333803255457983", "-1366.4533380325545798269352", 17, 2); + round_test_opt ("1.616517984524612699717355385084000297718640111608e+21", "1616517984524612699717.355385084000297718640111607775614178018", 27, 2); + round_test_opt ("-0.00460305367297441", "-0.00460305367297441113888954961570827988520", 17, 2); + round_test_opt ("-17687431722.3140597210681", "-17687431722.3140597210681325048373017817841713775", 13, 2); + round_test_opt ("5394.903", "5394.90287299681", 3, 2); + round_test_opt ("5.22109331317558145439471625e+26", "522109331317558145439471625.26", 0, 2); + round_test_opt ("-0.000041802535523658", "-0.00004180253552365815871676", 18, 2); + round_test_opt ("9.026516727856752608946954266950892264209146690378801844984922750379805e+60", "9026516727856752608946954266950892264209146690378801844984922.750379804852", 9, 2); + round_test_opt ("94275109", "94275109.021", 1, 2); + round_test_opt ("0.000004616456949662159600889881739", "0.00000461645694966215960088988173933387666979288344500471354739672179117074", 33, 2); + round_test_opt ("-1719371359697", "-1719371359696.95", 0, 2); + round_test_opt ("-27.3367", "-27.33667873", 4, 2); + round_test_opt ("2543111538817370.3490073511136251015353", "2543111538817370.349007351113625101535313677948165135921164", 22, 2); + round_test_opt ("1.3345940433600211820210284767785368417612358543578176164157104e+60", "1334594043360021182021028476778536841761235854357817616415710.42736", 1, 2); + round_test_opt ("-3291574451706986.8758", "-3291574451706986.8757568", 4, 2); + round_test_opt ("96405.635", "96405.635100", 3, 2); + round_test_opt ("3049403108.412923800395777724353", "3049403108.4129238003957777243527876084827225355762", 21, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("0.00135577440331309044027", "0.001355774403313090440268742644904579785259888199353003417742070", 23, 2); + round_test_opt ("-9.217391826607404316458528e+25", "-92173918266074043164585279.81118", 0, 2); + round_test_opt ("0.0237258", "0.02372578857087513310497550", 7, 2); + round_test_opt ("-48", "-48.4", 0, 2); + round_test_opt ("6.9959049225118279690633605702415647755970752718462923693534691e+60", "6995904922511827969063360570241564775597075271846292369353469.06081011824", 1, 2); + round_test_opt ("-2.91644062862385254968625542750539352911940245514111765589074092469129478e+69", "-2916440628623852549686255427505393529119402455141117655890740924691294.776", 2, 2); + round_test_opt ("0.000008340907791377", "0.000008340907791377023026", 18, 2); + round_test_opt ("0", "-0.00000015", 1, 2); + round_test_opt ("-15907748.2", "-15907748.189", 1, 2); + round_test_opt ("0", "0.0000000516717209025282803", 3, 2); + round_test_opt ("0.00805700885801193345479952", "0.00805700885801193345479951801", 26, 2); + round_test_opt ("0", "0.000000690241671505883936406906696546003155121125187210750083970996577124118", 1, 2); + round_test_opt ("562", "562.32", 0, 2); + round_test_opt ("-5.881233836149031776879600122668181177e+21", "-5881233836149031776879.600122668181177011921512256229", 16, 2); + round_test_opt ("-278290307625765293888.05", "-278290307625765293888.0507900", 2, 2); + round_test_opt ("5", "4.79", 0, 2); + round_test_opt ("-1198252696874748.3211911365306282303", "-1198252696874748.32119113653062823030286029915", 20, 2); + round_test_opt ("1.85945139752585852753811e-8", "0.000000018594513975258585275381132530313449911158263", 31, 2); + round_test_opt ("-1.1407050071970528529191421693346177928979244133835766190739141389528248e+65", "-114070500719705285291914216933461779289792441338357661907391413895.2824761", 5, 2); + round_test_opt ("-0.353", "-0.3534130540265816021015859736", 3, 2); + round_test_opt ("28664614.408117689", "28664614.408117689188239077547338", 9, 2); + round_test_opt ("-268871363196450682.614", "-268871363196450682.6136699", 3, 2); + round_test_opt ("2", "2.4", 0, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("0.038863047504098263754587496098", "0.0388630475040982637545874960983", 30, 2); + round_test_opt ("-552382524740993597449.17971153278", "-552382524740993597449.179711532783627", 11, 2); + round_test_opt ("1.561800830043227350712928455747038e+30", "1561800830043227350712928455747.03816", 3, 2); + round_test_opt ("0", "0.372000", 0, 2); + round_test_opt ("30.804347619793369791031725539335381852887648326486049230154802476", "30.8043476197933697910317255393353818528876483264860492301548024760023311", 64, 2); + round_test_opt ("13368", "13368.02", 0, 2); + round_test_opt ("2723634870", "2723634869.88045", 0, 2); + round_test_opt ("7", "7", 0, 2); + round_test_opt ("0.0071000662601", "0.00710006626011943981022498192125744874706640717982408", 13, 2); + round_test_opt ("-9334602199292852753.5651", "-9334602199292852753.565061", 4, 2); + round_test_opt ("2.729836503389467360083910925625124385529680269583096301667151203843208783e+65", "272983650338946736008391092562512438552968026958309630166715120384.320878309", 7, 2); + round_test_opt ("-0.006", "-0.0056357", 3, 2); + round_test_opt ("22899716068547.126306054", "22899716068547.12630605408664680838", 9, 2); + round_test_opt ("-5.02824725050301597590659024229733081751392712748e+46", "-50282472505030159759065902422973308175139271274.848", 1, 2); + round_test_opt ("-87", "-87.154481969", 0, 2); + round_test_opt ("-0.00004553187486191", "-0.00004553187486190784", 17, 2); + round_test_opt ("4.184376969241000088691790311151962529738578473848959e+32", "418437696924100008869179031115196.25297385784738489589", 19, 2); + round_test_opt ("-0.397263", "-0.39726251919448835621320733060316", 6, 2); + round_test_opt ("78845952.939020828383752049449151195187870271022", "78845952.9390208283837520494491511951878702710218984505967916788", 39, 2); + round_test_opt ("2.770372114757730412680309526784713044108130304373392176e+51", "2770372114757730412680309526784713044108130304373392.176244754", 3, 2); + round_test_opt ("0", "0.000000016720450859173397668989", 5, 2); + round_test_opt ("-1.562455332398304839537137663396453141288893760649393300155e+29", "-156245533239830483953713766339.645314128889376064939330015503", 28, 2); + round_test_opt ("0.000876344550348635702", "0.0008763445503486357022165753142695186277630007987646280699898384", 21, 2); + round_test_opt ("-1", "-1", 0, 2); + round_test_opt ("-8.7689639992444559472566978362522431218385745539867e+49", "-87689639992444559472566978362522431218385745539866.770786098116338", 0, 2); + round_test_opt ("6.745165947865409245106269e+24", "6745165947865409245106268.9", 0, 2); + round_test_opt ("-9690090866817300866.5001184568", "-9690090866817300866.5001184567974535869898427535739539447563", 10, 2); + round_test_opt ("16812157145369246.1390494058969646849926124434165956423925626", "16812157145369246.139049405896964684992612443416595642392562629", 43, 2); + round_test_opt ("-85.743964880502573121090925427555594662684357", "-85.7439648805025731210909254275555946626843566155871159446020573999638237", 42, 2); + round_test_opt ("0.05752687180161750017555411217026419371188707852", "0.057526871801617500175554112170264193711887078519141747897656972093", 47, 2); + round_test_opt ("-62.536520674882", "-62.53652067488192047470964", 12, 2); + round_test_opt ("-6.304771829630676008320130020526e+28", "-63047718296306760083201300205.2565", 2, 2); + round_test_opt ("-1.7750867078270178043590219665540149640345992e+39", "-1775086707827017804359021966554014964034.5991580785", 4, 2); + round_test_opt ("-6.73252754422871084624524819626268003", "-6.73252754422871084624524819626268002578592446", 35, 2); + round_test_opt ("12230467541708652594.81344", "12230467541708652594.8134442936", 5, 2); + round_test_opt ("5.9515360926529978569058942741307748379577128394359794e+45", "5951536092652997856905894274130774837957712839.4359794485658237", 7, 2); + round_test_opt ("-7.39392590188918268234992452e+26", "-739392590188918268234992451.67508368118561", 0, 2); + round_test_opt ("16286.3232351229941418", "16286.323235122994141804376055326858788736369392450153849161300046353727", 17, 2); + round_test_opt ("15469.69867", "15469.698666429057", 5, 2); + round_test_opt ("-10", "-9.7", 0, 2); + round_test_opt ("-0.000014693761691537558568253201957781367850654159135332775062", "-0.0000146937616915375585682532019577813678506541591353327750624395516217833370960", 60, 2); + round_test_opt ("-0.0001424906145756648557167", "-0.0001424906145756648557167372535004793436424937964062239423", 25, 2); + round_test_opt ("-1078093526184022.7963", "-1078093526184022.796253", 4, 2); + round_test_opt ("-1.815287952979117938264058056902741947894527910100505717833774716838e+65", "-181528795297911793826405805690274194789452791010050571783377471683.767", 1, 2); + round_test_opt ("-653.9065768471", "-653.906576847053298532666147291912030069213", 10, 2); + round_test_opt ("0.09140216031745575", "0.0914021603174557462098609339238985", 17, 2); + round_test_opt ("43.8809", "43.8809157757331", 4, 2); + round_test_opt ("-86108", "-86107.612", 0, 2); + round_test_opt ("3.86022289248163319594748155782859e+32", "386022289248163319594748155782858.9007", 0, 2); + round_test_opt ("5.621196571890384186384686118709744384577384856e+41", "562119657189038418638468611870974438457738.48557635682977189942282386179928", 4, 2); + round_test_opt ("-113474555.303661301570927857", "-113474555.30366130157092785703509802627045554249807599884692307252251912", 18, 2); + round_test_opt ("0", "0.00000024871666447686081513415760090831233621149", 6, 2); + round_test_opt ("0", "0.000003140", 0, 2); + round_test_opt ("-0.8077", "-0.80768350725", 4, 2); + round_test_opt ("2716795343.054377410367818069076130325912", "2716795343.0543774103678180690761303259119780871514", 30, 2); + round_test_opt ("0.08215183479018280866121048171017014672595", "0.082151834790182808661210481710170146725947636135600624942", 41, 2); + round_test_opt ("-15599396", "-15599396.47463676716826571518009734129", 0, 2); + round_test_opt ("21237332302166130", "21237332302166130.5", 0, 2); + round_test_opt ("4.446802729574404672215e+21", "4446802729574404672214.5841989231212", 0, 2); + round_test_opt ("151595", "151594.7878535770037932", 0, 2); + round_test_opt ("-9", "-9.1", 0, 2); + round_test_opt ("18", "18.35584408282", 0, 2); + round_test_opt ("-0.04536687705", "-0.045366877045781157814871332455248235349", 11, 2); + round_test_opt ("3.58962", "3.589620823", 5, 2); + round_test_opt ("-3470871455926727", "-3470871455926727.4213", 0, 2); + round_test_opt ("-5.43267224426488094025101495226314154904279e+37", "-54326722442648809402510149522631415490.42787135", 4, 2); + round_test_opt ("2.1701233393452135837687989289801783613534e+40", "21701233393452135837687989289801783613533.7083", 0, 2); + round_test_opt ("-110226456088098.34", "-110226456088098.3354257139084337657140821170", 2, 2); + round_test_opt ("1.79527294692173689644030821922e+29", "179527294692173689644030821922.36", 0, 2); + round_test_opt ("2465786", "2465785.5", 0, 2); + round_test_opt ("0.059", "0.0590097", 4, 2); + round_test_opt ("-0.00032341204149493519172411533844411518109538", "-0.00032341204149493519172411533844411518109537514034386131655201857305", 44, 2); + round_test_opt ("-19632526678771", "-19632526678770.5179362", 0, 2); + round_test_opt ("83850975.9116141", "83850975.91161413953344", 7, 2); + round_test_opt ("1.3330575581185095e-8", "0.000000013330575581185094725", 24, 2); + round_test_opt ("9.593757839891004592635206828432142735400349114724354435185e+27", "9593757839891004592635206828.432142735400349114724354435184976270503456", 31, 2); + round_test_opt ("-1.5834359535561981827384627232289049496513728e+29", "-158343595355619818273846272322.89049496513727978", 15, 2); + round_test_opt ("-161385178003980959.7", "-161385178003980959.71957215", 1, 2); + round_test_opt ("-8.15856460209393352542084878399e+24", "-8158564602093933525420848.7839864247", 5, 2); + round_test_opt ("-734334.87", "-734334.86528524", 2, 2); + round_test_opt ("-339107.532", "-339107.53240533465722", 3, 2); + round_test_opt ("0.0182264564729", "0.01822645647290769756975719547208786195238221037777193944140277446083612264", 13, 2); + round_test_opt ("0", "0.000000312535177523535094674680811257", 4, 2); + round_test_opt ("-1.02317614554336751348183375464e+25", "-10231761455433675134818337.5464107", 4, 2); + round_test_opt ("-5192", "-5192.2", 0, 2); + round_test_opt ("4.194414075099341862772775482e+27", "4194414075099341862772775481.96", 0, 2); + round_test_opt ("0.011", "0.011409868990755914863555139060256834004384701965", 3, 2); + round_test_opt ("119.9377386667742", "119.937738666774165317150", 13, 2); + round_test_opt ("-280557779722362", "-280557779722361.920271594258351879901", 0, 2); + round_test_opt ("-88990007973014097", "-88990007973014097.402", 0, 2); + round_test_opt ("0.1626198829126045426702564789", "0.162619882912604542670256478874554675083", 28, 2); + round_test_opt ("0", "0.0000001077381345477023", 4, 2); + round_test_opt ("-0.0010058504431498241471201525718053", "-0.00100585044314982414712015257180528", 34, 2); + round_test_opt ("39507381.12", "39507381.117798830437320321819745628719103", 2, 2); + round_test_opt ("-2.050602224312136987122686636e+23", "-205060222431213698712268.663604116", 5, 2); + round_test_opt ("-14.755523280399235472", "-14.75552328039923547174081588953690734302657223334", 18, 2); + round_test_opt ("5", "5", 0, 2); + round_test_opt ("-9.75881721989668738875263337478353073721585336373089515072925085364e+25", "-97588172198966873887526333.747835307372158533637308951507292508536375", 40, 2); + round_test_opt ("0", "-0.0000015245848", 3, 2); + round_test_opt ("-0.00001922927428707613217504434079596", "-0.00001922927428707613217504434079595910790056397804239", 35, 2); + round_test_opt ("7375868", "7375868.357940", 0, 2); + round_test_opt ("-2.59884314", "-2.598843139712835", 8, 2); + round_test_opt ("-3069.5", "-3069.509358849664", 1, 2); + round_test_opt ("277549389.08968912793732154", "277549389.0896891279373215444205527113793247", 17, 2); + round_test_opt ("-3.6788826053419000928251587320525e+30", "-3678882605341900092825158732052.500322302531277210598", 1, 2); + round_test_opt ("9.548857944235036904508484482396167658656110421603801e+47", "954885794423503690450848448239616765865611042160.3800783", 4, 2); + round_test_opt ("98806177.44981668", "98806177.44981668155474315342", 8, 2); + round_test_opt ("206.85148341", "206.8514834102037", 8, 2); + round_test_opt ("1.6697970968114023796527900430323144973544151692977457e+44", "166979709681140237965279004303231449735441516.929774568403", 8, 2); + round_test_opt ("-5.876853276710302874983908e+22", "-58768532767103028749839.07955", 3, 2); + round_test_opt ("-28.477683461", "-28.47768346112565043170812", 9, 2); + round_test_opt ("-414152503735.735094144050962324427196806634", "-414152503735.73509414405096232442719680663367650677003262299033", 30, 2); + round_test_opt ("-1530", "-1530.2325969933", 0, 2); + round_test_opt ("1.67495602958004117641339319024379972941875931904023877993700175078e+65", "167495602958004117641339319024379972941875931904023877993700175077.95137", 1, 2); + round_test_opt ("5234", "5233.662", 0, 2); + round_test_opt ("-190523450.6", "-190523450.567", 1, 2); + round_test_opt ("1.1432525741847682794437171601229238400265e+40", "11432525741847682794437171601229238400264.9661", 1, 2); + round_test_opt ("-2.99583340382501073629209407987407915791340762683834568719e+35", "-299583340382501073629209407987407915.7913407626838345687187994", 21, 2); + round_test_opt ("-0.00004", "-0.0000392", 5, 2); + round_test_opt ("71621.14", "71621.144179", 2, 2); + round_test_opt ("-1890", "-1890.14", 0, 2); + round_test_opt ("1.4686517218614327647983137371969e+22", "14686517218614327647983.13737196939359638064986252998693", 9, 2); + round_test_opt ("489090527336691382696.105", "489090527336691382696.10541305057", 3, 2); + round_test_opt ("304070461379406.605407", "304070461379406.60540684169314", 6, 2); + round_test_opt ("-11.6", "-11.568", 1, 2); + round_test_opt ("1.422624734702245114376941302742587248917335e+37", "14226247347022451143769413027425872489.173350489614354031691494939", 6, 2); + round_test_opt ("1.9", "1.8969534077467812781478737406964724400409391", 1, 2); + round_test_opt ("2027091", "2027090.944", 0, 2); + round_test_opt ("1.2234607376132958e-8", "0.0000000122346073761329580239635143344389270410244", 25, 2); + round_test_opt ("0.000205265132", "0.0002052651317354143799470812669", 12, 2); + round_test_opt ("227729.86380759002723544183936484272966773", "227729.863807590027235441839364842729667729035395957243", 35, 2); + round_test_opt ("6.42747724441705776916400463006150151711550978008727e+36", "6427477244417057769164004630061501517.11550978008727410", 14, 2); + round_test_opt ("-52051054081793.2672679713905273103909501396258575", "-52051054081793.2672679713905273103909501396258574953153828", 34, 2); + round_test_opt ("0", "0", 0, 2); + round_test_opt ("11875545.61", "11875545.610120", 2, 2); + round_test_opt ("83542652463", "83542652462.958362000208518025786276278329509580", 1, 2); + round_test_opt ("-401437509134.126753911001702061515772", "-401437509134.126753911001702061515772042472", 25, 2); + round_test_opt ("117209371.58414", "117209371.5841398132283", 5, 2); + round_test_opt ("-74527.75605569111", "-74527.7560556911142469", 11, 2); + round_test_opt ("-0.09", "-0.090352527437431724009201587160643523155031024972052117377", 2, 2); + round_test_opt ("5.55", "5.553662", 2, 2); + round_test_opt ("102227377262987.3093738016576", "102227377262987.30937380165760189891748642629640436577221577326700076451", 14, 2); + round_test_opt ("-1.08505022157355782542910761489229861552176e+39", "-1085050221573557825429107614892298615521.76460395", 2, 2); + round_test_opt ("-13", "-12.6", 0, 2); + round_test_opt ("-3632808919.1", "-3632808919.07371062219", 1, 2); + round_test_opt ("-485708170667.969649834185802791581238709", "-485708170667.9696498341858027915812387093327385", 27, 2); + round_test_opt ("-4.594805598", "-4.59480559832078991740", 9, 2); + round_test_opt ("1346356.65", "1346356.650482596113805165394442591002016854", 2, 2); + round_test_opt ("-2.16009738819645430801800828e+26", "-216009738819645430801800827.56078", 0, 2); + round_test_opt ("-52704.267218", "-52704.2672175213516660657448", 6, 2); + round_test_opt ("-2.916153881351363898131418752828573101558e+37", "-29161538813513638981314187528285731015.579857871545774805605", 3, 2); + round_test_opt ("-3.4937178314931012799461660644864734612715548774e+42", "-3493717831493101279946166064486473461271554.8773821822", 4, 2); + round_test_opt ("0", "0.0000023647203264421", 1, 2); + round_test_opt ("1.989756784879801030533213375415812776636025008435569523075e+40", "19897567848798010305332133754158127766360.2500843556952307500839202812", 18, 2); + round_test_opt ("-97260642", "-97260642.05", 0, 2); + round_test_opt ("0", "-0.0000000337886464136259021586124727251750885109409", 2, 2); + round_test_opt ("-1.14257955e-8", "-0.00000001142579546607962945225", 16, 2); + round_test_opt ("7.44877621032950231335430253285255273724302401015805296e+53", "744877621032950231335430253285255273724302401015805295.7", 0, 2); + round_test_opt ("1.775299455743090238528215532021e+29", "177529945574309023852821553202.13198", 1, 2); + round_test_opt ("-2.37905145360030744233272167257615464e+35", "-237905145360030744233272167257615464.5", 0, 2); + round_test_opt ("1.02175848129590067439065e+23", "102175848129590067439065.02", 0, 2); + round_test_opt ("0", "-0.000273593279278068", 0, 2); + round_test_opt ("-0.0000183471573", "-0.0000183471573015865", 13, 2); + round_test_opt ("-2.12274080557609569582588730594098004856e-7", "-0.00000021227408055760956958258873059409800485622885332576686587569613000909143762", 45, 2); + round_test_opt ("3.0200161e-7", "0.00000030200160571197733444217721269656", 14, 2); + round_test_opt ("-6263.10301664173381991555829833514363", "-6263.103016641733819915558298335143627616957", 32, 2); + round_test_opt ("-324565569264469.7697", "-324565569264469.76973626498148841934", 4, 2); + round_test_opt ("2.0356920034598500325931466276970479920769197e+39", "2035692003459850032593146627697047992076.91966941729463", 4, 2); + round_test_opt ("-3.7274264783062264794262624965296657029e+35", "-372742647830622647942626249652966570.29370", 2, 2); + round_test_opt ("1.60302196933629697346794839662315623452283174780650335959292811374e+47", "160302196933629697346794839662315623452283174780.6503359592928113740962157369", 18, 2); + round_test_opt ("-0.024429818883535342", "-0.0244298188835353418193163558516579", 18, 2); + round_test_opt ("23756303523305.6140950547", "23756303523305.6140950547362366198", 10, 2); + round_test_opt ("-64", "-64.121465561370155651261986518696226", 0, 2); + round_test_opt ("-1", "-1.13", 0, 2); + round_test_opt ("-5.9e-8", "-0.0000000593304079243227119", 9, 2); + round_test_opt ("5627537826012654.05876667817", "5627537826012654.05876667816732352831662092524977075", 11, 2); + round_test_opt ("-8.27665277458e-8", "-0.00000008276652774579588", 19, 2); + round_test_opt ("861513716", "861513715.6741", 0, 2); + round_test_opt ("3e-7", "0.000000257206720261651", 7, 2); + round_test_opt ("0", "0.0007927", 2, 2); + round_test_opt ("86896.0793", "86896.0793412169", 4, 2); + round_test_opt ("1881.403", "1881.403241319480686035039127812", 3, 2); + round_test_opt ("4.392651708547615025847404743299513825363847608692e+48", "4392651708547615025847404743299513825363847608692.07", 0, 2); + round_test_opt ("88490", "88490.47", 0, 2); + round_test_opt ("-0.002520080111610405629478", "-0.0025200801116104056294775120111812168253859022387858989987369", 24, 2); + round_test_opt ("-0.00001954811406075605", "-0.000019548114060756054246867110232262755190200519141776424080201732786", 20, 2); + round_test_opt ("2223754.7527995", "2223754.7527994672219542483768111486118124321099", 7, 2); + round_test_opt ("6.091736744674932958041487633787806768568507433438650553608452876e+63", "6091736744674932958041487633787806768568507433438650553608452875.72", 0, 2); + round_test_opt ("49894.113", "49894.1127799519294971", 3, 2); + round_test_opt ("0.00014716749253645018595071503227", "0.000147167492536450185950715032272743133814160026661411028052325585862", 32, 2); + round_test_opt ("3.81040319815393750281067878907184507122920230505815564457784e+45", "3810403198153937502810678789071845071229202305.05815564457784047325821743", 14, 2); + round_test_opt ("-876471048554.3", "-876471048554.3047", 1, 2); + round_test_opt ("-2.88524162951643474889032043499458669e+33", "-2885241629516434748890320434994586.6882765880", 2, 2); + round_test_opt ("-0.001736753895", "-0.0017367538954142089514084785545", 12, 2); + round_test_opt ("-4", "-4", 0, 2); + round_test_opt ("-6.512960873093505284474111490971867178300352124628025656839315965e+52", "-65129608730935052844741114909718671783003521246280256.5683931596513567720910", 11, 2); + round_test_opt ("1.0980475166911", "1.09804751669106053295836153349782413287881213", 13, 2); + round_test_opt ("-9.52739343917771237705829027591031075925453730263899396244900573459e+40", "-95273934391777123770582902759103107592545.3730263899396244900573459364", 25, 2); + round_test_opt ("6266994391864.6457286946", "6266994391864.64572869458316836014463", 10, 2); + round_test_opt ("32818087531630388688.541212000359651379985916816547", "32818087531630388688.541212000359651379985916816547001029122", 30, 2); + round_test_opt ("-6.74952425706814883243146844744111948684907205e+33", "-6749524257068148832431468447441119.4868490720458937275298704", 11, 2); + round_test_opt ("1390737649580.164027609372666559633410099161120120113528", "1390737649580.16402760937266655963341009916112012011352799657622104260826183", 42, 2); + round_test_opt ("1.377356798931617572168824144922e+28", "13773567989316175721688241449.2249378", 2, 2); + round_test_opt ("-136.980592", "-136.98059207687877543990242", 6, 2); + round_test_opt ("-9.940719781507809586982903206069125166489707e+24", "-9940719781507809586982903.206069125166489706924170724911", 18, 2); + round_test_opt ("-2.919415632330415539162055538e+27", "-2919415632330415539162055538.36743214", 0, 2); + round_test_opt ("0.5044040336849305898871951944104110698368739561294195225", "0.50440403368493058988719519441041106983687395612941952252648164", 55, 2); + round_test_opt ("-211939308449.806", "-211939308449.80610", 3, 2); + round_test_opt ("9", "9", 0, 2); + round_test_opt ("-0.000002529042206717194", "-0.00000252904220671719422836", 21, 2); + round_test_opt ("0.13783", "0.137833239471954697384832913641929313", 5, 2); + round_test_opt ("-7", "-6.959319286182", 0, 2); + round_test_opt ("-18376.595853842449641806856827882353282165594", "-18376.5958538424496418068568278823532821655944864835322", 39, 2); + round_test_opt ("-5.788181284389440139668504e+24", "-5788181284389440139668504.04", 0, 2); + round_test_opt ("-6517661118689", "-6517661118688.671", 0, 2); + round_test_opt ("-4", "-3.9", 0, 2); + round_test_opt ("-31134726.3196", "-31134726.31956543905411576841391657438724006870983352032765413", 4, 2); + round_test_opt ("736935.6717779", "736935.67177787809451704627896212268788499886470861541163", 7, 2); + round_test_opt ("-1.19413296045337846822938788115970951731619e+41", "-119413296045337846822938788115970951731618.6053098788249753452", 0, 2); + round_test_opt ("-2.430625127524074829671611249118947124506314106473763566088e+32", "-243062512752407482967161124911894.7124506314106473763566088179", 25, 2); + round_test_opt ("2.97154e-7", "0.0000002971535498369260212763981014672847846827781862484611818953", 12, 2); + round_test_opt ("5.131850706303771906876154006932365178207368407589e+45", "5131850706303771906876154006932365178207368407.58930848", 3, 2); + round_test_opt ("-2.594623492073402044682711994246207736e+35", "-259462349207340204468271199424620773.619225", 1, 2); + round_test_opt ("-580515", "-580514.51266982", 0, 2); + round_test_opt ("3", "2.6", 0, 2); + round_test_opt ("499491386121413.839966864719354501", "499491386121413.83996686471935450079", 18, 2); + round_test_opt ("-197419447699338754619.241644310441263", "-197419447699338754619.2416443104412628738", 15, 2); + round_test_opt ("2.73619440021960269467178371169519e+32", "273619440021960269467178371169518.67", 0, 2); + round_test_opt ("0.000015271956744930317606856959647902032034991009788568796", "0.00001527195674493031760685695964790203203499100978856879597", 57, 2); + round_test_opt ("2.0469381062538947948048399936368577750183119466067181e+36", "2046938106253894794804839993636857775.018311946606718080", 16, 2); + round_test_opt ("-2.21538347481844971594054e+21", "-2215383474818449715940.54466", 2, 2); + round_test_opt ("19104837206.88", "19104837206.8785650019902873131114637398122818852991713", 2, 2); + round_test_opt ("-2.05e-8", "-0.0000000205037320799412748102174720532304479663672372992229635664934671661929", 10, 2); + round_test_opt ("-1.54034202082889515748408194e-8", "-0.0000000154034202082889515748408194049", 35, 2); + round_test_opt ("-0.00000148490511430300806742668011308298618928937721949", "-0.000001484905114303008067426680113082986189289377219486220129452620539", 53, 2); + round_test_opt ("1.06947853825804210903107783956033201405330460741113965153452866240598028333658574600335986282424005728822195712469239427515115497688805463213672082362783538099103520875006075956709410401127681714635619808549164975775653198187384132067097089033589263672210569243378453394296722458663645730124374780200631239499035297347068633399893578423983210776283580625821940144222187506712840219298810415057963261973055402443168859938145430149792389607844764196802154175749313795864230898105128337096324097715e+112", "10694785382580421090310778395603320140533046074111396515345286624059802833365857460033598628242400572882219571246.9239427515115497688805463213672082362783538099103520875006075956709410401127681714635619808549164975775653198187384132067097089033589263672210569243378453394296722458663645730124374780200631239499035297347068633399893578423983210776283580625821940144222187506712840219298810415057963261973055402443168859938145430149792389607844764196802154175749313795864230898105128337096324097715316745478605824049582433501231131614926547026172075676335478969822988872724971675943974680694103048603395181915379760948587689747562343921462399023385862972305737770702775356163975369732864199938961020377305697840185796727984150041090650368003", 382, 2); + round_test_opt ("1.666459852506088168940120080515492127846107360888123211919252210485934832e+35", "166645985250608816894012008051549212.7846107360888123211919252210485934832046158028424177226511182571636047696001087114343029984850297897", 38, 2); + round_test_opt ("6.795422862161439777133903173611314918560038216974815214939905174613969043746572902940337970764552530690194400013861117517675495274170021408916149693335937318130790526998291013468189650994970285684672283481295779507882877959051666346246442284486862455561895975859865354050430664693584564169600892792136243794827310642598727847206593084e-7", "0.00000067954228621614397771339031736113149185600382169748152149399051746139690437465729029403379707645525306901944000138611175176754952741700214089161496933359373181307905269982910134681896509949702856846722834812957795078828779590516663462464422844868624555618959758598653540504306646935845641696008927921362437948273106425987278472065930838249339634376551644739510812090250783854642527850733364781848186734237535786279286466267174280926901122630867278466184745897155447413254972336025365004060824737540978874643680859778500140264160473", 340, 2); + round_test_opt ("-5.54355224689196844206859540363498692034719895921748834278269838486587451020484476411412420100529171186353680057871054976715300749756833859399255728021953892489844952806572444070781089008785332958846102959532440189983269164499559578570579783482347156352653297783089500247950240789247732417130487000728146146750592278993087383958504592787728768825737216406179968758245527771260009803330413354492471210501617590136098619488503725533652941984324437991860841248948016812599622204499741034884841495557895147301378076755e+445", "-55435522468919684420685954036349869203471989592174883427826983848658745102048447641141242010052917118635368005787105497671530074975683385939925572802195389248984495280657244407078108900878533295884610295953244018998326916449955957857057978348234715635265329778308950024795024078924773241713048700072814614675059227899308738395850459278772876882573721640617996875824552777126000980333041335449247121050161759013609861948850372553365294198432443799.18608412489480168125996222044997410348848414955578951473013780767545375506505763870999386335585090677935839415557291517548517372483099509837724691439063670273856129047489", 67, 2); + round_test_opt ("-1.038423229963297710070799812780594733870806645120204521101153028241587269142557204149036780962768944346262853146999169453538114642577746872981543397527917079134275352059973647053423481416375263148940763516017475328454656432465396109620956410605718777812402229415468896313e+207", "-1038423229963297710070799812780594733870806645120204521101153028241587269142557204149036780962768944346262853146999169453538114642577746872981543397527917079134275352059973647053423481416375263148940763516017.47532845465643246539610962095641060571877781240222941546889631318090011936631395629133025949352554817487189764986556035050585870288979670296892407195043380429320863938431760347995985515782979075529024437173605", 63, 2); + round_test_opt ("8.065651075321143246040850009763097959044533851699723570348927203628584985160062586480941064076934619876975029387054157915068857896332361627034335238120500756293865622499568841613676346408932187928798004379733010314247e+192", "8065651075321143246040850009763097959044533851699723570348927203628584985160062586480941064076934619876975029387054157915068857896332361627034335238120500756293865622499568841613676346408932187.928798004379733010314247003299794121687552736213805867662", 26, 2); + round_test_opt ("3.755251348586178013256491795260474822130327679322928599973564802612022947035253831502390443833283173811818869685965694441144295788399306628553857621790836089128737568257964630143653411992511976227894547548026996174581171880909938220161371478535428434648089431053486261717575680974847249359e+273", "3755251348586178013256491795260474822130327679322928599973564802612022947035253831502390443833283173811818869685965694441144295788399306628553857621790836089128737568257964630143653411992511976227894547548026996174581171880909938220161371478535428434648089431053486261717575.68097484724935855314654858493044317521713283", 15, 2); + round_test_opt ("1.387080130424276523575308751131710282141382406374751822200756834050776526956906706127471044689577632997933469417179151174707015492859254718943091966840592138437472858086537927043359078800761961974437918067501488911857847082084614313343570527022926132823594753199206424619916401613903645400246787e+272", "138708013042427652357530875113171028214138240637475182220075683405077652695690670612747104468957763299793346941717915117470701549285925471894309196684059213843747285808653792704335907880076196197443791806750148891185784708208461431334357052702292613282359475319920642461991.64016139036454002467870753530166006895080634133700307339994605318746285606605073353768500074983272463614878771789", 22, 2); + round_test_opt ("-2.0147295359992226490664114468525909001083615718156688545109096030966812316646296696244506758247380693060716738997774336291334777558764168442727045228978658333475633951171114409162804797915645069952459681290495610755679161021535360787280798779945877150305455930002954788915519355859501739508635378049100689305317716787e+269", "-201472953599922264906641144685259090010836157181566885451090960309668123166462966962445067582473806930607167389977743362913347775587641684427270452289786583334756339511711144091628047979156450699524596812904956107556791610215353607872807987799458771503054559300029547889.15519355859501739508635378049100689305317716786951516233580707306193436745410967166057722082066234795871225272004585743988004310277976348845952193544799339399270894134537975729366831004390595794638774978735891732320626305334667695544905377923208230333561302518753006083732106004221640098474474898156374500650480817182411615989343913968729275", 47, 2); + round_test_opt ("-6.4682751605699355152266972951219578190232663387125277427813370101021024454088417337203306465434592368744067517932721298668319157478136775716794966023207432720971025564367309853897410122135689538902518988304105352456783498314585984555931949638826096953846413551985933439654307839734950854166998750670707454974566582975088165611307071735157582662935545867739486245437961518301507423104249032343960859764576608030271247372660070350389908389430595724896643252828388489303743567441360757671539e+249", "-6468275160569935515226697295121957819023266338712527742781337010102102445408841733720330646543459236874406751793272129866831915747813677571679496602320743272097102556436730985389741012213568953890251898830410535245678349831458598455593194963882609695.38464135519859334396543078397349508541669987506707074549745665829750881656113070717351575826629355458677394862454379615183015074231042490323439608597645766080302712473726600703503899083894305957248966432528283884893037435674413607576715392267537759820458682796889223257918124328104437523683802855020225211529425741276482883297680943485112", 238, 2); + round_test_opt ("5230967583910917018.50408152810449967993263111384544784726", "5230967583910917018.50408152810449967993263111384544784725922303637701488425", 38, 2); + round_test_opt ("-0.000085973527408593099297590684824326491271165817048126780181592293397723679155645862767949431630165486569936241487844960076963", "-0.0000859735274085930992975906848243264912711658170481267801815922933977236791556458627679494316301654865699362414878449600769633687185176786270458354947674908972417152027784127735753855428208967654594385777066599617492461534927747699445067573964509724154493067244067868559216103094348525698193681847454441400336730113735370577184008388250", 126, 2); + round_test_opt ("-9.3847383309424905092769888480938735782018823273293340248673207665497218024993378966128004521828466138060970432748067803944342148229594394346525017564326180056518201810017521759339476789450692085472086161159434651133321658654080808856427367695408032643998143849351421395165378721233408866762093964110432258780229e+303", "-9384738330942490509276988848093873578201882327329334024867320766549721802499337896612800452182846613806097043274806780394434214822959439434652501756432618005651820181001752175933947678945069208547208616115943465113332165865408080885642736769540803264399814384935142139516537872123340886676209396411043225.878022887143305613", 7, 2); + round_test_opt ("-7.86369869882265586932482627732231268105900029876920276398291943996637269402814339594667942531593510873608675301033720550758603882629417032584858e+122", "-786369869882265586932482627732231268105900029876920276398291943996637269402814339594667942531593510873608675301033720550758.60388262941703258485804554572282126764058890142339713655268042738219801468219614749500", 22, 2); + round_test_opt ("-3.24857067939522454734336203662672299837356891031743623860060538736486301475399061560512392394884948745543208602570775307358755746669961014878645623565611494631180939993451255915972674634834616018539901681606751450166257e-7", "-0.0000003248570679395224547343362036626722998373568910317436238600605387364863014753990615605123923948849487455432086025707753073587557466699610148786456235656114946311809399934512559159726746348346160185399016816067514501662571156091293134174347038519804296721477826974827296719926896623954921270961340041265740815881463886029615618666804627388609251441241506365246517894986651117794381468287345354611387206329", 225, 2); + round_test_opt ("-5.9670766439293144146547691222551429082605718907793715738025865511910266033917629911839964290319954814528909057720556941094162253740574605331983125017245800601068795343684034767491074047e+73", "-59670766439293144146547691222551429082605718907793715738025865511910266033.9176299118399642903199548145289090577205569410941622537405746053319831250172458006010687953436840347674910740466327752921613094989509085998298098885318461726700218175283830994713114336237775743029926303902381171775835259997315252881136774538178086270869890018", 111, 2); + round_test_opt ("2.5096639117920463462287328597296749981043275920449323425180027976786885113276657223411254461434269831425623582399660089134643409640967108556266387756733203512320234738256119878196681697440729493145607544255387069966170741620152988303108642695833719140542818586581182077496877278980368345805264823051552922025335588381030245229042320819186001790656047668908952938407230366580345510489802293908847175605443453027574073443725254019132539578894357997564831507795134922021932595993282495857755246142968279845938140122676856708224385947019820217053e+384", "2509663911792046346228732859729674998104327592044932342518002797678688511327665722341125446143426983142562358239966008913464340964096710855626638775673320351232023473825611987819668169744072949314560754425538706996617074162015298830310864269583371914054281858658118207749687727898036834580526482305155292202533558838103024522904232081918600179065604766890895293840723036658034551048980.2293908847175605443453027574073443725254019132539578894357997564831507795134922021932595993282495857755246142968279845938140122676856708224385947019820217053305656", 157, 2); + round_test_opt ("-2.8507660941108569550287308326064177121151538201978258092410665344309678010272912820704619664520658494905035914159401466197846483930745282965809112705487219212406030489394517260243199295173286870921113764608918717971025087726764185158191295932128205693711051120987324699581522929876731219164524225135484900780869219107191498080757339162373435074430045067468529047359582843910911985237699559020798413773087104499530272180332255967127361187e+398", "-285076609411085695502873083260641771211515382019782580924106653443096780102729128207046196645206584949050359141594014661978464839307452829658091127054872192124060304893945172602431992951732868709211137646089187179710250877267641851581912959321282056937110511209873246995815229298767312191645242251354849007808692191071914980807573391623734350744300450674685290473595828439109119852376995590207984137.73087104499530272180332255967127361187414060128315925467453140320346147820", 38, 2); + round_test_opt ("-3.59089828969834447089866670409563698613796519920887260893628116796219699700295155566574700974305862881829539116842175156625589321038153746830136335430975180117738583836263157892672949110363994957437257028596753086911681027493231687723660583340473066987864559390829822248332270981499602035052694294589999780431928143466271681066767593313168237835986350589527099528400107655526657067e+260", "-359089828969834447089866670409563698613796519920887260893628116796219699700295155566574700974305862881829539116842175156625589321038153746830136335430975180117738583836263157892672949110363994957437257028596753086911681027493231687723660583340473066987864559390.829822248332270981499602035052694294589999780431928143466271681066767593313168237835986350589527099528400107655526657067124497659393816422837799218949133277601595497917912674114827477096642873285066389309250196072308994823837109436543139707", 120, 2); + round_test_opt ("8.9952767699784490329238753106556088240055363532827226609029521944449657384883384170667072930734367679170716914947678038820950440722219201194e+43", "89952767699784490329238753106556088240055363.53282722660902952194444965738488338417066707293073436767917071691494767803882095044072221920119400608976324854", 97, 2); + + ) diff --git a/drafts/bs-big/__tests__/sqrt_test.ml b/drafts/bs-big/__tests__/sqrt_test.ml new file mode 100644 index 0000000..c01591e --- /dev/null +++ b/drafts/bs-big/__tests__/sqrt_test.ml @@ -0,0 +1,711 @@ +open Jest + +let () = + describe "sqrt_tests" (fun () -> + let open Expect in + + let sqrt_test = + let count = ref 0 in + fun (exp, x) -> + let v = Big.fromString x |. Big.sqrt |. Big.toString in + test ("sqrt_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("div_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + Big.setDP 20; + Big.setRM 1; + + bool_test false (Big.fromInt 0 |. Big.sqrt |. is_minus_zero); + bool_test true (Big.fromString "-0"|. Big.sqrt |. is_minus_zero); + + + Big.setDP 0; + + Big.setRM 0; + sqrt_test ("10", "101"); + sqrt_test ("10", "111"); + sqrt_test ("999", "999000.25"); + sqrt_test ("0", "0.25"); + + Big.setRM 1; + sqrt_test ("10", "101"); + sqrt_test ("11", "111"); + sqrt_test ("1000", "999000.25"); + sqrt_test ("1", "0.25"); + + Big.setRM 2; + sqrt_test ("10", "101"); + sqrt_test ("11", "111"); + sqrt_test ("1000", "999000.25"); + sqrt_test ("0", "0.25"); + + sqrt_test ("1.850249442642802149156602e+24", "3423.423e45"); + + Big.setDP 2; + Big.setRM 0; + sqrt_test ("0", "0.0000001"); + + Big.setDP 1; + Big.setRM 1; + sqrt_test ("2.6", "7"); + sqrt_test ("10.6", "112.439121106"); + sqrt_test ("1007.1", "1014216.88354115504848"); + sqrt_test ("14496268662.7", "210141805141682355705.090"); + sqrt_test ("220983929785.7", "48833897223529771949253.378778868849049559624562513592321569"); + sqrt_test ("1180052939140.7", "1392524939174533146207410.12619352287"); + sqrt_test ("120468836204612.6", "14512740496493785900839846763.82328768609126547"); + + Big.setDP 10; + sqrt_test ("1.0998820819", "1.20974059415009437172900"); + sqrt_test ("4372247436270791523.3453396636", "19116547643976509183347719022510178407.6659485696744517151189447"); + sqrt_test ("645.6559215353", "416871.569013637"); + sqrt_test ("9.3832989934", "88.0463"); + sqrt_test ("20195394139.0634492424", "407853944432118316238.060"); + sqrt_test ("203574.8431903851", "41442716779.9898655080652537763202594320363763900771333411614469322118841"); + sqrt_test ("434835511792648.9460364767", "189081922315974940615057855618.468666216438821105981678672603"); + sqrt_test ("76418328144.477890944", "5839760876397101738682.29836547353"); + + Big.setDP 20; + sqrt_test ("346.00153309920463414559", "119717.060907"); + sqrt_test ("263359760985014.62241224437474495709", "69358363706084030080212405554.3002793975414740876419285502"); + sqrt_test ("4.14645859760929707104", "17.193118901688058566035426"); + sqrt_test ("492974271191746.46231483998877250102", "243023632057033585989741137703.800100153395469328387"); + sqrt_test ("164.78781194238374484766", "27155.022964758430758944789724435"); + sqrt_test ("7366.78400597487165781255", "54269506.59068717789735301787194313247"); + sqrt_test ("23762326490698.34975320239967323205", "564648160250544549780100380.5514166040523"); + sqrt_test ("5.291502622129181181", "28"); + sqrt_test ("11.47156968462642430546", "131.59691102924"); + sqrt_test ("316358493873927157.1740897995245240711", "100082696646179606634487051294887359.5035240594546"); + sqrt_test ("500048686.48939798981543930512", "250048688859772239.7160140065116884182948058142834537"); + sqrt_test ("6022.37550162532363706717", "36269006.68257686850553015065182301017562876"); + sqrt_test ("6.8460154244205197188", "46.86792719140366873824501484885278"); + sqrt_test ("45189.48536114270306146252", "2042089587.204930656134881238462876156607"); + sqrt_test ("856160326.88774167756915629603", "733010505336524684.93087677"); + sqrt_test ("522130.17609423801622137924", "272619920788.2"); + sqrt_test ("52292561.72399606203863014237", "2734512011657938"); + + Big.setDP 73; + sqrt_test ("26887623635.3707912464629567820776000467035000476700672842803068855485151227900078069", "722944304757350004189.2345"); + sqrt_test ("196.9765983083095309326276839454825311907994129311587833723243476358522465777", "38799.78028111312916322430363229763959902004100996"); + sqrt_test ("120016703223.6151811849913819241621570830640571538995217287681670128389432142005932891", "14404009052665322623144.3467403"); + sqrt_test ("15.1179067962466285341140019013436699388546686629569704817549228235938583883", "228.5511059"); + sqrt_test ("88.8125725884151110485104354919995585100283886785637267479492612921303631122", "7887.6730497725031780"); + sqrt_test ("19107253881509743.3779260316306131671181869224843248420235662435238492667857670998535738552", "365087150892469154433642273521263.83276841"); + sqrt_test ("400.3068500117233817006410985991134968372763336206911625632292309118077689013", "160245.5741663084"); + + Big.setDP 100; + sqrt_test ("1.7320508075688772935274463415058723669428052538103806280558069794519330169088000370811461867572485757", "3"); + sqrt_test ("1.0488088481701515469914535136799375984752718576815039848757557635800059255011006914193852889331944178", "1.1"); + sqrt_test ("0.3162277660168379331998893544432718533719555139325216826857504852792594438639238221344248108379300295", "0.1"); + sqrt_test ("0.9486832980505137995996680633298155601158665417975650480572514558377783315917714664032744325137900886", "0.9"); + sqrt_test ("0.99999999999999999999999999999999999999994999999999999999999999999999999999999999875", "0.9999999999999999999999999999999999999999"); + sqrt_test ("11111.1110609999998870049994903925471271162312358157188236047401971668110785559489100264545730662845742184","123456789.00987654321"); + + Big.setDP 17; + Big.setRM 1; + sqrt_test ("44.40502294864850084", "1971.80606307"); + + Big.setDP 97; + Big.setRM 0; + sqrt_test ("14192376.643123461322847366137186892667087869800484670508360531721790645551341594437545247745705539930735", "201423554780276.3686384009255372"); + + Big.setDP 4; + Big.setRM 1; + sqrt_test ("2553252336.0331", "6519097491458426345.3554782053764871036657698339691144086"); + + Big.setDP 20; + Big.setRM 1; + sqrt_test ("62.30949119560079364913", "3882.4726930546528212066"); + + Big.setDP 82; + Big.setRM 1; + sqrt_test ("174228234.709795821707519878032640346805381350977820681861118903584344693715322225768054125", "30355477770091701.53717021425249799086667828628302277998976752563"); + + Big.setDP 54; + Big.setRM 2; + sqrt_test ("163256493.009563679477426538597267934928790668772138046453329418", "26652682509781714.54341292267818515442604"); + + Big.setDP 57; + Big.setRM 2; + sqrt_test ("6413898755.503103237879757203310804711689478588298288050385897319721", "41138097245844256487.4"); + + Big.setDP 41; + Big.setRM 1; + sqrt_test ("651.83586891179899229526795359574620017366743", "424890"); + + Big.setDP 67; + Big.setRM 0; + sqrt_test ("3.1691816831920187703897673787206897581382652839389771357354751032132", "10.043712541079797228859738302727066114683041689841812835450076520"); + + Big.setDP 97; + Big.setRM 2; + sqrt_test ("118594.4273063315320244062844564170472198563498805200012242127200252960812599679770627273052218882949925", "14064638188.1167541187722341530354253926613230053009933342"); + + Big.setDP 5; + Big.setRM 1; + sqrt_test ("5248173.56787", "27543325798538.753780506094441280733789361778933753426582596791104"); + + Big.setDP 23; + Big.setRM 2; + sqrt_test ("6.05855328019481326674235", "36.7060678489593315124567"); + + Big.setDP 93; + Big.setRM 2; + sqrt_test ("164207.20075782859923311531097410558094817321169039986325465336651402772907533144002814794168144323", "26964004780.7218252942882108"); + + Big.setDP 54; + Big.setRM 2; + sqrt_test ("2.723397260313830449769700482256736114679660269490922765", "7.4168926374848775741132294"); + + Big.setDP 75; + Big.setRM 2; + sqrt_test ("145626737347.699863159799647089039014085200730659988131836086866937945539247414906654868", "21207146630535962175511.4592"); + + Big.setDP 69; + Big.setRM 0; + sqrt_test ("15625591.477694858909123645800863577029584072458683168542082897370551849161553", "244159109027810.20442572274363387"); + + Big.setDP 16; + Big.setRM 0; + sqrt_test ("85762713.1327157666976061", "7355242963884497.437336977648000579022368327415840055129120741942567239"); + + Big.setDP 2; + Big.setRM 0; + sqrt_test ("74629.64", "5569583803.0907402"); + + Big.setDP 62; + Big.setRM 2; + sqrt_test ("44.05501263636205450407476438041804283847324427155286698836103844", "1940.8441383900203"); + + Big.setDP 24; + Big.setRM 0; + sqrt_test ("1119.912102354466031064620923", "1254203.117"); + + Big.setDP 64; + Big.setRM 0; + sqrt_test ("92093628036.6480124503328403126750210810151658188780763586760022178450462311", "8481236324952480852423.718960437545027"); + + Big.setDP 34; + Big.setRM 1; + sqrt_test ("1947605507655512.1474872179815308192647511525219417", "3793167213450085186132700081381"); + + Big.setDP 94; + Big.setRM 2; + sqrt_test ("557716086077.5080956743653150675842959387446784555727262266063122593621607958161147001199667165261203780317", "311047232669614419511648.6130023664452767398438696"); + + Big.setDP 19; + Big.setRM 0; + sqrt_test ("3.6766253682232922013", "13.517574098263058968167681315043395710343763189956497798543"); + + Big.setDP 40; + Big.setRM 1; + sqrt_test ("374863740368.0156985152529892838083189109926642299794", "140522823842699082383715.919571886197001394994582"); + + Big.setDP 63; + Big.setRM 0; + sqrt_test ("3039991938095044282.834999396730197828406224765246402870200714765906547758763203772", "9241550983682863551151813316288949279.9625949439074666"); + + Big.setDP 29; + Big.setRM 1; + sqrt_test ("948722.35086770259132293410301310241", "900074099035.9401838348750892"); + + Big.setDP 36; + Big.setRM 0; + sqrt_test ("23603002885797536.790280728725364655699852314300322649", "557101745226966849549415425061219.969394346783798760227"); + + Big.setDP 18; + Big.setRM 0; + sqrt_test ("247788926631.668855265587728589", "61399352161274570866824.398764295216033428917127"); + + Big.setDP 16; + Big.setRM 0; + sqrt_test ("5.8309518948453004", "34"); + + Big.setDP 35; + Big.setRM 0; + sqrt_test ("756731558.25262830674557663857258007802853198", "572642651255450988.3807853"); + + Big.setDP 29; + Big.setRM 0; + sqrt_test ("315.35186696767786854256245741213", "99446.8"); + + Big.setDP 28; + Big.setRM 0; + sqrt_test ("21743622919.6152043904934006640996008653", "472785137670415625131.3819412384141603569725008109774351813892945"); + + Big.setDP 59; + Big.setRM 0; + sqrt_test ("9931.93848832625073050157085444478223645326098496189725178399175", "98643402.13589633051811977376659116574508796"); + + Big.setDP 32; + Big.setRM 2; + sqrt_test ("12491945070243173325.00123703924746770276608629177675", "156048691637972720536868554818649758614"); + + Big.setDP 42; + Big.setRM 1; + sqrt_test ("1.986294948124507296707366989944167364007457", "3.94536762094493913289346223994950919328456012507449654266826"); + + Big.setDP 62; + Big.setRM 2; + sqrt_test ("1854467167302463060.67001538852537388423828924920448451675904798181668319798201139", "3439048474602821519577229021879982239.2082"); + + Big.setDP 51; + Big.setRM 0; + sqrt_test ("2088927.797138422758659686170900239830365738839263869523289", "4363619341657.58350562244267149496471405124"); + + Big.setDP 61; + Big.setRM 2; + sqrt_test ("90061141477839967.2682846126818450599184988316687847204716382695549492605718861", "8111009204291506563499764980695382.1759246268375"); + + Big.setDP 10; + Big.setRM 2; + sqrt_test ("1476747291384.9099630858", "2180782562612668171679967.63324"); + + Big.setDP 84; + Big.setRM 2; + sqrt_test ("9210807993.639856342437524083401141956511342156180578284602614905116773271331676341823693120447", "84838983895699875876"); + + Big.setDP 26; + Big.setRM 2; + sqrt_test ("3.37200237247840619012635848", "11.3704"); + + Big.setDP 16; + Big.setRM 1; + sqrt_test ("2693874.2163861651089144", "7256958293710.1751161960"); + + Big.setDP 74; + Big.setRM 2; + sqrt_test ("5732941347.55256238286493674720703619067740838113000509955135586822000095629002988639", "32866616494477789872.3518055761631860371"); + + Big.setDP 4; + Big.setRM 2; + sqrt_test ("16288419988283588.674", "265312625714716342994884296792766"); + + Big.setDP 37; + Big.setRM 1; + sqrt_test ("365543004.8061649872764474380277913079084143042", "133621688362719958.9872107366"); + + Big.setDP 61; + Big.setRM 1; + sqrt_test ("12782418240925459479.2031797451385115697726882124289981424172567856909899486963994", "163390216085943917855551726128161143915.02664633"); + + Big.setDP 43; + Big.setRM 1; + sqrt_test ("12.07324881148295353275508188921102928327377", "145.76333686397455005144032806105"); + + Big.setDP 40; + Big.setRM 1; + sqrt_test ("29.6490992649274348544759045400715775766925", "879.06908722152055781935911221883768070437"); + + Big.setDP 51; + Big.setRM 2; + sqrt_test ("4.666365343768356140513396346961342877525930132228624", "21.7749655215223685799362730400310696"); + + Big.setDP 42; + Big.setRM 0; + sqrt_test ("17.122151356727858418696401754969183602519558", "293.168067082697642757847"); + + Big.setDP 29; + Big.setRM 2; + sqrt_test ("109652272385643.1603769184581163062699906986", "12023620839335281581899617727.8772961473185586727206798164"); + + Big.setDP 90; + Big.setRM 2; + sqrt_test ("13489.123629030538320414969169194877155101718802208604977345597134035561855309153297129880622467", "181956456.27927"); + + Big.setDP 48; + Big.setRM 1; + sqrt_test ("2.372129844675455365912878765809140727257324413647", "5.627"); + + Big.setDP 41; + Big.setRM 0; + sqrt_test ("739871537758100310.43883822919081011754036378492392360075543", "547409892384536053343836850938988791.2508666160979"); + + Big.setDP 54; + Big.setRM 0; + sqrt_test ("77140.793792105688747751462443855549841986175279935245610391", "5950702066.8761715670568717062071879678486494595966218026"); + + Big.setDP 93; + Big.setRM 0; + sqrt_test ("162820594803834668.752129825654424512211529624619694188452350414129430986701621110932095616631076098099130503248", "26510546092274513134180208644185957.57422670990654"); + + Big.setDP 84; + Big.setRM 0; + sqrt_test ("939333.959604513485668563847772506141997730133849933463092593953521840168273751255714815246", "882348287666.2937728893202363"); + + Big.setDP 9; + Big.setRM 1; + sqrt_test ("4.568369512", "20.87"); + + Big.setDP 87; + Big.setRM 1; + sqrt_test ("370.818280526354041083927163168590728498008550586626184882319882834674931772525681078764889", "137506.1971725218006486309891482928119051089854653"); + + Big.setDP 32; + Big.setRM 1; + sqrt_test ("459260874.20127731126343992531130965108732", "210920550572121463.814947484719373265508800614967431627085952061224891"); + + Big.setDP 43; + Big.setRM 1; + sqrt_test ("34146881023818508.954756503743080316053431668549275132795068", "1166009483654816582318330803409852.007911"); + + Big.setDP 26; + Big.setRM 2; + sqrt_test ("411369926586282.35173941504630680193130958", "169225216499603331644025273726.130552532747109702369176231397148094894"); + + Big.setDP 42; + Big.setRM 1; + sqrt_test ("146.837594711181641908188613240193044745216301", "21561.27922056523889531529752"); + + Big.setDP 80; + Big.setRM 0; + sqrt_test ("2436.80241424922206290898076140846108744470830585565672963845308477988719476570192112", "5938006.00609083724509944"); + + Big.setDP 40; + Big.setRM 0; + sqrt_test ("5968940791314695.9391845388865719907476112181090409748506", "35628254170220508537420332407309.79446040"); + + Big.setDP 9; + Big.setRM 2; + sqrt_test ("7757883860673599094.299765297", "60184761995699906684011270143497832606.405945309948"); + + Big.setDP 43; + Big.setRM 2; + sqrt_test ("2.2181073012818834324103200205219865836926753", "4.92"); + + Big.setDP 73; + Big.setRM 1; + sqrt_test ("910.9629520458008175934592151820959436914447449057963517034109551518362704397", "829853.5"); + + Big.setDP 81; + Big.setRM 2; + sqrt_test ("4.242640687119285146405066172629094235709015626130844219530039213972197435386321117", "18"); + + Big.setDP 12; + Big.setRM 1; + sqrt_test ("1259229966702.622212273094", "1585660109041887045436663.9"); + + Big.setDP 26; + Big.setRM 0; + sqrt_test ("163.04833062468649267909332731", "26584.7581194970792"); + + Big.setDP 64; + Big.setRM 2; + sqrt_test ("4204818551811.1334068235516094940662770670832347987097641633616076970760141535", "17680499053655077194352936.9862782964932"); + + Big.setDP 9; + Big.setRM 1; + sqrt_test ("39405180.06334322", "1552768215824502"); + + Big.setDP 2; + Big.setRM 2; + sqrt_test ("11019819.18", "121436414839837.12468"); + + Big.setDP 46; + Big.setRM 0; + sqrt_test ("2.7666477911002694164386944265228742439351110337", "7.65434"); + + Big.setDP 22; + Big.setRM 1; + sqrt_test ("79.8964796181302813829514", "6383.4474553703074736391804543616"); + + Big.setDP 97; + Big.setRM 1; + sqrt_test ("256884.8986204117896931254014585418288760261941990857711922965396545498637125556442506103725098664222399", "65989851139.2192430115427289"); + + Big.setDP 26; + Big.setRM 1; + sqrt_test ("51576.16987553369007338491641136", "2660101299.0299088953962881552848995811"); + + Big.setDP 30; + Big.setRM 1; + sqrt_test ("83117929425.537107714299371091957543379566", "6908590191988567392806.80486418318444628"); + + Big.setDP 41; + Big.setRM 0; + sqrt_test ("65772725.59339738278078887228018658173869609912689", "4326051431984351.09884157745017974"); + + Big.setDP 98; + Big.setRM 0; + sqrt_test ("353254.68729598168174020062443678572940775163547873542847911555211434402472387360698376451692274187949171", "124788874096.581801769341529731"); + + Big.setDP 24; + Big.setRM 0; + sqrt_test ("4710250560799.345071943574342121547002", "22186460345510544746149875.21079977475782182108767576173806601062569351"); + + Big.setDP 58; + Big.setRM 0; + sqrt_test ("1922328.5814452710447231491355356265501994748371717620744762610836", "3695347175041.3880723243439344"); + + Big.setDP 15; + Big.setRM 1; + sqrt_test ("89116010281422470.490792878028479", "7941663288478595468163012949770631.031610"); + + Big.setDP 55; + Big.setRM 1; + sqrt_test ("893056745827291.2797429722245393357197289561968389609411292397482876045", "797550351267631140592697284483.78129"); + + Big.setDP 91; + Big.setRM 0; + sqrt_test ("776.5090582120990070056744810742483620827196187879468568581488531077672537925651203290541573461", "602966.31748544096431040937268"); + + Big.setDP 93; + Big.setRM 0; + sqrt_test ("2995751.634073306004244447026435588871407905052680216908898588671550117511803869048557530431723092132", "8974527853052.88312"); + + Big.setDP 18; + Big.setRM 1; + sqrt_test ("10256041108976420629.199454567907275476", "105186379229014287888491059604397048384.620569192314"); + + Big.setDP 31; + Big.setRM 1; + sqrt_test ("1668.6764282929150311920750595338744", "2784481.0223404"); + + Big.setDP 67; + Big.setRM 0; + sqrt_test ("10.2385664037012525496880466372434589015640964461096948083431020419951", "104.828242003"); + + Big.setDP 84; + Big.setRM 0; + sqrt_test ("68651941131739807.174750106032127662294695087292808832370099322483965602512157211426100868174677659683", "4713089021155867956380018732563084.26698833111"); + + Big.setDP 21; + Big.setRM 2; + sqrt_test ("2119642072.680265413658964490823", "4492882516276291566.29881022242536487557872701343389871875"); + + Big.setDP 98; + Big.setRM 2; + sqrt_test ("295414.57241487468020923791493376733960197400575508671338810222236013093392808359746725949898886883126268", "87269769595.06323634741877845138"); + + Big.setDP 33; + Big.setRM 2; + sqrt_test ("37516617.579099132622513300879884121967683", "1407496594576370.06261787957718"); + + Big.setDP 28; + Big.setRM 1; + sqrt_test ("1770073.1489207444615594580039659422", "3133158952530.2"); + + Big.setDP 90; + Big.setRM 1; + sqrt_test ("2062559182194.651333939625538780888106868996091400331597659659567648164339407129332825200701125200486512", "4254150380055468916249334.9191129113190464726018607977"); + + Big.setDP 8; + Big.setRM 1; + sqrt_test ("12.07145393", "145.72"); + + Big.setDP 97; + Big.setRM 1; + sqrt_test ("25034434221195.1626546646428355078518084227214031163523557198228259498967796293623093732280578488089414910009545", "626722896775347450122233568.221736229089870371148583168"); + + Big.setDP 50; + Big.setRM 1; + sqrt_test ("1369370604956.05098382437442746815592765507526977434916820834002", "1875175853717701043262789.163"); + + Big.setDP 75; + Big.setRM 1; + sqrt_test ("61111046097989.562614478991002463202122550327564207016373610481385147575687339517642575745", "3734559955190605346508566151.747128467087991987800252614000906073017"); + + Big.setDP 9; + Big.setRM 2; + sqrt_test ("487839154280.605258799", "237987040449216180199565.97996551897500100835854353148858639128012"); + + Big.setDP 30; + Big.setRM 0; + sqrt_test ("3771198.65750627716579658341655388678", "14221939314377.1471847"); + + Big.setDP 91; + Big.setRM 0; + sqrt_test ("998223.9287829203446196803384884403292209921824958032442949937536171090461827984654389784946553623", "996451011994.8088280477062132"); + + Big.setDP 10; + Big.setRM 1; + sqrt_test ("5126338484054822038.6885613203", "26279346253101490909404023029363590984.22045482623574089"); + + Big.setDP 37; + Big.setRM 0; + sqrt_test ("4435299142639732.0386665272768109416139138688675365733", "19671878484700742088824375591214.762823606521949640217195100557734"); + + Big.setDP 29; + Big.setRM 0; + sqrt_test ("1840.27953983121746818190253230579", "3386628.78472139752"); + + Big.setDP 29; + Big.setRM 1; + sqrt_test ("18505.45444317533478496724906701013", "342451844.14843774"); + + Big.setDP 84; + Big.setRM 1; + sqrt_test ("15478.581565616610788736047569976878217626279567162328064930393795809558245153963295159638", "239586487.28344637"); + + Big.setDP 80; + Big.setRM 0; + sqrt_test ("8.83176086632784685476404272695925396417463948093141782621020297255713993823544284", "78"); + + Big.setDP 55; + Big.setRM 0; + sqrt_test ("904094739518026362.276858998253417589801385050899447007512426103468322262", "817387298024167938863983875545245626.80"); + + Big.setDP 86; + Big.setRM 0; + sqrt_test ("6130.86992934880235087497305800565551205615083568452544051362005512506946811033000392166546", "37587566.09059338872940942140"); + + Big.setDP 76; + Big.setRM 1; + sqrt_test ("24.7386337537059632989284591358444621508831953522417226063918014385697260780257", "612.0"); + + Big.setDP 30; + Big.setRM 0; + sqrt_test ("31.610335068913719526253073315531", "999.2132831689965253909026235101062925484544085049"); + + Big.setDP 37; + Big.setRM 1; + sqrt_test ("10249810.4776964144606649104434449145329654563", "105058614828695.2"); + + Big.setDP 24; + Big.setRM 0; + sqrt_test ("25529284068924417.312616362288832310787818", "651744345071838052967175093720670.309523048811416290"); + + Big.setDP 22; + Big.setRM 1; + sqrt_test ("468012.3980129886634423908716", "219035604693.86811504914527871748991009824119534"); + + Big.setDP 6; + Big.setRM 0; + sqrt_test ("39070.768987", "1526524989.297643871802383576028102147694626812685590152575"); + + Big.setDP 46; + Big.setRM 1; + sqrt_test ("1250964.0328412267817990068707571462032258488049181937", "1564911011462.3859182790021956920389318080447013349220674"); + + Big.setDP 81; + Big.setRM 1; + sqrt_test ("46143126703751828496.866649027371445895940007418220059475791917987944465104919918209683758208288829164", "2129188141998495085389252895218765450927.7063857106"); + + Big.setDP 60; + Big.setRM 1; + sqrt_test ("64866.977655547797763275486444509839974560207365651674817907766434", "4207724790.165337269565"); + + Big.setDP 84; + Big.setRM 2; + sqrt_test ("2.94358860030385493881670889399291911046241548916385003586188315285977498131365266043", "8.664713847838807868001451403595636253922161359756547"); + + Big.setDP 83; + Big.setRM 2; + sqrt_test ("424.99280768859670787492492363122383472286022111724084853084296368784059306715270358792", "180618.886587036545015612122512773593063212916813764199769387313"); + + Big.setDP 51; + Big.setRM 0; + sqrt_test ("126427741490350.05876064315047378101790577982019123921425265937548", "15983973818350781697093926569.612618127837088601804542393750879971390"); + + Big.setDP 36; + Big.setRM 1; + sqrt_test ("10.406728592598156155682425873215240545", "108.30"); + + Big.setDP 91; + Big.setRM 1; + sqrt_test ("1183519938.0327546884078159164077132538648035819895600967199921207723839756282768130542759614616292199", "1400719443721055497.588328093817233056244752470"); + + Big.setDP 32; + Big.setRM 1; + sqrt_test ("241257503.34869155337527048121955221501097", "58205182922043916.0906037558925342272671667138"); + + Big.setDP 69; + Big.setRM 2; + sqrt_test ("1.486678588956157516725362331766399749551245061708835963596471115535207", "2.2102132268606715586559333071481289982224051499"); + + Big.setDP 65; + Big.setRM 0; + sqrt_test ("2514912879934.47954895904718779302011160467785506374230597396840365067162301819", "6324786793660337947551689.6597215"); + + Big.setDP 52; + Big.setRM 1; + sqrt_test ("2.8178317099209633246681281054844265828694464028893106", "7.94017554543610"); + + Big.setDP 51; + Big.setRM 2; + sqrt_test ("81.917085580481926713094910295288886277402363899734148", "6710.40891"); + + Big.setDP 32; + Big.setRM 1; + sqrt_test ("324.26623374592211771183741217403875", "105148.590347765"); + + Big.setDP 43; + Big.setRM 1; + sqrt_test ("1662149798843078.4069237887302461551370934948249024202080631", "2762741953794086012243855678967.8"); + + Big.setDP 89; + Big.setRM 0; + sqrt_test ("75328512486.03568083840615998761042897028410187816426562961651629515834372852207961734642188953302492", "5674384793358833469158.7800150542809744853291679751200"); + + Big.setDP 81; + Big.setRM 1; + sqrt_test ("5798169.528389841210757172244446608220276215346825819225777169316424526085117502743814039", "33618769879948.4736420937"); + + Big.setDP 96; + Big.setRM 0; + sqrt_test ("29119162498.850656252014862720939576335974293913751260474542935386631954376862430745731464008616766564510391", "847925624634470395269.44447102349587477"); + + Big.setDP 38; + Big.setRM 2; + sqrt_test ("168.23340288442161387499486814301418324124", "28302.477846072118591243169889731912227"); + + Big.setDP 13; + Big.setRM 1; + sqrt_test ("84.717176534632", "7177"); + + Big.setDP 27; + Big.setRM 0; + sqrt_test ("13.385220437154074004622844494", "179.1641261512071"); + + Big.setDP 23; + Big.setRM 0; + sqrt_test ("50518253294056311797.1731845046869551098465", "2552093915882431397702073747003243930704.039747494091408300134971"); + + Big.setDP 52; + Big.setRM 1; + sqrt_test ("97932545.8343664485428157368834804942294639641837112693533951", "9590783533600285.2329863436120504074140917839"); + + Big.setDP 58; + Big.setRM 1; + sqrt_test ("662542878881.876031608894840844837559122854993420182484052151826850145", "438963066357084252820457.6516316337481795"); + + Big.setDP 75; + Big.setRM 0; + sqrt_test ("2.408258174236454324395775462046657264396664516691587445008530664989455090566", "5.7997074337767003950634583826104408675441912175"); + + Big.setDP 16; + Big.setRM 1; + sqrt_test ("973.3437664448876512", "947398.08767712"); + + Big.setDP 8; + Big.setRM 1; + sqrt_test ("253803.10166048", "64416014412.481521657597915615475256293"); + + Big.setDP 48; + Big.setRM 1; + sqrt_test ("10979495135456507.342255564998728572391728604678115723240759397693", "120549313429513108511981910613966.523081580"); + + Big.setDP 50; + Big.setRM 1; + sqrt_test ("13.1438229181471400406148696794413041749550438491914", "172.76008090361"); + + Big.setDP 38; + Big.setRM 0; + sqrt_test ("140388.44002034207101031451179095355772785653", "19708914091.345183231428356292375830226197664009"); + + Big.setDP 6; + Big.setRM 2; + sqrt_test ("242308.729399", "58713520342.9660909760390092854509"); + + Big.setDP 21; + Big.setRM 2; + sqrt_test ("563619360203.007379904114453023253", "317666783195647379114879.695054964988341456801"); + ) diff --git a/drafts/bs-big/__tests__/times_test.ml b/drafts/bs-big/__tests__/times_test.ml new file mode 100644 index 0000000..1ed14a3 --- /dev/null +++ b/drafts/bs-big/__tests__/times_test.ml @@ -0,0 +1,2089 @@ +open Jest + +let () = + describe "times_tests" (fun () -> + let open Expect in + + let times_test = + let count = ref 0 in + fun (a, b, exp) -> + count := !count + 1; + let v = Big.times (Big.fromString a) (Big.fromString b) |. Big.toString in + test ("div_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + let bool_test = + let count = ref 0 in + fun exp v -> + count := !count + 1; + test ("div_test_minus_zero" ^ string_of_int !count) + (fun () -> expect v |> toBe exp) in + + let is_minus_zero x = Big.toString x = "0" && Big.s x = -1 in + + bool_test false (Big.fromInt 1 |. Big.times (Big.fromString "0") |. is_minus_zero); + bool_test true (Big.fromInt 1 |. Big.times (Big.fromString "-0") |. is_minus_zero); + bool_test true (Big.fromString ("-1") |. Big.times (Big.fromString "0") |. is_minus_zero); + bool_test false (Big.fromString ("-1") |. Big.times (Big.fromString "-0") |. is_minus_zero); + bool_test false (Big.fromInt 0 |. Big.times (Big.fromString "1") |. is_minus_zero); + bool_test true (Big.fromInt 0 |. Big.times (Big.fromString ("-1")) |. is_minus_zero); + bool_test true (Big.fromString "-0" |. Big.times (Big.fromString ("1")) |. is_minus_zero); + bool_test false (Big.fromString "-0" |. Big.times (Big.fromString ("-1")) |. is_minus_zero); + bool_test false (Big.fromString "0" |. Big.times (Big.fromString ("0")) |. is_minus_zero); + bool_test true (Big.fromString "0" |. Big.times (Big.fromString "-0") |. is_minus_zero); + bool_test true (Big.fromString "-0" |. Big.times (Big.fromString "0") |. is_minus_zero); + bool_test false (Big.fromString "-0" |. Big.times (Big.fromString "-0") |. is_minus_zero); + + + times_test ("1", "1","1"); + times_test ("1", "-45", "-45"); + times_test ("1", "22", "22"); + times_test ("1", "0144", "144"); + times_test ("1", "6.1915", "6.1915"); + times_test ("1", "-1.02", "-1.02"); + times_test ("1", "0.09", "0.09"); + times_test ("1", "-0.0001", "-0.0001"); + times_test ("1", "8e5", "800000"); + times_test ("1", "9E12", "9000000000000"); + times_test ("1", "-345.43e+4", "-3454300"); + times_test ("1", "-94.12E+0", "-94.12"); + times_test ("0", "0", "0"); + times_test ("0", "0", "0"); + times_test ("3", "-0", "0"); + times_test ("9.654", "0", "0"); + times_test ("0", "0.001", "0"); + times_test ("0", "111.1111111110000", "0"); + times_test ("-1", "1", "-1"); + times_test ("-0.01", "0.01", "-0.0001"); + times_test ("54", "-54", "-2916"); + times_test ("9.99", "-9.99", "-99.8001"); + times_test ("100", "100", "10000"); + times_test ("-999.99", "0.01", "-9.9999"); + times_test ("03.333", "-4", "-13.332"); + times_test ("-1", "-0.1", "0.1"); + times_test ("43534.5435", "0.054645", "2378.9451295575"); + times_test ("99999", "1", "99999"); + times_test ("1", "1", "1"); + times_test ("1", "-1", "-1"); + times_test ("-1", "1", "-1"); + times_test ("2", "2", "4"); + times_test ("2", "-2", "-4"); + times_test ("-2", "2", "-4"); + times_test ("-3", "-3", "9"); + + times_test ("-3.6", "-3336", "12009.6"); + times_test ("0.000000219", "-110.42", "-0.00002418198"); + times_test ("312", "22.87694", "7137.60528"); + times_test ("0.29976", "-5", "-1.4988"); + times_test ("0.00000000000000000010018", "-74.6", "-7.473428e-18"); + times_test ("138.583905", "9.73380", "1348.948014489"); + times_test ("5360260.6", "-12.12", "-64966358.472"); + times_test ("-7.01", "-0.0000000988077", "6.92641977e-7"); + times_test ("0.0000202", "-56583117802", "-1142978.9796004"); + times_test ("116727.96", "0.0000000000000019308", "2.25378345168e-10"); + times_test ("-136636.46", "6.5636554051", "-896834.639212729946"); + times_test ("12.1712598149", "53.270389", "648.3677449597909961"); + times_test ("76", "76019.61784", "5777490.95584"); + times_test ("0.0000714939", "1425786", "101.9350017054"); + times_test ("-3221.71685", "-230", "740994.8755"); + times_test ("0.00000000237457904", "-892315", "-0.0021188724960776"); + times_test ("6511.4", "0.0000000000000186", "1.2111204e-10"); + times_test ("0.000000011188562", "0", "0"); + times_test ("-25379.8", "3", "-76139.4"); + times_test ("41.9279", "23.4198661", "981.94580385419"); + times_test ("0.0000010", "58236.222", "0.058236222"); + times_test ("0", "-16.39257632", "0"); + times_test ("0.000000004846959", "1", "4.846959e-9"); + times_test ("0", "-30878.5", "0"); + times_test ("-8065.5", "-0.00000000058314173", "0.000004703329623315"); + times_test ("-443850607", "-1", "443850607"); + times_test ("-0.070884", "0.0000000000000000002106611401", "-1.49325042548484e-20"); + times_test ("15510739.6998", "4.13", "64059354.960174"); + times_test ("-1182.8", "0.00000000000006116702878", "-7.2348361640984e-11"); + times_test ("0.000000000000000024429766", "1.492", "3.6449210872e-17"); + times_test ("-521641.171", "0.000000044916564267", "-0.023430329181534636657"); + times_test ("-1.4", "-50.3861389", "70.54059446"); + times_test ("-906235823", "169450901242", "-153562476945135592166"); + times_test ("818.5", "-0.0000000000000002572", "-2.105182e-13"); + times_test ("0", "2", "0"); + times_test ("0.00000000000000000723208622905", "7281.27407", "5.26588019315858457335e-14"); + times_test ("-8.30486506", "-1110043.7", "9218763.139203122"); + times_test ("1.8", "0", "0"); + times_test ("-0.000000000000339156493611", "-0.000000000000000000167265", "5.6729010903843915e-32"); + times_test ("0.00000000000000283", "4.074", "1.152942e-14"); + times_test ("39.85", "33086328", "1318490170.8"); + times_test ("4.1183805089", "-5.126069", "-21.1111026568765141"); + times_test ("-464.2025675", "0.00000000000000000106831881858", "-4.9591633849340270415e-16"); + times_test ("0", "-0.0000000000073", "0"); + times_test ("-0.0000002358363833", "-37968.0", "0.0089542358011344"); + times_test ("3.4", "-32545254.52", "-110653865.368"); + times_test ("0.000000247", "12.88", "0.00000318136"); + times_test ("-446908", "0.000000490399599", "-0.219163503989892"); + times_test ("-0.0000000015", "91", "-1.365e-7"); + times_test ("794881.3", "45.2898548", "36000058.66023524"); + times_test ("5", "3046563.8", "15232819"); + times_test ("-95094833817", "3.101", "-294889079666.517"); + times_test ("-12786.5", "-0.0000000684878615", "0.00087572004106975"); + times_test ("66754192.630", "7", "467279348.41"); + times_test ("414951476.81", "-12.875", "-5342500263.92875"); + times_test ("-2.486307", "0.00000000000131610556936", "-3.27224248983875352e-12"); + times_test ("-0.000000000000000477405019421", "-1.1", "5.251455213631e-16"); + times_test ("-367046.223", "-0.0000129", "4.7348962767"); + times_test ("0", "0.000000000000093338247", "0"); + times_test ("0.3341376", "-8", "-2.6731008"); + times_test ("422580779", "-10829.0", "-4576127255791"); + times_test ("-11.6639", "-56.51836497", "659.224557173583"); + times_test ("-1", "-36577.4", "36577.4"); + times_test ("61.5", "-68269.0", "-4198543.5"); + times_test ("-18.10728", "0", "0"); + times_test ("531751766", "41.50116", "22068315121.04856"); + times_test ("-7.63315110", "3", "-22.8994533"); + times_test ("1249.58475875", "38582.13", "48211641.6081111375"); + times_test ("-2", "0.000000000000001022", "-2.044e-15"); + times_test ("10.750", "0.000000000014145865", "1.5206804875e-10"); + times_test ("14", "0.044276206", "0.619866884"); + times_test ("12175855.915", "52.1893", "635449397.1047095"); + times_test ("-1", "-0.00000000000029721", "2.9721e-13"); + times_test ("311354.171224", "194857.1428", "60669584203.5706187872"); + times_test ("0.0000008188", "6375.414052", "0.0052201890257776"); + times_test ("0.00000055577528074", "3", "0.00000166732584222"); + times_test ("526170.543", "6065.11546", "3191285094.94589478"); + times_test ("0", "-27078031462", "0"); + times_test ("0.0003450371", "4044.753", "1.3955898453363"); + times_test ("0", "-5.681398758", "0"); + times_test ("-2830933", "-1", "2830933"); + times_test ("2.8", "14.36338836", "40.217487408"); + times_test ("725.6556", "-0.000058977271", "-0.0427971869738676"); + times_test ("0", "0", "0"); + times_test ("591.1", "-182368.115408", "-107797793.0176688"); + times_test ("1", "-8.44", "-8.44"); + times_test ("-48988695", "3.99", "-195464893.05"); + times_test ("-54145231.29", "-164.1", "8885232454.689"); + times_test ("1.9615", "370.5", "726.73575"); + times_test ("-2317170.34468", "-0.0000117290196265", "27.17813645069548986202"); + times_test ("-3865301765", "9.90928729", "-38302385651.92906685"); + times_test ("8.9648", "-3", "-26.8944"); + times_test ("-10645.1", "-4208", "44794580.8"); + times_test ("-390304.9", "-9.540", "3723508.746"); + times_test ("0.00000000043946", "-0.0000000000135", "-5.93271e-21"); + times_test ("11.167962", "907.089236", "10130.338118257032"); + times_test ("328719912.6", "1.13", "371453501.238"); + times_test ("8.0902", "3", "24.2706"); + times_test ("-0.0000000000000000000103885880", "54949757", "-5.70850386173116e-13"); + times_test ("-60096046", "147.9066", "-8888601837.3036"); + times_test ("-1.1", "-4", "4.4"); + times_test ("-2.3781033", "1.488", "-3.5386177104"); + times_test ("18.64", "-13492494", "-251500088.16"); + times_test ("0.0000000000000000078080114", "1362291", "1.06367836581174e-11"); + times_test ("0.0000006699", "-0.0000000000000059", "-3.95241e-21"); + times_test ("-279.40", "-4199.537182", "1173350.6886508"); + times_test ("-346081282.623", "5715.5169", "-1978033419605.4328287"); + times_test ("26098.51437", "-0.00004277160560", "-1.116275363379572472"); + times_test ("-0.000000000038243914682", "6258350.6", "-0.0002393438263964435092"); + times_test ("-0.23215784", "1.7", "-0.394668328"); + times_test ("270.08569", "73.4", "19824.289646"); + times_test ("0.000000000000000253826", "-1", "-2.53826e-16"); + times_test ("1773.911", "167", "296243.137"); + times_test ("-609057.1664", "-2", "1218114.3328"); + times_test ("178326076.8", "-299396.226", "-53390154391306.1568"); + times_test ("-99153591.8357", "-67230.718614", "6666167232273.3544197198"); + times_test ("0.0000000000001596", "-0.00349909609", "-5.58455735964e-16"); + times_test ("1.84", "0.00000000003464", "6.37376e-11"); + times_test ("73.5", "0", "0"); + times_test ("0.000000000000000049", "-198604", "-9.731596e-12"); + times_test ("1052854077", "2.8", "2947991415.6"); + times_test ("28.3", "5964", "168781.2"); + times_test ("2085.7", "-338.192", "-705367.0544"); + times_test ("59.12705", "-0.0000000000016294", "-9.634161527e-11"); + times_test ("-0.0000000000000629", "-0.0000133901915", "8.4224304535e-19"); + times_test ("0.000000000000000000010713336246", "12.8722", "1.379042068257612e-19"); + times_test ("0.000620507896", "3.9", "0.0024199807944"); + times_test ("3", "9.6", "28.8"); + times_test ("-1", "7", "-7"); + times_test ("4.07", "4", "16.28"); + times_test ("-2473.25538", "12.3", "-30421.041174"); + times_test ("-1310633", "-9", "11795697"); + times_test ("-3.90", "3031.9", "-11824.41"); + times_test ("150.0276", "0.00897", "1.345747572"); + times_test ("2", "-8.8", "-17.6"); + times_test ("-3030148.8", "229674", "-695946395491.2"); + times_test ("2", "775.7549", "1551.5098"); + times_test ("-613183.18515", "-3", "1839549.55545"); + times_test ("-0.000000000001224", "367.376621", "-4.49668984104e-10"); + times_test ("-0.00000000000000000737581", "1.3490", "-9.94996769e-18"); + times_test ("0", "-1.15490644", "0"); + times_test ("8.437", "-12103106905", "-102113912957.485"); + times_test ("155.8091088", "3.465", "539.878561992"); + times_test ("179142.3", "0.0060", "1074.8538"); + times_test ("-301.3766", "9.6052", "-2894.78251832"); + times_test ("48.15", "518165.306", "24949659.4839"); + times_test ("4387518.42726", "-8069", "-35402886189.56094"); + times_test ("-28.3", "-77.67", "2198.061"); + times_test ("9", "0.00000000000001022", "9.198e-14"); + times_test ("-1071.62294", "0.0000010", "-0.00107162294"); + times_test ("-4.15", "-3", "12.45"); + times_test ("-661.167", "453", "-299508.651"); + times_test ("-104436", "-1098478.95443", "114720748084.85148"); + times_test ("0", "3.630588", "0"); + times_test ("0", "-13181687.0", "0"); + times_test ("-1.111", "-3.78770", "4.2081347"); + times_test ("0.000000042325027395", "2.89323850", "1.224563987727687075e-7"); + times_test ("-21.7", "-0.00001926174637", "0.000417979896229"); + times_test ("28151356.2", "0.00000000003236052", "0.000910992525337224"); + times_test ("0.0120", "-862436.56", "-10349.23872"); + times_test ("3649.71055", "-692509.6", "-2527459593.09628"); + times_test ("-3", "-1", "3"); + times_test ("-1135.91888551", "12.37808265", "-14060.4978485386674015"); + times_test ("1", "2172752.822", "2172752.822"); + times_test ("-0.00000000000001091997", "-117.1", "1.278728487e-12"); + times_test ("-605.91910660", "2036476909", "-1233940269312.8094994"); + times_test ("-85793626", "-403556966", "34622615410698716"); + times_test ("387.034155496", "1.51", "584.42157479896"); + times_test ("-212937", "7812.350", "-1663538371.95"); + times_test ("838667.59", "-297101", "-249168979656.59"); + times_test ("0.00382632083", "0.000316896", "0.00000121254576574368"); + times_test ("0.000000000000002582", "-295757466.2", "-7.636457777284e-7"); + times_test ("-0.000000000000798713", "21.52", "-1.718830376e-11"); + times_test ("0.00000974", "-2.9", "-0.000028246"); + times_test ("0.0000000000281", "38.82", "1.090842e-9"); + times_test ("-3.237", "16967081.13", "-54922441.61781"); + times_test ("9.8", "-0.0000000001333", "-1.30634e-9"); + times_test ("5614.9", "-76.1668", "-427668.96532"); + times_test ("-1.8", "3545.0927", "-6381.16686"); + times_test ("0.00000249806256", "-1131.1175", "-0.0028256022777108"); + times_test ("-0.20706", "11338.58322", "-2347.7670415332"); + times_test ("1908.3417145", "-138.575", "-264448.4530868375"); + times_test ("0", "0.0000669436", "0"); + times_test ("325.22245849", "-14504.56", "-4717208.6625157144"); + times_test ("-13.8825", "0", "0"); + times_test ("0.0000000000869261985", "1.1243", "9.773112497355e-11"); + times_test ("2588680", "-2.639437", "-6832657.77316"); + times_test ("847973030.3", "1300.4", "1102704128602.12"); + times_test ("-669.7", "-1150.41", "770429.577"); + times_test ("-1", "-6.761867", "6.761867"); + times_test ("-4", "-128.68", "514.72"); + times_test ("-0.0000000000000000148", "-389336", "5.7621728e-12"); + times_test ("5.1", "8.1", "41.31"); + times_test ("959895377.84", "976.5", "937337836460.76"); + times_test ("152", "-1325188.6822", "-201428679.6944"); + times_test ("-1013851164640", "-116895", "118514131890592800"); + times_test ("-0.555030", "0.0025719815451", "-0.001427526916976853"); + times_test ("-8.61456", "-0.000000000050", "4.30728e-10"); + times_test ("-0.10822", "-42439", "4592.74858"); + times_test ("5", "248", "1240"); + times_test ("1.00560719", "-0.00000000000000538", "-5.4101666822e-15"); + times_test ("-0.0000000000000000880", "20.26149480", "-1.7830115424e-15"); + times_test ("-215.544104755", "-4060438.71", "875203626.65949706605"); + times_test ("0", "13031.6", "0"); + times_test ("-0.0000000000000047877659854", "-208.19", "9.96765000500426e-13"); + times_test ("-4", "-3160383", "12641532"); + times_test ("-0.00104402960", "-6", "0.0062641776"); + times_test ("-6", "-221362529.2", "1328175175.2"); + times_test ("-5658.7", "-0.000009428149284", "0.0533510683533708"); + times_test ("-3", "-0.0000000000000000171257563600", "5.137726908e-17"); + times_test ("1577941089.0", "-0.0000000000000054178560", "-0.000008549057596685184"); + times_test ("-3", "-19154.88287", "57464.64861"); + times_test ("-5.3", "-0.000000000000000094150109", "4.989955777e-16"); + times_test ("-275.9", "-618029.6", "170514366.64"); + times_test ("-0.00277412", "-2.0", "0.00554824"); + times_test ("20896.13", "-2", "-41792.26"); + times_test ("0", "144.50", "0"); + times_test ("0", "37399", "0"); + times_test ("0.0000000103050173", "-6.752", "-6.95794768096e-8"); + times_test ("-1679844", "0.00008795", "-147.7422798"); + times_test ("1731362.632", "-0.0000000010867236", "-0.0018815126323525152"); + times_test ("-116536", "8818.8637874", "-1027715110.3284464"); + times_test ("112359.12", "-6.3736", "-716132.087232"); + times_test ("0.02767509", "4.002781363", "0.11077733447134767"); + times_test ("-942581.9", "7.504907", "-7073989.4993833"); + times_test ("6603793", "1.604", "10592483.972"); + times_test ("91689.093", "5", "458445.465"); + times_test ("4351694708.6", "0.0003242690", "1411119.6914630134"); + times_test ("-2.38", "-39", "92.82"); + times_test ("-759.5", "0.000000324", "-0.000246078"); + times_test ("-6.1623", "-10.1485", "62.53810155"); + times_test ("1819.975133", "-1918.4931", "-3491609.7348320823"); + times_test ("-544", "-2373759.39656", "1291325111.72864"); + times_test ("-2143.2", "-0.000000000000000000162130", "3.47477016e-16"); + times_test ("0.621559060", "53.8", "33.439877428"); + times_test ("-4624.6", "0.0000000000000190537313036", "-8.811588578662856e-11"); + times_test ("-6", "-50.943", "305.658"); + times_test ("-3021.479", "3", "-9064.437"); + times_test ("-965", "-0.000415509858", "0.40096701297"); + times_test ("0", "6465897.6979", "0"); + times_test ("74528068.573", "-119403349", "-8898900982117850.977"); + times_test ("64.56", "0.000000017086", "0.00000110307216"); + times_test ("-9626.07", "-1051902.812582", "10125690107.11121274"); + times_test ("1.4514", "-1", "-1.4514"); + times_test ("0.00120840179209", "-492240", "-594.8236981383816"); + times_test ("-1.163", "-3.5", "4.0705"); + times_test ("-390918.9935", "-3.9645296", "1549809.9209329576"); + times_test ("1130.013737", "3", "3390.041211"); + times_test ("-5", "-6733821263", "33669106315"); + times_test ("27774.358123", "-0.0000000000000128441670", "-3.56738494049618541e-10"); + times_test ("0.363631323", "-3819136980.1", "-1388757832.7919876723"); + times_test ("-0.0000000065598472", "53857.08", "-0.000353294215438176"); + times_test ("-240695", "2", "-481390"); + times_test ("0.000059", "0.00000000000017987993", "1.061291587e-17"); + times_test ("37.17", "-61.7668", "-2295.871956"); + times_test ("1.475572354", "266461086.2", "393182612.2135309148"); + times_test ("-0.000000000003907", "-31.5", "1.230705e-10"); + times_test ("-0.0000000000000000000894018", "0.00000000000000001599913222", "-1.430351218905996e-36"); + times_test ("0", "-0.00005850856211", "0"); + times_test ("32.75", "-2.57293", "-84.2634575"); + times_test ("0.00000131", "43", "0.00005633"); + times_test ("-129602.62", "-0.000000000000000123490", "1.60046275438e-11"); + times_test ("-2941.6442", "2.013048311", "-5921.6718883729462"); + times_test ("1.01983639584", "10710047", "10922495.73175700448"); + times_test ("0.4077750076", "-3", "-1.2233250228"); + times_test ("0.359", "207160.173586", "74370.502317374"); + times_test ("-26222.646879", "9.8", "-256981.9394142"); + times_test ("-2", "-1.1360", "2.272"); + times_test ("6717280984", "564735824499", "3.793489214890694027016e+21"); + times_test ("-7", "0.000000000000000000179598", "-1.257186e-18"); + times_test ("-0.000212", "754.3", "-0.1599116"); + times_test ("-8.6", "-44061.183", "378926.1738"); + times_test ("0.000000000000000000013", "956", "1.2428e-17"); + times_test ("-3", "3.8968771877", "-11.6906315631"); + times_test ("-4485.1947117", "444609963508", "-1994162257095211.5806436"); + times_test ("0", "-3353199.6579", "0"); + times_test ("0.0000000000000000000293", "-4", "-1.172e-19"); + times_test ("-225", "5.09648", "-1146.708"); + times_test ("0.00000036757", "0", "0"); + times_test ("-78694.836", "-43.8", "3446833.8168"); + times_test ("0.000000000000018028989162", "495", "8.92434963519e-12"); + times_test ("-4036233", "-0.0000000000000000000134620360255", "5.43359140533119415e-14"); + times_test ("-2.19", "-481624.5154", "1054757.688726"); + times_test ("-6", "-33692.483", "202154.898"); + times_test ("-0.00000000387466078726", "137145711.9", "-0.531393112039787150394"); + times_test ("-52.6685", "-107972.8", "5686765.4168"); + times_test ("-7.137137210", "3.06", "-21.8396398626"); + times_test ("-174.1619", "-2084784202", "363089977710.3038"); + times_test ("11", "-0.15", "-1.65"); + times_test ("177.3211", "-85578219.525", "-15174824022.2144775"); + times_test ("2", "-1", "-2"); + times_test ("-681.685707574", "222753546489", "-151847908952971.868407686"); + times_test ("2225288.04", "-2945.03251212", "-6553545626.6317910448"); + times_test ("-829419822664", "0.000750870", "-622786462.24371768"); + times_test ("-3.887", "-0.0000000000215299", "8.36867213e-11"); + times_test ("14780708.1", "-2000820.86", "-29573549092050.966"); + times_test ("-65280872367", "2756.0", "-179914084243452"); + times_test ("-1.1", "-16652196529", "18317416181.9"); + times_test ("6153.32891899", "3.07", "18890.7197812993"); + times_test ("1.6664", "10.5", "17.4972"); + times_test ("-335.16960", "25.16", "-8432.867136"); + times_test ("20.7", "834", "17263.8"); + times_test ("8029.51", "-1", "-8029.51"); + times_test ("3544067.44", "0.00000000000000000108040", "3.829010462176e-12"); + times_test ("-0.00000000000000861840983", "3", "-2.585522949e-14"); + times_test ("-1", "-5.4071", "5.4071"); + times_test ("-0.000000000000014799305202", "-77.4875919308", "1.1467625223519416640216e-12"); + times_test ("0", "-31045268779", "0"); + times_test ("-437", "640.03", "-279693.11"); + times_test ("60", "0.000000000000000371281463", "2.227688778e-14"); + times_test ("-1", "-0.019533338878", "0.019533338878"); + times_test ("-1117.048", "8.967", "-10016.569416"); + times_test ("-0.0000000000001992331", "17762516", "-0.0000035388811264796"); + times_test ("-1.209", "-3960.47030", "4788.2085927"); + times_test ("-994748.5", "-10809803.2", "10753035518495.2"); + times_test ("-3.0521", "0", "0"); + times_test ("4553015.460", "-6", "-27318092.76"); + times_test ("0.00000000403775332", "0", "0"); + times_test ("10628.68130", "-1.196558", "-12717.8336389654"); + times_test ("-0.00000000003389", "-113275.58", "0.0000038389094062"); + times_test ("0.0000000000000000000810", "-0.000000002954", "-2.39274e-28"); + times_test ("0", "0.00000002678", "0"); + times_test ("12309", "25980042.9", "319788348056.1"); + times_test ("-7.6", "0", "0"); + times_test ("-61.22", "-349.3", "21384.146"); + times_test ("-1.845209", "0.000000052784913420", "-9.739919730680478e-8"); + times_test ("395.326251", "-371872028", "-147010774681.007028"); + times_test ("332.72", "3715", "1236054.8"); + times_test ("-1681921.54", "76348.91498", "-128412884660.4906692"); + times_test ("517583042", "-13.9", "-7194404283.8"); + times_test ("-21.723616577", "-0.000013157028", "0.000285818231564853156"); + times_test ("-116.13334149", "0.0000000006536", "-7.5904751997864e-8"); + times_test ("-4.1", "-294.0876", "1205.75916"); + times_test ("-22.05", "-6.7", "147.735"); + times_test ("-22.9", "-0.00000217178", "0.000049733762"); + times_test ("-50.5", "0.012432393", "-0.6278358465"); + times_test ("-2", "-0.00000000000119764950", "2.395299e-12"); + times_test ("19381.0141", "65.916071785", "1277520.3166816971685"); + times_test ("-4.90", "-22.5701", "110.59349"); + times_test ("0.00000000000192902409442", "289522860.5", "0.00055849657378990048841"); + times_test ("-27006298.37", "-8164.7", "220498324301.539"); + times_test ("-8776869", "-143972778", "1263630212072082"); + times_test ("-79325483.3", "248065.2", "-19677891879911.16"); + times_test ("-26.2", "28441.8", "-745175.16"); + times_test ("18.71", "97792.4647", "1829697.014537"); + times_test ("-150.68501", "-1.3460", "202.82202346"); + times_test ("-43.0091494663", "-5.6724", "243.96509943264012"); + times_test ("12.359", "-1.261", "-15.584699"); + times_test ("0.0000000048694525", "-13", "-6.33028825e-8"); + times_test ("-26799", "-3.0401", "81471.6399"); + times_test ("0.000000000003271187802", "0", "0"); + times_test ("1", "0.0000000000250081008", "2.50081008e-11"); + times_test ("23.590033588", "0.000000000000000880594309", "2.0773249326711650692e-14"); + times_test ("2.34", "-35556883", "-83203106.22"); + times_test ("127410324", "48.0", "6115695552"); + times_test ("2.4", "2.0", "4.8"); + times_test ("17", "-0.00000000000000000467960391085", "-7.955326648445e-17"); + times_test ("-5827035", "63.01", "-367161475.35"); + times_test ("-452352446648", "13167459.5", "-5956332520963450756"); + times_test ("0", "27.51619908", "0"); + times_test ("-6.8253", "-203490405", "1388883061.2465"); + times_test ("-663513.1", "235798", "-156455061953.8"); + times_test ("45846991454.7", "0.000000000000011371170", "0.000521333933819940999"); + times_test ("-6940453.30", "-0.0000000000000000000429869089", "2.9834863373180437e-13"); + times_test ("-299.7692790", "-2.0", "599.538558"); + times_test ("-0.000000000000781997707", "-0.00000000002498", "1.953430272086e-23"); + times_test ("-211968.876", "-11448", "2426619692.448"); + times_test ("-2", "224979.5", "-449959"); + times_test ("0.0000000000007372", "3", "2.2116e-12"); + times_test ("2.14", "-96.5220369", "-206.557158966"); + times_test ("246.3484", "-119174406049", "-29358424251121.4716"); + times_test ("2301100.91737", "-431951.5", "-993963992909.347555"); + times_test ("-13819448.15", "0", "0"); + times_test ("0.0000000155919108142", "8.51", "1.32687161028842e-7"); + times_test ("124616457", "513907736", "64041361285211352"); + times_test ("-5298.3584942", "-4.1932", "22217.07683787944"); + times_test ("158463114", "0.0000000000000000001405398", "2.22703743489372e-11"); + times_test ("-65667302.5", "7", "-459671117.5"); + times_test ("-1693481.437", "-27743783", "46983581502656.171"); + times_test ("-0.0000000000000003099934391", "125", "-3.87491798875e-14"); + times_test ("-0.000000000000004272052", "0.0000005661", "-2.4184086372e-21"); + times_test ("12.95933", "209420271.72", "2713946409.9091476"); + times_test ("3.1", "-1.31573054798", "-4.078764698738"); + times_test ("0.000086866", "-103057641552", "-8952205.091056032"); + times_test ("11.1", "660.353292988", "7329.9215521668"); + times_test ("-92.940180", "-1", "92.94018"); + times_test ("97808795959", "-97", "-9487453208023"); + times_test ("0.000000000000000388699", "-399", "-1.55090901e-13"); + times_test ("227578760.552", "-40082.64751", "-9121959239968.50902552"); + times_test ("-4.31547", "-29.771127352", "128.47640695373544"); + times_test ("27.8", "60.0346682", "1668.96377596"); + times_test ("12.7", "60805396.70", "772228538.09"); + times_test ("6.808549", "434235.18", "2956511.50055382"); + times_test ("-0.000000000000000000764", "798867", "-6.10334388e-13"); + times_test ("0.000000000166682635066", "21.7", "3.6170131809322e-9"); + times_test ("-17.0856584365", "-73.70395", "1259.280515120874175"); + times_test ("-0.000032761108", "137.87702888", "-0.00451700423385679904"); + times_test ("6.7467", "0.000000000000000000017375144", "1.172248840248e-19"); + times_test ("156.9", "-90.01049", "-14122.645881"); + times_test ("-294748892", "-46912.02", "13827265916481.84"); + times_test ("-1145.2", "77", "-88180.4"); + times_test ("0.000000000000000000049300", "336.35", "1.6582055e-17"); + times_test ("1.0", "4", "4"); + times_test ("2791.3", "372.0576", "1038524.37888"); + times_test ("0", "-1.1", "0"); + times_test ("-67196.498357", "36318.97052", "-2440507642.87511143564"); + times_test ("0.00000000484838500152", "-0.00004296", "-2.082866196652992e-13"); + times_test ("-1488.65084", "-2472469.6620", "3680644039.21081608"); + times_test ("-0.000000000020", "-9.9", "1.98e-10"); + times_test ("-2841.5725628", "-0.00000000000000000049499064214", "1.406551827547777476392e-15"); + times_test ("75.099315636", "0.0000000000000014", "1.051390418904e-13"); + times_test ("3", "-2.7", "-8.1"); + times_test ("0.0000096", "-0.000000000027265607", "-2.617498272e-16"); + times_test ("3256481", "-8.7", "-28331384.7"); + times_test ("13650.44", "-53", "-723473.32"); + times_test ("6", "-8.1", "-48.6"); + times_test ("12.819672478", "-1.0", "-12.819672478"); + times_test ("0", "-0.00000000000000000001480", "0"); + times_test ("-0.00000000932497", "1", "-9.32497e-9"); + times_test ("0.21304", "-0.000000000000159938", "-3.407319152e-14"); + times_test ("-40", "-10124.4", "404976"); + times_test ("-138.46343", "-72.2", "9997.059646"); + times_test ("5", "-65625447009", "-328127235045"); + times_test ("127.3760", "-572993.9", "-72985671.0064"); + times_test ("3793.636", "-14016.5", "-53173498.994"); + times_test ("-0.0000342", "-3.21", "0.000109782"); + times_test ("1.054585905", "1", "1.054585905"); + times_test ("-18462488840.1", "6264.198", "-115652685667176.7398"); + times_test ("-55413", "-9808.30460312", "543507582.97268856"); + times_test ("-1.11918007", "0.166606078", "-0.18646220203846546"); + times_test ("-1.6", "68.418", "-109.4688"); + times_test ("73090459.50", "2990.3", "218562401042.85"); + times_test ("672.231", "19.8", "13310.1738"); + times_test ("-0.000028", "4.8", "-0.0001344"); + times_test ("-0.13900815895", "103606359", "-14402129.22010276305"); + times_test ("0.000000000000054", "-0.0000000000000000492", "-2.6568e-30"); + times_test ("-0.0000000000000000000484559", "5.193", "-2.516314887e-19"); + times_test ("418.8538369", "0.0000000000000079", "3.30894531151e-12"); + times_test ("0", "675966", "0"); + times_test ("106621", "13.56840585", "1446677.00013285"); + times_test ("12.198402747", "1", "12.198402747"); + times_test ("65.314804858", "-0.0000000036124", "-2.359432010690392e-7"); + times_test ("-16207.72", "-0.0000000000052877", "8.5701561044e-8"); + times_test ("-26109.4977159", "-60149.26838", "1570467185.380666093242"); + times_test ("-0.000000000000030215", "2614373", "-7.8993280195e-8"); + times_test ("0.00001270329688", "2444.29", "0.0310505415308152"); + times_test ("-871.457466", "2348528202.8", "-2046642436441.6221048"); + times_test ("-0.00000000000000000063864554", "397.146", "-2.5363552162884e-16"); + times_test ("-24310822171", "20.60", "-500802936722.6"); + times_test ("-19.860", "47497302.8", "-943296433.608"); + times_test ("-3.55", "0.402200053", "-1.42781018815"); + times_test ("1311.50024013", "4.4", "5770.601056572"); + times_test ("-361", "0.000000007669817618", "-0.000002768804160098"); + times_test ("-0.00000001735304418", "164354775", "-2.8520556717689595"); + times_test ("0", "194.3", "0"); + times_test ("-3.7", "-1475870.0", "5460719"); + times_test ("-5888926.57", "-1", "5888926.57"); + times_test ("-11.644", "-83797427.047", "975737240.535268"); + times_test ("-0.005286102", "25.9", "-0.1369100418"); + times_test ("0.0000000000000545367483", "-176.8675", "-9.64577832995025e-12"); + times_test ("-112.5258392", "0.05538900297", "-6.232694041650542424"); + times_test ("-2032574", "4.7", "-9553097.8"); + times_test ("44405.894", "8", "355247.152"); + times_test ("1430.7023529", "15", "21460.5352935"); + times_test ("-0.0000000000000000010538367753", "-5.05921", "5.331581551965513e-18"); + times_test ("1107.1", "-660486.6", "-731224714.86"); + times_test ("-0.000000001271832580", "0", "0"); + times_test ("0.00000000003329420451", "-4.58", "-1.524874566558e-10"); + times_test ("-1.1331472", "22318736.7503", "-25290414.05613954416"); + times_test ("-1320771192.0", "0.000000000000000144797721037", "-1.91244658612921966104e-7"); + times_test ("6.0088825", "-2.06", "-12.37829795"); + times_test ("-0.00000000000000130", "-14.851119896", "1.93064558648e-14"); + times_test ("1", "-54959924930", "-54959924930"); + times_test ("1.22", "-0.000000000000000000447152061675", "-5.455255152435e-19"); + times_test ("0", "2460.4318049", "0"); + times_test ("-48926117262", "0.00000000000019101657111", "-0.00934569915711302150082"); + times_test ("-1.9", "-0.0000000000152246057022", "2.892675083418e-11"); + times_test ("-0.0000000000000000262046", "-18965.321", "4.969786506766e-13"); + times_test ("-1.5349403", "-3984579.1", "6116091.03912773"); + times_test ("-0.00000012", "663568053", "-79.62816636"); + times_test ("-54228857.6", "0.162776", "-8827156.5246976"); + times_test ("0.0000000000000000001875935465", "14.25202", "2.67358697658893e-18"); + times_test ("-13.1992", "-8.93496384457", "117.934374777248344"); + times_test ("1.4", "0", "0"); + times_test ("383.512", "-4258970898.7", "-1633366447302.2344"); + times_test ("0.00000000485581523775", "0.026476965410", "1.285672520872576762275e-10"); + times_test ("-113.2617", "-1.3158604", "149.03658586668"); + times_test ("229813.79204", "-4.40918501496", "-1013291.5280939017289184"); + times_test ("-0.0000735399", "6", "-0.0004412394"); + times_test ("20950", "18.05", "378147.5"); + times_test ("-224.09235215", "-0.0000000000000000000330291504", "7.40158000265211336e-18"); + times_test ("-1212.5", "-89187.79", "108140195.375"); + times_test ("0.000000005360379781", "-5.853730207", "-3.1378217045031744667e-8"); + times_test ("1.721", "-59400291.7", "-102227902.0157"); + times_test ("3", "510831.1558", "1532493.4674"); + times_test ("-79731.7076", "-0.00000000199301902", "0.000158906809743878552"); + times_test ("1", "7", "7"); + times_test ("1557292", "116069515", "180754127153380"); + times_test ("13174514.5181", "0", "0"); + times_test ("11.5557387", "-0.00000000000003525009362", "-4.07340871023257094e-13"); + + times_test ("59429490631462462063898399891833", "85.00891132032463441584595955", "5.05203629890205609747397099201262363916734883085091009335515e+33"); + times_test ("-0.000000000000000042109349317791897577655162141761006017167", "-13008827246961207056988713615056579178448396076639.2633976291", "5.477932507570985534957063193452340625430871365299670940723162464475095465880668702087454656216987597e+32"); + times_test ("8591855.554373470161526044552421978378391766637549711729320", "-4.18144454943", "-35926367.5773248178055078206847122253956635626957707604812328535202876"); + times_test ("-2283433141014849078.33114178969776355920", "-453.97", "1.036610143026511036089988438269093722970024e+21"); + times_test ("-834090482593334176100123.7933568971710257756", "-2311068.681", "1.9276403914416302737519348190500409072951706328939836e+30"); + times_test ("189532.2", "2968613550973672055370920.6", "5.6264785726585220673297239734332e+29"); + times_test ("5.5765", "206791541", "1153173028.3865"); + times_test ("223004397.925983046564773982957421494273449", "-0.00000765764399", "-1707.68828752147254136863163630226113151989615142151"); + times_test ("-9", "-861605.04321559065136010082968313802", "7754445.38894031586224090746714824218"); + times_test ("0.000000000000000000028090298007095127212699390661641605", "-6917964065283873879.11378929124954598", "-0.1943276721961993069547944346297165198267413742521737520171142577284979"); + times_test ("-12902.95204428144349964281942884855605291385221512", "936511255610118037649.1", "-1.2083759820067154006199526430520916600744894425420426553143497592274392e+25"); + times_test ("0.000000054421393267623019090", "0.0693540337668146867938144", "3.774343146319828330922834963772562065116896e-9"); + times_test ("-0.00000000007483922", "11963887185334360.01202905021298539073645325022668", "-895367.9851184189424994447352806605141113868134295543896"); + times_test ("-136818356017962729836947190424992612288254", "0.000001250702751", "-1.71119094258963391622539632506259119343595682786754e+35"); + times_test ("89886141515.402264741", "165920325588054483132342147189817", "1.4913937866089484761163201125053970911515450613342397e+43"); + times_test ("-4910559.69867254476135299557110880352698481", "-0.000000000000001251373615473295746877725841601861845423548", "6.14494484412532005943449278569391549262463086794696425713068030612078654982181230588e-9"); + times_test ("188388334026044880874021952902236669508901633565820006", "-1428610610603915751990.6", "-2.691335729036024155624090667679961618627273975496253699574106150646158039436e+74"); + times_test ("2569238997875.3944611244282198384307876980880850", "-45354701.13646736794503189060", "-116527066896795434703.141029468202286044275680813636330729593599972883501"); + times_test ("-20273871998054251005", "-0.00001018031347", "206394372190847.50529696253735"); + times_test ("0.000000000127882266384995374972957752031634640610096", "56084430050054721499878916115459816143192971582.9", "7.1722040237117373866688717282573432808847848059761445842371981626319357370527308468409584e+36"); + times_test ("954627502168195877866647607616261900931", "9.96209474259629834949998607", "9.51008962048762055845159388440432218351076192328571371885622003117e+39"); + times_test ("27452502565473996463690067929.18801932606917287121704780", "-15999511778834005759916561695256821.291408", "-4.392266381547719678372690910805800180664096055687896418712826017984317410615883824886612653024e+62"); + times_test ("24739272583405.47186561318831947000688841802596024659835438", "0", "0"); + times_test ("-14628477765152447836551575115758391.03361640644696947989", "1896549844807094292937664785889813670098706728.8", "-2.7743637235263904499250092914009953677085505785952534916815852412079339245487773243303684333379283832e+79"); + times_test ("-0.0000000065376926", "400694118953983940534743481756583594", "-2.6196149763489805485528325035782515637752044e+27"); + times_test ("6159556.6345747363", "12428.3903194610108", "76553374049.32049544464848654145204"); + times_test ("1", "-214152.677228898078143751453160882566438516677", "-214152.677228898078143751453160882566438516677"); + times_test ("1234245458508975352.84372029387871714", "711.09788699", "877669337572736089357.1591886677375895858960086"); + times_test ("-12435092008252.828827", "-0.000000000000000130972832307119388", "0.001628659220320498210781727802616997876"); + times_test ("1222155005674.47827107178853812873657", "-1.9217613579329307675966802225522", "-2348690263309.514070047950271986297573047714307144600821921806873954"); + times_test ("-9610326782.75790", "-1925856563138573766.221666413429", "1.85081109084807161320054127390660041302158391e+28"); + times_test ("1897933.1084909834795612591951194123752666123", "-19444.86721593176768385769", "-36905057279.327795521442821058258453663270782572671411150172721603587"); + times_test ("0.000584193054195683632690208", "-15427224.032385517626932779704097", "-9012.477125240345688831570386428613444841606254309382176"); + times_test ("-9193123344.97483292546402603464388933977", "3", "-27579370034.92449877639207810393166801931"); + times_test ("-208355", "18.5077", "-3856171.8335"); + times_test ("0", "-7.9", "0"); + times_test ("-146.9974821", "27.85613660690160", "-4094.78194224817268246136"); + times_test ("0.0000002221395758167297538432", "-11018022952341415341382543191308.248305367013916352", "-2.4475389449721144325377299337884145675514764946137036517351977553240064e+24"); + times_test ("-62634425863308865890231971109828114770592016347.2857222333045", "-0.0000000000044191162667", "2.7678881018796339994185288016784587422371771822944265151385376844431015e+35"); + times_test ("0.014785725196930589141008331862", "1405730020396633.72", "20784737782660.25819955773732132563645741958664"); + times_test ("3060880958477929473167827.136432332645114184906595927797020", "-134990224.755007177950183445", "-4.131890085332574931410011369432785413898866996911658019131150911202211096837243339e+32"); + times_test ("-251157.56", "-35553.75153", "8929593483.1210668"); + times_test ("10660825.6584256928", "-54.80641419272238648411", "-584281626.672080870616452029619482941408"); + times_test ("0.00000000000000000018196806510154644625549186906147312734531", "290466772346954491087868523893813560578350699536244189", "5.285567654026668587345538632825206167793448119823731989523008725260266169443990119026948390359e+34"); + times_test ("801946936195133455122.3263199289", "3353455956475898285353850471499087737905097359235396953.528", "2.6892937299611674351748616442698675657013699635861635172559630870783247800626545335641592e+75"); + times_test ("88876291341359997.22", "-242985336224765018278774996045975", "-2.15956355339905308693512776069018053139845369921895e+49"); + times_test ("-677.8706245402", "-40041.8855", "27143217.9316521785471"); + times_test ("3.1852520702012", "0.00000998870874036575237809441602188548308619567919990770190850", "0.0000318165551938868335179942506676244968068581347935045219680140052189902"); + times_test ("-2897031868709978067512290.19826378134251899155435029", "-0.0000000000000313426136", "90800550447.862773034512424935249089493462002949664538517944"); + times_test ("-286245211287.816038991926811942762853058522756387871", "-905725.51698541", "259259591978255100.08416583456412844730858064475954566698860796211"); + times_test ("-301283745846510635986864779646783.59226306843", "164455867753899", "-4.954787986333307027587976990843711993792791415951383630857e+46"); + times_test ("16627939773", "-24446.50", "-406494929660644.5"); + times_test ("2835613541302657637165162939561661439198237", "-34702274210562114517526690656890036690211485", "-9.8402238665467925464317665495284869217720281504532926830801758242091305082784369151945e+85"); + times_test ("0.000000000000167329000479220734904842317239446253923254", "-335462.843", "-5.6132662217107750155727738207852552086794690651122e-8"); + times_test ("1606900543967463817538016297544283302866330961.38117", "-12172415089417043266077235.5931339752547820885496331722", "-1.9559860428582011548778770036179464667831089769951903599695351323242935536918541220406695361968160447474e+70"); + times_test ("25175391597018424433550189069315474558138086224811394.9498", "2697842514071148.65", "6.791924175882585620347727294751149080055684613881481427569426305249508777e+67"); + times_test ("33605644614556574.500804536703659893409117374", "-32.543409918351171133101366277860678601667282494", "-1093642268261945046.079483918411013199812861395190797870188216612955697572700923777661450756"); + times_test ("-16194637333856709349021519708.8552324881761540256020238975", "-468.317375400951782165492196622874246631857734334382", "7.584230051762041449005379580598839525796458346850505580761259136785876093027076066542485326077054219893845e+30"); + times_test ("45938105933592236851533187176.70670204189811056", "-23728.6", "-1.090046940455836751355290385241202650071383506234016e+33"); + times_test ("0.0000019359500318287540988972385182980431073131086249", "-1.433", "-0.0000027742163956106046237197427967210957727796846594817"); + times_test ("3.383292222691", "-0.00000000000000000008416407858503881", "-2.8475167250671594974339763771e-19"); + times_test ("-1781216226076936151337005862078252102700230837", "-139003643961.53840777847576996", "2.4759554610811353724544585499901643072996118138112041996180785490331025652e+56"); + times_test ("-4942215729757062263164723577.197780606517", "-15241705.579", "7.5327797060859772211128133542568249856768162658343e+34"); + times_test ("20212448898283508798.6625218057881201405", "0.000000000000000000473337907308896740021174588136160473489005777205", "9.5673182631015315198993602152061224371243489547543953762429365302559862133611162973025"); + times_test ("0.0000000000000000000336083585075308914988259705527435231286920", "-1042029834722073772731648833.0978", "-35020912.2608826168412442748054117197175486895048242174316983271784220776"); + times_test ("2376653285350901814422.788590453876", "-7116898082702.215", "-1.691439920976175340680854757410757210391140053534e+34"); + times_test ("-0.0000067077602282", "10325935005362413727223741709915.3224340753", "-6.926389614794815252662513824455946141306951378398346e+25"); + times_test ("118620396179863704912953340.8484888231431511", "0.00002664482432944840555300828814", "3.160619618102041148915830017998160333002812044061355761312703976357954e+21"); + times_test ("-0.0000000000152038475299141990408716170165065", "0.000000000000005856774815228245375399878344009978104812414293866282", "-8.9045511307771647940461821641351376995341987855772716940834996589432243659697783833e-26"); + times_test ("-552929555032574543198346", "0.00000000031628803556881", "-174885002769189.22345730619750676118826"); + times_test ("0.000000000000000045838", "3539579713.731326460", "1.6224725491801654227348e-7"); + times_test ("1392529024903490704995506782982906.381429", "-696.803141131", "-9.70318598668840847367530799623705904459432004456199e+35"); + times_test ("0.00000017046264046382452", "77820777096586290650583567570533323989282", "1.326553514683081867495692236827890756347852656781320879464e+34"); + times_test ("173.2", "400230281235477723305446756183676238679630391", "6.93198847099847416765033781710127245393119837212e+46"); + times_test ("441.339801980", "3859926956832539877913158087979570115173.37608", "1.7035393987857371577386465661853388929161435925152686384e+42"); + times_test ("146444036588433930865962234014095372651938826216413", "-52287041949860150983876138.09252718579", "-7.65712548440629977355786783708824277254343945936126868688503521615280343003456839837127e+75"); + times_test ("-152996991626635397079841283901340.65158799", "139164451.4055465586500905725256511816907743", "-2.1291742406419715449781823729219758981469966625530964344454535418866326578427680657e+40"); + times_test ("-2392095943969007513831013778238", "283213.66941826693939894680290224", "-6.7747426989201568951320097088428601075588412800688116615345312e+35"); + times_test ("-15192560288102281367737239879605.47240096086", "-81553445736510122", "1.23900564105440798918085016560369292282227123306201591582492e+48"); + times_test ("1.7067661013360140299015089144175628", "-8518082392971818901480808577069938345874733", "-1.45383742767114563412540521449653172561766842289564535605710831784007839607324e+43"); + times_test ("111116813960956208515375359292296052638950332201721672", "-6723639335232846900768096240894018745358463215413", "-7.47109381153635523540473499319528741906993971058857734750058361188185043050515216086975306279606530536e+101"); + times_test ("-19017520.49675261317806237143645102654220495050", "4439261178196804.5636234243239638305", "-8.442374044679588557398641259522603028251217372386419857709859483039768004289025e+22"); + times_test ("17312453768.05379", "1726.44336801935101862147113581125657128654142147602", "29888970991998.0896280136870221704774967797321308901016337045551158"); + times_test ("-2", "-8.63876", "17.27752"); + times_test ("734608.2", "0", "0"); + times_test ("4.1351657034625927353146715451605855050687982255845069770", "29034498780299324669067501513285520", "1.2006246357352024765485891656111571028229380504313388083084112136514462841267544463307304e+35"); + times_test ("8113870024531627718699652079910.7068190690295904975254176585", "16923534495569343509614671152502455712381.505727413", "1.373153592527270771522358333649474524182371877317191394431842566433920202044363434189424789373922626777224605e+71"); + times_test ("-10.01", "-4864429445729841.069760518121786", "48692938751755709.10830278639907786"); + times_test ("-2257142436339514797101935880.78", "361.115", "-8.150879908987438859554655755878697e+29"); + times_test ("2334599.31164827194227", "-29960204503173960913.6", "-6.9945072809951386426110474550748535657872e+25"); + times_test ("0.0000000000000042471515826788460724024393725389035009593598059706180678", "828398091382.612675070213", "0.0035183322649037987809384707757042363075619742175811901626183872501809043713944414"); + times_test ("-0.0000000000000000000284493127383335026590175755701910596367998889566726", "-0.00000000000000000013237", "3.765835527173205746974156478226190564123201301194752062e-39"); + times_test ("-0.025286262", "-0.10797436581647216600797099911020807463243214320798554", "0.00273026810331915910538504877190248824967123287037864285665148"); + times_test ("-2.16564935772054852403", "123868749404533277771925133166764554.44147780538237283827", "-2.682562775895750704487504519843216927715513029094342900139628307846103986281e+35"); + times_test ("488112856156098659519479388744402.61", "-3114334168535743226695852106494538175980162249914143.70", "-1.520146546028510353469309736526975923164123845906295275264771051373672808879616446195057e+84"); + times_test ("13062458273.90637045335784972", "-422551949801626.741267985176602715381458097174737967000518", "-5.51956721284152853764296726669744927261362132472755924039708895768532345915860615496e+24"); + times_test ("-1774897196938188058987.040101468413944266333770483137507", "-546064776871.3594927107191784", "9.692088418156530694143698199431520418181775404052225935078568528036161040292642488e+32"); + times_test ("17667764535653225248288857836.95612603671740964890", "-0.0000000000000000319890032591629766", "-565174177313.13507635499469894977748029671843469133582435048491574"); + times_test ("-281835819.9184911063", "-7175814054420814885484554.4", "2.02240143761032232334599327109026978241853272e+33"); + times_test ("0.000000000000000001503903188910", "2473558551492927739005724.481043938460207033289961875", "3719992.59354581446800290523978683389613115250358419250482280625"); + times_test ("224371010310.537303586", "-8046248744083810452149728.077812213", "-1.805344959919976464767416627850984855572049419079495818e+36"); + times_test ("21241841371778633003043.69805019497112440", "3019928870075002318121482.417", "6.41488500121878843990786691028203447626143414100289387726373196748e+46"); + times_test ("-0.000000000000000017364919937061080720023417741392471545683503908", "-0.0000000000000001101", "1.9118776850704249872745782933273111171797537802708e-33"); + times_test ("439522909103802363083392888521183473696.816065", "-2.2", "-9.66950400028365198783464354746603642132995343e+38"); + times_test ("0.0000000000000081177461857815960900264491259569062173810350", "0.0610415335877925918303617472579311", "4.955196764565624988836180976890473307042478930774835424434663605140744766885e-16"); + times_test ("-186798563956757871041672400714377.094855823", "-1262567588714917541983982710.193577", "2.35845812470293091731202495176066945197325419055745256762489749711235648871e+59"); + times_test ("202739871381.909125537", "20323942031180.7301604586345358572504650", "4.120473393374958139010105109821762644139100410749336624705e+24"); + times_test ("-0.0000000000871057582376852096451379468926610553156501430073631916", "-0.00000000000000000204556363069958967723715901466977445824097114499093", "1.78180371075520049530019591335531323553330829840490421849868550913658281328132369671225257713629597852188e-28"); + times_test ("43650.3286859870996376890566772833", "0.00000000000000000001310330289622533562857521522228834136757813518300419196026", "5.71963478292282611553143218521780871633322080859969244917523136988043505512171959238361658e-16"); + times_test ("-1092205601185294", "2", "-2184411202370588"); + times_test ("5860768904954696696.24176142662833543847", "0.0000000000000048972255", "28701.506930951217005600908223400663331828964985"); + times_test ("-85896656824567.02163635501735158916726224558523587655", "32321.39", "-2776299344922992287.4470686942774805948582718361870079644045"); + times_test ("0.00026", "95786603846831218908589843126114668233645", "2.49045170001761169162333592127898137407477e+37"); + times_test ("4045878451917596479346482", "-2.2547", "-9.1222421455386047819825129654e+24"); + times_test ("-0.00007402891873793970469482766866928008041088343139", "580", "-0.0429367728680050287230000478281824466383123902062"); + times_test ("-294517422548703614947348777318332.649869292704089396942", "-0.000000000000018464905130542546160683866082", "5438236266653724351.349152153311431266266033202633265447500622081254643984468321244"); + times_test ("-83.506", "-8171012757524040761112.5", "6.82328591329802547797460425e+23"); + times_test ("0", "-0.000000000000000052054568154502662326801153388437977", "0"); + times_test ("-848457792560875.315304639536969249869368391843456", "2786837672040308423168750746536175069.979124227", "-2.364514139444808677729215519365182902026897625419714103499744958027008402375235640420961008512e+51"); + times_test ("3114192", "0.00000000000000007442771895146280027117559688227552768887141498150", "2.31782206936893840902092874406007390124461849564067448e-10"); + times_test ("0.00000000000000000004917302646400565894337036110048", "-422918872", "-2.079620088498342188194690499484768025856e-11"); + times_test ("-497313848.92", "72015813415347226684601.47954307807272704460158688818499730", "-3.5814461352690899900766892687894799291942231391683303086680262807916e+31"); + times_test ("4026.7272674898467547880850473160814529617052037657449361", "-21157682685", "-85196217784587.2940970833078499068622793775121577888984306494014285"); + times_test ("161789945200634672.93574932528", "-8005803048483811151653134568908048072385822541265", "-1.2952584365012698158369216496463941318557463003471359935387477829065387076792e+66"); + times_test ("-0.00000000000021548823070578223953868560097628121116323968225230682924", "-49653567182460198793826479862157.077878", "10699759340379041130.65114538401855139934323670216223964167385329900350710562551938222192755272"); + times_test ("-5565648526946998.206396582068274786458395468246488801913", "0.0022945055453979742566004395333553200630524525428518539025", "-12770411408815.9541406930749916678604063671114068656466120089976699763004963995450912686342679576306781385154825"); + times_test ("3.271826", "-23890.6474306628013", "-78166.0414204757505261738"); + times_test ("-0.0000000008805699092114903173390188646922", "9284821552.25745813417849639083469216233186", "-8.175934471316238510307959904561765618357930068136953080998844682973153492"); + times_test ("361333176.6552043788873570", "425816532338214481.0652246362221874080822", "1.538616403020706012031174663425818903103785031033415757451967454e+26"); + times_test ("2805.024", "3138666568668923617772609.35105", "8.8040350531139788020189957723196752e+27"); + times_test ("15516261613526.6610074517562", "-0.00000000000000000236624580694534592762621412652683109621677385955", "-0.00003671528898247448920639683215816512848818717755547603887938060370189964171"); + times_test ("-0.000000003258489294057571", "-0.0000000000000000001263694100620034334234551033555508871", "4.117733697834092773082498224393477748428351275212341e-28"); + times_test ("-21061048707054855665564434392186020553808698597863.879494", "181831629693595281071297779845", "-3.82956480945997219565546562178683388176250894166635033461551679226752688144082199843e+78"); + times_test ("-0.0000000000000004150087739116129831368627055614", "-1518028660414097725821098740744462450073.304250189994494", "6.299952131211430047024557585815135401837971947761937657558761468690680184406091789316e+23"); + times_test ("-329353403844205335310.931518048486742714840512646142", "0.000000000004737902605006197777999824176859382087", "-1560444350.041118731605073747643365481135986445785795088564232590700292190358983404458354"); + times_test ("-36414599958286461846528123709871289767333710768520", "-11982666807671338.82516899790506494507", "4.363440182347893057208595495864483712233866372669435753275016489496855915098212851964e+65"); + times_test ("119742066861.890807047", "22054829383.984629241", "2.640890854724681514607753859168565061327e+21"); + times_test ("-484485733573777836334476960525005005848019789", "-14406177805616860655.8627771810687838", "6.9795876221485617831711438674257823866674330443283469578093046623068838325626182e+63"); + times_test ("5988848948477.078723617", "-6.5", "-38927518165101.0117035105"); + times_test ("-1.0", "-63379703.864490098873312332", "63379703.864490098873312332"); + times_test ("-0.506613427677516177791327725446313117452", "-0.000000000000025064675288473359447414244747114622651598944039", "1.2698101061517425226884571964189454600296022874042153446180321519393920461477382268628e-14"); + times_test ("-23042537.21970212804132180", "10390764065108.50823342162627716811120", "-239429567711406187063.05734442567122738046800108051885738416"); + times_test ("9812550833139441428690193893295885866528739.860970333644852", "-6934084675959416258239634601815942.0149731256600469716450344", "-6.80410583641450037528576307977037672169914839765125030421279633360096772675136555394720496053502446210349236989229088e+76"); + times_test ("0.0000347689", "0.000000000085057549281766287602723911010", "2.957357425222803877030347389515589e-15"); + times_test ("17309197932605.95272164347202723030822567422328", "10372291249693770815173154703247665392420536", "1.7953604225558623153970783373103876250250653717733283278048673842023984171292886092127808e+56"); + times_test ("-10.68586744857482180099209534824648355512284245440", "674588.26676653525901087", "-7208560.801031027382439380269948592059745431252505648164243884987079328"); + times_test ("-158425376406388668464703992996848728.8980383980010724", "516624932849644105480296.4740763529887132394681136194056", "-8.184649944763013743333361097416811851476935800617569830052596874617614630479435342869900779234127425056544e+58"); + times_test ("43701371988184830897740842", "7444696727806908941269732116534493096172849746185.16", "3.2534346104111212105848066810541857916878449567515264310528659180255182630472e+74"); + times_test ("18985671206766137596695783", "-4918195942924959263752039745340080571253768938", "-9.3375251102824433332331539143355814981375199246602425748207454160988454e+70"); + times_test ("-8164454926564686613685695436631269148628112649072225137", "3017566861500503598.7", "-2.46367886286161259704778334978048504960179943566519245177920238542851005219e+73"); + times_test ("-167.140200050688164319586013710074703990054053511303270", "-124707.791051624249704808849761672566349962496678", "20843685.14424789642526902036712772659312890967899817539551993752122248668554302671208072486282553706"); + times_test ("0.00013717932814418", "-236889624553106847157555062629.1419261258", "-3.2496359540522243673339058837639891572432570371217844e+25"); + times_test ("0", "-7377966474", "0"); + times_test ("-1165159893843574357027338982426", "-7258741844369034621359206819796872729971572863114", "8.457594876822935516127237999861301735400382433503942145536493041682252149634564e+78"); + times_test ("127327741", "-0.000000000000001314349415125924728376790639", "-1.67353141912655226200255348893816499e-7"); + times_test ("-19", "674693830910632347225468600360472778098653805584.98", "-1.281918278730201459728390340684898278387442230611462e+49"); + times_test ("1115499473064514172110108362485045185533368299248344166641563", "26727699066738.5277545215239", "2.98147342251737349166633853134205297966348378257402631237265170730493167637686598378557e+73"); + times_test ("9531022923010697243825538443.3659", "-10497868918011538716", "-1.000554293003294813441624977396834705527412812041844e+47"); + times_test ("36948.619152016593259861704969912416", "-109424973578674628984651491823525807602358729239", "-4.043101674477927092300739573396847025094408695070482727807518216276085630888331424e+51"); + times_test ("-0.000224994118800115645797961334226721592496197539765940949883662", "231860.641001", "-52.167280606449958627644387092820869098935873225250256147940687697225662"); + times_test ("-81737025015671727638688.506795636777200442300", "5419138.800783060", "-4.42944283723002262118621171335050352165263579845818347438e+29"); + times_test ("-1466856541.9549101", "-24128674849693158122765920.4", "3.539330455197531614891444994295155372575604e+34"); + times_test ("3719432135548", "54707696881", "2.03481565841010488825788e+23"); + times_test ("0.0000000000000000347350240379700980370747179429442891350492370249744117", "0.0005534400198558475169798243101266211771697229801", "1.922375239326751185420171365530525629522813111237423841789162415238003577693927327244648617996830717e-20"); + times_test ("2248441073845808666637746763786280194954645599162114623.5", "-6334923145497633015473724024497.97", "-1.4243701399993365995217919270799399913979461349413953499228708640778427689308423183064295e+85"); + times_test ("-2833.50779749", "0.000000000000000000027787099520949762309607915049358999802", "-7.873496316224179511483613883698024416527436609698e-17"); + times_test ("0.000000000004441882942767312311877169439858885409", "-0.9432493370398481379786084999178021934162", "-4.1898031409738770478382967231410155261701150266906290976528356507851700442258e-12"); + times_test ("-2107306488.021444213082463895093082025238625832167567", "-0.000000016561760020640192077800", "34.9007043445492445900173806825761285679208256730753889935834487955007126"); + times_test ("-129070822817.42205", "336811489052744821.06", "-4.3472536026398913255504341077748373e+28"); + times_test ("0.0055725231631263368659868273181674133608110946135789308", "-152412560828753089910310350.5653132", "-8.4932252556962839520515736693985586025569561774936573592091065011026694067884882312656e+23"); + times_test ("68902.0767970349411722981874624462811895157551795177137623704", "0.00000000000298788286086686468161985148648212755894442142", "2.05871334339993176415426311877635990320333360195205545566288301397039058040718828895421507390094595733968e-7"); + times_test ("88153860095637039945277243438872776.064214155", "106.735", "9.409102257307819458559166578448085753213897833925e+36"); + times_test ("3.7075516820964288985011546648796", "23633186593.70572408884166096265287527701858061993092", "87621260708.792430109916115951342109977008394099657174865349158237730095429102117232"); + times_test ("-35505760506401161908713691885731701346896104.7570686644891", "-5457648514664450630675291184021238402035211", "1.937779610897920137400487822865364585421914753043232864073023463191678738063333894770237751635257001e+86"); + times_test ("-120.55403235772170", "6237.155894", "-751914.2934654306175666998"); + times_test ("-50246944566472610231911381270921126440112308695", "425722751177060307857193841626947340", "-2.13912674790799614679030549405709134417922674778586880217918152980768287325891213e+82"); + times_test ("8119749715097219059818517125264159.064450132566482", "560418609424712067.0940695322762258473926083185", "4.550458844211485491057203230529751310726950775388516102150563306194801442473073934282587480517e+51"); + times_test ("0.00014717424858", "-7244528491321.3877", "-1066208037.026626286030354466"); + times_test ("-42181198581127024501.50753334291048422600", "-0.008682426489650895544", "366235155926002047.202675730675546783334970920687585688944"); + times_test ("-57.3", "-96900776925224476370583151961084756", "5.5524145178153624960344146073701565188e+36"); + times_test ("1083976078583942678025084625.271006", "-0.0000000000000000534905554182086699326584150063088902383604755", "-57982482503.506901999157564033733434733806444040999020955818569250676306523353"); + times_test ("1058587.736740719", "2.2", "2328893.0208295818"); + times_test ("-337676088587247469427246609", "2694990217595978128", "-9.10033755458704844211026116003411819226167952e+44"); + times_test ("-180266997707357275243150935948776784257767.114595713620465125", "0.00000000000000012929550822108208448723385741716775647229370346", "-2.33077130840613978574569769854573934386258812596377482210267408630672963476159438278046789605387340218325e+25"); + times_test ("667863393175854.7645678", "16647944315358092755156.00", "1.11185525798577381655823461635163932295615768e+37"); + times_test ("-2607482796153.37663635999672298", "67905.1", "-177061380021074655.829689213473629198"); + times_test ("0.02649777513989417670980608", "-3.7", "-0.098041768017608453826282496"); + times_test ("41727029296529241379347405093482273986363238008823.7495", "-0.002796170808176706621979157103112461500671267733114714664", "-1.16675901230889282855531874612261889002345278810932959186816789276573413038428661947418401753559128959112668e+47"); + times_test ("-11232695034932926234846674550549966790.9183", "-535612384919640506677833697180021817295233383415483", "6.0163705767354292540256743939915265501958563028272108803751138896375435530577152378000080389e+87"); + times_test ("3.481826810306751", "0.01981896398982153971994255430994006244", "0.06900620017226469113521762438686245737379444049353244"); + times_test ("-500336401148192185730936", "-0.0000000015351207243732", "768076778560892.7643589222652324493152"); + times_test ("0.000000000000000010152819846152021274527085743667507483", "2034271405274844529575.93770552252121", "20653.59109593400315620700194269765880413700716562682807038424236270121443"); + times_test ("-8", "14804.920611063196753", "-118439.364888505574024"); + times_test ("-7644880", "32.933", "-251768833.04"); + times_test ("0.0000000000000400490024778789822215877572796299412810612705023875", "0.00000000000023561893047293924977558189853184387736389392033215150171", "9.436303130345939646688036612188083884147595770701765354726302304762424603125782629215278913888534265332625e-27"); + times_test ("-669622098209324787.5786201166", "-442008.19657257", "2.95978456014644004507422179531566173761662e+23"); + times_test ("3750095561598843110.3554570", "-0.000000000921072821137", "-3454111098.455188785930556597852894609"); + times_test ("509.01003417", "-0.0000000000695541947", "-3.5403783020913832899e-8"); + times_test ("0.0000000000000000635110973210625767420869099697944141102671291", "-302.6", "-1.921845804935353572215549895685978970976683326566e-14"); + times_test ("-10277403.8756777588787330367830", "3.73924958", "-38429778.12561843210264377872295730114"); + times_test ("-566623967.574094904804042946014964033941069", "-0.00000000000001662953909014460365351667", "0.00000942269541818623958668998623752446360099484415277625603154138912023"); + times_test ("0.0000000000000000060428627571787342505274", "18.65854757486578220960", "1.1275104224320402610478848029208041233734304e-16"); + times_test ("6026260424.00", "18673139236042341642133200165212521277908.5537452", "1.125291999700035578262744750920904785263182229257757399648e+50"); + times_test ("1351407130504734.056748656589882", "-16213.40426049972577134801362523633", "-21910910127395164076.55243444398575049081525274237838315413681306"); + times_test ("-1749812757762436212668429.46101826944561361814636104616270309", "-259646", "4.5433188330198551287450703583554958847579349723006019196120650614e+29"); + times_test ("70245313181709005413989461536786.3825442617", "-509184726219286329641748", "-3.57678405606165250356068075267063781878365698344246156333141574516e+55"); + times_test ("-16.20", "-83495.2179048376073493099472538", "1352622.53005836923905882114551156"); + times_test ("17522790821382422258618581410703033443568", "5481690529703238.18676804112985115150792", "9.605451649954285042649291504450317447918361312248424196122189225108309342505856e+55"); + times_test ("3", "-0.0000000000000000000298256458973606523936524717292889013", "-8.94769376920819571809574151878667039e-20"); + times_test ("-57135112812568.466051", "2713703246.301287433494800761485396936819", "-1.55047741117257327421574162146466373193666197915868993431769e+23"); + times_test ("0.000000000000000018433", "224.613695971469169", "4.140304257842091192177e-15"); + times_test ("351655210258904818533038059328", "-317039471793459879795242832647363526701869253095475", "-1.114885821139012575684668438594527497497409491712701452561241865985548506983408e+80"); + times_test ("-1317999447639091934290806166798244489675877673.24510838", "51973652129741187036804.3069426597647651181729", "-6.8501244798785198639385417890806274968448700953804306642353363730416792643087698202422857568078902e+67"); + times_test ("416970579045160473905951389152873165527755895", "900715.23677692450", "3.755717538336730295514426258945023234083011232063852048449275e+50"); + times_test ("337048915259856.8484", "-0.0000000007165482473721426233042063689577689", "-241511.80950813224169860503564044515006631691904953476"); + times_test ("-124735.945324536963828", "43656784749.045127925982651536524807752332", "-5445570315501972.252440976832268388353995138128083224266646896"); + times_test ("-229.309150279271759668506974147516151893493701324327298", "-56277750392608320423429992502109.4808173149501499937169775", "1.2905003122157966621553106534643794501210439187980937861478914275127685562045563793515134308625165671789301795e+34"); + times_test ("-773.26721", "506120106.96085084420866486187778058202", "-391366083034.5187115273789355692667516507815642"); + times_test ("-16179029077993579729752892854", "-0.03205622515938674669127103", "5.1863859898442754973726890489016131925911697266421962e+26"); + times_test ("-379694977175773597575402239067729598591749627164211967089", "427.4134", "-1.622867211576197909699344273675511380147349200949881951741975926e+59"); + times_test ("-0.000000057593691704585518467986423410653803725013114132854316233", "24689.19870977557359290982947617857947691050", "-0.0014219420989240649383441724944840134755882327254494635758934109877771747341652064425031912888381465"); + times_test ("-104", "15074917718070702275412", "-1.567791442679353036642848e+24"); + times_test ("-2", "-971091107444027282033715.48309206", "1.94218221488805456406743096618412e+24"); + times_test ("1.0", "0.00000000000563083386598228603", "5.63083386598228603e-12"); + times_test ("219100199509205287520379236835.595422414343", "249215953689501338499522.46564075955864255", "5.460326517424660882913977937259236613421658567164008732143598687724455221273009465e+52"); + times_test ("-3956981388.58456771827964370777", "-3850656424026801387755000322904.790283281327", "1.523697580370765854419130687951064298276236466076285768791284492428581079e+40"); + times_test ("734.960286303554479116990306863761301115192463389214", "-130000607393220114986132790422441608", "-9.5545283629357036833302332771199553820796316440028291953441171730648555190680692016112e+37"); + times_test ("-0.0000002666120264878701311448", "322570889825538918018562439468.0160867345870", "-8.60012786223824197974573415201224841889283841235410512800651976e+22"); + times_test ("0.0000000004031032595796909999049", "-2712762676362394173603186", "-1093523477307807.4647872649597513148096163370114"); + times_test ("0.0000054604495949732794611395765459328765263001334150", "-298907.681810114352964823611311466161", "-1.632170330074440811222971888249135550087671561067062039655656486575779653557869815"); + times_test ("670489501929686.291032", "627223395167741302962881364608526379428084315920", "4.2054670182466566942266803112300612071880467870075440896463575082944e+62"); + times_test ("53314.110410802505016043147844064319142110836740", "-290216592240562577134439451.5", "-1.547263944176020278887164669780998856796671698801721678198701042353164811e+31"); + times_test ("0.00000000000587199496778346240428737868027766", "-551005.316277", "-0.00000323550044440047912772450593052565891047747182"); + times_test ("-89694219111352199451730456185908593505562.881", "6.32", "-5.6686746478374590053493648309494231095515740792e+41"); + times_test ("12678032520049858276397.8", "-0.0000000000000074933793548296330814995251238051875041756343", "-95001307.14560031424594545397066655517994845175009207951656553412454"); + times_test ("-523228.1027985605", "2361103.2", "-1235395547847.6101519436"); + times_test ("-422058160.089943171946211", "9455722182962.552320564582039151365712747392896268147", "-3.990864706862835827499020129041439986893906907628633530927174587244916641017e+21"); + times_test ("-265.20593471797540408456443", "-1", "265.20593471797540408456443"); + times_test ("-117096397.7", "0.0000000000020", "-0.0002341927954"); + times_test ("-0.00000084780432839108612959331480507149065703369783040", "-0.000010825079810960431632673973072527105", "9.177549518911214340736347681158868989278870466087868848313439029850170283692992e-12"); + times_test ("621.284586089902789096175355124878176656898069", "0.00000000000000000001841815997332304201462126563776625573631078", "1.144291889556362115393585911981542504972877752024640554149220155131163404208000456588382e-17"); + times_test ("62838970696961.93575529768157435967750130012543934643251895", "7799025017418", "4.900827045344027526036434980262455014867740735222443957786401853650711e+26"); + times_test ("-247353051265858.992388279974222435772900701328741022620334222", "13.03830659799478334978416300680018326059", "-3225064920353791.19824546858361898880804876150878659765687851458354866130547449520822131539552091098"); + times_test ("-2139441231754725391266252450690990152166777909", "26220446827901878.81347", "-5.609710505864567774726728960484243595395230887890837315312192763423e+61"); + times_test ("14286913921.940840650", "-1242844090.352406582", "-17756406537257697634.0436449596731583"); + times_test ("2437674767843424972272.34179653188260607311276734", "403927988104479.6110322848268399591134551070", "9.8464506462804905964641906770409128324751565746334602350400894172348609324599790162580538e+35"); + times_test ("-282975256.593232221485634", "0.0412485784400225687488894518785", "-11672327.068171452858593608252189019369153357222063469"); + times_test ("-256178508.2486827293794161556160000481333795995", "0.00000060622407729698677", "-155.301579786376201792071982290374904153826835212494097939398615"); + times_test ("-92215568824012627934.74189852734", "802821222.0162469626002", "-7.4032615652217143799840729492067368601093636437189468e+28"); + times_test ("0.00000000000631216424157187020311390", "-28896.442960029403", "-1.823990939609188046299993634327261580017e-7"); + times_test ("-5868684173183824149727150676541321228.27946209763645", "1767678018.67", "-1.03739440114535694186833871290131127571890503338033620259725215e+46"); + times_test ("-1464504298805396118871695503432730.5230", "2208833322892572033925", "-3.234845896720779321449912432206390896261116508330538992775e+54"); + times_test ("195.36", "-13214599838.47575096481496546334113027", "-2581604224444.6227084862516529183232095472"); + times_test ("-178.8581172026568", "1542628302874005920400457301.7905298303732", "-2.7591159379557450261955452194656628921038300499237551776e+29"); + times_test ("351875781344.0280054729542235343559317", "0.0000178856834451374927", "6293538.83712970189834558679045935052951438284631044859"); + times_test ("-307.61455274208", "0.0000002438400533036931515021270613358401352036899", "-0.000075008748937620515500399556886599434410402744867379000992"); + times_test ("8320.987246030626877296", "0.00000000723034", "0.00006016356692446508273598836064"); + times_test ("0.3178832760474045258804752", "57.66675963865299188481", "18.331298472973254687278485883883193525626461712"); + times_test ("0.000000000000000263835146673878760137331888121481766389116183835336431047", "-2.082954760", "-5.4955667461965393109095371006242790355341756731284907525076043372e-16"); + times_test ("0.000000000233346878395806113798662159173733434871136164480744154169890", "10289471873381.87490244310848109593247868", "2401.0161419951076855155738296198869665643993521903141787021173990086767696510557356775276055229452"); + times_test ("-0.0000000000301270068082410889159", "-18488503331.384508718698847", "0.5570032657388091474587525501237955790818099673"); + times_test ("-538244397964164173070105649994388625", "-2280.52363653", "1.22747907178713620859177763155650252117906647125e+39"); + times_test ("11816719921.6984115", "24346834400764849090360336454820099097991.85306443422359", "2.87699723093810199016709496254407379606350048843381923576632239138827285e+50"); + times_test ("-0.00000000000000000614056701921479118164625780", "-0.0000000000000000004526129846", "2.77930036570313218519067348427902988e-36"); + times_test ("0.0000000000000000000211718849571685401", "-21818432978682095763187832118707.42059881629", "-461937352970.349445849940275487640330004420702796016087398229"); + times_test ("354307691910025309530301150.530797676735046789927", "-0.0000000267343273366", "-9472177813397840300.1738065546659359293415312312254736184282"); + times_test ("-0.00000000000000000001564140879", "0.0000000000000000012127764653067414424836974110", "-1.896953246475399564472178411611564269e-38"); + times_test ("-2192995405.921", "-1492963957482", "3.274063099963661175050922e+21"); + times_test ("-69077326289723825817911969975.2", "-160.497210320954020046818", "1.10867181659309712810734480548942940388027429142989136e+31"); + times_test ("-34636483655.3", "-57826095450336990.7625812016394354487909856618", "2.00289260991541487342513087342333948596839502091235357754e+27"); + times_test ("0.00000000000000000918981946289", "1.09999674198752514", "1.01087714686325481931551720546e-17"); + times_test ("213150740", "-13337847744665673.1379595", "-2.84297211678281928195418951503e+24"); + times_test ("-7062099495908.198413696", "-1.058736021405", "7476899123064.10206563783530116288"); + times_test ("0.000095694936784775916676475094824420202134897751844986130", "-336195659475425245294044969885823799340891152365601.95879727", "-3.21722223808168692686768515627014434144106705991738803812388959163318091496999877734952100401367322242946318651e+46"); + times_test ("26868896167028748101420733486377", "480507267329881259405862882", "1.2910699873389304567069920812073966334143151295977876958514e+58"); + times_test ("-17.084476787578052926829789715003022556", "-42587983371473135737559540519744259126585114576504024.779", "7.27593413339692893938094555667816327719803206600514992485982114723845688369293247684119915124e+53"); + times_test ("-76372412484569384.3511", "9012097234036431278745.3269231299", "-6.8827560730887716103930962801811543430595527769250789e+38"); + times_test ("60654377820540327528", "-0.000000000000015117053045659", "-916915.446964550856786185798600952"); + times_test ("-1331839674", "0.00000000618492062771114573665144", "-8.23732267252668770406834370123056"); + times_test ("57436192370710.8629215108579", "105737032624.1773726358981981702798798174015047365867", "6.07313254651038202363973449861725599835500772846363988048609447329832343472993e+24"); + times_test ("-965563477.0996002946011879837917175", "-4271362438679787505570708994903.70810816", "4.1242715682442838707409662264403439596770359705507151544781327654021648e+39"); + times_test ("-0.0000000316616", "-2.4", "7.598784e-8"); + times_test ("-2.385", "27.5499221426824606177", "-65.7065643102976685732145"); + times_test ("-2266803.57818655", "-765116.77815066069", "1734369450442.4824101199545717195"); + times_test ("-32731559035569126148642.446165008", "53704467616503577993.2664889330721452187634866311652474", "-1.7578309522633972201948025668355694620574985124468833198585070981942000057664555429792e+42"); + times_test ("0.000000000000000022575861041290712552639790861752973874588224619267844", "31.3944076810173444579596934007549380765", "7.08755785280277370389292313902506994649964414578494551292873810891605957242649610987662066e-16"); + times_test ("-11.858586370905899290715", "-991047772227373783020319210519807971818.824767583950836915", "1.1752425604652188758145553608664648912870842306418133290829487635928729138744225e+40"); + times_test ("-2011971696758986575760307857385008882209510.6", "-5525155372891673776761633609.52070459365483366973020593", "1.1116456230453892069924547730202138929609342602851169377795116783945568725725156231784447542517858e+70"); + times_test ("101703650999596029193296586451725488", "25620023337044890752720058833900.03506", "2.60564991207231919895254185864449131548456396842795048651050944069560928e+66"); + times_test ("0.89310", "-4483944764830427741251990095", "-4.0046110694700550157121523538445e+27"); + times_test ("83.0660898", "380025540261.5474990692628313817425000", "31567235653659.2200446528027713580805854765"); + times_test ("12249047873.6982", "-142475289409910528840622723.707048987614004620751135579865", "-1.745186640801000235481534461055817862532388247975966963088442739006743e+36"); + times_test ("-0.000498899320558508419779744140203069146893", "-0.000059386343271843835168818993", "2.9627806308777237249170821580126645410922765507304403542845338749e-8"); + times_test ("-2297433.28538549", "-285796548778125338857408803711103260149820899037579434872", "6.5659850401116294498139439137406267368280581599271391787641901086880728e+62"); + times_test ("34167188438641414252422741077347811417020.59175671639136", "-1876839.0519778124207491962458916326915672158166", "-6.4126313557927024892196883907714297942957465376354294400472573526515361182444034644427066219867584576e+46"); + times_test ("12880636073104135025.684594372389347", "0.00000000000002717486381885835955193357797034462478107970045332718", "350029.53118687937886399193088901600225479341922014167752066254086091217423503253755146"); + times_test ("1602471.60609897", "4948980398.148665647375032297236242244605323466522685367809", "7930600567173612.25671087112877473741757520842649668372026733910210605673"); + times_test ("370646280676040583641049478094.841", "1176.901804728", "4.36214276643352994796521564113760876046208248e+32"); + times_test ("5547404728207", "-411636889958330609055.5065082479", "-2.2835164296592677798830108543636613032785153e+33"); + times_test ("-0.0000000000000000717041779275895653254585995816746449", "0.00321217261726873009981380480107282271306898444464862589", "-2.30326196882768081444918769519152717431393087666881910579487955526028795479141279838696461e-19"); + times_test ("0", "-399327.602", "0"); + times_test ("157.8", "584.2802770", "92199.4277106"); + times_test ("-10542363099197242246550684296314627705", "-4850153229755188101.33556814417023579013954", "5.11320764348234189624759367689059634200461502178300975633252267426243050999557e+55"); + times_test ("-2562650836927093177981.565429254128045484667799300595712", "-0.000000000000000000317395222174952988716141595565429848789500451120", "813.37313174330395999646102020198262859585476827525658527707087140151929076326008633676971110873759744"); + times_test ("-0.0021383531474526630012273967098296654028460337299367", "-1407391260514289948513", "3009499531618102701.7588489539730050863932112182078160238774067897491271"); + times_test ("85399454218074127051769295076.287333823347313330158", "-0.4092038950326248225015994759", "-3.49457892996962542239070012424224836131258038173055372705839875319563364641922e+28"); + times_test ("33.127135132152", "204.48590", "6774.0320419197206568"); + times_test ("-20073920159741041234.22437514622641538676580", "71857.713649597096", "-1.4424660066635461364336974246302806972842556483481805121168e+24"); + times_test ("-0.000007522084816187962395438426656921829236", "256085.25", "-1.926294970674698397026448350044490870358369"); + times_test ("5220.8153048375064912183804758", "-0.0000848053870645192181", "-0.44275326271911063141541592413054755924692197198"); + times_test ("218437.2", "-0.00000000000001820193740822812", "-3.975980242028607494064e-9"); + times_test ("0.157577570127431677", "101.0319296822", "15.9203659846066164839488230494"); + times_test ("-14.33490", "290.67243363958433117", "-4166.760268980077428888833"); + times_test ("0.00000778430585574695128213792486514057213166437662675439", "-0.0000000000000658092384657839808153501892941795", "-5.12279240351449754074675940343526036050666862079292855468757563270534826950003073005e-19"); + times_test ("45215297824632433459231894077144.81", "77667936.103345159", "3.51177886233727320835487431074370227708584865547479e+39"); + times_test ("14342668379445830286426805277231689892104589", "-0.00000000153230966", "-2.197740930800139119461236060924109647979621945502974e+34"); + times_test ("1087327540724260701412332282353.246979912226498912687", "-31181.1155292590461395304941342272532923707", "-3.39040856654682932656823122420611037707430356255272533055260947181604908300590629044625370709e+34"); + times_test ("29098578027968222529887", "-0.0038633633262596785860098746949622820633214200572090", "-112418379199558110812.573170785518748243461139468530838004471322252305383"); + times_test ("45167443.85086931970589523202133", "-0.13322343827726157227081356406399769062787658346986566850596", "-6017362.1680079665574862292748307786959075342072628967876653391403467312455019622919521268"); + times_test ("-1277104346263109522212350488222850419104.598041084894694", "-0.000000000000872545304590848146374055", "1.11433140080444089775987766493651597528395567239169697675262925481314760876417e+27"); + times_test ("347.048067026229351381168979388696389522228278049448558", "-580372453576496014579764354612", "-2.01417138168992971509920131695177453316685553118682774156732799236522441451364049496e+32"); + times_test ("85.9498795419121819013954981", "0.086819059343222766234152013147244", "7.4620876924921221071832372576722493425329853011417540222364"); + times_test ("0.000000000955538852", "2796816770377393398221585073517643123820923752.2574913", "2.6724670860207620944890322427693843122815393358116556452019876e+36"); + times_test ("13.3499409389365943266698006822510800901", "-142605023.688711727210398330", "-1903768643.839955511708245141067882976861272713746574494353289533"); + times_test ("0.000000000000000000780", "-722296330274145516124092200004225017552775396318.66", "-5.633911376138335025767919160032955136911648091285548e+29"); + times_test ("0.00000000032533771679445565923566197211480872204653266", "-33902055423889399559039392315", "-11029617306247268880.3792855595203258365194772546962226666267013992005079"); + times_test ("0.0000000000000000477109133480553184558657389005693925237508746393136844750692", "9544079599812049753877281093753.806913927594670", "455356754773575.186639624987152382218896113143126632346387917730524427522867133635682709085290515537801164"); + times_test ("-0.000000000005212381313104274295521085956757682135609555632962511189216", "-0.20258211424784772185707", "1.05593522667463662312577979622174586506157166623770153687938400565136484167735712e-12"); + times_test ("5.939336816620258503935", "-181.5", "-1077.9896322165769184642025"); + times_test ("0.00000000000000028", "0.0000000807854522591970390113967313771890503193275103759", "2.2619926632575170923191084785612934089411702905252e-23"); + times_test ("-1420735136825498697880142035376838692614.60263288147781831", "4794758649393115914238372958725703", "-6.81208208579077187760278480672518379981721734276502252436200522274670249079192835816102193e+72"); + times_test ("-14302450490637670545279313.292191928068", "-0.00000000000000758231718292500972333975206250950391475327599176587054817182", "108445716113.09624528335189894213613395592525495466249866985446295108569636686802306848015834464376"); + times_test ("-0.000000000008450771622", "-69748785787966613339823993495254469.001291622669751588", "5.89431059605905165095631246704409058304793926203868597659835736e+23"); + times_test ("-1179004888.823228", "49931113655424934777966552716734550837488773547523258643790", "-5.886902710413423665263191856093556409577570847449923030469713801232995412e+67"); + times_test ("-739484608100691619531927074065663059218837785449156", "27.88287", "-2.061895319467253133749818345565325454400115552276670835772e+52"); + times_test ("366.123540796397283114420", "0.000183575228961067940921266500079", "0.06721121282973553030230705091816031104204619829603918"); + times_test ("612.24659918919924258642657076118376830990940740", "412296990330.330273291603849583", "252427430185686.8746606867196534961374184185494504035865409741651638262671142"); + times_test ("-1253.044774927718837481270804718997", "0", "0"); + times_test ("89.955", "3.072147874", "276.35506200567"); + times_test ("137440172231079014714878951462.97980416140395", "238.92817663651290090629461162158684942088308705117640", "3.283832974778000222556804923252233207004641698923980593985160071015425606241073037967932310678e+31"); + times_test ("0.00000000000013007478162945817837283572658276879385007", "-9605773255988262156131.54662615327683681096194", "-1249468858.6547626741062732720588036874502171676524751175204550553355667396106328363358"); + times_test ("-959.0561817087475466288631232777115", "6.5232691288079290675200146125939736359903603475043077091979", "-6256.18158293308052505705738568867991673577610410424533837553637598105441295850976942461260585"); + times_test ("1232651308.483980691765841289013994011162", "0", "0"); + times_test ("0.244059666606121846715993202008963667291853198185038924811401", "-91.8912", "-22.4269356360364638409486745244460821438491406050610488476294115712"); + times_test ("0.000000000000009298467342175115268976111043399158", "298.30", "2.7737328081708368847355739242459688314e-12"); + times_test ("222487581688568714558163241.2498688", "622765319764779384998.16290716", "1.38557549953973970068746587697772147617465686740636673376580608e+47"); + times_test ("-0.0000000000000001094619824042797469992", "819334825", "-8.968601419736362575863380714e-8"); + times_test ("-0.000000000003213357903869884", "502881.861925654510", "-0.00000161593940573160560373542857777684"); + times_test ("-0.0000000000000225850887358266958", "-9657.24", "2.18109622343174999747592e-10"); + times_test ("0.0040522596025230943461061874749446981", "-0.0000000000000035111456723673138306010083", "-1.422807376670785399057088730766337512497448065110252859909423e-17"); + times_test ("50.4", "-0.000000000000000012807615227380978390330730165878274412863", "-6.455038074600013108726688003602650304082952e-16"); + times_test ("34509655900.4271549037478532640245880287700031396795737736", "64.71924", "2233438702537.161140732834214879190678535092737997675858151324064"); + times_test ("-0.00000110516283770184738962025591", "-12341997806576.504800", "13639917.318826066245556761603362081169343368"); + times_test ("1443495892579134888970475033389", "-263878898.64", "-3.8090810632514586354552763528830654669096e+38"); + times_test ("-0.00000000000000000069532890943744308434473313878", "-57497447967704543918096254112146", "39979637790820.12873785593753087723013293250902050457270162188"); + times_test ("-0.0000000000000000007659553263900774084490506", "-46179282173901700884047955896435818818778979617487", "3.53712671499703607070284553536887181481970539221145787819001524983163078422e+31"); + times_test ("-1", "-80.5351111304083830696255443", "80.5351111304083830696255443"); + times_test ("0.00000444632", "7", "0.00003112424"); + times_test ("1748652238406104265.08687786280471813580897620802429129", "0.000000000000000000175013", "0.30603687420016752574564975540304213510233635309495529153677"); + times_test ("605.35473313", "-8105969267.633939755450293", "-4906986862768.52514719110958199530709"); + times_test ("3531.27893", "303826595361824791936490465665622559869413", "1.07289645457484761411696267955090137099952167836809e+45"); + times_test ("0.0000000000000000000139500802384964877256638688566332365116099", "-669823.809722799400662636451451747822858695293904", "-9.3440958912884554771068695881482229864014701239462146074951636707559395049094067886960496e-15"); + times_test ("-14328.20453041484587995049563830419841249274151406721890138", "0.0000000001737045483", "-0.000002488874295905724415190916871212750963235628741729704355101435146654"); + times_test ("435835890288235470264209317728368193", "2502287905711035099019387753673794537858483", "1.090586877143053196441416655157728683500541851046587666747641275079364352431219e+78"); + times_test ("1481352883141719129158247138.8038050", "-606388568.443511765388700681359582935123762319163277946633", "-8.98275454167975836154301999007742562427000217610359536587169076287724303365227616247338565e+35"); + times_test ("-2254195545465844946364682.85626170910", "-68792607248889229037631606.018565330920642673825", "1.550719888214274947292592996004771619292172071432516539437011341424210097883343075e+50"); + times_test ("-26784210511779136785823800676221849936631.56183", "-0.00000000000005019147414519109521634075017431467167600186829521963593473", "1.3443390094013180964383583232553726446281441447994273009124279348757959259512742782394910442001518393559e+27"); + times_test ("-8770530121852166665068897500281", "11987190432239629.9682", "-1.051340147623357682201798135592086804701933955210642e+47"); + times_test ("-392092775092295510505846799423331218731967579086912", "-0.000000001347740911042761337967635461776381177269782335301", "5.28439473916174872080749764195178381030762509320641795527675022371094325058097973324110528604680512e+41"); + times_test ("4015679.55", "4.713361052", "18927347.5882828866"); + times_test ("-908765.598832994503098008148905108990", "-393227867096205311879272472100531195041.383622646628607", "3.5735195811950419553683668422021541455075148867700124530307768773407398811212098138687693e+44"); + times_test ("-2369253560877872972694", "-11.60552475086080768", "2.749643084183325817302731177345942548992e+22"); + times_test ("174098.34305585608863845094930842", "1.38", "240255.7134170814023210623100456196"); + times_test ("116951064421932980", "4525883193151806788", "5.2930685688844070019747986244506824e+35"); + times_test ("600225026818135855", "-127962986020756918725", "-7.6806586716037565057838021298243384875e+37"); + times_test ("-355276.30", "457734732040.627839182124360081830", "-162622301980885708.381620168789740259629"); + times_test ("-0.000000000023259793972698088534519974595546178", "-2551236.5", "0.000059341235365627366949498869167230146749097"); + times_test ("-138631", "2.3", "-318851.3"); + times_test ("795255541856527997999067123124137485004290563483625370482792", "-64991504618917159513144692611330263343972554177.85101068", "-5.168485422178800786099741762775612989901343114104453511664262171013611241941946296162984705040765106162199674821856e+106"); + times_test ("96045012606945538626605174.6240481976236369294325652245732", "-0.000000000000000000038130457744062248428043049303932284765937539238468630", "-3662240.294737062792567245617774026857299030801472930205579945585215779769210281070679229934569639844413338716"); + times_test ("421989371626234493675627719459467707.14836401276576921755856", "3", "1.26596811487870348102688315837840312144509203829730765267568e+36"); + times_test ("0.00003674095297032643311401261648", "-25144265134553986531", "-923824262782066.66182891576601261318521398863088"); + times_test ("-383466.04881547", "53724954971092", "-20601696205553692514.69239324"); + times_test ("-0.000000000000000014783370871610989705993827634590792", "-5.75544555955339866871", "8.508488623824452763835260497721954711915248063842451832e-17"); + times_test ("0.000000221838708829447458147931597976839", "29539052824125603227.9202610", "6552905338548.867330870922184373002548907167329945216834979"); + times_test ("1417021083070041108879006664525950600252.582747034547", "20386.077908379675293435494662791207239424304698951", "2.8887502197282405761889040724952549395790613139212743588512735905545957366555623236526443052831660197e+43"); + times_test ("442.735", "0.00000000000000878277865798641273232492264611347738525943901036", "3.8884435091436144410458746277270504101628377302517346e-12"); + times_test ("0.00000000000892", "16797743856811194", "149835.87520275585048"); + times_test ("-28.32380770960", "3481300309.0", "-98603680531.4870622664"); + times_test ("-0.0000000000002514438408283789730670345516227699", "0.001175682622527705754776427124", "-2.956181542035476048733420921784296951833346097731013663707676e-16"); + times_test ("-0.0000000000000125727922878", "-13.313", "1.673815837274814e-13"); + times_test ("-0.00000000000000311161", "995915309552512177", "-3098.90003635669241507497"); + times_test ("0.0000132726799331352407876197984124", "-0.00000000000000000145179351917753148242751859389117949850796347504360670810576", "-1.9269190709043414470286356436843451767202221286209940752290325354825996720087060259295424e-23"); + times_test ("-1305365.7803110685680577657011785720", "-1.13", "1475063.33175150748190527524233178636"); + times_test ("8499682132744325149884.2", "12753066384420249097484638996.8248053537637250207", "1.0839701048535906248094606671098895649828222408103379536302544124760294e+50"); + times_test ("-27597428686882882379490857905609.4308", "0.001777076303502550583927", "-4.90427365570610811144061901744727200974205360973380987516e+28"); + times_test ("3851.5801", "2.4681503", "9506.27857928903"); + times_test ("-254136480693014397618955753399722664599889.09", "-23582875375875972784153503.3854654728889123761140614", "5.993268952647068812676163151455910299034928531722912670375198720068520525866107064371629450126e+66"); + times_test ("-36756.5", "278541826958821478.87226349825573265453570107573513272911903", "-1.0238222662611921688168353273636837316441496590258406157863626195e+22"); + times_test ("434677757893257627333239169971.36582235872933", "-0.000000000000068725189442692668129", "-29873311257739028.68226613696221684789246137143439950127182852357"); + times_test ("13480614688014170819.34130485033", "-74790845792983147611.766920195511401471625734274890", "-1.0082265743258914745957730201044196850059871310317319787175533254133776825272137e+39"); + times_test ("43288920440971609207698898895824622861", "-8750.436", "-3.78796927827813844188979922058384029569317396e+41"); + times_test ("-0.00000000000016299662731892671518950597", "0.00000000189502990635948720606833476337904040553896306692718740072", "-3.088834834050979272599008422371925718929124189963816260765249621332298025452222984e-22"); + times_test ("0.00000000000000014", "2825.871550945769438271943129439745088808390801", "3.9562201713240772135807203812156431243317471214e-13"); + times_test ("-0.00000000000508", "0.000000000000002145872435", "-1.09010319698e-26"); + times_test ("6668343.896256", "-30256115.746220409", "-201758184760723.915056805888704"); + times_test ("1910671461073245653125406909", "-41009469551.2913732728", "-7.83556231054046679894479520055900512189070617752e+37"); + times_test ("8289.8635", "-66806493292579558025822119188753113864024114483099524877158", "-5.53816710309150098924394843355494049132717469773268118146494087933e+62"); + times_test ("-0.0000000000000005326", "2424634.43200073035390412054", "-1.291360298483588986489334599604e-9"); + times_test ("424284.1840077187212673385", "970.3396784215570868735428784067", "411699778.66940253812593312501264900866190088462962956795"); + times_test ("-35760922777.0406357", "-7761344319.06347958972953830", "277552834840052130228.57982929972823169949731"); + times_test ("-0.0000561650355483525921131526685343539", "-111333300972076302345", "6253038806812103.7204293271893852389242141697156298955"); + times_test ("13512458606466223813008490671514544370375", "764.975563481753223231576796031842139048653", "1.0336700636505365489288540708376614928455337024474216176633151377504345359376854875e+43"); + times_test ("0", "-1183974879.82128974148434577518", "0"); + times_test ("11143820497441188022611097072500689220.103841042188", "14333893036294350850719062076858.50886743820472767247", "1.5973433102598649386055415009433149402160776376532075449909743742363111723311690413638261800831616436e+68"); + times_test ("-23955066895875385312189828216196343.2", "-0.000006008550114741720774296140761236324588", "1.439352199458576433136766578653842412823876234519218069316485509338466016e+29"); + times_test ("-2668354.95894041993791850076178801129928639334916993835", "2120902450621765046861513300898", "-5.6593205715454758964489377686065817529188126202588690397558408061055411762596596383e+36"); + times_test ("-357473707639070742000106223385951624969553570180519146672", "-2880014494.9", "1.0295294595461685945268041406912380369425230533019395520223390959728e+66"); + times_test ("0.1576", "-17946110296096494652", "-2828306982664807557.1552"); + times_test ("-0.0000018223152394757689929568141403865013237549366458944677798", "-5052597332068.33289300934043046685446478", "9207425.117162735564750314224408158434255360168962984445546645230422805472786347453701483895444"); + times_test ("-0.0000000000018113502438791982724283161334170828780578698749690297210", "467569918734591161565.975984", "-846932886.330478617799083574720382758183324318393500300146312171222449646868220464"); + times_test ("-43456291089.3917040495022986696", "0.00000000000000000160606215298685200471957781912132661", "-6.9793504427851792555934505781676792541584728405006755687190078056e-8"); + times_test ("-850368", "-16365313992958404661804115212963911454627853490846168779", "1.3916539329564052655449041845417695455848978517303874852260672e+61"); + times_test ("-573001586626626136559291430.708491137026124496587", "0.00000000000000659091710510594985802988231762972361602034", "-3776605958550.27888864268809093797447339962539247097589384819969254713146626305667085257958"); + times_test ("944831849965628473424387135285.11628879031122854553239231", "-9167656497046734408050.66645416827001933707275561667810469", "-8.6618938479540792582928343057162520481532362870957700270661322678213334143541246056098522215623568551067323309339e+51"); + times_test ("-0.00000026160509100", "24622004042950607868289417294478649240.52229821030", "-6.4412416082584616798891690256590608321239167108346686373e+30"); + times_test ("-0.000004846613578004694945875951019296774584875442", "1", "-0.000004846613578004694945875951019296774584875442"); + times_test ("0.01331120519980531178226823546536111232129742873981595748", "-566030091005684186432778.7962173603", "-7.534542690641137182401329425400191730488017551596028318788787538488664119896612542640044e+21"); + times_test ("29160798123715526401", "81.21430510259265355460162080077758", "2.36827395585454415364839027902703656652482945981888958e+21"); + times_test ("-0.000000000000000016948492474809672735628387832748072035504038167841614", "1562956864069228066615011300882107599329713429.314843972", "-2.6489762649129436461814187882951473845942013738702479876336587925692515948461245980490938479637262418650808e+28"); + times_test ("12.90597368208644830150566402904732366667482473", "604431199603296.47474454963005587100955", "7800773154712085.1940792711683581731610862958146209226570359806010190800492344061715"); + times_test ("-0.0000000207428179", "-197640319459879.188", "4099617.1562541003526838652"); + times_test ("-1", "60210209731827764276966194255", "-6.0210209731827764276966194255e+28"); + times_test ("4583913614531584761660.71", "-0.00004564661231066039596029736975879852374375394905", "-209240127628081229.8988189542842449222791835905813694075712860987268255"); + times_test ("-79843798348570415955954652124494715927", "56861144183144013650375039269786414203977063811583167481", "-4.540009730027938310459807409573958130149645615816392783432439536138537446203669899681959169887e+93"); + times_test ("-0.00000000000000000011314", "-3.526", "3.9893164e-19"); + times_test ("132407155319180608772091166836747467896048163329803.57610", "-723665204004.7159777491682569458925", "-9.581845106573894955821546492296266642173629363834000697071816757006018496183651070616925e+61"); + times_test ("-322521422170779513210597092315316261621", "41262058870589483714064.04798992976852435145735153", "-1.330789790863694859369204982948722773695665386328207265159910537452461498636765724463013e+61"); + times_test ("45.38814", "269533555865235093537499029287212271314833820844669369384370", "1.22336267683091115583931011911520907801556615372327715913294993718e+61"); + times_test ("1001606998247.1329297768570186489508291933755", "5.20052838227", "5208885622264.472940958083743279523476777800178015652385"); + times_test ("-208725364670066089848651768887053413406981733447545233.37431", "46428363895460548499939303066133160314818660457470.1898", "-9.690777185114533186791052743948505833183422796131294760780293146823565795246823794373752025269078880430890144038e+102"); + times_test ("-0.0000000000030479119204492183257505452809182072468706814247166", "0.1831953518167469517279635239571573090896007407998", "-5.5836329657315139902372580139052711078742199613978215448274609146206088053118483963543265377233668e-13"); + times_test ("28.71", "0.0000000000061362523", "1.76171803533e-10"); + times_test ("-76698670010634912042.111088324461002234771829964608794", "-204.3415360766065", "1.5672724045005890926079579860206010656480530112197034797251387577561e+22"); + times_test ("-1524.1774171342348399240363", "-287256761224.40001067164619002", "437830268377351.631000336578138459542103286567115177726"); + times_test ("-46386057531584301786849973746261104490857090", "-4.80529036", "2.228984750949274409036809536091615714528682827146524e+44"); + times_test ("-1333480998557541026668203845446224930066438742734237449871", "0.000000363031301806973352170691602189509034079482081910252260722435", "-4.84095342841206873734133792646560873902386616947445713637359576061752353209536356871478780155826152779923290557555885e+50"); + times_test ("0.0000000000000011328263767573913302830489935960640008976331311323634607", "86336988667731117573.758284472483734537177637", "97804.8180526097967631959070730320562045880918766169966194605514255032840380206192312923918439683659"); + times_test ("0.00000000023383059155254587815392387016693739292933749", "-739769226366265.5531389494840049176644417", "-172980.675813593093567219554957028220425661619804809222561967458157553863975311729333"); + times_test ("-6750356340240.984376193207629621761115", "6785896266076286.1666119258989601680226719364211", "-4.58072178839256802270353210343421354282744424281215396734873712247233250402922455265e+28"); + times_test ("0.038352390", "4364267397803.554078375378060505", "167380085304.84704939994306577393135695"); + times_test ("-3677.765452", "-153097604617851523106898348175.2705689839321002774", "5.630570810474899941481304477948773393614882215140213363848e+32"); + times_test ("3564276717.02076515", "-3724708.5652442", "-13275892016787721.61135498059963"); + times_test ("163961034566390719", "13906850976432268007907879396507766911641292643", "2.280181673656455617109020414398350949017013169011794072158180317e+63"); + times_test ("-0.000000000000000000097053790888310241217758521607840846169737665", "-174167724848769605456951958316132823954.290613019997555", "16903637946965240719.160592454311893126986143375067836000624105979381554916207439134564513291409075"); + times_test ("18174121469196263476021234179885", "598847655451717090028982590433609440", "1.08835300317228983812760587141239606682288560521096139829987941144e+67"); + times_test ("2862482160141173353.377689153266444043", "-2.5521116576031457307341661427802694156525", "-7305374090577323175.0048432033414644577500405016939717138581879110681995830575"); + times_test ("-0.00000000000000828251723257466281232072431185606927126573858797644180340", "59246603229200010807575028.948615845949794986267082749", "-490711012217.3627547204685981714157886628710287556950766147835640216213833020293343764393555822441764905895466"); + times_test ("-0.0219725", "-42388.442458578279694893", "931.3800519211112505960364425"); + times_test ("295211627171624947864455852710547075994077285904641205668", "-32114221914552039416309", "-9.480491706745564194049269607588763971795849392568309012222499652763032742439412e+78"); + times_test ("18076895076744235516275796550556474017044744513472", "1110616783295453.907507694897679", "2.0076503062103110248911265925095057715921072859968017387492670202835863677031488e+64"); + times_test ("-30509248597412319207476984175234018573.80700", "56489216853846845634764972404741.4102289", "-1.7234435600671472183595024375663260504322309432173684665884657236439010994144223e+69"); + times_test ("0", "-37.8349097", "0"); + times_test ("-2851475309", "21590640", "-61565176865507760"); + times_test ("-82809184867575581.300036713702885747495702565", "1983849666549698977150.0321478", "-1.64280973786792195412167897641267648031706071732558941631564732096919107e+38"); + times_test ("-0.000000000000015392923450383", "-100527447118222995497036068167.83978088878", "1547411298153231.68196185030647190431319404613997140274"); + times_test ("-90815267.41287893625890527712", "-1377.468328268", "125095154584.42972566162438210224966962816"); + times_test ("-61531326072626014632609689592827828109737644", "6514.9664391", "-4.008745243164772945370376441467418441994843425659034804e+47"); + times_test ("-0.000000000000000127087490497875", "0.000000000001476615944219678865852759023586345893215179308071704", "-1.87659414780029158895646469218881896708577129747276999389159629e-28"); + times_test ("-500.0464508771550", "3031251990944702206548861174233303005657140.843654", "-1.51576679978620832480902504570356096303779609394637710501532437e+45"); + times_test ("-155.3658", "-1.487280412", "231.0725110347096"); + times_test ("-7246163852901276.04365667671658743999435118996620258393", "5112736623675367552557768126133416.065405138439108", "-3.704772731188096277860254002053708999588540456247342592474290019026821786006110036086254157751656433444e+49"); + times_test ("0.000000000000006689933708640329486606383032", "729332114805.1424421852307098335222592037429719271268", "0.0048791834996288611343551405747438154907187127049172382481758395023666868320324576"); + times_test ("-1.8", "216561.426678096257755924379012116313", "-389810.5680205732639606638822218093634"); + times_test ("-8058045.0444", "1329279770290237732458883752.79771", "-1.0711396265608420509738201250987261701168324e+34"); + times_test ("-0.122934172485398496827140448263042340165490502305", "912702090990315108628442662833971663.8", "-1.12202276281587270916014575371637467822687977597732727219667936221931017460398585059e+35"); + times_test ("0.00000000000000175417191262247437274343236218710277615977753", "159777383.0958810142116283", "2.80276997699115404345306815091460487951017642480659328034789667052099e-7"); + times_test ("1.832596787409", "0.04233218045723559484149346857663058272000354", "0.07757781790994800381556406308518949782645811636510742786"); + times_test ("7764032078986972842.005528691471157135", "3814413634570635467562869035571042157068430937090750616", "2.961522982133170619249946192718193418202399599536127455799771152758136779037896695123404516e+73"); + times_test ("-17135339502484788763", "-115136630978196546781", "1.972905260983705133684367626946832621903e+39"); + times_test ("2732768992944344069188.78233921094751884724609431", "547802187776316166043551795761072525805362767.4739838", "1.497016833022191997667345517507111060165004561416898656598340429974721721725596504177233879086212178e+66"); + times_test ("0.00000000000137207147854597410975017122036947235", "-31922289389067969062352250596.5480447", "-43799662800630948.884223648169873969145520154519727429336909041963214045"); + times_test ("794.15", "17485441159196003764239999", "1.388606309657550638937119520585e+28"); + times_test ("1.7375578177138444239721", "5", "8.6877890885692221198605"); + times_test ("67346906173389358", "-466873.6162827458603696333231123965906193638807697765", "-3.1442493630625071474606471872766565213027787746877671241569093138487e+22"); + times_test ("0.00000000000000008330954900095391223717198750270140816415917", "-1255116.84123905597608550718171171454784329986782439", "-1.045632179871276258673769748937031166781342825771332297107555550761723897353461461042815681563e-10"); + times_test ("-149004811516278801454193569023908186952042538093822927716", "-397664736597845838069915", "5.925395912343267570007772381296883214350181601356111567003076787081507599926414e+79"); + times_test ("1000073564757252670366408149537245435047377806404.1015", "143493737303.17", "1.43504293385121986151561356719338126856345712035100585929836951755e+59"); + times_test ("-120791171186.75073588795", "-3356641846898638185.78959337380788876290302345", "4.054526999413445597874488228850145076904199735090551400294754224275e+29"); + times_test ("-0.000000000000000021645765186475073728477012180542023658755317897440133896819", "-2892.41876465002535699255875339650679491474379", "6.260861740056875851324591106893702672467555630128663303516124593419559504118801178122464786716968100401e-14"); + times_test ("303590.733684425609632655982112479958446", "-1079042632393906270486", "-3.27587344445239960885966209642701728797406978059884116224756e+26"); + times_test ("5560006241690.3561204958103356609", "-26134.5", "-145307983123456612.03109775521732979105"); + times_test ("-21241252966066639793327", "-9918174602168819276153472753.0892247103917800902408030", "2.10674455686285247587982556750283161206049081499338374032384978521582521581e+50"); + times_test ("0.00000000000000000011710898531900697150827118078795784040", "1416082645912.362", "1.658360017906513490504921316067138338281826491830248e-7"); + times_test ("171974954737627841.3571", "12776560683821406610094.4", "2.19724844530274182316145798323728537865511024e+39"); + times_test ("-0.00000000000000068754763933835169744516274824757850275393656608356918004", "-6.09469365736868", "4.1903922366142608309254800108912871683678914634852117466941692915771472e-15"); + times_test ("0.000000000000000001400696", "8637225390591.816150963722258184", "0.000012098127055700394515390281912149296064"); + times_test ("-360824784680774106563254315862091.5", "19099425092005944.36343728914640", "-6.8915459463496190545354254880571561783649870472046644721536956e+48"); + times_test ("-61.150780875663855271841725817415551", "-0.0000023333939193095575001578508180794664583584954721238120", "0.000142688860256305217839982589618557627868898235253332040049384167607214599532790926200412"); + times_test ("-29783331896.867208404770028328881856", "0.00000000160", "-47.6533310349875334476320453262109696"); + + times_test ("-838472500998941781878534497598346150189438395681961909493802795126225423951505690327678802846577883568622319410118", "-2884829948773734005744162960155700874127.0681001892763437635520740604769472972181496111013", "2.4188505821049618555759179210300843443018778137981932674088381260022683344838428233063800820435344194302980110031387348601685636929132993133036482870813353080292469079495502993056630049417824321203429534e+153"); + times_test ("796691.919974655750", "-344177691021", "-274203585471964324.87434102075"); + times_test ("-0.000000000000000000037241136189493487515236242635317406", "-236633306915237035867656873537286323242534.531", "8.812493209800553514615822924219854143174591731693607256359134469397049100346586e+21"); + times_test ("-36918999197803067902650019640975752121441727061986591604616945161242737830954924822209930.0610216157567", "-630816248640.220238311747288806", "2.32891045775094316018876017621573827476363455570577127733350185252461212627985116895575049148402627634872854943933909453127151295002e+100"); + times_test ("-356285686518395271578252895087932787716516776378851836556183.490949109645090654856023328687155015449097603555460351788748359722414863145", "536192552176752561042209607723742909268910764247931780563.2", "-1.91037731558344763167084704445859558938320679866577929319697485737868113003820206731226346686676150919266490086231386325706954806002421869189844369048659180671649946432503759091893660299023264e+116"); + times_test ("-10868240043.323", "-0.0000006987483137538548533133640114148563911523216092560534998", "7594.1644037440686677326890935142678911031312404730399664663577718354"); + times_test ("-0.00000000000011591017649385438295796980510866337031921451760232710693439920068628049494341909991139678975519329366780780539554769715433124600", "26133984739171981586185319", "-3029194783605.121387520277919164440375428744596566999709645269433197968011145816158998774967743687046263521357854521385482216635698201872145379668177474"); + times_test ("-1711273540905209744011506141193.37033113722759550410761924564724", "0.0000000001293732763469758906747311439702612890496046217356893762894231050676460791112722303394750148856", "-221393064712797651093.576041646381279748254325855686348423517448454794870494445248164160406818767744894597164595179089851596941716698075867505673842006555744"); + times_test ("-63062954745.8598353024049107700099585768452939988302739544094597635", "-0.0000000000000000007066107653369429290153271704760473112899492658449746935736601687393998875372553088763481649809909245944916440347928986666226", "4.45609627173810154902373805273164378070520471666107189671611539018934456392187448488034184668558120645401564953529878995106460890572197110823797727327567501341707822274253599872751551397551e-8"); + times_test ("-0.05396306543212365254900360568584", "0.000000135925517648212", "-7.33495760274574245053942000380666682810971808e-9"); + times_test ("-51311181621759783527978578699650628367670018837603370537970304306.5", "-0.0000000000000171073617238152543", "8.7779894447982604608252727389859997980275463423154981803549625152925376395768264295e+50"); + times_test ("780360810680597937530828803485426316757997822572046380524663475663587783713055764905934635773988266249773631591980851269802869685048538490187809566", "0.0000000000021114006241457087", "1.6476543027298657092509209956166007749872751971298560901265194443520620935869459922698982198083609063920515096925628739206594316734184930365483909751507976717094242e+135"); + times_test ("-0.0000000000000001558591643933212408712480642149933587830724439341932663613727360989832586450936995132509861377299507330923270242750447693180038078839868789871", "-899234589140276920.9563731186", "140.15395165697510406375504229464266777072446771644043491265354600675571562268623460258428521212930915552512830838365872392420849552201444571287189837930690619037363617006"); + times_test ("-192128620208427347208760897481755790502927310252099946847941391701541372730741701901004842683652084499599551669587901.095113423628696460069833", "-150027.013347965686304316841127", "2.8824483068535959518771144524961420793873335181555629802553828843970441540984506755823649963472492988719283593979140183046911245632653583841810467259116227616668386421791e+121"); + times_test ("-0.00000000000088119558575179620805745334627526", "-2342970366196339369130467230746566743437618438527.293007742982263818470063380858096529305084867946540343494845177603781376", "2.06461514423948373213684382167619940227586580537675167441830145669955691286212463457073538034124876268856699464885544965251476720909351479389090095755776e+36"); + times_test ("-6635456782135376051461227670659894416124826680462504047183309508524677837974389566804395212269550349799505694436932101464692080338", "-36033.774951979165187136955049120300", "2.391005563910499861359276356470099138701070047532575485529233046218042255556441673237652214828582412128576389116490428262479007258867518065861096006448051838266614e+134"); + times_test ("1.0795693", "-0.000000000000000006209261744497244037804821960982585015091967690457481640260325487223225820327780029749670765451353356", "-6.7033283550236685978221251810425966169333249952098001341386914040137368425931872572708312434887817265895708e-18"); + times_test ("0.0000000003205206100151839365357713821428922286825107015046701389076172910755564034571464044704259976070021361285911146439621197151315883353504731", "181280954003418224438635307210393590651533286700798186230089972712042801144671899167602413575288941132381001", "5.81042819613101098829202896183160808144566548341644020145672547798396356491584355574818346795299101366223635188614907521125965341055497357077467758341149862217405975928504053356664898994511933823140023871980627595465353142713441016064148015731e+97"); + times_test ("60.273280", "-1948051519028114.87884169", "-117415454660806895.9645912570432"); + times_test ("-83193336723730904831044", "-8597513002342", "7.15255794190492657393641372686305048e+35"); + times_test ("-20357731434704594485933.435192883517106779904094737872189392050585959795325610691798979690389882855327158774541534046886050", "57101254487124.26556892385946827693467498483828207557125700861375680904187175758285473565759248405589101", "-1.1624520034335964384881547289755586531335208559562766632031511288008463494925147406785220580646246607391536758053170339436847553410796246157934498139151632371860559137134623242512914876401966834601783673486087092780486894105e+36"); + times_test ("0.000000000000196393242447331955075189676455271786947264076645295021258862881929479958110333580", "194877.520544633956108976283205922142563827316236038257841914758325718909245819798140", "3.82726281398572106089641076236903647054748740721743415697957940132522454065934785001420361718935697399839562856732355534966588993484025198806123215220764836635412e-8"); + times_test ("-8071576425880681257819461150", "-1591541556785189268475083517665125202173160434133152.98399538151538621882421945398094", "1.2846249310556773308688003659431424152963795381736069812397375172279784904016650744805487687134414853173170481e+79"); + times_test ("6215707454580399344821610342", "145319540897984402903779835609411326583090144758472486922947576644983828825850438698150473186142966520100265693", "9.03263753655802873031730925036374079283112281131923966584171630907427735951790460941752213245331152538824074995769485027917034562316597006e+137"); + times_test ("-129348079468144673220614626836759706", "-88248178940421789818564716716211678654401184759743634646878788943183256531349288163631708018145656009375447214258101552585320093130", "1.141473246250472885515118898707262713605663944616163164881785239559268827685334536245384449464192711247404249908389352393586709492073897298343118518559610042335141978e+166"); + times_test ("-5780259200186462371596484655187034250137478170873403737601291296553629304246338.1", "20317804349924669254706871559", "-1.174421755212405947511968636545739798982946944457429152629522410545955272538056812944623926565594717327880979e+107"); + times_test ("-774.0", "31209403299230592237921875076234864775333333322171087161573695825372946329.47956111641", "-2.415607815360447839215153130900578533610799999136042146305804056883866045901718030410134e+76"); + times_test ("-35300012822981309972161307966314653.5746532880996436", "0.000000000000000000330318102723213448", "-11660233261792292.2796305229097940998500752778977839907195278155271328"); + times_test ("-372377963884127526301703864441812802765174863559283045963633022003526893443086066813180.3717468998054326701855782319548515", "0.93426382293185456943254764459757361885785459231935724261799663689196168735639052920121741580138452492", "-3.4789926011396505505944781064660804224349193623867972766690000964018527357693140898258100416659583488178405935796093105315794205956790824509036660608118406568210299647359494344226952122917410385314738577518950473221664938e+86"); + times_test ("24266165641723085835767787003697599948414575.4598063181549354935463146230534386950113305", "-114046436224578769506685348541641847469702436631296179876858707928490406027412029206934467.22255852787626", "-2.76746971227383645895497368320257172653365323571255355106207704032170926692669369847993108061766552826817226048614230592101594822309797349385303976310250855456022415694582167365528080196393e+132"); + times_test ("3296856412996342216590213367517526056709903701721644610.791416", "-17873043539632614693589701036988.4471469786937536273599351623416309394", "-5.89248582134006296943775735259576640781981176325731275908604121314963017378308625998703430431944837580972601701118670108255361904e+85"); + times_test ("-579102350347312720630005129054780607559620407558223441199264163920137899902249163147321939579047776302298780448678174736222915", "-219492399337234160290652558813948662413370806048542871624923.1888570368753037439767245955297245131205931820059590", "1.27108564339563247096015910701131062607103942871909341223369812880561545119021551254208157534581993545107836369462180155951136922383213991699434467561508645543330227906067804094605876984754845169252387320636979899325902200224418682350485e+185"); + times_test ("-0.00000000000000006163518675166495062601637166684339458092498600493044751669369089730774084108109728725760785705955545530", "-0.0000000006634126736829635005496725883566808801526308721290044433770358933738076656970776547028344255382880585757916925487", "4.088956403587081499616844261176845350066362599955649570127728925758519680545486693543687506509190342330458809847232254048349532057461695086500962967500458536634636810198879285867211023138454828380781894359544592311e-26"); + times_test ("749330908047468986174543866383750336261268464649133307531895834594094676053587911029106522535833685617906328029183872567352948262609142814490", "1.72", "1.2888491618416466562202154501800505783693817591965092889548608355018428428121712069700632187616339392627988842101962608158470710116877256409228e+141"); + times_test ("-135986987299837104129797979843691621285208421388144053924300522288644.5900287109133895483", "-17962494534979782634275.37015590780316964667993394", "2.442665516201689090665690743015967257236753951326674341795336278365795371226492213646697861453424431171591440002808134392672856130439302e+90"); + times_test ("44006442863122570049153802624466247185058307274072774466983112669894864433785226136933.2", "46790892915789.3411524668861472382045424537291525565291001608139420856967742081828733644952251814", "2.05910075561317027401508721128826736996297356066394448240229549087424917958568533386066515904891204498637800861760830895225068854234088512703986966936540011209421699582958756520968248e+99"); + times_test ("-0.000000000001357086727370149233250058639705046544732320894727648668175942", "-879468576980759082.033452675408474697409162575095118715838878", "1193515.132959700504049250941775088529954670578739886689678357661665327443107825618722158521731867085586347456416627873076"); + times_test ("9809841.727201839210709", "-0.0000000000368880827799595678609037922161591383619613563735115949331671506211385891506096678952335776345631106186087", "-0.0003618662536913229896876574465145932640958294417169072448132935373449094813864973395333355003851497225742989014305327367357205683"); + times_test ("-126.76", "-302985778493402807197323438", "3.840647728182373984033271900088e+28"); + times_test ("124867100493.457541072094721668121610280880363817443143804305", "-2790.963779772728898849783002651075720477860575346862492661675565992697657575735773", "-348499554762481.440673495837344907334116857684623288727299421812123101984255650489865544241755462317555675735472100548275529499295106699902765"); + times_test ("15521419716240482198113978224037109244552806478255554247304501803343108406125114544385881082700492397181091385635182384771169625695908585249481", "-2836586261373793936479454372136.74149007596046739828188227468752645", "-4.402784592410408295066853625044872038760273286404138338015606642746110634158840973424236636715346429517243853338608937452735485971423525672323975187535426255868008698725535902235665305652922137074089203627245e+172"); + times_test ("39568702947499980.31043424352839120626194373", "-0.0000000000000000110532060314654733243303464490568893422715164279635383512851140023129429730151730074105250113850458826687408847800122155909183172465757401122037579", "-0.437361026076572434440085826634462269408809302675686544261100147571961623746441124718245098250484230095790472367852085991196762852617202769222972427292049884929603478563067747014298264342967"); + times_test ("-99609250253802741981.4964874360244285", "883485457775161795418874408210783527590114513274007831727657306342804460473168388.873823683132057229380427284612779592765741821135482015", "-8.80033240591215667544412145489909369089691076369957723858897861506204032139051216834675560840680969094658338799237500038744626460350984691160948888063757133290716624034275e+100"); + times_test ("23.384657", "6358331922737965853097929789343578523627007160605428122392114297855155.13891249819092314840480065973772043562526917541987676891872705", "1.4868741110537783235240747553388183892758395838730184898029361236013863860525612320785833880636058134030234898750019986664922343269294087185e+71"); + times_test ("-14723458729544396106728.8730102546343094999696645194153", "-133727558.268817344562", "1.9689321851736756223818822532522079871040093348444209468925006088388745986e+30"); + times_test ("14302541264229922914", "-0.000000000235627544641501596076737344190020766746331735586147665546911192908467378811964334722559869070841801090200096029602404948591646484821330808", "-3370072680.224254836492035508073157091195119213264445104738613033613662085628770149276109216999634545944893478819818145213075837742045845104662438460733334512"); + times_test ("11859540992913956563027495896462810455142079490183890981402926486193538086518056969511874125054152356620542433.487767032922718042853047303427", "955192395684300504821406379834312349326154.0693", "1.13281433727376500867653857943948863816132096768226862985682668025650778093862402486711549896946612114014654961667306187363301784449098292029152064116984771872264804563492799411078854911e+151"); + times_test ("-89992.89188302466393156671880484242772885323991845613962309150678501746987154469202208826173765453391736170812306681487216203314", "46028644449145217432303817391775774045082825030.2022387362122235067512142165", "-4.14225082343410889148864685916871924839200546263861436771489245494114989348152499951206927264038619116817258198774738485287373362091029303295538404627178066368057815540301560861820242440073822631213481e+51"); + times_test ("322550604700426997899532770743249875139977021368583.850723996627574052487902691354294316078353979975", "5051247930821098558310030929577132446128131203947693097941889018946508950010.817010609850054994957659209938580530674194319", "1.629283074578125979757678549954520448550932971582730260571009370631223791910921098102919850864213539220310377679206053786662498134329234965312607315294965577812311728138336208121595820208987331544983981561498920184762025e+126"); + times_test ("-18162869148539225267245", "-0.0000000004082605569565299430913769521458041940383792216884928840151413981544379047647242539071550738140637320695619458956310444200164926", "7415183074511.198888443043591378591772024538336265966741297786740921169768779262078997101641290939777807031074347273941892988987901012164049542564887"); + times_test ("56.437", "-0.0000000000000000363636129586261117394059679281224058126111740191432401889546", "-2.0522532245459818682368546119594442168463368281183870465440307602e-15"); + times_test ("0.0000000000000098328737846670488651996142598", "-0.0000021680510741625274383109785118138365114445962436956704809668310586255130207174432385040177431879924758023695894509584", "-2.131817257095195181206361651183585087468603124720413551197211179755387449478899738202568963063585962944228052493622001429362279056649894941659232e-20"); + times_test ("15353773892289910580447352912374084465426576602840471898589013750906506890933921327042063374884073.37459230997064", "-0.0000000000010024383418176318716576007775600816833200531168899324061052647625728403071186802669732334255658386493460274446", "-1.5391211641229945537862597203687187815529728355277111549164845611017692299846743962405790219289790424490140365517893874940113367036665712735367218576203409806863531895103340714121294126379877846187972625242851311660226544e+85"); + times_test ("-131317855179200803975486750.21706572131621841705391042457406222193797630804760305734762283213938032", "0.0292170474534535827560241963251081294772380763588549279699135998743535144719442580701100219852823099329042846816782892289228", "-3.836720006256455223034915613925802473646371948151381349060669000949432685656690149745351896865724762974757845038322594373778118540209910046753684013004635293983638022635663512882017379734293615901239976258135149413119296e+24"); + times_test ("-1.2652", "-11354", "14365.0808"); + times_test ("9907551115374943050635613568695786302517118070997561724624950969636860315016878905709.592450615294116872101107020677899332545772518264112371602200", "-1.4", "-1.387057156152492027088985899617410082352396529939658641447493135749160444102363046799342943086141176362094154982894905906556408152556975732024308e+85"); + times_test ("-490.0344807942463855", "-9323932874.185090992679891416847", "4569048604961.6964723167091758356936009232035565185"); + times_test ("3604969916487266.77582902266201875313967241643046258256599229303814897912723083869145048", "-32491432188732331176981674049239559807795.05", "-1.17130635583966083474238734587571010296057134092517034186160396265057194098968738205898514560270240397013328401070407840495064124e+56"); + times_test ("34703234002309873855644196344429559904012545590136.8731266774035", "-30509195306542390332337786607824589011847240852960.400475884124826629604413425289601053748170330700373748814", "-1.058767743945114695217780865659236851886438030887854601194770945013467876376008466686358099101594157300090732314055284541644607734865797363613111496055241101601318724449e+99"); + times_test ("-0.00000000000000000001846850219978014536016505660530611315774081617188936233750581313204111802184283556512413812", "172294.1773686139898820857102416866146212540421600646329719718", "-3.182015393741558008777043196173134950988956232467393142872076553361750999454632625636035727486190076054675229759462180914335313087408443832697591945016e-15"); + times_test ("-18106034022632087299566240966", "0.1062593952762739525593394732713320570280318748229897368327", "-1.9239362260965274886455362609833980864707868629715502819707822658572629454695338283882e+27"); + times_test ("-15954726647545197343337193.777996734931237024726479085", "0.0000004481748063179037", "-7150506525118665829.3250763667151579960827175193664627204716990941145"); + times_test ("-0.0072925304890", "-1691234031.569314001265549", "12333375.739253610871043600667823461"); + times_test ("-1865227748847755571775855702643769331381101998226093529507611331692677750602855545329939048493285354105512957820154901.7086", "2210049489063501217982642732440647263267341254731067280328753568541239370364.8214774408688801128406378268765465307868425869089870377072", "-4.12224563332804677406698803644377193820506176786228016964994619508823923498100669710299638948960004422089468802904369403398678960200548365227202005570666224092394691081191293375038692545892613850007520900934668836420552876480141825643798919514009790652192e+192"); + times_test ("-29657447.9015389403059670276084073033511112446764971506273354986137667779619286113465", "-1827855316102176003105358531801341705072592351.135", "5.42095238088512761081531495719462889138251775255086295922416345110850703827501143639893274817453208270263341869965571991680731532775e+52"); + times_test ("0.000000002303893648170578350944498774746492391128813731693885869943488294353601573494998681870582486295872268039945356590815", "-32442262.91320156091101969855721550263008139081880143903731313592785661221100831", "-0.07474352345800499923522516975799224318500890706048459253531640566042618663498550717397089326803150428347426693483873444675443808499665437424291063143582928567184402307096634148635840535523467265"); + times_test ("0.0000000000016576004870465706885062", "-55848857027244311015.8188471734270775276780246873885866419886637427519716023962487120351937093495264631807155", "-92575092.6093544619318438795137350300013067044584954352726853911684860351652174681495037636300286854678776361173457113848293421861"); + times_test ("4060428408888.0232603235503282900294503488016711959024243468046984749052603493273497544632749564430853860097672053826937821420346478", "-56342167050275452604675195079699398.2675991078629882729119248786198064047635210295605913955475957472202624", "-2.2877333570925316685876047368022072172371889058683599394540501407358757119526517889443532452252466779232915679501821225464672490791576862382231853032125642473217365895411111636095821515831491602289971848581424815174345498160459900758272e+47"); + times_test ("26299685148174659.21498806517835627517278416660123809400463889", "-0.00000000000000002810938946123709113663641801589824230970112320150509166", "-0.7392680925379544113700127042857131426674666337496775201943962811858815880839349410511049278268042443619259946506574"); + times_test ("-0.0000000000000000000237245065931924834498369898311931358407431388348456381998654995741405648243043023156623847512508812546011581686473004618459451222129595962653", "78470.0567305612051127506377842349815403261", "-1.86166337827238752251588053847936462363465535270736342476553827797069992977676755247798085804488792284146627152984361709483184324719876052483334166262924374381677162633704456690411433e-15"); + times_test ("-183824463031586708", "143807363604069401113874611858643135635193494053567940110697592615174793997761093.2327486120912246439210504605813271646434876", "-2.64353113945062034769011701589673384301679059470040712450349324003153646920125387527703799373682836286840975022033298195495859192205669228208e+97"); + times_test ("4709101207483984726787440699170240831795242716.2138423114488136479566547686742376976336667025624304570806054934", "-1", "-4.7091012074839847267874406991702408317952427162138423114488136479566547686742376976336667025624304570806054934e+45"); + times_test ("0.000000000000000000038532944598313834956548814879372", "-40661.8380161978165598078232608918885279594361853172147", "-1.5668203515437617982746501980121696087743512254235020270033803551407710522231355251684e-15"); + times_test ("2334886001264116563500830341789350499377618860287461405266703471620193083331061.9777697176990366889825738659887530082768575891812891822435971810032332", "26035538.8683211892476845585304290220478694825782227287031175818318794980679029048408253481320254733533048872460665035942196191856378829543", "6.079001523901094420088368729082607832663817841432796296671692743644677805701345873443864752415327061436957752682222783317280683048921810139315200905217552914921575411464462577484189557662106960763012918216551898062340176680217599395447139612485659290222974247963252522982643623146784276e+85"); + times_test ("-7778469807.563", "38672644915681385296338808681298386088589", "-3.00814000855232415447033790891667731035489355100198607e+50"); + times_test ("64622392353741.4865906677596431143150394253242646025467", "0.00003378584792447508795371328648463423391931923728963301558475258018764078318119181", "2183322320.579271598509382338738236518894882788661215479990430711558769726756727680434235068590712469349522851338102909922320467182527"); + times_test ("-0.000000000000000001648136935803060530512720919823086792624816339685214001103485134801966927382343845709538610434741849", "-4391532746732420685914713997682658712351988556515487377264609238454668698925221533684202870806667745235943356", "7.237847324678369711768998633093781574995948295740118328002527697546317476553671589822452609098233955280840336196399777925163783629478472302267347352300512328538053758750290707036775767388047947510115846705244e+90"); + times_test ("10333000414188250420538344710287739407808614536951039.810025625233444425363102180125538936079684897578202747788108257631148570", "9335", "9.645855886644731767572544787053604737189341670243795662658921155420371076455885147190596830385851889252265060199058498677190095e+55"); + times_test ("0", "0.0000000000000601453886227057059980502655211529623918792629968455990334450008543269999122651600055853233978797789838530557724224959611814658608426039511317644", "0"); + times_test ("-2297750624251138979504978190262936680523712405752289172826124262469129120913490453904199762531745620.96952540734690968359393491107", "-40416204690650952371389732084289462889292036515283404683019111928741464.2687913586781776783223", "9.2866359557805037179029429569778710628234868409496948754232191472442648400693401233340833685175058579432758055493241234301333517014914341123314199162326187649292261109846406979086483744843709435080273472996954914317297861e+169"); + times_test ("4343355589964158622184590891340741623549153108779.436816", "-0.0000001064974529896251240308460910120111005761688204576301219728", "-4.625563077594334790148387774508543628581450404563732480957583510623242646260781687362461885461530966385708706048e+41"); + times_test ("-11563484501688268.66686509003783", "1322408781913756518185807148018074515.664891437493116279057", "-1.529165345455618514610777438327506360176848752673257181206491978239020817017600896672631e+52"); + times_test ("-7105422094.2179667", "30559895492351516.966189644412389996", "-2.171409566283465162387924857949138932897137105411332e+26"); + times_test ("0", "111016869919462691384357858914534606927438531477.1293238954660357640541427103317553925", "0"); + times_test ("0.0000000060932574133709382983", "-22.267165855523514466854715520800113116277499916129314878467293624269528017916046898922489352991777889888803407846", "-1.356795734239288861313869942530919648656125995428613119992994317378914675143711278820250703114800246598130872149242193747276361084618e-7"); + times_test ("-44333.76", "-0.000000000000000001470079352177070580940", "6.51741451803737246384545344e-14"); + times_test ("-21357371607823146.894996126592622902999367699791992019397626730636288058416175548036595334380731548047707750374539844136475793453543167632520829674", "-2082610833875897815259749572708491274194096.1328444788624505568347915241817370559885019276541831998071798466253171806140327187679310", "4.4479093493565988402652146155895503067864965364415050875276153305362992271006919883790488712645218749008589188930440013166012155736226914204651235463946650075417869390037652928234175055618130254249241986895815834958749240488411354040161221049340462201305247819550627184384494e+58"); + times_test ("0.00000038779", "904315692695033441415603523306856029010929442362969497588323373295.4261037009085085062076151428035395486146494122744116706", "3.50684582470207018246556890303165699490148328453935941469775920930233288754175310513622251076227784601557274895585894101741974e+59"); + times_test ("-108092399126602892192263936618253.11634898323699426667272696837431678187861415020697", "-10577768091951217923840244460858974390254947969430786022673684947578297621240080038309605361343066868902863031903186141346699486064112972330793516", "1.14337633046383576973976076259460800215089889515619540807214976204561990493150424651385392676061643973011767877937603525233712134586553308518682088934561533581793269433365489470332685181218952765840412804140387512176915573400652e+177"); + times_test ("15467641140816407251201603.17330929847758676216749067445955101305983585263772950", "-577622788567995038.889222735426051145123753952194531865720030753211409854898055689387177412129339425045834175708407053831", "-8.9344620083274171838850431285315863222279965262274085151307500736726521153163765171506606924039712216379344449734092210186563577666902614357166638103925323472931546721201173791263892223252481167145e+42"); + times_test ("-147577569629276477202061028275376955899710718777", "-1836553374816.4194414", "2.710340835498528403441827678365194491127557859039387630435108311678e+59"); + times_test ("19607260477306481515065963386476904146461.13", "0", "0"); + times_test ("-7587887623467943790564171894728147122394166719543547263769028178587424899740120.3214878", "-0.00000016920971191816124290279600506057889818397766687630546391612272642869578133220841440723450090978526958058420544559571", "1.283944278834391917935678304507329917170307310293334436436941584511090251795678415124232910095377726352226968886370226267649132152891311373385442150371798069034937442982381537637461944916510337784497338e+72"); + times_test ("2183744843588421584150515470170983080333529023791.649929295654521467545253432380589261845763800323659", "7388076664655153708968991031349105352802.87524801859750438051677178784807521032697033391834", "1.613367432047663606017519920365670781068592286431464441643858801885153492675086468494328491512664083724900475004088922960826586460789211331922609342243762356185315284210154800101939767600606e+88"); + times_test ("47663056245673578412988857668839696666285127435258253279539956729954000870254229114622792532345", "346546822020292249515761823895055766746157088669680742020667195407870883898961673353876509569868596891010435068343.891429081941502924502622209358", "1.651748066971262047841009039410535405983991643212862547257807586948128858978665397570993212728686939913279771853555026022126342707912524337215453128506654700200787070955669974964782729940854858026583385489299889179192801828417090757668451e+208"); + times_test ("-108127035861913115550264284316138800046955088009916843670136654902573526429629906417162564166515174290526454135619208.14401004096640476727920000", "-41876811.2693259587009484684", "4.52801547390097523332116417273670654479155983631591114406304348746150113439265113473586255636518700022503707400603551613864908028442586791089724406027095241367517728e+123"); + times_test ("-22930937565270017519558999696163059408815.2103786274010528531899481200409337071", "442710909275310619619476456914560821720723777371027183.19798799", "-1.0151776220056066916079907416732180895063328275280083903607063874114903814021738290370272558746844782372813173058269500111226243281691977729e+94"); + times_test ("-0.000000000000935", "-1394991975035345206923314783009363790456653341293996952.89914882995729104423", "1.30431749665804776847329932211375514407697087410988715096070415601006712635505e+42"); + times_test ("-0.00046024", "0.01162786573878994938984477754797863400638858513306671988962769958859110982", "-0.0000053516089276206863071821604186816865151002824216426271620022524586531723835568"); + times_test ("-1627.2108799123697489132363803597735986233989579218110364523089725598273552977977776687575769964049313924", "56699994277601502191648", "-9.22628475794822699354291906781040053919455063547635119292864057974253393511179708715340019643722079742642013165442036762906752e+25"); + times_test ("-27116910291.9182040738629485", "12691061832825245519.40893289319955481488011346305686826840916092434155363686258532264816410801529729986396433852053976574899754971", "-3.44142385229909206506408450914121490994466313457211336682505249135405026892531659087017902656062527076358954643091265672241689615713870521464190780855919935e+29"); + times_test ("74334146952185.622333564428648946767", "476584680993387873045.31749635019901122634977692103894159588456540699130081843563616833608386", "3.542651571212300025591240199136282046613545603127423889427355578233920699125928663269397001117473297183365853355090147038788062e+34"); + times_test ("-0.0000000000157591044652124620704467757472117236708299027185378061", "825889432875054704437419479225672139169234.4648865373257367774758779311867911088245084945960951054201828797", "-1.301527784939306255868774017049829614469141796766685094069536216576279534218241902166490354194411368867404472498297448815923977414878533155578679521444041822617e+31"); + times_test ("0.000000000000001100192990777212594294335234679657995433198981402645", "0.000000000000000000432645284322379079219999", "4.75993309304295726917904095312991723862503538234489037361811165973555497355e-34"); + times_test ("-300700711.27857809815492793761168238841641169113962704371", "2796485968452997110905186933271347618098487118212692028161371341773219361074458463009437202075408782.868217914378353128764067341119788514123", "-8.4090531979437954393871330563049695911136868591602684229475806517303872799072423007746634357788114292441025309971392965563899108585661101482006280251358427683195796604902336825200320040807331633e+107"); + times_test ("1001261567690509940798222741590486780493666562063067481645961.90629710999960001", "-1650177790476279206501558139505.7050853", "-1.652259601460341163039584257033432854399411843740615967044468360193262523967905931854751303094262379472596022930853e+90"); + times_test ("110.8604067291480106069111398751254426097826209058897035561124403844051579732", "3550086474131605383663436798312168506354131157360313848273263892613620358824680555084478737815742184487956353593187968793241400.17721303537436259886645", "3.9356403044587676036027794309018622288005376717971688259462205139902681207884104868717633863448326626441423669459931832858572563749403841913604929877516515276589416960678197046131472363670530588356080270487825651541549947914e+128"); + times_test ("-9565239171980107624419624526395838241183446774838567911610629737292737676405985674082492.7402072097442088866372528167684894637964203298148137737241", "-36054341543178006514284988556899580296546999631717365906312843826084434013452", "3.448684000487559907760299189700848766200218042465011401311363613150401470742277874500718876731897516621371622912032460093110240951501324564382188117403446347500943089873810691365498189390424553234241009759752460955435365932e+164"); + times_test ("0.00000000000000021536749330373908821656161952581400559880285070951784338817932051856533596270829157789717921906316591168026012467390896523070770210560122939454467353", "663477678146178303688345264055398845777282913816.2865250058407981284027739848602730238855", "1.42891524405327413808513101984282436944310120570351565859962360818367363905163907249459291799819814848604018845827474322713798614022002843947155226737103321232324111623370722541558737029258436237486465744476494522921928738155070489600815e+32"); + times_test ("0.00000945", "-18898734150623755402431379573.925485263576945358998697169620788", "-1.785930377233944885529765369735958357408021336425376882529164466e+23"); + times_test ("-118155484782065759745414566117547423380595772557270766076629821949550123865.7556876205552", "-3222725953437374057075335595917494.78154846586409115254934373165610464807636269976395928338097797032693881785669329213286427799731102411887254283256", "3.80782747348138016629045371008871196005073810159724255259507985221047370481336261384421677347963935331112831607680385035083546977933094742953609409763116007720964740775926559725243391158892800768754854303883925126424611683360687837312e+107"); + times_test ("-190628036687751797516.3923598265032797533714657001", "865709203990726346661478248439122009697620464322316832519149040247619305112126151915240.927219690074057652788651697648519684669722701", "-1.650284458992685868486399903806413990004373003855903554255634262462272823920733859164088044294272768929194834986945666561794180291325817436074210916748703508868419322426333998279701e+107"); + times_test ("-788627400197335866651447870.157709244984248131980873718306382781375", "-86747290916497451031316747659315856743776649872846183098534827784400266496743256523741518237922.2996321602121937", "6.84112905096393537461269413785832954919219508550269374591141540623116216431585547212308389464605406974151833014851983606637628384743188851383796216195778432408403881159962523375e+121"); + times_test ("-1.04017", "148558325637199565292759778627500454502992119749146789207503706844555418", "-1.5452591357804587183056993893496714776037731319947001572996913074850120914106e+71"); + times_test ("-0.00000000000000000071132398470582962692145075368461", "387290994676565.8926187930695693123250251643", "-0.000275489373574019100458714153409095201115930261231849509402017099019195631423"); + times_test ("215107310441729713046298412931278726261089816.7425287833514081638904884659853465814509169056957391447566", "-0.000000000000000079530922946391176631073888012201003836910614023124515004051787554271", "-1.71076829319466519842618108119001097767954970538486717238178897562962688286230746264794767938468573458599488912245410770935262628286074407769931453705541079989415475854386e+28"); + times_test ("15.20", "0.00000000168020242551215734349782244623375617292165135038473086956135734916317120833176", "2.5539076867784791621166901182753093828409100525847909217332631707280202366642752e-8"); + times_test ("53.7", "-203077092210298580698048848822677", "-1.09052398516930337834852231817777549e+34"); + times_test ("3762.1500774483361388784232631064469116842540525321933222132260527508280723", "-0.00000000000451157562475195223090446528742025080950824631951180", "-1.697322458607458258725685631392223266464385065379983966983024481605281774480724387957456810916611803963822277644621467110314e-8"); + times_test ("10153060082382209456279162718229817773.21414954173571898129540", "13877.5946499736990", "1.409000522801288735724123829540759783413794325474382601016313019646829496846e+41"); + times_test ("18897399203675243.753780", "-1910633732732845629536812142230308713253202119068241546428657394632038831097695534323128365467560033377437820071074546249694941907476629", "-3.610600837946073550532020697653346279388929417890343273657708768347378585716753592761967644855725372607255782094846473883590443720333438235921023941358040762e+151"); + times_test ("-227851381988110698228234897200521545909.8859817013555168022664133019970486786396950937267160151127235063398214239139286950658576124761", "-1268874936070643773798575676971891302001120798002567287940.21946823635809002112374440535791936322353876611612756137359816293380527820953454", "2.89114907753771796464127821062921785105163932083151495322011931184509082675890958425989774091841783969857985176854191074417481688593300580341868089326459718767784372087364119694552216708565314138516855049665928747274756209929360259354799135676979673768285573391477874494e+95"); + times_test ("696500910829095709265254100912961.759143821807206113527355359619517140", "1114499552366341774527606900484796988675131209334791717032223696865951521317145662953110337604968236933370458980418848545855167865.33", "7.762499533417764961744733643290572565963244168792774190520762259732634644303990430873725013181100121300237274692989559835517257654859131921380793007417874521366460660750927680178271377182536191467562e+161"); + times_test ("-70.10", "-2517567781055870080456863350280219592820297586247709916931434675762.61506437297379043545134128087973548639372915", "1.76481501452016492640026120854643393456702860795964465176893570770959316012545462709525139023789669457596200413415e+68"); + times_test ("0.000000000000002306594150940581693662924121203297813803898269978979627841840215966618235769199313660292073294", "116992676693387498070382.7747684654799920318525566565823", "269854623.7638501167227065187659703931498533193140103582402361671530932334102659535168542374567463444185883703688336666394633637064104492276191430962"); + times_test ("-0.00000000001181358510850947772334650728239469358105", "-481890547669680463659904229596086456299864735360996516824114722268856.54851170927985881751230609513583653813147810", "5.692854997882013727740130126310283585722443259230619411261749891601386990764956284506368357210347041750883604578383235465621769499444496072167018650005e+57"); + times_test ("-1834.126675", "0.00000000000008674517502282013089240795076167689517217195581862368207764378830001739241505540256750749795374881231669246429195318071966775335388150", "-1.591016394368981357967569774740781611664593018538591570853258932691148023923957854519289902594786129196141965293563166090383235636747739390125e-10"); + times_test ("0.00000000000035250317144887670812951006342432995417313795500599613972504272719157358113604799695738826228638715709865929871185179926814011340468405980601224", "-0.000000000000000000021272512743884326405045478763658819652652411080930898072232071938774490149150675831747076538", "-7.49862820690587140909540970755250892258210729930767016105970954978799195506491402524535800885748254897893970247659807375624928755168639617915215048372226158776475176073323855448724956084743637169140454360251047844711344183201584482512e-33"); + times_test ("15721631316833446647076872477517236.12954053920703267418936679341513919357706705809389209070714586294463311338245994298023554035379477", "-357511350671198870300372232100538.1303938329586437211936443603854018463080112537158549352615274628829848363889696735642169838", "-5.620661646835744415086989091837302307955447632522363902002938200959151381457803806059537394592953324800087575638876011854291111449657686052527475421964247595605170282782797258746087685871582969776908398036007564256205557694516425413130055587991480013614726e+66"); + times_test ("3253729487345424036939309028740036451", "41382.193", "1.34646461615119395163461615513962735242317043e+41"); + times_test ("-53618931066856441239525329925922774166747059804.731067937979588616198646926180", "428.71708", "-2.29873515597039782674008800318782280462672325780696736316522303311379246101428651544e+49"); + times_test ("0.00460104302362018630202736794501376789373696947488687556056401041393190634456941939438735", "0.0097403733746400832576516808174515324023665911967721621686382928687157274600680878342008", "0.00004481587696284356635234124520882413754979811951974130365547261171837147431228113809768987174613255553265451013766186937944499945070524997906900028884951249482196583289287988"); + times_test ("1677453254494.8933968213578859249745170393218098919671494230225238019960047762641999542148114948195560618412253838", "21698.9831813409037769663882983019728670821859931084790618654907569761557036686614568057014715225588686176", "36399029956770254.61815647295605403222195084034899389723728455774968833742619776793560171529933737657028158467430352145406981302848175254658241102272245868058796169820204651822347385243123767173210904612588453433543488"); + times_test ("-0.0000000002919695530321722484984277810687310403212039464661356722375751251668297055979816704921817077930395835966342868337436171143003475385582696559", "0.0000467435515211462536099607610605749574554406010634606838859023639329665349097075031538491899684093202279174", "-1.364769384476538686936225893376326381400072912004108048321079964657333163471060859282060687267616249897947560336772938595308007366926166649543531172638654882898076593187120930620811092498003694929915967620884049583354836924979303135355647162266e-14"); + times_test ("603854611243120547.787810466452796370957795270702329858515593134870178861102533", "-1.443648977792806959560328531759843896504517453521508829432901295106075946137", "-871754092256603815.457694771840809554026399109994406269191599674109909866767981863687374560559981613911867626356905487893301607765864732838103294942265021"); + times_test ("-40.440526242216028465959594055135360244752337785292869659524201380035562721496158514354001447065595303342069691098", "-6241679606047503379025590422716839198006778643413679187399633462", "2.52416807903868662768373787395500221586271219331254483212435251241310894921233219736835628583965316050937610054902736153912767627312787284137615949322472984890293258224764321276e+65"); + times_test ("190202434.508038647841031698547078216727", "-94800.49", "-18031283990554.97275426724712779530301404579623"); + times_test ("240457787673551.0553964370137451859068301029702133344054038041468987152326", "-113811730.49021", "-2.7366916924974332953445795236260775735980418505302834775806957412715746250777592172846e+22"); + times_test ("-0.000000000000000037347671655579143058079422192039757670106144334496120979342554992077029390338777020220866582016017618507350840075639338", "-66002749861804986801728090866144973725446555526.44841912823309868929360696717462761165075411", "2.46504903020401430710916622478946584523872946340038310101035741960964095064955939570946178742591696202144017351188867915011670426023840138265647815988159839485263479191111855834656201283339042728373652808117918e+30"); + times_test ("2217096250855392361576457107363.550101329506097526554933312928808962970058721968159857675935", "-119.02573598179826220767289082192322334412324905093960546113476851847137178273867550322447", "-2.6389151300054870078699458746934883192689259758705923255722692155151793736620554306044775120676679617433953726881548219320386556081319536307857183199189515857363954254037282212945e+32"); + times_test ("-7810543038413013183543974906750692474736112.830520775223157129955459725598357936920887935346548627357711660362938363582877899220351", "-0.000000024840601734880447844125586432330812489626056994428818563969", "1.94018588950360699674928168207639163235428509329502583916963340815490425553873121778659312254666940895194771657722665285619316279071834113799397487954421488584967639435397144832420520133119e+35"); + times_test ("-215969900665491429229701.3940073328175247468", "115249.193647", "-2.48903569037205758977126520019369452248876591678435796e+28"); + times_test ("-4035575127405764517339706203.4788226338445902", "-88902309983026598393661019935338468232233526534344738519100289640088125353379283048690019987369761984422527235042814970844399233265479337257", "3.587719509364193355575242986206913087493287494035221267169492881995478618778834577094297983987290045033929823209982268817160327957706935779582674240650855654673552267470295842307570814e+167"); + times_test ("-28499916611563776888621.53827878180215801449832746", "5995.369746918629670729501318845959128845800374147641916915834504403849426193388405031670359811808264465541348192", "-1.7086753784267317072023465954287299476765112854412427476967519098923744309002169668338318340958052443834272196779007400662171578997777665622369069868825749495232e+26"); + times_test ("33940277567855896556536207237998924729047510555567616051277715731698465468759889055793654824231539562678564552090900045034922322.1690641489242517", "-58557275066496364264951120471607827120696885728717812654290030305387606748831.9183665907629793676083704092979597697586525", "-1.98745016937417395543833870238306804764880834969233299088069121150704606919273152334891301543693138976149441332170609730695515633779077917894486225657656974898750258313446228915338253648124299689091087492416283574756990938405638221490525215652696287427161316283425e+204"); + times_test ("-0.000000000000000001047064413365314260621529874256953696906592212846819", "-434397528124418421.6091661017223", "0.4548421929529367773911801643725801508623453120069985877346513296252893958219763637"); + times_test ("-33370590738262171579.39614973283917480277678311111671774535779751556185640913284598686491", "-99094653.33173767906444057476506", "3.3068471206833860362071327479835859150736781389077457604266441207582457927611004156098420714391130319622364115692080446e+27"); + times_test ("-0.00000000135893504172734", "-145791096031983569080162023719458335233663720930454033985903749.924827775901017923575087659941838981388109045", "1.981206291696982245471792411246101316206613787316920816048059429054568140323128384390929922747612723701453667023730777903e+53"); + times_test ("-13865781910.2079575101787283939774081870084", "0.000000000000005111340576657977529690857668009570333996738347099523635843713836084214963667601914442680495175289459369931831218047341605612305371", "-0.0000708727337047360947483712809665199876351338098500645907437129231083200095113355222531742276112479425377592938317792723399224219930646266745465349945511268888900466157421164"); + times_test ("2221303.063062607", "-2.525965215750429650596003299885690890329317816527744727340100271151083414522167788474814497266651607680421514303744", "-5610934.270936028330697409054729056703155654194124398987862017089179613782122545869272030899868261055124767892056053009313886500608"); + times_test ("2955433876854127435547184981659750312874750", "-0.000039202878947452162560625708217061180169183736624538113434241595982106528764", "-1.15861516511511599582586163812175464411359319256995079161567403334139282606046617827274676780880858338633660404309e+38"); + times_test ("-1925003256423680784876.1957689269203", "-0.0000000000000614144439205338076312802493579740530216692609642343477458243733481030491978062242259372884320561187326591221623660", "118223004.5384771047512790006924893059325401413863133808621379188835488070846162209706362064697933581769897034762423998928884355927161113795649414298"); + times_test ("0.0001074280907302126774691277050759016234153511565364175703838489020817316583420637215", "0.0001532977223327450369874510044074807629409774927247949577150151195776859623266960380925487660870709945455405380437750382992", "1.64684816234970840550538622604713249522114056250203424510426725871022595010818109545611749855873201375214405305332022403202928107807661566637499538331414567985551667985554396394756099731355830293824728e-8"); + times_test ("-51719564234003853480795874799029206659495378941873129625597250275327964731715068962774998751", "466532423420562663.592331220126361", "-2.4128853640345274449820011797672270168670456082913030458542405572274060582037181131606130323033781460111131337883517837175111e+109"); + times_test ("-1724059986073957512357853.05703381906907621063941826220185749299041791046931825802106508069", "-2665994918609117220274024374289170787044923934794140833582674324712895082643859871981.5384174394916234884976873", "4.596335162250476126397000620689369599669734677111641881617412368616916429689082558324657810003289232013968094235442049486840526116938235377972333081125575786496773286246190410954882029026469852888237e+108"); + times_test ("0.00000000000002795129561961146401319754718204318652084938036308535981529129883306076220009274119013027424", "-367284334695386275069239735137863507066443274836293057467619925457742005840610489941285870890827991341527453.1239055840633353121379761935", "-1.026607301552306124313300154008632390701208483751483889410351517683637370661669822560424911336313305943490756696083944005783385779384493150385978269507423733524787840537586575485518520814488626005350057699017603079788874630544e+94"); + times_test ("0.065024658867154009934139288250506881782640024913856247796477081504212332678", "-665460681339474763575385930611037367230025491535512485820105677925713917024055708892630604.560260598070556046", "-4.3271353793603226678150325769871841452491924531112895833715271367485564019397270216591883369859017756012808701471442567394097379898539481503530181916728520372454137708175982196271188e+88"); + times_test ("-276510.208587680613648136603273411746807332340011833", "2605351321798093.990970489610", "-720406237434580367010.08789881220282603686585579572198020594015398214120355513"); + times_test ("-1141731373426523828", "0.00000000001228914544864000403177026028329087085", "-14030902.9113140661455213068073751399665217637223956138"); + times_test ("-6945202132900812232267754762195507765101114.626933181713698994880961083764777532865251281976086752243853355949851812697573518483229325256100662271783", "198.500596182566233231418150714777497924550531544984107394883271", "-1.378626763989241829423752237699325897620912267936419616678649561070893719008729731590007841901671107837003264905764835754363036476641340160319240720502391830298256035482481144857802524759297321191775928962042193e+45"); + times_test ("-0.00000000000003508292319046289357668381194881192144875489890254082933630984748085694196310674317752270255439632992013292438026236847255227135350509221", "-12646.289", "4.4366878563139579594698714752632876528625314168731416208665252478883885572167521207173040056393420870934788012794380752838459114284655905930869e-10"); + times_test ("-0.287610207934561349588295090691549344568062900733", "43561994519313302798849015634739297829426206398579890440129222701736044543165037398693801937437.9243029452694915", "-1.25288743017439209045579990822356125048347677549255399828298801437378973121007271697418144364441489766184499365629256770107139603488677894036054186818978872695e+94"); + times_test ("0.000000000000000192", "-12108079130041324.8599910305913709996877522568944631978562414383996429587415771634862023459492435054277466841987842715088475336753781193", "-2.3247511929679343731182778735432319400484333237369339883983561727314480783828153893508504222547530421273633661665801296987264656725989056"); + times_test ("-20568177346839726327867757072303820722593133821514591458610274374266.37198646", "-534342814455338031486092101151521752991657451149454616317240974476834470502228759280758223653930620503606363601006870", "1.09904577717268667573895775359758445299657810692590923812884672106543889507154870122646024207383034114557837930915217170509202835912718118550506629814473881108189227609033460252466188180069802e+184"); + times_test ("-1182.3299256870", "-147162546450055552210266162228061556539.797326023627550726867910750435749282172653416371899801978172967970344774632377", "1.73994682608203866701785740185594706489760121335556873257063559751827647851659356907682594962027863260816409968610867061154167999e+41"); + times_test ("9106311100510091578555175.291251271962559609876", "1014206950166689350187558262800656656127736355378743002804820184380658978941538.13338393728923507197611", "9.23568400851740850405690546305915901453077329283645359090099261781771022159231929782452163389786781433252697559132084134612891947899159122199206236e+102"); + times_test ("0.00000000002380790398795067678584772975148957851144823495943191934104092082796285119597281", "-311335492270699981.8187024249236948798391482088578", "-7412245.508022185205534542741414892061741870570633829375932307947952750675656606815024557059080304215250354778137764084129956418"); + times_test ("-459107433083516704803135533549.9370726940122774506638331684", "5216864295258985882129407260355552822654299758311025336128418645120106444368253186174452684656258241404364726655870378516906394208438578086566108931", "-2.3951011753414023938728351576018231982234001717277301016858655888837322273016599246665882605588507148724528061606913078187945915687420371837702713713354429660018711277008065538782057324960908955177252669804e+177"); + times_test ("0.0000000000321891162991981855413480133794894989319146938941669481853712504240526430027314092932643025", "-134763534415664538713532770059667389.177391730107496493", "-4.3379190821968230280422342891216605083499498614921463348518339967882865388159072601421584951618987475295234426996826071260203876918460408411325e+24"); + times_test ("33279.339415206582540482746683123451895750217730735", "2358123523728734728589743.77319797", "7.847679312915151656953999591683173680703507048673633215999463330697682756730860795e+28"); + times_test ("0.000000000000353739089246492910027064870427354171506304617311189028621762245079583293104983994786058488849", "89.2", "3.15535267607871675744141864421199920983623718641580613530611922610988297449645723349164172053308e-11"); + times_test ("171.11526841158167203333557925506243707903346", "-892230436.9596630521366514219721041194232334089033401680786089416696171067640821518918159", "-152674250705.335543438952814693411686830371790621030553860131456031688753597684538585227522590915650930288422940391639997604056260014"); + times_test ("-733600573426", "0.00000033040751206672045761849003644598960142858564314273065863456912502993453964294661705657514355828281447882514699", "-242387.14031640414208016942107704561068604361659765821593779056830839506769730896756901035759801454275354730316665273788774"); + times_test ("5.407060250", "894983509287282057739447083.8543243233619681646503346546908188657720214623", "4.839229757472768644941169184087133839458644424846279660576202729065982810949203575e+27"); + times_test ("-808729895781.624674969350592579908381307343041664310702922570660", "-0.000018", "14557138.12406924414944831066643835086353217474995759265260627188"); + times_test ("-7874173051342200985556358445162694781995734030142926506325840936292568550580411005561682118906679842482219.0492", "-0.0000012325012891970851064894932661125", "9.704928437140208129135757974157260618986599406272057601438444485095519271950063154371970461800830427187707721546146166916789646799572330235e+99"); + times_test ("-0.000000430107308276532278514", "224144306746606979302588712185931212406889.197263709151077", "-9.6406104440292501862428318854477364480895829071122484854759676386315467059578e+34"); + times_test ("-78447932062514438523504874.05548646556284585439748424869932707256764818646061107800377213587367912600020326136", "-3618396947489172957173653777903437148775132", "2.8385575791184026440804730054109713727456120179794155436480050335238908442702365065025115219164988251654681117750347278731430170767508687816655566449952e+68"); + times_test ("398344525499512577582336511121666224709052905420447547608128587685795296475632034766287454674444514141282803194155553367745120537420220770", "-27125618478287015045404726742380927685738591197795175985782379683976.193104266048757690370843265062495822", "-1.080534162161405142653380276457947626239920154503690438713413845124333388848808189678412350793281352453783298170743129726689403893393610196781463690430258145190692262396630679800143839228210109253361757862038429643553279024184277250644262294e+205"); + times_test ("560555227022785413491923481073654909048982696.2480925260763", "-0.000000000055945909195749319312168314920740513457467773655137010097489061064437802811189813038277307920819234756363832360445689012158203384", "-3.13607718302193977963347461210034229231284614823237752102010861278943979945733599665261238405005674005758593157383769276422304789339955395466489473545510344991715182034227247859789021992e+34"); + times_test ("53683812799175377405416129296695521380051667500787926235235161394163291.6772285236819124409364862784464258457438293794967799666118416541092194902", "1002085239338631.91098069654292203203638801404514242082065101889787248609067618438261168776", "5.3795756397471969187136355919525769970238781938603258307213243094992246282155354543484962264142098786182227068998815395594712635092562656959880937968190303422424114781273414341203880090074688223986213775703111763870360005321708779952e+85"); + times_test ("85251406536953414226544773130024365036572408507583595068846068418600.1205319812043138751554685608133508306427759344342315262715891140344502", "-14640.836750817778351989018346781730874633202", "-1.2481519258851345347885051287664718872340382940818875870448237208943268320517859270539035447679237658640425284982425765828931101626280359992735997817678878451142046283911403167355404e+72"); + times_test ("-1168964957570.815587458251340", "56538572696115.72608565692028718229319011374125733775862205437667843677102186943732802", "-6.60916102328293923983280676454563885183081101391883074333220411142712357555724202247544863269382868083511845468e+25"); + times_test ("-0.0000035740568614143300428297245610418", "-220936232135526", "789638656.3990059006672364554989705373573509868"); + times_test ("1346034386225456518679533104316275599194652955318802468313820086088149624400847.185", "54939560960135761994417267108815425036339300614381.4483866588714259041240857418173085472293222902548715740451745805798856530861", "7.39505382164723930246517776761647354791771483640955760963662039805511757685269752798232203634586599328591387494964164173089232999789108334073422192252509759081688578894765226433014479831461369862878497476285e+127"); + times_test ("-155646778363951461204593301246056264317969228058189198896139899890727803045.11936198483334033209653315521827243605631548584036361770", "70010086124901511162734982850", "-1.0896844358323698924028061858087281789212298425539029658881075600265807741939071442787428242144667285959576990020034537638802277308860865062577335864173456445e+103"); + times_test ("-96230341173782142876521207175875305814979162902343913723999663923462086933.11747987173088004223522808909664360812790761033270386408", "-32312766854681308785639606074893295460039.2098266500874834272005936578144638474562541816848168427108675212737366956591462833878750808347288369144371132", "3.109468578694861657044341174482395073888223668003904483303702568979989305498812009034748469873885971391784305796766553860166319366182690854126591215571252169482729464411083827831940112574078691557408084659925085229544889092188654423122525035195011188050614487145148823899800373856e+114"); + times_test ("-0.000000548494172595574330396761429371414006142446808314253568896786945188386738792461354439029277", "-23599662.27946574215991340", "12.9442772355105479080497098082314463897599465046293055191920810370276950781896553331072508851470742134787983846118"); + times_test ("-714491311271945967722626072689371246725304", "-354207932078705268748581131.065984233837379302661", "2.53078489853838501514954773016484025244072911508100754790233958626529737581211243343233944e+68"); + times_test ("-2652957183438", "-195185962067717725512037169887386249542535008172118583806939423414913218407717522397396925805258634149", "5.17820000173808723699241726590004932229973891258816030817795368301911879552134013341717829627238806141061924024262e+113"); + times_test ("-0.00000000000000000880590826878036444443656266764836587490740155586607932367514263056628321181262993864472136637", "221.48126943989476644014754266743958579083215022106146593457414", "-1.9503437419407411606247922977674915717900791357974569097861654104985704464836690328779827178384445759527338871093471950304259661832134813136971685648676718e-15"); + times_test ("-347873602.23510519131378528375967688328126", "-0.00000000000000345204441953134921260412723999268616841434091539516160053217948913648444927706020879947861434828121114161104100848431013272935429403082369582072600641", "0.0000012008751272979631661860642678932206188355136599447128288384619284997247859154163277648673794145259219010025658692572618722220704615506152641552019366413559230553625413995603960631242165928766"); + times_test ("0.0000000000000001442618965364152298486684187600173330090418464315351795690935142411476466184129035934014488253341654078976849545022104268819111681009555", "0.0000000000249240364882037699910299485535757120039682410050255081964884056237893758868", "3.5955887731310902548303070850838164719748874637094192870760300960851465410299817503704107844345957619545899785709783227712047477876114102968736355229590341265414695145023045767563414004483980850712921197398374e-27"); + times_test ("11203361460741696775550516477439054249886501188874281520876798975981497083993389664224944576772981555476668884535000964169301021", "-0.009425091022859976408210896617129512523351916940774040126129926398280814501901637533674397", "-1.05592701529491998289184550400386588919196745317033009594950262014856245582393791969590569776888682089563381256271169054068993633728958894678614097027273021445496799602248296257190716802772690940886533141705293659337e+125"); + times_test ("-50257275098882173690313530324319207319.7", "-0.00000000000002613102305812786358153112867873275089759049662992988804013925307324391675101078591150104728275428248350857948737528851613002722", "1.313274014447565385918882096099252569252443657688483069512563244738248437919967250811168909580079875716332790199500861141616087147571179420643034295663475485584242234e+24"); + times_test ("-0.00000000019732481798", "11713877058294598799452.6300621325958315801323987275857206144411781296421875252993224990921811411", "-2311438658368.079557319116750642590563091456361363221635925091739233848401495958715457150683358908746196978"); + times_test ("16669921204672133066496720461645831860294144062172262348452206781980345719813505226331586428501288033918045572872571033439052885163185959983499", "-251909114234", "-4.199305085019531263164571072959105073744794265399005234122464071331276442675313245235919630379775040752398208810774467987877807125340295724868202346024766e+153"); + times_test ("127594991665.979", "2931972609362423110559000705020991756049379484274406531578719920328328631360570935031987.8511584086593935337222578544201427", "3.741050206564770789405448806731198284533698395535872424847129715200781225838343397951497453223347295962658413239336292329816540879152033e+98"); + times_test ("146200133592544330684264498065226245560031705674109303503477692120859154893091630.871735716026997526317545935283624142687003866188151982212989698909", "46730789676874137872952436533.29531686073021669792243838852461391282932511897427150915122385179702857290277711857", "6.83204769364409047271650618653599900430147034336920824087779336527502529052104798054004653483290666541743622267860756708314673328113463875187686742000697177806992937541292873782614801211759243277925667772455483685539661134063357932775410662696035415889264013e+108"); + times_test ("3305168235.08883", "-0.00000000015960253276367470672820299075290130045238822873945326349880534378217699817857400746554521112484146318053536850963687569374932812857474", "-0.5275132215302218955363945278671543840140049260367406641422620161137050522156464498199756178493590046194472374663980497123349110510329792890451941542"); + times_test ("-14662664077162165311256", "0.000000141784657393925274142572490861043212868340562120628819802636951941686924487200580031", "-2078940802662653.108290285852001564512570305578867791848575532841089886824260278364785279496635830853128936"); + times_test ("-0.0000000000000056998852880676332652472177552050285678774883196500512", "-36498373273900144419354144402538260265.64880867165981459073157696308446822865007237717278768", "2.08036540862304331717677642102316632522246004626115723942329232479603003027974589958566297786436869850538183264991752492295191922735133158729216e+23"); + times_test ("-67968411827513303349511763330956716200597055731528479256856033995905188987752276494336231454282073.2592237192851649247647340481118", "-0.0000000000004483593999475811573860351927852363194231748110211408", "3.047427634237394269949752053446075793452954414318045278492820191953525157364829988068926830766709378481812043618023757341388343262182042155382714412297436468809738064216143412194144e+85"); + times_test ("-39147071622153.33743465738395064998231007612242609707852571665922928037980935209746718640869047087190554662186743691289", "63424511281756665049556884134307448242418039636636009044809552022044426453480310050617427620937346481967898179810376485", "-2.48288388574700054052521039639443124893165696752230434717540647035194354741975215494021537917119812595584047998724074329330913195295973963059478012613800118844862490179027576674476090214756182225141979897773406174093090617028873704939165e+132"); + times_test ("-0.0000000000000000000212", "166963558962441896333912989698468664503074325140998167446135880665447621153757238111137.174513086233214289455390442249465", "-3.539627450003768202278955381607535687465175692989161149858080670107489568459653447956108099677428144142936454277375688658e+66"); + times_test ("-860642938911.89435988366786337586704323346250899248118740045", "140830725536103329346326306.425423317117473697116679279", "-1.2120496951448633875490135507286030453466902766109934494954321323997081079892561368828279080230440233059839027555e+38"); + times_test ("5120155281492.6960891", "0", "0"); + times_test ("483497234304151.93475846468237990040573513326581342398440051651712771865349390238040778985950490599787315241732009163910863036888245878997967132752", "-0.000000000000002446148373855415167", "-1.18270597345669190978054478684634031633264057012297038134354632718936884883092588556284387957205148298464894749852350309479922902362917548718181008887660019563249584"); + times_test ("49107229571.216725255807725802556664025020334907", "0.0183027672070302023790702223019211", "898798191.0241693052645246478450553949374710665324134212540239364754063914898377"); + times_test ("4777991472272023913003337327759575484434911659878.9391160", "-272.978878813339754436881", "-1.304290755080515609320060076869253031973150159686523391389068499267988263937196e+51"); + times_test ("691961893816226173138683615558104657029075119080", "20888395139664451446632.865882039316262400286", "1.445397345962386803567566022135550445519666093682044976235972214321728596830297084207605688e+70"); + times_test ("0.0000000000003033805695921308583790907838465039054504904757732225737126675767790336448122804692481183103833", "1205.341037096038791925207662937489878783324398262713191296436049856974303800264977495244455397149", "3.656770503869659792755630630441878632712190709939383192077151780666062487640831547779168381626737843643632860934266858208328198722651475946630361327414380262986385955514241668191884519172117e-10"); + times_test ("-0.000000000000000013736762253040628738016656811899978900772420917465579992026756713474712981645066867464219941729626816955275801365161507762", "85532614698100819357606499054389025847104053990809", "-1.174941192988739408334389452599416522954290918785451326292660032528327766954585591614133632582363824486991674256064796714808554605539806946168016562596219749595467730159458e+33"); + times_test ("-0.000000000000000000015811255247299305828768713319620074244982509614182062286978069545537489406407030102060780870055866980118153434550305", "-401137413593688737860912906172596426086830141009", "6.342486035571282948613963880018634581799042582084278022045824002489491031661976947293164151517578765536914386152201758345969760642775856850743822412630635653957745e+27"); + times_test ("868871903240454856454229094081624011359909603881418403823490415408076494742619348242915473328227861764639800179679657635955448452.19436", "-0.00000000006357246685755280701854672125777125138", "-5.52363302722126457498705427469309802606911867827348426238286090544579757343893328680598652010805938682728728170222222699144643350355823304335981947914590621447842841782168e+118"); + times_test ("-817490632.47780", "-0.05082", "41544873.942521796"); + times_test ("-2566509873328000254011581163819375336312675622809818.499935237794106355143", "-14085586641244278298102529457882882173828.1386", "3.61507971863704252530700366641383269581722371260221251588353625777177940442779032699974632687837606902398909382268198e+91"); + times_test ("503419281104.463633640902474726192736893485104591050840525886329718599066457645293563757497708980772570127618974706495417595", "-121337599145999931368859624997930779.73179", "-6.108368693302086597981507602493580554469919267653677670683934587044246440236052848418720220332789575988975507246301734145970281303551608797453924222097493814684505e+46"); + times_test ("154.0752879034465903", "-0.008726217915728513196107992191445520422089690044688368256659372978169115950", "-1.344494537674084306953324167403048279838310386922350436364043480401117060195371791792845285"); + times_test ("-0.000000000000000011925048592029545210459398688308718254092506044948381860935240918133166559166620982921389189346569737569028538401055", "2083276415584377368536532532727643929994867840790251749.88373757843573756621600", "-2.484317248647283703600678453474259458742779398299485727046453258915073511408926866511770738523415042481132395288773086582850710882881051220356645201811022177650375833106965396711340182675788e+37"); + times_test ("0.00000000000000446904154566584455897206481462213986849554065179928600359644945423277723320322131526226161353244832569", "2848064161461423289727866756193778408645084968560840504840991868260331965438561614918967119347024529487381145007808689.574200435202790467855", "1.272811706229305662213683326319709782050267108388413502237287169373774908480672399099191144562736507324487505708069393969774714426776963142634656549866268950975004320862082201493957308813283909556739183697464382316012026987207034028651569495e+103"); + times_test ("-0.00000004733747496524284528744980210835293091798469780", "-60369256501669614091439562465874779052299549893280439175064875222.062643118496795029", "2.8577281683181092272030103013062657800563801201278542890132513734588525148374106855868764763504825752739825308041149449651072362e+57"); + times_test ("96456491774549605983464536192479065464697606538688448511393590515441846121829477068030573224599124", "552591880159850811255567071754556187177795094968199872657.3807356618203751867762303325381820718525675700180057477640927815410828", "5.33010741433215513846896037986563851532355661394443362975026204428856124749065340874569306244290877879518226101551796386327528977418142095601897892583643746390474594920802738822250754452900709400116274658794833132949668914672e+154"); + times_test ("0.00000435296825302837417997979246513279920760355177075128726543859320043830213235385947701661297471019483638796996791390033912786070", "-2358972609625663685288774473895.6434231", "-1.026853287946401014950993771491057785216233603666290400912634027422541733751360917945594249383195357423341794633440301199534687372368265325725161906863912592796217e+25"); + times_test ("-999234622854868865674773818245832433202378284835.73666608911561114433921", "-7.254", "7.24844795418921875160480927755526847045005207819843377581044464324103662934e+48"); + times_test ("-78760433369517189268813718850989812439872780124626693423016073535122", "-11.0900738491866377", "8.734590224618892006011443929973965209196433850642586975929968912375943222522040392994e+68"); + times_test ("-1510939307579695343987573960", "0.00000004320067801896720565303672103306587888166187016245346353772091834756228523943136134993165134358763411118907", "-65273602532951674469.8274051759179425105664207275230087993219234918464759004305190552070563017062681064499654251448984977190801686172"); + times_test ("0.0894174964177934303779732054608056301726883008695547961408331314203105438641593697918217224788171493946008016972690054132568541347357906742329332833", "1542.6581508582549101995706396231", "137.94062967824784574736167582697025827541997000463104865008652399044560913829513820967821268072546354439954364140784723516217249346765923537667015058098902147542450230708975752423"); + times_test ("-34577745227575239042650497034045377305765805548524711395.5081303310220196", "766658358890973242394467250763846956795577882707608858967751880636.0954859315385805368772376186546221646109", "-2.650931741032301486599844865029472285624680782442203783493297156082528515125839636070674383514156414623150702190980592575815090407165174168924973668598655192785690042142376617364e+121"); + times_test ("83.3290153999204844106326", "1311627337486915320509440687345026266029743794924400721935513620655368692498627634744007885.7578920", "1.092966146044038692204564531458641541903270444270154411744236954983690234590929647426240374543484806952751680089941624792e+92"); + times_test ("-1192151.908799751109585637800720757640651255179973011410490516408835753100899", "-6097036742802358386983942122025791952308256986659597643479361457987833051908958694867787164384275533358919693.249523575055559871322198016668187", "7.268593990954048718183298042908900396708340089605455889963655461676079135319303447970644868475734604822116794986972434401410410290069948464123089061651877757219473044801702473574398904984445482549630675240973614400113e+114"); + times_test ("12873087032432609726511318658818382838704088", "-11137.85789449932987810195", "-1.433786140307564932441456398853868326855191909251446120695471457716e+47"); + times_test ("-514407318470542052534960135899863052948602062295713.404163", "0.57617979470448909978527108240023648361885980490885247972540173726145900170394342", "-2.9639110315084366361019792930292554963023439694418106043485007867268143561606223483230236306497936769993015568968024431726476622934445746e+50"); + times_test ("19864031434939435816482549499647863708767614292250", "266674221057214323300502059.20145204832171982196589122398", "5.297225109968493345109943564396209963433048692089789948298291839648394867940757685353484913375893928155e+75"); + times_test ("-4754055625084332185755418342.562", "342203501523496667277706676371384769113403050858703638741982429.86030457236777579646956050309789441181343032128562816083443", "-1.62685448134133416999696896663497605074404274391890811668228808135026703965039960122943110479134355342110442043580444401677907314671327937812747350400966e+90"); + times_test ("150750927242228755712.122222703133987729780", "11153110586322698752791057735178422360301.378975227", "1.68134176252326445776964103880327253856485045353577333614876702243490238494407508859016006e+60"); + times_test ("0.0000000005454515643719086225314528110151760642884722399372", "-0.000000015543649516517081944335531513584387020723567068639189715742064587530870420218940682937593923251202031320330", "-8.478307944832903460053527019222484930464321162422574722274786852848535790350689038575946698474468453359077459886259429789018774414058766868470265072283276e-18"); + times_test ("-2767036068909663273137653237379082714767201822111902341892857916392935025490148010094342382799970940711420469586533427545731180775808468923.9088539", "-106163436291247150687286.993186225478584736592", "2.937580574172739975981907042564559944340709871604734255385615604239771087687041986895276609517297709801222177972170328755157939564075490962060559952941922254377647597925548092640347481119088e+161"); + times_test ("322929059228302.42232788641548949211838", "-18539056294225888575098493056536343700876218241905416897333383900668766550246400797654743627780376379843529081553892", "-5.98680000807490479064022688673406386728717075134452992916398938660729018368078136257909679075702485459797355840674648444941273018869686024213037721373496e+129"); + times_test ("-0.0000119088486605", "-678482308015968521186583296185550742292089152413308996093003534425067540438719433029394014", "8.079943124988915136143008357350970716799926602463815180494764874359731216575673502367418360750618247e+84"); + times_test ("-15743621782091209915924278", "3274082843013731438255081795999294296956951330200864645074905956456916040.35509269056", "-5.154592196364209761725129736597728957541850874359227108512452329645582903082160123855441179599042326424541568e+97"); + times_test ("-22.04", "-5944551299976709752172805837341550253708966615717585971886595904737262.553978573497219171324864133558843421716871647969330963830798611962604850", "1.31017910651486682937888640655007767591745624210415594820380573740409266689687759878710536000005503636909014639851121244054442830801407655810894e+71"); + times_test ("-0.00000000000000000555645728539942948834543543660522131579870362355003609281304516197635570002691794651513876516995679257618212853838", "-29306695827152569391012711584981295617371666610349814272.592165236226105635164951770704628516992499358459197490584668922484814646542200", "1.62841403539766953518495453372218761268090502299476097416218349383440252143468559124456611158096941013793431583395346583297449705537413859250236966991939668836100087684424197338992971973055292271335773446637724947073443337667809840027147206989636e+38"); + times_test ("-0.000000000000020742270836226952980998683613591994841969458265756792", "0.0000085068798515187907992734965918590053220157266548600897228989451266931328328578374770020103860942048211855612454052631692704585242999552", "-1.764520058514448864430556069534618615275204892312035230025568038037623488871862099421613268028548477427078877470868347138110966013281940578093221932329336549462641760519469552917396957184e-19"); + times_test ("0.0000000002219866544727448068271267401609565019963347224974926712349689958555511499", "112575212318901234841480884640021.488017899845441345152302010098074629364453", "2.49901947592318130801503047727550173178035497206246305960969166018454548964265488494296651336239176806475308333361242019778922151710635090703345047e+22"); + times_test ("1315378829978163097323201091487091023884510464263405789489832239136944342027634418586990942689761050161994364084475", "-0.0000000000005431717253475371481154070141404996706352278219461841093282411", "-7.144765885648635691663776677388815688808217253830298250560692436430854724042690565481563931808762010822550658080798534063657410136765651632899419238667830655937868686635669225e+101"); + times_test ("-11.974214873897", "-69620602709317858077606.7777617143271605405821834772501233928978990960832960289391723644435809527901763729636", "8.336520564915876725076403852155386259151906493644770055032514166066102032748457719926765893410251855328880867224141711492e+23"); + times_test ("0.5799373425407396613321531402639174796275099785413933819926994175405948655805025226256707030596694071531988549812177396212002923068020219", "-0.000027700615530600411086471711309277", "-0.0000160646213575591435303047842679851674438314220751425839463942452348275488872543258932816330972165180823475893661313040152587644081646971818065194220662714757232798271663"); + times_test ("3552978384198918.49229744871077180734861394888625630207038892347651291160127968", "576121651802272791027406554970", "2.0469477755224511189481484697284307523813499893489378816814079522112320677347783327847826609021022722640096e+45"); + times_test ("-18851687060584485145327914172608439977632012360714293181151849.676443352833892494771644740339", "-710051449483.09545735", "1.338566772256972884671120004800472882868495911897525532968781498881932306536347328148798533337590085679119904165e+73"); + times_test ("-0.00000000000000000288249562210477058762080967034190536380", "11030576382737761767940218.42753523411870710120067239740266744266743407186080051248604580", "-31795588.13253387463958232003043592787423655701203989880802112096311021607776492918973045954883598861925991488365393167246204"); + times_test ("0.0002651045160796089842082260007521946896171492324757847312814436724243594046468985409527086868800904047336619267796004334725939839850264", "1.5", "0.0003976567741194134763123390011282920344257238487136770969221655086365391069703478114290630303201356071004928901694006502088909759775396"); + times_test ("-45630450424356227610905727217979234106654796.6161863250137780341068134637326896292372723834060729494223789898", "-0.001886550312601736573060142331616041564292703429340077718703409523396153539560814169322896332023638792684056481", "8.60841405122272844640400481006709825973377910773092658383432035084194649814689826091063041039246763382818233815115923828311073497379982604148882785954606467953532261460988494258202205778413397486064962158760109228938e+40"); + times_test ("1189249849326945544423032382429163536272388440707777088772904521287431570230109527744855960682093580486474033014", "6504.8683354042275751628267409987442515379734097114877784676929229119207894859954124", "7.7359136877710967170429074459214076095443123103950889587500385890668195031469937128361362071610022299701776151817353045025434440446556587282911741416992344550889955487947858660554683425301449736e+114"); + times_test ("1128441920157431650427749624713171449845850142623381662768791487676773466730760868814283339962300837813340670485089015543152474935830631262056277625", "79061776144493796403585114968361776195990966081.4355019441515980323901471378982885369231", "8.92166224835496029459276238758633651524460082513027939264421048853489989185952160214129336946076678283640307013713880795010401659801489431413165623876916877756744842119523338662139879091814025301405422477576287618845313203749568756375e+193"); + times_test ("0.0000000000000082641501664127551186707163886525969338633571732489264646653134052232915073527623626871791859115793743174790277", "77102203524923153670", "637184.188091283794704877392959386970281584723592270762046140361002187615856825504876006527697363766914328733379224518124369286659"); + times_test ("-154596.64783108125962775029015421009207072050712414460575385753089518786884795842152456687953719640163452440709563114", "0.00000953332223165578725654281988611433", "-1.4738196597075074167285758911774621445701892232319827414730606050858237209327721967567187682158190683858892715205135805644946318114951019760935482362"); + times_test ("626094027960191400373416029.419", "5878856.79754771959507653634625689098360680482358703172927092067871619778735053759313320563725801048848752364854140567987016428762009823015837615", "3.68071713217780322698039882190698318126112699362991022750878399644122991392056045799737440726628318401494664115665446003913196526833417240938632301385924540360002145766795685e+33"); + times_test ("142.135419283057828760365017829388355940936300046104351305886714809787574819399072768256095762422384093950730185429", "-0.0000000000278515979862993195214307567411728513299170817121298333088852493894670155456948388404536227491002693927300401260266753267364837037", "-3.9586985574858228931018800299373061499410310433476663516734373778684106112589529389671174026955027434401703451041795013355130980833809943565348714743599848089313344119919746925003574800408491140122381937990968341446536009851615571381376933873e-9"); + times_test ("-3414337375638988582664180574338695013525096328524003701356935598956539630495832919756207376.096050041684723108331618893085565788050841", "2373966573751563392591661339321041667260.9102329522532997791967528732655638468045668247650320116224114705207987248257276765954175435815311222155414632", "-8.1055228012775943922611598191168220209920422725184693447914123413517420845343602166955572458315096659666380761391540010074112348208219442252225691108563375371596959919631253585651006293756277244412869691262300395317383824508608721200136269451608738907028690741099725299413451305512e+129"); + times_test ("-302467810214374958256067.032373830", "5575069632929333955431348.9768", "-1.686279103664794846091850650203678409366941699204314045597144e+48"); + times_test ("82697078376296338907581778590825184109578442102991030323732250149625618801404609650700917759037258851030792.4579476961905660977126995470583812166076", "209841367832573904068305526440706142.946", "1.73532680422395935522579385025838046972848188875755297012803632653935308780712618867460319171676636851490602740492068944818297966533205669240452066743937774780200047624598512303547899896e+142"); + times_test ("-8610723620694674804743328843770809170499375.7454758671", "-390208977887824714144", "3.3599816629058183220228074369266852148945886756309325082365153093080342624e+63"); + times_test ("0.000000000001665736409252239537708350662977465625669000790963980", "-0.00000000005397325311245537834096132969282540541809141350200755301957235584804115716973637524555508536156078477308323210", "-8.9905212835203683504110846121534305137961327547168950515670333480752564275581116048493890275734599276350080922308328478982195507458726674696580816210133079758e-23"); + times_test ("-55009.833387304033632191465037502050438168517958786455204058304623268020750747185676992712088", "-29561521305527851502676865044574530904951941035976693977553088501233865440936246487818963545187685243602080828543148264209993996454896778956464642639", "1.626174361692325529945956942756425331503823214619006101333940515950960317910361711714132411783105515670069490701197466001427788281114415821163283764678271096259297038980050657582474248326862791843561305280964954948600547092666115456335520232e+153"); + times_test ("0.0000005510346818658465664306888534549271604193320861182474130165534720766271492178988616151168719125", "-0.01183566974341274034927329940717360016909321111795523305608990101374740733837917774832376107936390300470266447548265172072145593380615098624169574", "-6.52186451173066523843915450437892584263602058413986588969423688481780355800652939405885567360640536676093311565481528848197657456939614662844329592819951096602632005849951491911991775291110362116460575276787590328868726322084826837690275e-9"); + times_test ("-0.000001849521254273283959945614449797", "-0.0000000015253958577166611145202508909209879321211559950068605128152947738844883802079744653882403", "2.8212520600273908617019782505256127608067239079286482382697098430394398747360047423507203058647464997472737712785222191e-15"); + times_test ("-309.68", "-96055.1516378444925", "29746359.3592076824374"); + times_test ("-168028626126473481129367789758521978889200869466491962302048311336890634520017.5719333163304589587068817821858799825706754229048601236351696679905637", "0.00000000000000040505144173091841345427692344370044084035179023758893212083311438716720662223829934353555898735535197317508971014099022876688542096545250", "-6.806023726459354860300059210154347949752163001995863383108662941548990570394989515646898112331550406123056248481183044010335252896104139538361899382958674774865348411475636358567387218161462977943906814852515597246369885881277132093738749070553676123096546436403361124299691370057425e+61"); + times_test ("0.0000041405315442707777667317116430726678375268137201769082592971414397218413001195015562151372405002624925536507988661290804269379616336095616", "0.00000000020534154280912678549286088770865816", "8.50223135350417750807611605428001794994175049772882453947533102952716919656365787338607257071961225914246011148972124658358852928539815938659942645226103867281485281862656e-16"); + times_test ("1043304625.7986054483292567142119628829071667318336", "-0.00000000000000000003922920237128071855393930461155089778347745292989380337114027290711582558804238092936477", "-4.0928008300346795587963967318969522795914555559316007448013653233486980241052075387119842284031574844035339709938086685807849050185342272e-11"); + times_test ("0.0000000000577244850492733199753691968434531131534014494738041562671682385265947122048380667867064559302522087090151313923160444265178252188520771169749", "-2993829090737873263916664.0234418356069276036115961287838007488804067542802424350078567987894997758950299", "-172817242588377.90289435436410530982271580018756182908074690988652090894327112554557513833605455776187642341828319053607251432332962573366023560105756765820651824786361583489449624159271997847165480283033635286456942690484125635118492744583304951"); + times_test ("-0.000000000019733986238945494869277217117479256444529951600715483268803452518656509029860", "0.00000000000000164627700103694856499141527646022342482582124935390975524916641794007931969687515151257818754024349160456008195507607", "-3.24876076839556011689439563662251683467519484990438085916787388341510942412905771246984808263084148148601145015559577022588882488930808591955187411190280597100157082627777854794533428182014502e-26"); + times_test ("-11427925335330818004816066050106833418219402199072704112963107004970597981437954806793580004070019399256039487816876806901413994111491.92397663856039", "-10254398713648367399130671587602705.557162008583916929614232815559112128534704736523", "1.1718650285828592780495104592683632759974828335670562590852557778855769937220071548729686706912740577068594561471384906191535657977013468872849927726389729680735882934586903957393565745867332347237612282016833288027776053697412397e+167"); + times_test ("194053275594004162536549158604917941716280933587153407126108810987941717.1", "29178", "5.6620864752818534544914313497742957033976450802059621131256028870061634215438e+75"); + times_test ("2.93518376745944436515386335020372331712985006976884316865242", "-966659011212373171674223610192618777699658.9609647969094449683040295199948844301663048672586994151702046353417857765604445661", "-2.837321838378954758771215418938164310917942593004475873952183940640231881169627087395424110407746819193011896535794052106353148150659770269806093135838159918310696520280932274648614962e+42"); + times_test ("-0.00000000000000000868510085783592320951067786028338014000842721104291268902134885144965679501434098211679237543640508019493070439633157498534035049527", "1.66186927561028596926036092509335854186047127558602856573976536260498222833648503213450552687521363067", "-1.44335022712140589682935718532287891186909515934902995812983197529942616459692310661388930461065190889143976230808707540505066234871399330617979826977854860688501351020336858399810037738138869688388995164376763031097320446355893619309e-17"); + times_test ("-1181859428272891621990692513.97972526073548792078905838349464918869621234377765379776830944783886329774493550743931156263730", "2.9941", "-3.53860531419186480540233245610669540316812438363451970602132913587532937850467323589809531777434059977811140282404274969233993e+27"); + times_test ("0.0407860495", "-0.00000000000000000067006193014429870550943276612546055857881417429492755101247850388305957467261270841516039308586250108088434662298612276060", "-2.73291790509309091456936475161149575524931645640945426945087233770604100240461282197497983428394457192787524651402698407269082497e-20"); + times_test ("3534937774831542866352533130845566313027721824245809049775432305752915295270444679.5880933827075988", "-2.2480869970190", "-7.9468476468700692010170378639263153729049188935676493712057455085625903839492076731999624985988712896442479772e+81"); + times_test ("-2313111414785056499431180531976979973.274", "7671974887242891859494.557233282222057816576248", "-1.7746132685625829899267375266227186594583558197192135674091228488559599633565223195952e+58"); + times_test ("-0.049506264282575986354429257789413492175083859994025520010200438659280593549597224675611141989487638448856569022072780436586696496251665748576110537033", "-0.000000000000000002289376387781964560762840433567145550", "1.1333847249582310289779818259083630345427337255960896766203043455335894797786980608848419608105331975026702045607659909764116027289661369664795559011503382603816675539847618267537615315e-19"); + times_test ("-0.00000000875646084168554507977167823489990902563799552509732315823818127203671896010029263145066030926978731172618906161505494", "-12149799422754916719269147530161643795542307713126182634497110622412638327814575847624536131684703485487672095750214266758123266193160", "1.063892428796870678069788900402015365706552939454485642953799687841866869693207537469912665183234951380917914005709858797891441500773219383040079223313752838870891947612334390210947680627998406712051291289215921823307231964371826198854050237980522104e+125"); + times_test ("72132913784335037210708416954845481013.4936052396", "0.000000034758907396517145945375764660651269929701596542982929267988814344071126980935379146949580197412941449868688705948558", "2.5072612704706567177369364733761303227157324401681208246105574307760108529931727084685203750541786884736657231851778565267996322876935570476425834209668059168644968e+30"); + times_test ("319.66733043418522086907604142851830292549270071301298537533804754923073658110499293992079580", "-151.725", "-48501.525710126752636360562385741939511370380015681895206073165264407033507768155053809482742755"); + times_test ("0.00000000000000000062968826433918348928022932804766807886926653", "-0.000000000000000030428038130246925313880152590782914692618238491169604901884578172392510096079664807819", "-1.916017851748168043720386562747740471345349440563638610201143130913848507924678149083014143799108415035645952111410793293793899807e-35"); + times_test ("-1180774887.3", "-1449.996894078842975987074068709452557439051769626362706935102826112305930", "1712119919191.295852285533989737156299954793129899433988390218967916669531638871689"); + times_test ("3647164297747831538659156395004173038414109110759206277814463425856379161036312539485631.38948348284728053244339540610363604645614853959905", "-44392.7", "-1.61907470520630161146234332096501752442406021521200216529134130525014483182136711671623788583923408994470492599919244536883919513865273858746935e+92"); + times_test ("17498312279239.00932701739727337804928343115988922324826729272279616797560451780334324648186406856", "-165176662774787477578875.101155425022270058043785237734912330043953397824558634005249868631913924077857553397476499801921399000", "-2.89031282647578469354264890469746211626219999574969073812160564852073608013566136037691524827633370435651099998507837807111037742964559522767880633090381980310349646177225049281653222840024159118865374106303342746711544e+36"); + times_test ("-0.000000000000000000924379194701874135396133614362003093078303247619775269472734328426147105167965036903810455485324946", "-0.072771076651632335504153815223990944", "6.7268069232824253584377498803810917142357774490329000970581887327408582544296355494518772848722889546489345140622499161796902801289024e-20"); + times_test ("-120631710673724347689914070602312.9151429", "-0.00002802807358811", "3.381074463822740563254319054484144416394255156390919e+27"); + times_test ("512196210721455510182901457014276459874633282215822699880063790892256101411937345231821904839765586258", "0.0000000000000003806505766975721", "1.949677829934332018345035402585815281370286067595371424284055069028866856886403261381419605884609510991608281217242018e+86"); + times_test ("-12004236887475073738586111006769029393080783935378309149099727.68396298775060968922", "-463794927584484417474190358889847435118899635706815444621012022509301590070944948658314884349", "5.56750417793349844330521891159840232636935946658560169085150684088850605724977314027337726117947637117197173970007342920606127105666878224551145677898907304818177310313201778e+153"); + times_test ("6584641990290656838269978401214918847381615636.518803901787", "-10753941414172447057853743167450817.50583947377863062378420539493289850486515772906013498800287501534", "-7.081085419688558260857966029738760695277290042994837834892489736689162992602408154398193125842351999687246222800816463918193016012785992028984897208947841258e+79"); + times_test ("-24326422199657762368640227996078927157504200019578797624814562110060901133357274750788.36441683868312318843748", "-0.0000000000006902888661514497196311777408365084768865919183378538264433157093409003947610911", "1.6792258397723212195313963158909185623783542066080048568383342089993434418422010559055047531507911817998642508826398204207544200195899037683811355076482082358044434397074053955290508934428e+73"); + times_test ("21501938889227442926984999198582213780754593552865516434.28095561", "1275573970012590600214127925446975918013722828276558737918022879.290868107247330446595401054145784513619143055092036112746185085177017939280940668661320", "2.74273135518999619237055481685367562157141441273837681617196746425111391922129347808060414256695769199642463364622072974665066305632558241309767154727027823910405233929660720731520333952798686255808870704290440052e+118"); + times_test ("-71541409973383879506417184487015218354.023574350361463350873760009451721040985761853384121351993525", "5992111795695111627085788865.512914195836892777247907010", "-4.2868412658217344634387154093342340829086139811418993420175349903462119580242132265078555221121329803402221988433584258370336736020674652911879732211025e+65"); + times_test ("34142255447580822559151401211062905510", "-263926755678947832441215581540094557891886476037097583650654682043897799149499355822112508751738221779921998856296667571952006518196822431846845", "-9.01105471184188942905690908904627239542616349082031787011252961375696523930047374090057038095264861536129494798476922062541028503074147788683121044719759772706042769498406102661595e+180"); + times_test ("291910578907226789405906209195597276379329314216442687970828.12263463390116587613", "905766156845279032080418309.2899374863460", "2.6440272319927938125314442437268631851150779004590992519957935351389114318457620877828712701683102714405409392300232098e+86"); + times_test ("0.1447018135289410248822059919088140128370855413338568649453428485887", "-31531043177144606534540520126449707592.441165834043265865498607709043737814229488899678036083217728937497668745235164920031109748", "-4.5625991301921670224436171827297160639926118138546258979023381434676064727971907159899790572618884224647144712250542121029109924335769933935852618344978968520165094454255764789533981971966126476e+36"); + times_test ("-431470847375352240973824243957438268864164144677055441855.1122835808", "-283926397264833307842262874592214804147456.35181960193341", "1.22505963220088520133492369378146202611227577382619697690196693448533411156116335413333343159557018405513846376263877954528e+98"); + times_test ("43.645259992317026943608411", "0.0000000000000000000343476666438615307467230521728116897722871849771845212242115930032028373012984891992888161271678789193222138335354663458270965038", "1.4991128408007717160640135031205392680494419814377001223461964538550601533847575845289929527748139763281076549960076386814116184051973077956967114943734618e-18"); + times_test ("-5333642642837544.62687709591677124286121489157762662337705954241856563514693012115", "0.000001092403520420007654847736885", "-5826489999.69800727677170880845575478173936457495066350494224786180067840981405695080871119365234031637361775"); + times_test ("-72389949638529267084220162178469797619868037471866853897782590886837793391170450755475695445589382444913313865539107.825554816619359474078198937945329", "670516724101646254739075469170811171513447894797271200380414002599176331305558057030387883188608917", "-4.8538671889509795604939125299480164673783805114262471410372408819538068738391487961206173796503249288962752085213903270623213542356008521417558442327238499890085384270939054062390701273409174804755549787657232352912465878135282338593044925707898693e+214"); + times_test ("0.00000000000093389590550371354609879546798604119093458584514838", "-436244725.94251597789915707849842497816062786670486162986", "-0.0004074071633553053150284952158066178287741661729136343492697908838085289189761762237068783682124527003386268"); + times_test ("-210380536819319.64260798498975775170296381658684501981152412255070635544143685331980809905", "0.00030621239427093550265058736827171066633126148745977590497591435654761612693434536026517812303379", "-64421127887.4485697052582576831125251079439300578331516148925455276348682374579663836142871112701981303186673805005030452875519450671912320654524554714586680026745270896999533988168995"); + times_test ("-2986425419210684489372385430630802680.1700076164378161986", "-0.000000000000000000174383713906052937878565432107027682509555072891773406016182697852642942595757484268776430171027151127581004748120018091764749919908464469126", "520783955905400215.3593326533209447186843411978634958052248208818590205254321998670705004791818240022569816115585565216755711284287526937950905747371255207376455031602089558157107952374519123844236"); + times_test ("1005275502281605.7203063810011538411846251379520165504332670989327995886451", "-0.000000000000004001673036573006142766297120381368448210468914793665305672717", "-4.0227838718076871277132373250062298425694133513895898591969064598434150270288761898553450928567831052706301853626314400639691300657367"); + times_test ("-592443055123445281554039884803217796883007011697299809752867837", "-128767025696067370042375219001771824840953470096164458063850.3083988758376157095926583752", "7.62871301025373359356475793746178927840450521702002697787427513491791642079585760593083059843100862890831979506992101025525289259825474551988167584424e+121"); + times_test ("440119636500787798119778.1614067114799921393251", "-0.00000000000000000008016651264632167527854789402319094526310291781550499853504152970195676032634610434380960951927984204641071043406830501", "-35282.856405434903813597479779632705556601606542704671605957970152900017367125637334582859462287579739167125492423421901400646478981405910526064055108265969922348751"); + times_test ("-71579.2", "0.00000000000000993906325920139009275587686844510659032911932338073755273459775736935248889756221559252800727756986462003224559457716", "-7.11430196843028141727391461541805973650486097872134489434700319794292355673296385342340680738522628853610212113863357451072e-10"); + times_test ("-0.0000000000000000028252704404880797079738", "205661433462063.7105307433432819704421946280137966217786600779", "-0.00058104916870877463514486303435785934208231367367250497766551677412065596208835915902"); + times_test ("31511547820580.4394382615198628132988414617215767834965945746200468417564092109397320304169501963915067332074901099286788653074716563043835", "39899961813398664937157171453593.90023813309746209966498824019924844847011387015958705088743565647183663555197208597527", "1.257309554722245458313010717601632793452987822633399487410911056875703458652204694414418020975982056391949850738256638817586034701650856414371301609334505840392336061143829107090319885694135741359164686790967904196966939338727755954779566674337378573596045e+45"); + times_test ("-495789074385555943868529017377472010212654135435451505422731855063537551062677555928072920281877990746962752595360995056758586999317669647", "17819185082774026694204023148577882778297684550452324826832075039839807470403992920788019844375217029982704245209320846148492.201", "-8.834557278493440769527646032308030350371362475818934570787903683344802633346230326610094249834365327683855191264428319975098552784711089348596608431374093713258545096383387667958040878506159831317309788540734024264316478718947843168246822604530057437227626073923047e+261"); + times_test ("-12262785235810622775007408988251878393679277845775461370985491116596241792393397087453508079734404478228220643516598880369382712979645406460335974", "-17339.4599485985180854570917062071088513028304627905849022429965380282572583049408147112553558507464317495273478217946882351121108297352639325", "2.12630073454603527661886448347291489452541354119893214674919284918523671819041714914484722504179832434598604666638655329939148126697219715586452788601752336764716691015791681243794848208962144155133293203564192719333981843088873686066209217435640467778541139472308985673249979514457755e+149"); + times_test ("-114396868590854104192672352367580744901653263217987528344911658496559573111650716561664806136683756515973087947398968856550342371023724981841598828474", "-0.000000000905511055947334", "1.03587629274772706348234847002960858371371655011375374225792356944117914008860239779411591084427150020831085014159874092768298943748156678048631480006184964643588316e+140"); + times_test ("-1112241862840106360548102452612787954701297842442745550953310708233414570014516673446141946344195030870599027775528597.64281848005244542515", "-6348759644967567183872592130062154839790.5635484413196596709331464307", "7.061356254242819213528914158861347824577247501609657702110667409707299733668207944491015232613785616142229000235550257974209644089293373052607176525740858805900274429133922740980503476595397297785266512105e+156"); + times_test ("1108564966618799.684583511467562033896416379326883221554515730782746395008239020932004268892597106459172116648365972554761", "-980241488498709.989691822562361049071", "-1.086661372975934954665249154869827138993085763955003193792673025483663764315894189566505244862737823287988968852517424536981368134752599081608376589955677031e+30"); + times_test ("0.00000000000000000002838698369819955658555277373271853993941828559300730453309757421421453", "43513833879.28", "1.2352264929772849320906997234371440706324351943721359734528135469244723396680419384e-9"); + times_test ("-8511924985976613630478857403041973777452.09177107175699163666864323186579824676938621436941711058306956193771462975562483458844", "0.00000000000000002272278230386744849803445244424", "-1.934146184431965759189809035913423340545514889094246651943997790659345002151610321611910790026540789359818166350027713628491983499298272486356031374524485856e+23"); + times_test ("-0.0000000000000000004316812723968992118505000444628085260048886312014882985221720513162602276841485038550245898508488835", "-76290177257460517.999473", "0.0329330407898855391252124225768438464877945578562524623859269076191844422317697448247001533505237464666728778267802556383955"); + times_test ("-315381216106477443798809516461.945916162611156190552321997295114376958046547275354056014333919065425673748199256144380585548066158378662409475843035", "3589.161838511444431440733729960263707637958181400868325358533381567057455464602280029192715692411789833427", "-1.131954225432699752649141397708477473892667834397120107511962996304791377678417665209758473239521558381343101328776946782981992193865294194693770979873300748942276223781245879606796533776372414124841041914736508348886070269056497656762529089763048130945e+33"); + times_test ("-429554289753358320963153203206734665772198736780.45185520786347258238318355302967532112035290", "0", "0"); + times_test ("1463451471384605194456038106049436218092078691173664424376798273282402411629304", "5.34145410132810384872275111495210652002710418898122721083801583300401806143614616798518502693357282268142295737452661760061198730650979349477", "7.81695886392194762437336924065337257968714608565726584447407244448623703884415455226257285276362586454773057274509044560620808790280438685449822124417639104621469226432169534908781180559594976229125827018100297590274008e+78"); + times_test ("473586353851131907618376944471474603970238923713969727224418527992189433742423567976837249481727621512554255639.8", "1286427255593.352272327514643909503984179320306560931658975694284708", "6.092343934711738377612937734307383870923174240356564095828149119059002227331699554845917346771273434048376444070758413332992760270463202297025312107690635975666422869160358961784e+122"); + times_test ("-4048155812027991860998261874719005077642504207127030646327029367933424762620898655788666633040116830297381192885448334", "106705036497734766140329279268252590446.2335278949", "-4.319586136709639909348938311306692360922506424385494354567553905770000978932851239614330898183516223949738019390821277918151726982015490940436949045524065702817320966e+155"); + times_test ("0.0000000000000000000915543732852883697633526279049753860806942872601198742215774747341", "-34152105784317312126489961356698852045721114680628002017655109882376030549039796836.83153535701271122760014588481469402075074299376935", "-3.126774641456043327979536556784366250157747125357071312778820430770070528036829464402201655884092881178626009467738410063014596140203388175163040146059581509034963217801746892436203877630743347979835e+63"); + times_test ("0.000000606056178575650297523536090137837690540483833323054730991196951139940145168062878729776556286621722228058423687246723575421211", "-0.2110854059592627472281909321180610299910818145371006157746105830582652226002916315944873681237089216185278265414045060813822588197350141208020650990498", "-1.279296144887605810262234886377441922843377685091005337867319233708631851469414819167991307615079977909703057135546912192644428529187862612840717830395670958420462971297341460134768276466347220568187569616383072997479301070810241184256490139848082355340819140700544014708653078e-7"); + times_test ("-0.0000000174023009167704116970725301110863248980544485359112331870888076484651233171728545", "812850723207869191281548186903956096.809765707322509394052629000163", "-1.41454728856777941909802731675169558153278554336163713719217823280456330004090313022045897019660317794534957404145735837838652198044782601796752835e+28"); + times_test ("-2130698.0548286272900651895094179021589945303831135867320568", "-9165947089300259943733983387964594800521219964489263104.59571046797687349727612030295852399844295170184636", "1.9529865633834181981295933885978264475195798583990822467641671177002901506455322929500790695192903123945610282587760480932085484711958893867394353314006055160393248e+61"); + times_test ("-326083155399690502439723947025744049762670117683.432074400669883911818553035189833194671636060400687941284537881087120570924444", "-0.000003445571861995590614007298331872337442294157873364826604749208387112491508", "1.123542944915909132217079826299777527201239718962104484441084589157856017183525173415387994466036390860102540946603848752279383640837621156142175767860780613378089921458710577851612660512939659621552e+42"); + times_test ("-23.2079521420353162165629346282760720426054683804749740406", "0.0000000000000000100667680781319844905727827890837263875737788345658863306751556891847753254997696006873526462699281042889508598121471367829087954284592931196522647093", "-2.3362907178225593297823553952359877724440294726489222805197185879544455403490267478912169784494515330509275220029014923616029924211711606761207039492261868123451812767302600437565610895313205736991700539758e-16"); + times_test ("2285581244840240639260487167234266.6210924312942573974763401176849472", "-0.000000000000000000918107", "-2098408139956538.8125895280916479508246913088182767764248101964273738189504"); + times_test ("0.01199215867887013759356474044", "59219069282514349738400251796939074988014798278062054247507850372485277499304966991398291720701282976974931657695.89320830399601932636241718811893409", "7.101644756509164313135142859363774349015749437363131851507359602111507670252881439883943580721027909131341909904887723338723647408378876006443896747938535856090800949803175996e+110"); + times_test ("10418927567085948892137885878723808945364687260625931932.039351", "599680853267121291448.38087680537808199", "6.24803137355843394317878805129936255762113268577294303839429005376139089696541797413362353758438849e+75"); + times_test ("50831867721704613054022871310081961685717811744979380239875687986166840752637964249209739.95742211098733326424751917109066551862656", "-1632931078636285445774108746380428401452629936953024735101", "-8.300493658790009540471378875888368284941161669991237260884060249140601673097481745352940033672506184736998843139872004445042382050600280557809637308250946613651294900726384303212534288256e+145"); + times_test ("7100289077488660412990.83", "0.842207839712975032430755755635", "5.97991912528935706872007298550620521929833614697582705e+21"); + times_test ("71.01883", "1761970243586301256729933.7274571136169644922999518937631730701127745550670073949565808130784043676096", "1.25133065194314119280489519301543084253886394686592551344848526917216954629436791164270145276976454523688768e+26"); + times_test ("39875156712019325311551200466142836628229123594325201379832637310133453471608904683559565236344258.967154811777952228563", "-0.00000000000000000070081075140934755506891264428157216975205610555238498806", "-2.794493853791575200615635819282954125975165218925920550666607458660524754995294291334846227959636949211292863866638640564674087684191891139999119222389967229521626102314595778e+79"); + times_test ("5797150130947834056182621078494110956594842841052090075870166233975375056203178648058074850906399043556974734623", "5994943195099.1328888761373637634842940850229730116836324780692494703604483", "3.47535857284937649148307887121857419057110304246614305622459943600636593236940298049819575939494986921577262671435104495090825963819204860688181879997983293665235062953417708960478114909e+124"); + times_test ("264016746346020173260674845542.56087744794671212", "44725565833116388541385131784578311136952.11515649206925514017678106974916075594822233327402018434035090", "1.1808298369744115980724840684122092341038122639077601880904123414433464879079693475998082113642766387031979298492866976697783365167381515796702082908e+70"); + times_test ("-1204258217830.1047572987899835756536353", "3745937592881714229717990115898213651381593777161096717540301831660255825874475111361207039098321786912324541172077464946165364.14390772997939018900027", "-4.511076129706525686579204142051251397641532749272813862145610194389074922134315457597697830334597270566875350716009107169694204547970082327051675594936881425342543316554216670569498181531e+138"); + times_test ("0.00001085056051858810623505714593197033408403035596225606886953365", "-392929408749548979689032253667965895311572351400702674561774493496364595721866845891578496858294676481040176.798243172529157", "-4.26350432917002414454392491493274497473851341095485596409214868708449409899775190195407623094650897889780302985371766392684564356442617678251382828651108441963579450892957153361763305e+102"); + times_test ("5029414448475920188151028145401135310150737258101072206698406572639528330082067.9336479422747818663155268690086170021619688524908875089697158589347416", "-0.0005229224526200471446836303862066185994349069612658407253355478392257635933309390353751513396483385196163571877433495709051459895367873144796893", "-2.62999373863972991595232699135390284144005436661268919696790615365070651823630721931258425392749116101462135216825040904659228944045018325148257573243654477716244945479320745317393867583646412220760107366403103406898337360145950155726573614185125610071875889949474494080865196631936734378488e+75"); + times_test ("-0.0000000000149459394556759606943604866160845855165524674884428420450005789266873424201139870021367301867234201955279838923502786908774569432473681039899", "0.000000000000072681121445777643724015525", "-1.0862876406992243098110834770746303342214020691767313742628853277726465868820586019765285955443439023247300317509304826500549194884609623643817234580349404842020431975e-24"); + times_test ("-424139.3397723", "24.9352665519292948435181504860531561629245676859909123534754923791320492627466971516264644236625241080447", "-10576027.49238160664772089118930618199418545494982358874950081130097372753242050309994330560576035740865221100909622181"); + times_test ("-6547933974356063515673579783328852017212683547729632232078003886270959230998276343908132763800852667899598581090407618744044143894167068562238.97", "-11922174512798027988.715520057164002099095961564815407735892440769625640988450493600253780499938690761112753154279778415248891368390538551750986", "7.806561154055215663901405645925227739464677757390641017715015265801022422067920560519544881469304761133200469523238148889436630472098386093418009954492665836535393992406767441416546896285667079520157050657599018677219464362114136929451396800416962537931259941624014093037081081406512442e+160"); + times_test ("116971949153.5479374797237476837460980054925", "-7392852461118226343653879737274414841079276534234761286995956308826140702012532258763158080532", "-8.6475636218160290233694135116834390249179472139880806248404813419843222333387482382624808997980446329708149926437827055618140989332201e+104"); + times_test ("0.094736370343830975556009350140982661429417188805833955451765939740836399749318571449220541572349173464405792553494108387767327206545387797", "-14063088472465823296636520114.7840889695829209677553679799383909290850887704576208141405158860265325506024127861905793354266036", "-1.3322859577055824770031704859177438035519692243531107997889353707418395463470343576295679587059797728931003195157525260292910231399354545892908442725681827168435407603526548235032165419174525789568586355685792534406527613767949403942954190037378443595809925962692e+27"); + times_test ("0.0000000060238848102401094509085687708934429831403505207577935573", "-26397976144679538690.6353645112721463552724006844", "-159018367519.01583899352216272937345079686163173486566881281209888168576630569925947787199801314243061612"); + times_test ("-3054832823620065247866462699675075655044.24965543051115834991093974", "-2755412779439299724.2984036924450889829105682176654094195240144615415006313170056714410711837165723063574799946207221645", "8.41732540125336804197906254683195597019539860395893943850239114957397624723405493043107443806607146233611284249167142426017200712427976573775245903141353510518411863114852845764186723e+57"); + times_test ("-2450974019399956698469496563794.9748364333942615279874848551026505204635039431974104398444982010445818729382963397261226755940436258158321945719", "-997.24040302293", "2.444210318905143470429111243581921471467515949023475365592695716839122688195540502841004451264728108191685433698308378621706762322759533121835213000697233667e+33"); + times_test ("-1593.003418430705083401260653839458373", "81482817738806321636670141568925456324894595.35515", "-1.2980240720128456541718518746184368534776478125249076285377131164060683232627757617095e+47"); + times_test ("98261907174900314009700603815243346086200.8875197975215499156", "128758244401452895992559910962986981947835519218827223291426174867182696533638857.4611504455387701659979843027781766", "1.265203065937869250805348094516614652285677394459393456309889824224472248261724047240316582653646970392779473698285791164886759948690959417233989768983784053494623305125189496e+121"); + times_test ("346496136331578345.6139565562", "-770.118198136243584727", "-266842980172845321727.9109640073233064983318371574"); + times_test ("8094462815401859042799401705641425818247198451174542181431184727369479972319.283362207236223116403463114800998274436638818181016", "-44716739326169.50679740", "-3.619579837016970552211688799002785780552856029741836983454305219747190234820032824275611045529918418220339456506414179332920358828891256009156381584e+89"); + times_test ("2729467653762704.3220008736708120084460677187730093661396089914034", "-0.000000000055233920094409680756264812311791211428686742640081962817736283081966745025774163718774682975", "-150759.198288205079331338550122412955542882826158428646159812354506434469254169683873619612365382943072278940175544745711284510129905967399982740638335337115"); + times_test ("1", "98776520222261745669591551900242713389385936698028187815152403272299821654553681210659893142881686053028403096887300880878591448.26475", "9.877652022226174566959155190024271338938593669802818781515240327229982165455368121065989314288168605302840309688730088087859144826475e+127"); + times_test ("0.0000000000000000576769268158760793228889322171711548712267346092999553202187549995149774466310618281592827181436884024", "7214897443070769737.590335358131669664171271", "416.1331118080442374873530552327247807419822048775263491897727868156732966268031408562709186237110762022701532092252726416209067252838924499674504"); + times_test ("2563816381746605865113037452511580729789619725008213300126058517120912912629866105171095179961598", "-155142400902758369245790224073470757889134578664867029684200360213407983500899972118045933740420731880423071611781.6961697019774959718821", "-3.977566289379913215989211867005456529599318466838788807437369058021539398823672950585044348343474526479765303904605036245529631372734211590112787398817987454064611577927370338439226841015272470235504418419674575665836030379657835958e+209"); + times_test ("21021355066083990352764111626531024748686292365672970531361459847295.43100373125999514720142962920161062", "-8692703317497385289852042779299.702257622199418950085745", "-1.827324029212387699226954866895393730056663738212949267989848701641289722199007782369745673635690581526275165825369689624008225949130316222067517051411026119e+98"); + times_test ("-281371829459700411922161394173847749045", "4262.059148155501", "-1.199223379781965638825029107725389720131878012484246545e+42"); + times_test ("-0.000000000002953739179434260253787432770866951567504749973", "309547007791848826075373946352866230269769314074366092085025869.7201225815415300560895", "-9.143211247914261165868175330266593984659858074863087669862336974871905611291966919042811817692587876933585012091675114363636105835e+50"); + times_test ("-0.00000000000239144278978796819150765880370364103148388159945376101153092134918047349666341937807866834", "0.00000000000017790542655638507387717413464523193083130128517052867317685503104374366725848235452275428161059560313199945661107215", "-4.25450649602420004053833718175053649747723590806183497288310789806254330950196751041980603311711723907162265791776589017621131644531690317327724762991500539399348391156280420594867129685071798617771660731e-25"); + times_test ("-418172866061503521911971552233519656327026674166049022680423475766548238660534576", "-90576902506171370108917411667870811129738963466006966688282481517335876800502911324072307434897211522733182430116410086632830502124065921343765439120", "3.787680291997906303359954806060523264425173800836418334594593478681399250024197130234921086970287168083653907490426018256804158591064373885502948936834304787910451280809462727218951755689222074507604311322831439358572513258301312e+229"); + times_test ("-3430311267169742574955929826622072681758112689207488355884200258692448298952.3897753652042205852531267397500939984515487", "29178195104748190876234156211954739009200852852565396294", "-1.000902914234947463302590931129086303752468365453949881103219746142108956587996112362845161460507830640398391094393578265988318777026054838820693518977773210730880397735405178e+131"); + times_test ("1217229941749445.9572811858261781662798606", "-7688.762839498170", "-9358992343247662165.263684546710966628782232475881555102"); + times_test ("0.00000000000000074169408783659430746120211730010355927129635815598173767929633977753817875737683684742368617111968470780652946190285273916758224772647017665583547211", "20277751314053396744396463.85165787361341700070969293684", "15039888264.2541356850348902729846895882151710461905734702387731438442631412304238135592144651640509390778276828843359389845898882091777630101738827628755435200638106447703368100930825028533561255938115324"); + times_test ("564381466888810169919601150245392062064224480660735222387818244250114897197669997801703266070021836470489338410440", "-0.0000000000000000002645655440014235375760091744435849282689052519875067111364162666736597818970677355465081835", "-1.4931588981175946834283111355443773198028167610654600849890869545798597157736617913162581558616543097793344871513878994482479287199763866058458885636014581139878719012494628251898131796309084420634183574e+95"); + times_test ("0.0002901387540443867013405807910333533336446690397588380128405647147868703703433303126537291208249472115", "1532908562403392492424723937748.472475940195350", "4.44756180359692297666882276804364242887051626129128210500015334075754912171335276467442794092825498742382966447793841999956236194956994747766525e+26"); + times_test ("-0.000000000225264190604268810784537320407445", "14950.700814220268672859713833679549117660443531292433032865528784491376833526537556454874844228048068717928075898239", "-0.000003367857517881911505578414004206612694308367570237761083545225919631139495505710310659653325677787421658102687518302736419664735602327222663837989355"); + times_test ("-0.00000000000000000132422391255571832661986637", "-8685.9441213328949678022978068", "1.1502134908591787160769054777064094203031244635960077316e-14"); + times_test ("0.00000000009742067142157691787222596751006921098920279989592268344573189495144592", "-118923723014528400203978798877563012809910061320326.53737153377573592386", "-1.15856289440289961067833399896083071996865135302176383556314783677919776746205807113913241561786412522310269565833727285343010237305940276512e+40"); + times_test ("-0.00005563546373241014529561050614463373299027558680685062277259553861178444745012994288955540119513731389", "43565560449530398941183073235722526166955055524605404664121285806765679773941818978977694475240560247441941103738049224883.328637095", "-2.42379015837197033639269209261239035396339708689516443560833885654548577622441367344082188020100430582832598711242044837458341177912171781239207907145798643930933786640347757166079449567939368292304555736474640815549897983291274955e+117"); + times_test ("-0.00000000000427087426712799927089415837629262439038369512842420608188380156879105597329387384339607914876727209877963249157620642500", "925233928141580102390081693311444.71", "-3.95155777477363086022568547662201291712827700290280460065453355510078335629837128123107501594590100763786464243066847452995303895192418602700657793426175e+21"); + times_test ("-0.000000000005091071907525480076989317935464438083994221617598954017569512203716892574912245558148612628718382099960321042186876280738556548120017521", "-29849639725760264066839307790055758277806690063171510919436665089162295348507536342284533528662967910860808922458810578140340107788205629605", "1.51966662257574655588783076840748333702840299074683399397337485352697121303070516861952435606970784590094155132031721724526937976956111602321500551446919936325059565949482713352248442850374534543475972410515760725383665948678467615176539411200064096625744148848636243436309205e+128"); + times_test ("-2532623712961933744380270221514261860541083273159263155049.929201610", "-0.000000000000000000012646589646423131239682610662957792721023875661746627573361000945171", "3.202905282663009949513269540690749564425465035038152243969308063023239476727318839202045865432868677151160472201684195600784341492531e+37"); + times_test ("0.0000000113044864730", "0.0000000000000601669081479195180359444266582823155394447964452777", "6.801559992803896747300132989382930294307713993458802443785521e-22"); + times_test ("33142360002065196584755139040522165.652289540188139925590361076693810562392719569608216426237486549208210658659065", "131866276226694967054888110190126225070936217278.208055190299743946923315513586077993", "4.370359598836895991628989736519636562344422619159613116474448702113850541696634666515624356906681122560009861221133939297280288166624498899890285407603655628297984634754638006796334523457886456545e+81"); + times_test ("-28271980269206475098440832341.0", "0.00000000000000001997128856200158301984619314093468302232590147010149380231144706644261177500747535724053029495", "-564627876175.53771205568655371502005478701323612123758214517745046808228380387390782642610030197268449800392442510422897795"); + times_test ("-613824085218213402416390718799790910276979950485725176851655692450022488003571999524663227579006467246542215327798466491629903216135", "144351", "-8.8606120525334322852208416649468617689392332832564915003713350860853196165803621703384661564257162553505615324783036436533268159152303385e+136"); + times_test ("-2.6", "83102555490369.945045038594374940850", "-216066644274961.85711710034537484621"); + times_test ("-19356482713244897360632880493785297953636172550378939890381044618408211766861486580267956414189437617939.34723659706434", "2096663623111671700117269467244749170.87006096167689688793276499897977784848766593786643930915441409", "-4.05840331762504879192862674091277246812216284989188033185403840621110675874956150938505763166302102413483441063564098934208044556598498878291756337336898624598153836135376440509322121089075137894784969112914467325506e+139"); + times_test ("-0.0000000000961833377275620802044513471680247526397846980939658945385489196881637745633153811677968300170851695260551929219", "-0.00000000000015523082518616051240657860119777317366287857462125986656514276221641140341472994194237", "1.4930618884608626385191111567704817106628003163415171598035214188415333416493921720574942746386069040797685559452034643996408611374739944262662458626993363351126829421325696180467755211836761710903e-23"); + times_test ("219117317452336788720880703911762541205752470989076742619261301626536476137450009416861100269148147444076", "1703053723960030665485934204490791810931377645235473549551623.9346390876850553262664923156", "3.731685634713343871742198830618170312603304239495468980986930004166517969952154798942905166375391398101794403344384735628903779970526327721072669544702681593941605616683824986240005980347423856e+164"); + times_test ("-229026139172552757937028186554164451744686.4623797082584117720", "142692877312662716284497225068488555041426628476953112845882495240122781240223136406046110921847532189803193193212616817958104193853628", "-3.2680398778341887238160775782128956864982778025883686830736123355786002576636730049750417595903040868869020303794371246492434867047430164188551479071257052965280634450368893979035874971520108816e+175"); + times_test ("-1073665452168840118738785397447323896819780779969711513798521784434976119794308932309275291527935867797575529606291327909398442666759773299", "-2201739131.40829642230910815", "2.36393124008131787118729847898108542201223436609958551819420766250456830353949023025701558031680369332682327153434667887063193820677205089342493716611601619687328685e+147"); + times_test ("75900276157586733312083235.382581622118846776984080849994704930212640859922732548092821867297114657673701742587369980172993", "-148738026482687430520904431699391318319406299324616632922", "-1.1289257285170424910960307900697967942479647538118082242484827272252207217650225144658178111388034339556050832590401486962625381452243039292709188298700811929089250125886739075546e+82"); + times_test ("3674513449.5", "0.123520835051992626211564329410225789797398349299387483082158104725685223328601760497980995245750734368030304555231401223", "453878969.6920179367892193608523230674423001146096982086973436692999598612243583269792089846259066311598292369117788993786442487385"); + times_test ("-0.00000000000000000003630523450169119195624332326712988718220493077008794952403238435717494340472630938510", "-63664735097223219209774981628599525664223257757965282787982134793736977272874143846.500", "2.31136313719273856014857129786830896070271022062940478374598697364961332865316791963355096598256182029643618880489361616574337962520294943300606808278625781284036378715e+63"); + times_test ("16255476060889702058292641519175308063089604.27385206453835321058", "-179922219665363.16403587084722191165281635104378752030512", "-2.9247213345924492933598059283240736222331848885894205158919467816021766897744680020212514605436690223674872782932121696e+57"); + times_test ("-37337860121811988659501056235845132337764643336213883612586814001890615154275803513.70825146506875697717604166850546696", "-0.00000000000000499312215357184649280143043628595160134265705278153950603622340397592808084159267174620857129590490362315100615527713253386", "1.864324965411862434361080737439842005056233440510613636437519526417257892974279749554865180460594721444483260908377047401237999183242090755697516312142757552953410741754553786322115284832812113468103953081138139580969418569870010178873112656e+68"); + times_test ("595287249.54365530407831622115559910904721", "-1768420334499109507714731763995306162286136171277649865409003891266116172008027525", "-1.05271807696104578648763801372031670967180464094032778762503630348461739223752684712175511968739692938359619321797420445525e+90"); + times_test ("0.002815450816912", "-0.00000000000000018862881579393125180980026941613678890399387821675560344766145135638", "-5.3107515352016691075986894697522001159488606156481160553297195685733162144309856e-19"); + times_test ("1746219149830810782027149888420786044489923228652389093.034680474110962166857959336903", "-1668828010190656.963346733783314", "-2.914139429168972634501569834110127443990322655116665224756513968188822900984956290803407975336799390526947925836542e+69"); + times_test ("64662722228212130661621650365.32166567378954381", "-151753087137277233145197949.129178182548659416754566676577139611814504364107493968621776", "-9.81276772083142891387388835588024421410101593988612095879269873008015700198765486880253915926871899215898047800746249703290547200656e+54"); + times_test ("84653669316972.30754613548716676668630807374200076888152269704972414345399368365406435043236681022822051377689088018808589089790", "-891907791289670302078281451791247530469932219962285948", "-7.55032672250669035947286471317344472517407746317731670298580361066330532006715429733763760659799434857873085352566481727017961595406096340089709578771542056983935886992682102727092e+67"); + times_test ("4345027127164155965936089847807081938532105519246471030938300717258607661737728621832645960975070377608443948838275506481065283884757.660457292004587", "-0.0031549860729161313643870355404353", "-1.37085000726457005604716494913217288695044606549706377095554606468800726719208784612404038925962557552104905114304146931613984052107356347854256094879310971318422341980712315767211e+130"); + times_test ("-61520610530668063822131867448046406754862343293090074441673351607446445867575168630626", "35605600761.929728479163049", "-2.190478297185136890729555264108152753112278766935841211441225374439764529201743516915979466007768687467908938674e+96"); + times_test ("0.000000000000001947822987703", "-33311862590868220285105571017136406095755495416393335802876470598016841787968672731566765403", "-6.4885611717696735160488683809368479132926370588940189388177405221668999878153400559367803107491154839309e+76"); + times_test ("-72035384592407021674980.84729507555", "40650025408409173438512516280344375884605.60024427411502645869761254054503221638189674172185", "-2.9282402139858721209738248775767586249381088104728312874024564502752576950437939324991537671241774101883194117425137328357675e+63"); + times_test ("13803733920957278337452274188531173497859274744002844428727547285003127728359.612974872709554753729793023049535183014700983630415660322292927376558448", "1362366267088885135733900716922.19506685185416683405604525950523770517636717536975000710349005385816611", "1.880574145378278711827375831194045930202239941319475711762021264109852456142716124505511107065080979058954130330974983743544175658555804894085980685328101923082779320611251686876404105639204387659101043361189777091188374895482149778850837141250779728e+106"); + times_test ("99584230876132495816697493861076736200925464688036538302231243310765908574488488858315092454091884601410984087967.53071632699032523", "-125146154822705515.5242914429658322722160073394188945992631305", "-1.2462583575124528246919426619953914719378688358583931729348000794287085154257080128549535423454367290540927132043549939350598411440675286201751061031732125669579309586594569286579560542932515e+130"); + times_test ("-0.00000000012758277143478046864136383313563417", "-16907614855016026181418628647663025463883570088670313587786762910136346.2239859700447043819351603364622", "2.157120361554808579905490037140343865957737705652239636688633884876362102934163912327493095734496347577324386761512911704717665571233374e+60"); + times_test ("11129202925396407157427240475525317417101748679895585149981795954110715244429638119040083910255519563482482.88385201997256314", "21121732286510044978255138780723583329997392678716700.9365222644226293", "2.35068044752467336469513267242489085155640464226702784189610421069783258880761029174834312728324802606762609982209717555410045636138013876460541334152485164353688420275011580410260339339064002e+158"); + times_test ("0.0007623108288892070002324554289862", "-85942313073979832197394484133961158027209650751540287422505752621999709082525249310360508378232261949707995297970944910223297349", "-6.55147559160812975392489905452196370592406606471681012737363795317578187614200614611166153102989166031105288845674348069177007346051710313415670312952762175838e+124"); + times_test ("0.000000000000000044051571525227145682264900344291236843501956911752", "0.000000000017712290570674458162141325247384093633836742093", "7.80254234949672231546338647163006869638114832232612780787802882189163497793578826950951184776936e-28"); + times_test ("2497912210234.005032121063", "-36215243145530210288660899586798506035608544499.347970495067719072170763689884", "-9.0462498049813268339455589123940089929239003754340990669581623284783162621680610224389952660876426692e+58"); + times_test ("1502959485835975870623286636747688.63", "-18.6", "-2.7955046436549151193593131443507008518e+34"); + times_test ("0.0000000000000002380492844605809635389684807457429719545734217366913382", "-0.0000000691300263175410058423613287987265961212556285556225346008695026090127373853991949000359920026136176879063299466975538116975010485068", "-1.645635329963176721222121671096715786436871824519931699863275362362108471140125039004626432868692100285050495434763779725307894808337972261206505074892100990010512693296587878317760379976e-23"); + times_test ("254809590039852410310539126422956405351723766563016602332405.68422228", "-0.00065877273880782339590525760713666216419301807744760105200422", "-1.678616115050522497913933697207225162184024783104908394273110760014145206072260328917980848745450315587200941660750818259780216e+56"); + times_test ("0.0000000000000278510475015254355758436577787533929830", "457360.858470081742985", "1.2737978994588698477266685597352939795610307887931308474255e-8"); + times_test ("-29020220592844713119041607050693801334769100420291179736770161092227817.69", "21673233203860610976626552967575106778601581986955436993267108076405912742379179", "-6.2896200853620150098094834197552528045796701728777707177496046234367216918962571321926709133055901673078103556052889626187364066099134572001385766387651e+149"); + times_test ("-0.078265485392684407726026843083593796846197554496715815079396449815003056610109470601087662461730977229533667789541208863921705388520252404620853855", "0.0000000000000000206254796419314596280180899887058415", "-1.6142631756326962818018348319288616709731477037044772633530435371256854543702769134066969398322149439228993616976959581068599334680519507769306737453547711855684460684428941562939825e-18"); + times_test ("4795305568846848112838662002421291203736834738342747362288755835416190464055590424568070003158113658996255292.35950008158232661087", "-8285467911375377.9458513915656103724404947804473238339", "-3.9731350415920213266579109721401773253848863967652965582593311148492458733327726591229165001156155949294034378674742185027297365357231327284258441411135637685909564095376656361814493e+124"); + times_test ("19117591065319548455532984279934187350039995069275770.12929477022443443469354713128796911998383266548606048053491", "-65695070326024876590276239417471386610369211243031736907459699925951944200466086828836449.27041754314379361686911712287570702272", "-1.2559314895003525759288047359281823933287108050703977637835742243565477054442990115080659989437373048015263572203486399172864054362529301399064585328306575664987751933695137203217341064876484312700608044517901164971224777248000985491231552e+141"); + times_test ("-4449958.97652133495121566", "-252540313515710072725302657773.59471991586456171844177757978469637150589979632648440614666063", "1.1237940350627462471642735367835141315103130147959353855777341370569264164618648847956641021208508179253842679614658e+36"); + times_test ("-1258441607483954377789927095378751802020005502122407.10214476628115698182122581797494", "80891657196033813941356884134762328483.27517852967702319172611835658583660879767525096710103201452929464", "-1.017974271138177784694027841372230917155036713620577632485672383505466603972062360612431726994977661204677518975067557466197345901755339173598338486348474216803531725823378534129113963216e+89"); + times_test ("39808017028002860936031338217973215314567637.102901794", "-57902551664450505458473980503658853607888324171.49605292290375427619687232427940212558542266526276651604284541035424385620765024160046792819", "-2.30498576262326111905050241194114191659986825956183943894195202199609220277997857123964697896577008957095100523340998232771311496428225722320228966585150676608054417194697150023556808021417286e+90"); + times_test ("-25293916752365259143834809987793203971606533992589538543882915368792362597533769162577303959554268549391839092976944430801.45", "-18870536.1312144", "4.7730976997543781813462001933060950776383666075435301423297088056421996528868308501593986755779476128550409285754930853295224839815378088e+128"); + times_test ("0.6419603235395239183208947139633444062611507467701373727615510595813003", "0.000000000000000000017952483446429057318650827831163686139172587165173817840377201106607889427351733260566157112519038473019359253459211", "1.15247820816075450454750045127898262549290759007121217263958499250330256525778703472457460506113402017388245419660594286457976772844458813380078355709054799484514557844989901980643920633e-20"); + times_test ("-7754484348993.123525069214650584107205341890439441675333976581900424068864364093826806102195", "-1752105446017682.49037253813167091733073426140377278798600289379784348182745501211856094498254897275180116436441751208660573331994338298842267191", "1.358667425892973493966955704447747036342266355969033025086821842915237172969178185006052744518082018289583598988482542984184766184862727882606439182799978323965924231683530282046591309550608146208712260753677314753286354780307441584245e+28"); + times_test ("116204805405208024790396987614152308611917319625528164258053148681924874821595877349738878308604676525193568190095523284.4546294386699942279642", "-0.00000708667732873965881702012704870812130887887783663833386408", "-8.23505959955691471303838517278590066464473883263415152528959807184051797771275805894703979322626180999206021924871332410324136063220356505352392864892088775379405012455775331410005572958884177905936e+113"); + times_test ("0.00000000010139065992977811728", "0.2823639034545530635547682690320968784587487", "2.8629062511605290206092872865262220006122998552333654430647536e-11"); + times_test ("-182348440817089344.0", "-365494613346284385774359945728371759418255497043130583704938461995522713031855368282526623182864551158365546976602079453.8724", "6.66473728707398913969618817118679541450450804984276803582504571866881111782170812402431629687112708340501385877734505804826605490564775757056e+136"); + times_test ("35078436593053772121948478354132824046030742485793509661339795486768350160379351940260957647345172644134739", "-470315326468850136120.98841520254693896261066046950478030733711497927705290819414286702121213017731741", "-1.649792635827894394262863251819308110416062211172951136883946185746058880577253761809396392427026832922884334966951567100285510447677219200061048033820977456094076440088034531057882865490348221044489361050599e+127"); + times_test ("-2329710971489131138898317317972150487.226887180882642662346810938", "0.00000000000000080780934683985383898326280513685583649350582", "-1.88196229820427637454825838040513247697835727714033766676609406173243323151115501339627651370238022434265916e+21"); + times_test ("1689256363719086734358832495291997380220279912721648779060.022015003200579854886304", "-2259059589029194007856573438.47207932659178007", "-3.81613078678819075313019801142236253002420775187972657992120430084415285628119278545102507880850081033723214556951631082316128e+84"); + times_test ("50563883339463774987198862916277845601202057166416042879.417778572998829235141574907848222440125486172315940364098463976083652560077213", "380058072907244.784369350321644073081361404543907907939563914660519351353607790299736723712817719111414068853481728614572841297911762329370311135686891", "1.9217212060703343272665422309643023974471329394919471100483903476011902558587720793118211708282887302802938658740501486070477164588947572483424138819524122982371487252360991540904867150086111696239666594880341944141794568786850282040411150653341851298511444181398173001624310751914783e+70"); + times_test ("46294959374709179919178793118885893663797283026751959408680198256485686362073381865322911852807891547580600.01450863642145", "-172254", "-7.9744919321311550777982238299005707271637371904901320159827988704726854186125883198293328582935705506369486748991706581404483e+111"); + times_test ("0.0000005527834082142680454399157347331241068314235320652520705781207217168327100784683628889780310703", "0.00000000000000266632277268185128455781020487589646959589371419742000347748975254376924718637309495578143940081972955041", "1.473898989682390821841521121371414207169953198718769475649011583919402328920280159796586990896854154136491120298716299421424991847787084749540756307376833028770272042850712186481647279973624030103823e-21"); + times_test ("-3018957351229289626132713890715830302577902789980653248950686120322288204403609991088469882148969888336650704961738500782", "0.000000001082120521596790393125823482055072836760853689259276513674877920764922256435650861059862899919835", "-3.26687570359070362516085008576334548950877338799335353420537013795825989339548239608169241156257202285080364129276771767713053661332672872002678878052870887315156625253726777042206003909947050207392523720502088481097e+111"); + times_test ("0.00010578119530223846946702960127201887002317294288", "-6085787778834088.70933788474669577642209247160329424394222", "-643761905600.8247941857377235732296308415119494854462530749858584648799519132617834281892261058500803936"); + times_test ("0.000000000000000039289970150049295306833630957794488396625415545568122904585548214355360114104351072386053992611376825118885803929657418065649", "-4605169823674888008751577292618614971794.977555723667587656862637975931940238288328992", "-1.80936984908094126427921442372226709393792657401598962039210959706690306344862877971519465406694496205108752617960289681246511462795560122095156580067059723548593631880883004929720338763881489190940653165995808e+23"); + times_test ("2514613511.2170783808206929866132543988564534527876194954598859691571100338559560", "-1964495794114274085237575951315085841.361649436638538985888913723131864823298797343859193187321313839924840812597640408726788696766685", "-4.93994766660887745881096220582576848896286904471239767301554888303067612828309748777331041576614562636212559985704314683156812973279114418194558517790467846327290437698974640024899151989425196795301938022962586e+45"); + times_test ("5799359.56694741019279510257555786015925813988005191176124258432699765886085", "-0.0000000000007231844570746320510997217888", "-0.00000419400669980343608737887111010110559927717748555612552954077474280846281811020478125660977836613228848"); + times_test ("-1791068145886144126734036774645051199503204286826392100458612918035133189286803934233671078314145954721325200457399093789769043791391200626757", "1.902", "-3.406611613475446129048137945374887381455094553543797775072281770102823326023501082912442390953505605879960531269973076388140721291226063592091814e+141"); + times_test ("809656351460719225181711866.1488944461227535", "-33867.144809805871082384828278160351409245109", "-2.74207489010992553148307158515078420513099421238160223165035288480514204794793834876315e+31"); + times_test ("-15343174181682054141420677206782114884223299540732121123190447946670136382584737580470391369", "987099689944419071747444299624152052403106779038923393493086986368730055942594131963617011747402639883887116360086428917.245", "-1.5145242477501571458201031358834948135288567189066332534201297139323596513233299183085395688552572218144560229423247824057601351422866714799537508985833062886631036720671807768726086293443750449585213823804063258405e+211"); + times_test ("-6.1499", "-14122475646217852912636972117760232196408460299060710372963438774127.30802263764662251543254158300069146620610278670238171347884347702832", "8.6851812976675173627426114827013651984692389993193462722687852117005531608419262963807658587481295952448020911527940977299723539499376465168e+67"); + times_test ("-252103580004042401308.937513693319696445897233569009398", "322191.07259437929639208064231154", "-8.122552284638533411190811393904476674853317117242659440655935323513978821796270385292e+25"); + times_test ("-332385.3378738577828707399978866231142878436743418042927022688847501694303446138653358154658874513293895263254386919164060798805928631172377176121", "-1788688861556141964646237161499263851038929089394372356769751862189978338244963495542562526495618342381239342", "5.945339515995442741438198459409608195257376497495695646466626108763151210023427170436149956435379334122608797739249630758718894850267317176420365157416700495312818386418495814195596242152257323833373715286243473836090341661932706350920849774582188152382e+113"); + times_test ("-2460917323354918446645703674853641464.424607984385990612569219446652731606596614873511538897698788038533", "-0.000000019704561911223284586046679188808477807835576405248282475083383206973764355330345760276507856652823084974", "4.8491297756448881664126623064115779205015987535516032622595439441897517259719875348865351513634911289023687531425512745832163192476366584227547545673644644097372482366494539257564003995127411984043445303142e+28"); + times_test ("162243669579467948721172981736248370537958026297935040744.847805681773372416035821372548485508877545367724814214913560686058189175343393608601489512", "0.00000000000000043034872397155", "6.98213561759858159315183613323524194776931640410698827712570108401602008047713604207319502488289379085249184148133416471274154998412862192528868878238703113836e+40"); + times_test ("2942112647049268674939521727079875936312678683322556734336248.11424534652681157516904544382063913587308466251549871327575873372911717", "-0.0000000160518477504399168052667437532822966025370257875590966186547766187236177521021479405317977917073345500604689071434454454499836553580673874665532292", "-4.7226344275078632315398240344022433291786804929459211275348315431326149856316741173727784448214255046618190169485768234658926420021181206553535921500696882020342752168452799288030099975139315001872319829531828024996830308930197541236951052531735501834035920248180157363728665364e+52"); + times_test ("0.000000000000085659689652397679263363379344304760754897339", "6.8", "5.824858896363042189908709795412723731333019052e-13"); + times_test ("-5.7783188901971298313183550831107549667729942738531150581362739386230606910679155155791688758", "-221439820124804823862034700.57305405733456151859741120374945380903497467757168028277653394776910998991571631868", "1.279549895669014265673487530332542622307080646887562219389924149894188918975837243317437652487919487957552517902434975981852190469467703844441311320668017835940689319709278323479039083091077241610139944e+27"); + times_test ("-2847941374822", "0.00000000000000000333453862751515460136267946372896613495219431745263240560720335", "-0.0000094965705232425743530447087065739774971604318716917458420879678503055240537"); + times_test ("4600164782241764006590425774876842089865111591027822696582831157578.739719314165811327385420927586685826049515030783212", "24936677097532922790671460124317897120172195409691302414459854884214881356875622080300.40462", "1.1471282377020572147332327802533044122369637791300506227907535665141877615112393905214612571695198704856557157162943485152720303637986357916099145417183717023786789993994223448696820674347492278452767910323944e+152"); + times_test ("-0.00000260679215621874990889590646697464210606210167340857181603112129227967025884261071747351602786622983212594677321781361453743686420364802073156", "-0.000000001556976867693202856950382092896216853975131678027766508144349094921207161", "4.05871508611667956997596806284421681761326338922686367392307074925675080478202951240305304779651248204530654676779205376458787347615247100101002125251986813572273619622642745986755165968519176975902222802953070116e-15"); + times_test ("112005422206895581683067200.66464306253548778644799733891467497177", "-569288990012093221416615337507679289992168170439593101496410.0385811397750145927182473472588677939073196039082322785618764898744620304415", "-6.3763453684041663102425299537134781104795400180652201585238496486086184313570463723811857606393356939337147660320432983174726251428956040334352123843908741307666227939307913535913017213265015893136455e+85"); + times_test ("9234638972249568361641387675279591873348137130244080421631134092282316805807483776006033822789591399832066971", "-67062258760784733815191025025646336427603744103904997634972806618201463866617680780550570309742758409129550780654178901", "-6.19295748319427746239309128664117623036037907234855321924344705389173421377284837396403653127764945278959634318829418910758542716822570206539596799575970845747768528847286120187750160040083010843243686852268940286480535647178871e+227"); + times_test ("-0.0000000000000000213737912857665573638079572432586728390000134190", "-181285730.138353", "3.874763359064957107044461619607858392925857065967379726558907e-9"); + times_test ("-2506504.0733758501826133673932299604035650762719626337255035252843580215290504920568908", "-0.0000000000000000063307590401488217267263854328109316460163087745601605669460055525432479875260852024893294778103375548445194197525199702769907", "1.586807332169400912551173916660722325707840899719608136941744779695862574081783246376975996756197880571888252763332023979673897643998859766655287848000511959009182082181258704230204193519120752866923945862251556e-11"); + times_test ("0.000000000000000029191265291623096374212238517809915598918566680688197689722067072109843781983891539215143111679796529799027", "-144459614607567236763647582499049882580370335188691777.776222539161298865028936239380239788850306312227587059786395648441342513", "-4.216958933935126326569517318236903884107951508793088777740048528137080091324499213666957905481836509907780548281139659624937009921418073052266920044400057847392420013165462539973879514483989622402887652609685114451199224677961134851e+36"); + times_test ("-0.00000000000000000011367487320425818863869979220926084589271902620348942087918357405316552888186055679751253463369024199347442851320519227185478", "-21839", "2.48254555590779458168056476205804761345109081325800546258049007374708198525095269990087624386516119489548804429988819402503654042e-15"); + times_test ("70555122248707171314736", "-81101086022274692488621411837767361950248378195397909.200440873455379623557692889032043422151272310592459622568950827", "-5.722097038804507341200180488072549073313712476829304641270901056694148836393515478119400477210997323863769882713087618465778390141724486672e+75"); + times_test ("-2328737444159883.22585049478830", "-465474361749661451599.9951730137496", "1.08396757550285951917153850391172159248110224634381083904120968e+36"); + times_test ("-20.3014066928633757647889348362325618964962565804945772008656587579802123642954157", "-329435370768184084561406820034073934012588977709700270652517248023565145783776412004629743988394401273.28545348", "6.688001440979140070188345542361244069517729332398623464379411528839275521534924214116901390055160850670677514105783601320874524580245478001576704187186030310275122663282192690671340259611636e+102"); + times_test ("-32476062941804823808177212128.37047244026179396179206", "-23170264858.839398780672784729575796922981615252587039", "7.5247897993395677581189377054108136654093646195424085291052102413168985736328290334867475461403556911034e+38"); + times_test ("0.00000000000000078020818918877022784107814476742023039526884490519321760350204369809967323559671586528756587388436", "0.000000000205123365786662618531603763262183979221647", "1.6003892978071778645361752741729365945858649779217485973276644181520266580188064434359630899417624168875864924106561648427968680391728674092e-25"); + times_test ("16411.97479231952475505598642359391159894419529343140530675214816439312142161965104995811520160184950", "0.0000000000000027918217792698757486367905214734859040448642073369967425369035344103512043731", "4.581930866602584512178030964640390866062580122108157686730832013698006926287481502511491005515718454308878140351176787687577295267975260433555460720995298677352745266944804845e-11"); + times_test ("-64342576782108353170532624771581267539756520906919.37", "10.7", "-6.88465571568559378924699085055919562675394773704037259e+50"); + times_test ("-8221425425564202135543311357128878704299939907773337451688454087709054980064079701204709862893688091178322203851683767887893871786", "-0.0053653210895499081114778560023351704116389771011759394571181993140755819983", "4.41105872219414419707174038902324084811431456260158178418632957765849297276315251194170903369456489104239536734987785292755508500736273353438544501239198533098378964478014299793109607485495440119098699638e+127"); + times_test ("-0.00000000001910608511655268019857813374990127054476192504583955285846583482452368825713345318314648457310037047203752064778987032587853577350", "642301865080793548011195664841322815727082571813145907.638646106551631362492680834939823385729510144767143760057", "-1.22718741047541772674654955433282115912253583024496254728712579960888844323021707984449130867906756160401346562961603346122134581742784760100299534939794183794586063570878664967245581007170245594883361157548393966363447660442291523748990895e+43"); + times_test ("0.000000000000001899500268191217", "883952560680798125471977636433525656958767.4329146255465789678475476012476204472687459005798142889552058775500478237", "1.6790681260814890585836193220538636972839642793176878790660318627202422075166836170289452406463821318133532926386268184542463044429e+27"); + times_test ("-506222074114478440.4212018359818757090468806843375176631454826045115958516526575279719878856236353605111026111752257846026439938084657014050761145504", "-5159467544042334960313178363211289944335613842064316815811191728903.574367721298576480151967142002627219994962105347353373165540336969132995273967", "2.6118363614714449452582198430103897223785994901299317101044259761348107189762413607706765732326606750493547847042725797461693311578242536847852702975212843374994786292094043375579903644474919183423720511760494827145234240751467691929508470719482500262148133264801792166487508484367183230294368e+84"); + times_test ("8650434955204837420156251340980467125431552732.08397236030027468302684214339589220209558182529147", "-0.303570960693217884327420647078548564916276955021262691277956348864969879961811223297756", "-2.62602084976572571043981976309152638775264794392233958131099791715831899377187947876427492733764795120380985528043759980136856459126265934320288206950485593122394243946315413929694132e+45"); + times_test ("166664781364.0082914723488023478368828305505987873686361307000655181790946128760191770642121717143556656346592000446628174724572", "-480041.0942847509055712529720906841565497160321331762055830088670429871444554935489589608266394637805469063", "-80005944024707299.88369343694993429517249943540140207247881593079529829548920836320477337300843753304432472775747784579377690170478442441481497272861023856984874550780497963725202716372180855504618999968964525770542110325165291916036"); + times_test ("-43211558252159093527866775647205601084011492340.205459697805340231598755202803639527161744593", "0.00000000001119203318598549392536941753377009590965307584900110755022862027840043858728011387253539611180", "-4.836251939763099008266531873875699139740918027346229229666486821933921583162396652285702155362998553549998984080376784393703700976212048695921578240422117362224246009514826407968734974e+35"); + times_test ("22228080669906830995384898726318434540920054474075066362723430068303595334", "0.0000000000000005446682564983826904165557014954366345827192263245436061673439169771964847765827397722973716801924439429612435686218283131447915481741738621944216616", "1.21069299437835559678074390552059815249561615752757133499522502582835547433276587506411508638591250461101776265492507290334698412116695650224909917771154983775120278858482062610470094757493360226297555949389464060902869744e+58"); + times_test ("-0.0000000003773157928", "43297647023077445.54510130448338353765777486", "-16336886.012887026261648726857462053937811976384809008"); + times_test ("-704246.0642491", "-4876468942183457666260007295840240729718873395834733463009561654592496364003930788774251638836263860.464149571397235826605163", "3.4342340599656720408721350433721409241108083813038963987160054952477748964430703827960612606796544474314358764054099696015239692357781033e+105"); + times_test ("90714014677317257217388754359562724228350422511592300196367622823480490782750230695", "0.10551171877203891416100509846755006675817523511356135349573800436749642311", "9.57139160531570883071608150743717558732170393411960576472278636404390923564848224638754968731571966908325157310107689739849841961000661380686664893982936145e+81"); + times_test ("16256367650251592857824070659043447853047682031758021447060795635763437999068158011730593356058028259231482670.842728511458309985368672626159", "167180302632355.05677826254070883700709474391390089985215716385024", "2.71774446347188795843522760152851417095331335558235538784521529465054664495076688729866682142620092642030334321689665117663066458919556787136329889313558843246657535262982668786110905407308427324058242816e+123"); + times_test ("-0.000000000000000005140869693986476129573937292110832444827883905213371700103686737472419302083991260187191661701298052551015422048926889376", "-23431072984.29109719929265906334268220161090515289622128095638741310550195556470", "1.204560930025273608708687379702964400245754501914517994869604548744993478713638266232843096136298708651286988188211879699693589237471003927285113544165412103336583365360013429733201256002657445106272e-7"); + times_test ("-600918601565864357615830916531004971541558836", "0.0002398203266606694050330194859330980464992506791531578245580976766372221543075302994826964325096371", "-1.441124953239982356850028499314436394823612382489365920407488055245261701578444032269000578787663442887261399958157232897473876372957266584156e+41"); + times_test ("-0.000002378573545299614819606175997977561025598320050", "-2882653077216085525237966723240931593332010153721729409.189099950085184011450067199947461092968807651228141791418167", "6.85660234974270886050574307192845780707197555258670774440795390596137425374082134400993260259690471606609110758329634878468480296762286592478289418958225034835e+48"); + times_test ("0.000000000000000022357617532781889076479320065100116692254213222725326015200603762919174701589837856906", "-896457719826992659089225870644004458751127732719124385827686320360654074025236", "-2.0042658834201645580346859820519392326977523701452584805357472701178299220185960756765568847872663515490447098727456428199599156161369223396351318781899083200879816e+61"); + times_test ("-0.0000037591700832106546820837009314715135833879626195863911405199", "0.00000000128660973296737392590374219331743360889744123526004704657440431966332363276599678510386", "-4.836584816938601241595643894689727875085794631034207181521858384737358785559745009296624885016550841630384096559285949624409877337769212375896814e-15"); + times_test ("-10897404485088933268299142109127940457874105398307905112497480738702104026493870", "6459527220783833615589828721781406862908330296731571946257487596628.142", "-7.039208090732380052543394587491979904440526984139707627324909518932550024566922074139234694919548719030400279757073454088117750506466392244643248954e+145"); + times_test ("1252391487512578363516059332047552591823815440694963818513488609376352517930673851276.19244762777307975100", "22549776.9253795732526305732013511684558623600507908536351482864251791287592196740297262530719650195640957326260", "2.8241148666652939539350687862707201683973473917640485175382134027259511907319776870024731139293000940076904783362318907295063149688420418024813050345759700762391301983348609040284923961341431326021436020670656126e+91"); + times_test ("-0.000000000004618950388937140493422755399930264176038354392749822437964314306322496775785511138074695877738144276032647315124913748488917", "-2713380462202072657447653028643460793172301", "1.2532969741222701540713742524625604310117116627579838128477044145948287310122585599028058960352298239073038474733050249887724953498915163176662179193294848309569888017e+31"); + times_test ("-0.00000000000000000004741599927671153114706", "0.0000098605921767576416944956043265259701017397049855054246352774023236279136700079166226671683330780112375", "-4.6754983152108772107589021499824280537386842022454892219026854810089318448711395624891020610400431916945696952628194508675e-25"); + times_test ("-600334522639128350301416069108895484950049158632569154577774908833218708159964256760025260070745036754849229258748618.286225296633751065085057954880221", "-20603943628058420.9233", "1.23692586624339624137684561274248493253093335427682675519597952187340115485564971154200167383285889714823571236526154847178654496322656526986532466296684549399002517280493e+133"); + times_test ("-0.0028569903450426823012406248893590913347605950672345342794", "0.000000000000000000380602538484379176276476072502", "-1.0873777777486072321414819892742916452188931452780514481064796648209244384695987250588e-21"); + times_test ("7633371138864371851511200109335895009200379214065654.14141197969364686617958181976", "46557774899433776362769332468929072168263071780847173536.32424609893425634", "3.553927752070818711219752919654829713936648328701795633611695455871498173222792379572585838047775680404274006272352702005591443767922861383251901395172784e+107"); + times_test ("11816689310524760.33060749", "3240086146153074.763149055913088596613954276720424786571958312186345692516028911031344618033329875358392613", "3.828709132842640485458626662093761049902194180604315455762384568460513896245457880390402922939380711647608722106357184891221847137e+31"); + times_test ("15417668979208863688007903355418023589336919725455814", "-2287252965683244062854057265399517873076559773521003653290361219949584429534587223153067", "-3.5264109096618027617770541672930242149319875097968700968868729901509384897856549235466082618911136178623675867468948846074586307080867081538e+139"); + times_test ("-44231051261766981720932141949492661571946235314205992269845098822302266502035476097047272345277610.27", "-21829364252494551993461871095.1405414373418522117", "9.65535729263870199707274609187215999675619566645960063838135526473595293696284813052387836041619820102648568607484181212361915051957155111290134159e+125"); + times_test ("-0.010471648280929367353726533714112845102028595890585874570958083", "31", "-0.324621096708810387965522545137498198162886472608162111699700573"); + times_test ("9801144054.04251480", "-79669022889354091.1326070042372454589141728234307836693721872475118", "-7.8084756998336986277926157641231569523889190793366151638111003547152953122771467464e+26"); + times_test ("29857288634175691192253935741525569423464902722491247366897306044982457983212231816738628626832523979506745945", "133673.6558945837023809692393557234541133", "3.9911329268300663632380133640663780097335900438380448470493780783062334184720774070186349410361053454199720794804033925701541209810757057340083455685e+114"); + times_test ("-13620158075540606.0220850459251063150637623012169134311683793968716003579443803708152", "-14094712052845720944279961661927524928294844400168253261.8801483866631477108668134130846798999339316583941852334437626140968", "1.9197220618898615906375442169544326587585370014151488298656204877054492796167185482130313382428085300372006548553535032109971116684812746007217292632043932773898787721990877866744793392082655385848282771136e+71"); + times_test ("118440515054.96300744924345961909763451770037124776047596926946", "3978918406101218410350317969873779924817925511337423100533163173007579791459856530353048879996496120205533862684343054321905", "4.712651453803007726438461712612354142589559988228956502605819373002120961113842720385180079632764208616661380363663300333950937121937309186788267547560787574638782242683284222185255213e+134"); + times_test ("0.0000000000000000004979626118", "119953.13939299602151864098685411551208280009209744651134782647617437471653240473066119015267896990648067942927449283677891199638584032687735555", "5.973217858574576550243146820040482597564559171812500490156201032898210607636089901472178932446062156472087484005983212281811688264520970961370795522549e-14"); + times_test ("4133032609317612147361.233208455670", "60149718767070729539657807610332371421265360276297353368024670202.145813386468110250239535755215076073418035935987159939685", "2.4860074910558688193760888076283428107792208632944279345307661267298591118711344604905557070531163947655318143762909457571230898163106422046776822919626395e+86"); + times_test ("-0.000000000000000025988801412726981607051504723536759179533093115290316536803305521555847577878002593862833182498872", "-62190864847540861920221512167077698610328189518126509.945114225", "1.6162660362084827318707380558579363611834016595419194188990226173706520381985407013085330782761618687291735642283204415795057016756891900469697853795529736542e+36"); + times_test ("-517391939544713325422033696525596189851051748767955039585693350056993951682945080450723027214906277369681756055494613881445451892", "-6355737319244501.33875834602457354455598517141883018726489236", "3.28840725884062937342287062927549804683222950446951497853928995858263827438383088820860677614531136832120859449547463148055636204133361775822367974808862660315286528874721657070976693834512e+144"); + times_test ("248488108396888727192484307620472597201728811.43632801228625119529655174763542491519552462322578674423725814425253", "-244376619784336994670734053495423487949530922624294868474118463232994026818752162901576014805701186113050589437429269164232162718718", "-6.072468398663559342194397673594158367331416443540937376483832956458681282701204862291922555840434608500693418850945313497296767648108091241452234573071111256003091374254946595152378328332428736545902967819673107271115746769252798457479074985654e+175"); + + times_test ("1.153024e+0", "5.28973573008e+2", "609.919225043976192"); + times_test ("-3.699875785122930862283231104748329088664056423999601e+15", "1.1e+0", "-4069863363635223.9485115542152231619975304620663995611"); + times_test ("-1.2682525953252723e+14", "1.788378029508237622037088155833989378609386207655e+18", "-2.2681150773465187729527785601467557683746716925715084680772194565e+32"); + times_test ("-3.87722166e+2", "-1.74278705869601992403691e+8", "67571717327.438998052674620914706"); + times_test ("-3e+0", "-3.64329808384254180872888049513111969646643282968e+25", "1.092989425152762542618664148539335908939929848904e+26"); + times_test ("6.953012278719261355e+11", "-4e+0", "-2781204911487.704542"); + times_test ("-7.04663671550547513365402564941508037562051247993316079593e+15", "5.535517336770122093358205271769744142052184795629511766877e-18", "-0.03900677970460142822373864049115522460524845334243105937826127540936694775384656847162726619838459694385924193041061"); + times_test ("5.08438408986e-9", "-2.606367e+4", "-0.0001325177090713613862"); + times_test ("-1.2967e+0", "5.94990983e+8", "-771524807.6561"); + times_test ("1.3117e+3", "-1.959557842524477358350764324331855847355274e+37", "-2.5703520220393569509486975642260953149759129058e+40"); + times_test ("-5.3548e-11", "1.742694574037778940228462366629620551e+11", "-9.3317809050574986691353702808282921264948"); + times_test ("4.34526424962996265825639250671e+21", "-3.754914933534859756171859142125715053796299171e+1", "-1.631609762109069348677868227008975151085048810070540943592037216417378493741e+23"); + times_test ("4.7426914347369245430071315112274335473949505818891357635e+55", "2.099290936966289806252483785990857067e+13", "9.9562891457708756252380705318075217577762765683497811755225761339325645531279572292864156545e+68"); + times_test ("1.2197662968047362383e+19", "-7.9257e+3", "-9.66750173858529800389431e+22"); + times_test ("-2.18492048239986982664891448764e+26", "5.0217571e+0", "-1.0972139945426971341049955535599032244e+27"); + times_test ("2.8477441033458111e-12", "-2.6015762266879431727233849707015975771758956198e+40", "-7.40862335895523532800693698581126602552353137494951139716821978e+28"); + times_test ("1.17305251157767339030842411702548e-7", "3.1679877726710109082864387936446078459964397e+14", "37162160.13379088759968293791782997863641886182709969796604371507532234183556"); + times_test ("5.516400791447843686549580838221025644959140288781e+40", "-4.534755696021348164010120097087738141133999137556364474656e+25", "-2.5015529910554782273339735168586403296046609840907360623635477256369630649686086353650780443350045195634336e+66"); + times_test ("-1.086178703865e+6", "-5.412964e+6", "5879446221587.90586"); + times_test ("2.193003362433320722921995078848109409779629e-11", "-1.87156484301625964803880921322257778262063404562091823011824e+56", "-4.10434799374664745958524117450745644772403340614160247100180995137281346990234693655901738534901333296e+45"); + times_test ("5.690242268084896613323736558476149127814487192716110263e+4", "5.85123113232510962819522680703136616268672961423348513284699e+54", "3.329492270949058963099905818513145552769091859265632399465562585831994642969765945460416258196265143264172794765837e+59"); + times_test ("-2.2964852129902920477142981e+11", "-1.01192386417445983894690800351420572044711646857422992584148e+47", "2.323868190748643763813766975749316051539457362388056941019107244885259571701270065188e+58"); + times_test ("1.64014114524e-9", "2.33457695670849217356126573862065622e+13", "38290.357234267802543783512378452575905911293928"); + times_test ("4.52030709268304468292307103018250587082757e-13", "2.4202633390406694150089337e+3", "1.0940333537626286438097741446790925743401036958119194290469762262109e-9"); + times_test ("-2.531530179588420531938806173298571611356854e+42", "-3.7916295786409190517918e-6", "9.5986247081496130774858068268051041666243771242517966898979109972e+36"); + times_test ("-1.1137e-20", "3.15532351096658148747044e+19", "-0.3514083794163481802595829028"); + times_test ("1.26704207115899080748696654617058814620502905910804474e+17", "-1.1036640030158560360573681189153991777396167698e+36", "-1.398388724244832908797767208849960696897136903372124358147141607664782163824521550287804299792680852e+53"); + times_test ("-1.92043925491801737087120450765880605794833102824745131e+40", "1.48390768547e+10", "-2.8497545698511264714107436784310097859137225929760606638486194657e+50"); + times_test ("3.8135622104716384192078983238750322e+13", "-2.39302666425671400328234877933630532203640643176e-15", "-0.09125956055460405574747767900047040915488905349535492182534023415362543138557102672"); + times_test ("-3.234931242339998871854389747974137006095446e+30", "-5.92883411067302421812958123642550690642906114730631103678724e+9", "1.917937069526724859889065751200796792104177866908520783368616010428214659504892064497475599582063490904e+40"); + times_test ("3e+0", "1.99273095508512817553537488885e+0", "5.97819286525538452660612466655"); + times_test ("-1.953336949e-2", "7.78542087974602115e+8", "-15207550.26792398884803047135"); + times_test ("-6.76927248655350571291737558944587651874684243378e+47", "2.106647491079819039765594992079775666086664783295561e+10", "-1.426047090023359087715991793962565118985535044059537158764939014517624689564606363869607106631045058e+58"); + times_test ("2.84765064643062294633e+0", "2.55136e+1", "72.653819532772341603485088"); + times_test ("3.03393155013395755198972274893138442728102576e+11", "-1.794588238175697749312009789507e-7", "-54446.5787530056249211726327679537663382541795271931196078506483571264470032"); + times_test ("-7.4371366140844e+11", "9.1277001754e+8", "-678839531768519399904.0376"); + times_test ("2.56791237096035223695516010175181403674163385e-14", "-5.44464273285261087885992104112953082914e-20", "-1.3981365429151599690537623761404625947844618835506028383097657567011072106548790389e-33"); + times_test ("-6.879908191615608804901708679355480110539e-15", "-4.0968480016502745852031526855040036466e+37", "2.81859381263577613382981765247793574699886457413439013342011267606204270915174e+23"); + times_test ("1.407896156490752151388208148659e-8", "-1.377363868116052e+8", "-1.939185296009824854218448713898983585080174268"); + times_test ("2.425103747079320530219213960814750892199747341e-18", "-2.365116997875961139721649192832330725431640562e+24", "-5735654.093829986735467358771314018265857755686256663053548830868280136074150452583527245642"); + times_test ("-1.0967188654311383e-17", "5.50107804404633954170295415508097739e-8", "-6.033136071114646945658547999340034265651011304263037e-25"); + times_test ("-3.2712219404248354159015350722161266784e+4", "1.40636e+2", "-4600515.688135871535507282864161871915434624"); + times_test ("2.7739526916093949721614335309760564882447898334454312345e+55", "1.24528453636520646201893749622334742900013735e+0", "3.454360391469821959459359614081123116456332059470735649519645107811472952525654511905494830480058575e+55"); + times_test ("-3.26272930891827103933126340157752087353407692e+13", "2.0026083903335067609700262e-19", "-0.000006533969089426773691398112669586901327358725244893395121554920405215304"); + times_test ("-1.06137697482182359209772074638146895e+28", "3.0663106098e+10", "-3.25451147889358514503318856302707319949426571e+38"); + times_test ("-7.1333686145776974736348748988848e+21", "1.62872571577602913313701931021625476208216466585507507747565e+15", "-1.161830090267232160311720624731057789079310830776668256181105708907630639297571581978415512e+37"); + times_test ("3.271164612807454534123020114329520320585016126992181854263e+9", "1.2e+0", "3925397535.3689454409476241371954243847020193523906182251156"); + times_test ("5.65403478840648195280973451110905199e-11", "-8.18034629055388719783063246807413028100652148732e+15", "-462519.625080035971400064460401798364338310053450183034154989804876490732716900057668"); + times_test ("9.44482836533037505193155281233841e+7", "-2.067341641721856797e+18", "-1.952568697856325861901776699253387295308175672267277e+26"); + times_test ("2.5111226381792956734986397e+9", "-3.65360655537789827590991569211646510131461e+40", "-9.174654132209716853544084660541570252769600723604642707862516736017e+49"); + times_test ("3.28741239410951819553626698975108924106326e-4", "-2.62227844885453731582e+18", "-862051067357068.82790743503875251297002496305525999591232187732"); + times_test ("2.2772892974034099e+15", "6.177601666756392528944e+9", "1.40681861593257990831209635468300461456e+25"); + times_test ("-6.50848921524116628e+6", "-1.144580764938138569486790679009e+30", "7.44949156457235930691999052822025420513027461652e+36"); + times_test ("-1.4551927019037e+5", "-1.3e+0", "189175.051247481"); + times_test ("-2.2911981542413e-12", "-4.53314582071257190328650375668441355537191e+31", "103863353373233077959.40247540692426855128645966365381883"); + times_test ("-1.4602128592500770116678944302583044846446637e+30", "-1.427582797083786e-16", "208457475794593.76574073813183484779514002948555208066927682"); + times_test ("1.6700609441460181151986345895359954232196252236e+46", "1.68243152329e+7", "2.809763178246720865741573493401128674173862301164254857644e+53"); + times_test ("1.05083997100929235995740938763615497143966041793319335e+49", "-2.524496056110348375423188927e+27", "-2.65284136241607138569403868866619712437928400385166771000044188224282590147003545e+76"); + times_test ("3.100786363878827739e-10", "-2.86304063902707066e+17", "-88776773.7272606582182668524792103774"); + times_test ("2.502713517421925552323011065985443554034244e+42", "-1.22434e+2", "-3.06417226792036033073115536852861796094628629896e+44"); + times_test ("-7.9489222898867596260428e-12", "-1.0788548012690995443645e+20", "857573297.73592957352865844131522518881758006"); + times_test ("-1.0755932899013878523165928263944458509156806951399812108e-5", "-1.11614e+3", "0.01200512694590535037484641917251896792041027851073538628622312"); + times_test ("-6.4497917487303e-17", "-1.004446091246e+12", "0.000064784681113628528184449538"); + times_test ("3.084474103157632963053e-3", "-1.340722625329e+11", "-413542421.7344814434949807418969437"); + times_test ("2.007409677882519495029550241974657552014828965e-7", "5.222151840789271106861316521519869023311e-5", "1.0482998144572396943190891671428030237589403912003291601853143252123470079223263003115e-11"); + times_test ("-2.488498956742602121296262808732706422946353052713e+14", "-2.23172e+0", "555363289174160.000613929563550495557821783503480065636"); + times_test ("-2.9688672164600521862302335509380676629e+23", "-2.34340486619e+9", "6.957257882124446358953277414968471000555340527351e+32"); + times_test ("9.6116339631e+3", "4.941558826e-16", "4.74964546426381633206e-12"); + times_test ("-3.510917030490276336587658593367687803429e-5", "1.180564327372e+12", "-41448634.02559652698690017440995500011934045540158588"); + times_test ("1.249503228e-13", "5.879424084035664549067080010774031325182324371002647085e+2", "7.34635937178350612118448086199642691938843199011087712925229038e-11"); + times_test ("4.5e-14", "1.6224776733813843876610106340899993022215e+40", "7.30114953021622974447454785340499685999675e+26"); + times_test ("-5.98567638319111415891202402487540407421463486631972864107e+17", "-4.54793136981650498391485340038861239718e-18", "2.72224453926846670043530235188742096666820419395601557608672857967843105674091877295333165001826"); + times_test ("8.92108677749256373753068098541e-2", "-4.701266425389385608e+0", "-0.4194040574501097838530020557051108449340791197928"); + times_test ("1.0445719060110887517378867373770257738782319e+19", "5.799e-7", "6057472482958.3036713280051900493724627198667881"); + times_test ("-1.03890765460564576e-14", "-1.34206940160748687807435785969646342084e+11", "0.0013942861743420366640453267735350857670895370671868416384"); + times_test ("6.39749371e+3", "2.5234527992374730183240434196649804550511817034984615e+13", "161437734106036264.31022782519073602768462872676198492440927165"); + times_test ("7.914175439604437611967814601653913774828611014407671e-5", "8.32100403850523895222657658496599490340606e+15", "658538857943.8750019874631462394490423060270196984652115300400533954357304447023953861129188626"); + times_test ("-2.77837203022891121310898693340776679571778100244092e-20", "-1.29e-1", "3.5840999189952954649105931440960191664759374931487868e-21"); + times_test ("2e+0", "-3.785802336743340316719402396217939978601e+36", "-7.571604673486680633438804792435879957202e+36"); + times_test ("4.743769864188027932328495491240985e+24", "-5.9891655632114551610420257227248006595584101099705918e-15", "-28411223110.395218469762107537426925959156755933965249012600778016167994609252836864923"); + times_test ("-1.696501776305087785563120340668939029159482e+36", "-2.20704482451194839742722899349253308746537e-4", "3.74425546516947120760454369427493495577833827584040523256623062924543284078088213834e+32"); + times_test ("4.0131499023574625019065378616938094123e+12", "1.177461924351806545225557804503154113578719e+28", "4.7253312067420823358733892576894302742518304481762080832752336264184374791768437e+40"); + times_test ("-4.62155685185e+11", "1.65583875e+7", "-7652552920621239187.5"); + times_test ("-2.776598951854774016146205e+24", "3.5341178108401263600119940986415244381516593e+29", "-9.8128278093099833546223999989350419583424311768423158174047121479565e+53"); + times_test ("1.12e+1", "-1.313e-3", "-0.0147056"); + times_test ("-1.400922738050340928068459005e-15", "1.669774637213352507258799185019866e+5", "-2.33922525669194448953065643831459603361384442257691893159333e-10"); + times_test ("7.50109935679466448466358706299522e+28", "-5.03e+0", "-3.77305297646771623578578429268659566e+29"); + times_test ("-2.38556354949153835408756963109992783478e+26", "-4.99378748e+0", "1.19129973861952045985823120474150382502278725544e+27"); + times_test ("-2.94e+3", "-8.61615789244720791078571983086407412571238524628016e+2", "2533150.42037947912577100163027403779295944126240636704"); + times_test ("-5.80381041944064404262216137492215065819338e+3", "5.677138821495566551897442869075850448375293389320539675033e+37", "-3.294903744480694771704130256831336545059429064900653708388680125250845128363784484521559308407188154e+41"); + times_test ("4.58722638789532058289643e+4", "-2.292585677620131398099727011e+18", "-1.051660951688994125699713239960797492772817868647073e+23"); + times_test ("-2.288825775843864143902825178240786758e-14", "-1.022792029007781346809e+13", "0.2340992759320655142089938144423568704277940784273012755222"); + times_test ("-1.432063323237600412250117767285385708080998075274668364678e-14", "-9.23012609141738073365221260162e-7", "1.321812504437725779783150336060293956648246141009265660188911448444031899918334929357836e-20"); + times_test ("-6.0806e+3", "-2.9505713511085379204927821042777582523174534e-19", "1.794124415755057567934841086327133682904150714404e-15"); + times_test ("-2.1971689665281316657e+12", "5.06674545635318811308850459987394e+4", "-111324958779966411.74779876603862140385999575942221858"); + times_test ("2e+0", "-7.9498279886418403969498688721389799731931074e-8", "-1.58996559772836807938997377442779599463862148e-7"); + times_test ("-4.31446036399049665749135715315413935059097082785e-3", "-5.09957831192823753379633205333620130303488425232090581e-8", "2.20019284998799462125934843416682842768267375970275614241257898190943464155895136069876374903975748085e-10"); + times_test ("5.6684216814938374789992297e+22", "-2.466e+0", "-1.39783278665638032232121004402e+23"); + times_test ("1.4726466812656072908248567521825181138629034e+8", "-3.47948862867465172229571384341201136985691220463e+47", "-5.124057381519144835787886917183826378015360092082220951469308136228382069243924518066722742e+55"); + times_test ("4.3284361218626063643720235128240704200079650833e+42", "1.4641063731834e-17", "6.33729091193628179321704177525739784198638290425046666717722e+25"); + times_test ("-8.504503345e+0", "-1.6126451605490274984274251623885903733401871912282447644089e+21", "1.37147461621872663968730195332709350199064207907267622573942269977705e+22"); + times_test ("7.7309990341924055295760169328629798135433331298237e+42", "-5.99563576510407238824175823080622306644936962384464739893e+32", "-4.6352254309389028017492862352717241512621152128519099776509088009611537721357769693774958840413184214468641e+75"); + times_test ("1.31099220633236524445967265953445007243e-2", "1.7160044747e+6", "22496.68492363164434927557667458365943093619102521"); + times_test ("-4.71244448219168433e+17", "-3.661845152473087014511441938e+27", "1.725624198341216588965585001399981214121943154e+45"); + times_test ("-1.6192523166690470927016735287431037161e+8", "2.1063669951791069077512605999904333513315096716248026e+52", "-3.41073963669898840947516853657748402318394608095484774905332123128295765265305433698894186e+60"); + times_test ("-7.9546255726227721651851197010394795e+32", "-1.6352825346150572721595214349862e+4", "1.30080602683123181981363225429281630656820439050469581096187376829e+37"); + times_test ("-4.65033001e+1", "-1.78402957430342048751447188050189199e+35", "8.2963262681107211387373788951990821828756199e+36"); + times_test ("-1.0747111621539139354559268707283340006236738352646385975e+55", "3.4569644402407395181922991072e+11", "-3.715238271095879729064413458963542564475178869110977001563130120111735883029910152e+66"); + times_test ("6.3652937877835233734658553177768102e+23", "-2.739191316024006563208208745870453e+33", "-1.74357574674381829401359393298451323167803405210747026007699767690206e+57"); + times_test ("-1.38596e+1", "-2.01668654e+0", "27.950468769784"); + times_test ("3.1e+1", "3.99532408029111361202961444968519230785160272779405533506e+35", "1.2385504648902452197291804794024096154339968456161571538686e+37"); + times_test ("8.752130293411895486461455570456266543110235191058256368242e-9", "4e+0", "3.5008521173647581945845822281825066172440940764233025472968e-8"); + times_test ("1.7666567718645722011538689771389140608479155e+5", "5.79849364509293864972181107177185722325631e+34", "1.0243948064717127403933357900393416605736130527033851840351793404944700646104585721805e+40"); + times_test ("-1.88074285551825927e-1", "-3.5892420997049074284601888671967281230296723689451e+31", "6.750441435745360244959256403222145003141120524314248902529158196077e+30"); + times_test ("-1.47443449855473683902404463491959178173791276282416e+11", "-1e+0", "147443449855.473683902404463491959178173791276282416"); + times_test ("3.6674516424397608e+15", "-1.621851622618484198437145865398587268422606620129963582e+14", "-5.9480623971657509801533671437416378775411584549470454175597505327911856e+29"); + times_test ("1.852799859644936708675646349852062e+33", "-4.07939656803717490972435529358637164801722794978e+42", "-7.55830538869531417546824622551390200682044219768001754254044667676246763456544636e+75"); + times_test ("-3.6242110037e+0", "-1.1278795340499000045446830565915076472512673379718862044e+0", "4.08767341815167642135552034202789183114074114504811682323070735628"); + times_test ("1.4274012216017920060904e-5", "7.3181715e-4", "1.04459669389914186078985917036e-8"); + times_test ("-2.3756329516520898291145904664793103180184540970355072e+42", "-2.270259567e+3", "5.3933034361686053900907941458116470570432078963452065594973824e+45"); + times_test ("4.929295626989455124178205785e+23", "-2.09905e+2", "-1.034683798583221577840626285300425e+26"); + times_test ("2e+0", "-7.18e+2", "-1436"); + times_test ("-6.31146996107278795852155517509682305e+35", "0e+0", "0"); + times_test ("5.62374544362317131178832531913e+25", "-5.028617311364517574605216817082040721294634e+10", "-2.827966369251080786848400856170544022762054465978646727405142173480654842e+36"); + times_test ("1.117412077388384866590003439477599421523143e+1", "-1.61338414788659224331375974470976667613219454556537612e-14", "-1.80281493231544618608867814708290945943864723087524854355671733079894613280168308370993407954516e-13"); + times_test ("-4.2815998483904942107791375e-20", "6.9376170311235847480494e+17", "-0.0297041000286500510137199365646358515056073393925"); + times_test ("-5.86940489151059825558e+20", "1.186355039910488859404215239846695660365360637322362023701281e+45", "-6.96319807431887432746494916572974977870149668248845809245935171579248369361139798e+65"); + times_test ("-1.18405412e+8", "-2.8902735e+7", "3422240245601820"); + times_test ("8.642504975809385471415e+17", "7.5109001974465513712091271541148798280521311221e+5", "6.49129923292395160193292467556975546756516371487956307369563014247715e+23"); + times_test ("1.9923555553060256693196663e+21", "-7.20338812908556886039013517835885875517875e+8", "-1.4351710356009111862906055289239352924294602722052150633824346851125e+30"); + times_test ("2.47767224522360228025008764692368247199028078613e+13", "0e+0", "0"); + times_test ("9.159951983506971778872e-16", "4.35572412991174861535348709e-17", "3.989822388339430055462173193590823971110558676248e-32"); + times_test ("-1.2584903289619528522717972e+12", "-1.9048067354292e-12", "2.39718085507923740095024952130919735824"); + times_test ("4.8222e+3", "-3.915307e+6", "-18880393415.4"); + times_test ("-1.145743e+0", "-1.40499568633e+6", "1609763.97264279319"); + times_test ("2.2428057847026326379001011260518421703171e+33", "-5.8239094523813465985489463975171171984367780708670099e-3", "-1.306189780938522558635234193371919783301088290650039938567007189410557075386960930089941183929e+31"); + times_test ("-6.26193904e-2", "-5e+0", "0.313096952"); + times_test ("3.0019845694844821786908363e-13", "2.59803721322e+2", "7.799267625032905531560694408803215886e-11"); + times_test ("-4.6771111417557737587832171805566392575e+17", "-2.41963969908791889847485e-18", "1.1316923795638693208841937864685962710236300920790258386423875"); + times_test ("1.368790147448792225307101642172296e+32", "2.382834531191820192940003254735240956141547e+34", "3.261600429296125258884096700972863323244136904532628866746657143899537981912e+66"); + times_test ("2.5158133090673533e+6", "-4.50742632133e-15", "-1.1339843128842514618218435889e-8"); + times_test ("5.45290152125555300060203251343e+25", "-2.3624677987030823546e+17", "-1.2882304253465295333570852578315749764228120522278e+43"); + times_test ("9.10645280474914206117691354111985771303355e-16", "-7.46868647274590839548386658906247692173836809486984638e-1", "-6.8013240877528954266058199752847353931423569799021123026453827361109324522139420649351012286049e-16"); + times_test ("-2.8051865003118537531e-11", "5.348454627859893296622387289464589021238848335043530157e+29", "-15003412719603032216.1087879676948803801286988008339781735642916313334822367"); + times_test ("-1.7561380718435796202851095012247e-5", "6.128268306422028776297429697021742180071567401e+35", "-1.07620852873801007780502248253390491162313640920758504239716098138490580960047e+31"); + times_test ("-4.378710689215449958543087541470086791901689639419136544e+54", "-1.9783905014509610108940939605033592e+20", "8.6627996361456371392438623941839474271341962222925165084899855051115783079519792754786048e+74"); + times_test ("1.121716338034368180915e+5", "-8.734522008301422444882962812919703e+24", "-9.797656041632466817652476303536047619163255652072068245e+29"); + times_test ("-4.8582993368534106923769355421057e+16", "6.98715048402856908663443073960052421774798629769213e+50", "-3.3945668563050984730942842784405126039162330280795884968022377310599078522350518141e+67"); + times_test ("-1.147697695159307927e+18", "-3.14666e+5", "3.61141442944998788157382e+23"); + times_test ("5.21292708738338107676256190382983420967375413562063935697e+56", "2.0716e+0", "1.0799099754223412238621323239973884548760149067351716491899052e+57"); + times_test ("2.40767713664497193342119078614448816473118895591100004e+6", "-1.9484666614e-19", "-4.691278632167740060209890691091392232345592973376458043474066456e-13"); + times_test ("8.84323002496195395098550834342755e-16", "2.074843038583988890307904822332637330993388021856189e-20", "1.834831425588922445909395217500126101937521988613705732420133880473831365442944060695e-35"); + times_test ("1.4139590392221052468075225255352223739775768735149e+28", "-8.5071158697e+10", "-1.202871338167213628815991013832091374398315253263031540940853e+39"); + times_test ("7.60905256044027294859360806368103238783888705635835726e+22", "7.626236267e+6", "5.802843259393881904794360045962793471613853022211697708475474842e+29"); + times_test ("-6.49983097039610238828951299410887525e+23", "4.100424999934130974333860679470965920172048633176651e+51", "-2.665206940635830060248743820457885128628819326617038782969842356414737979985236017178775e+75"); + times_test ("-6.44091388086048854999712e-2", "-6.4903080679715410063843348214810202569974e+22", "4.1803515326058717691453471440857864505008045873090454741429847488e+21"); + times_test ("2.78029662683945916043494079823001566462283856388915e+47", "1.72292937157713197163667918785093807960421637821735095106e+24", "4.790254720078529163251026200113350912677847102429264772360101417505440468715765792439145764556851324914999e+71"); + times_test ("-4.4878498622339775396888494885583054208940416614412529627e+46", "1.724e+2", "-7.7370531624913772784235765182745185456213278243247201076948e+48"); + times_test ("1.352549686604181695307046110709197982598092383194e+48", "-2.3555586703119991494894059087716726417170242847945e-13", "-3.186010141308257402498477975479367405804581618494048262835305948601981051698397443353715881543633e+35"); + times_test ("-2.019515564917190266675805443119046e-17", "-1.4788018868472268212026912165159431467984470085815808703e+27", "29864634279.168841526151723443673432805367034874393502449296552705312364840770199191857338"); + times_test ("-2.1655275560855920418985633841581563513185032946266e+30", "-5.9625533125793712547572194147395797672923522437e+21", "1.291207350302005700228376617552289919885062421326450164415825007449363425520444307151212866370242e+52"); + times_test ("1.012506744028479038160052533215313925528515964937e-1", "-2.212147e+0", "-0.2239813756282367818828645731194657054416130006287489739"); + times_test ("1.433496071288945453514799813e+23", "1.3979267765863662e+5", "2.0039225421861753263084300184572426981095206e+28"); + times_test ("-1.0851e+3", "8.013590881173773221229825407826356e-3", "-8.6955474651616613223564835500323788956"); + times_test ("1.0544140083165e-20", "2.7639893671307065522219750157782938300627387865356111e-13", "2.91438910754047439029710260584090912925195329258292696061880971315e-33"); + times_test ("6.9910144713252743945138327844029390845842716601381876e+52", "-8.482563824399426864364409762208780384877e-12", "-5.93017264503166569047842082409955073105581203136314428395603709690554785251717257461332289252e+41"); + times_test ("-5.359798702e+9", "-4.932148432974659892667336636982770197907445436167e+48", "2.6435322769128916091609850224697296903108609164903710455234e+58"); + times_test ("-1.71427280396517551988450013042709589140000549e+38", "2.403519034309521273463675792599073e+22", "-4.12028731432945393654068892074968286875285779764235024381198392132877356891077e+60"); + times_test ("-3.1889196169851645e+16", "6.3303265668790672589901e+16", "-2.018690257104300648907301509647095237145e+33"); + times_test ("-1.23339224241833842568898143251348600283e+19", "3.077450385078067e+0", "-37957034313826161513.8572222562474073059332490133292961"); + times_test ("2.92677040682294450913892109671419035013083833e+15", "-1.8864e-13", "-552.1059695430802522039660756841648676486813425712"); + times_test ("-8.6400999e+3", "-3e+0", "25920.2997"); + times_test ("2.8174216976e+7", "-3.80064379799368614537758774048216223e+5", "-10708016301316.282693791323644782201752565201648"); + times_test ("1.025429e+3", "-3.7942691388774640999508942702866141989404398978535327058969e-11", "-3.8907536088099791345485455606857325114052963440160501890751522701e-8"); + times_test ("7.5475945189824540258952479977984445146259416e+1", "2.241307785984759464484472e-1", "16.9164823608512696233027083957170305568142612592815464214011615788352"); + times_test ("-2.390294178360939572894052478069342172015510960221e-5", "1.0258531018946647560644677321558488928826911786e+6", "-24.520906973123289161325866068624287873503133376117055452224336029773591730793542320906922064706"); + times_test ("4.13335e+0", "-4.9088577675430835705980477517385482283e+2", "-2029.0027253474204476531440674648528319443805"); + times_test ("-9.49e+0", "3.11206e+1", "-295.334494"); + times_test ("-3.08616078174107176e+14", "2.076558336804330489690054e+22", "-6.40859290004299236964222747218844417227504e+36"); + times_test ("5.34715396168270921229718951112033768e+33", "1.185276582214392362269858422207e+30", "6.33785637227742951291731320592812398407062758490420416723385085976e+63"); + times_test ("3.09857552788127670265426890018069173e+27", "-2.775660244927720047697549780961273164125e+26", "-8.60059290864598393204134197688911975222918946093511063812459672352832018625e+53"); + times_test ("-2.152994e+4", "2.65842427162e+2", "-5723571.50625223028"); + times_test ("5.330956358309028663608422004436504723721138561972562601791e+36", "-2.7e+0", "-1.43935821674343773917427394119785627540470741173259190248357e+37"); + times_test ("-9.47262472923053e-20", "1.7815435405588685078649855417813049031471e-4", "-1.6875893398498851540266228993423166652387013603958400963e-23"); + times_test ("-3.7245117604208154109238688461979388885871895e-5", "1.099513130741858342635426870578056147376018748384434822302e-13", "-4.095149586185160991329081422183979955901725647516234149636345755464052206534381389581417571266100229e-18"); + times_test ("1.0834155200334824535073546679153022e+1", "-3.2878072e+3", "-35620.6134735782785171514593012553956333584"); + times_test ("4.1364165902025092463453669062207235153719556580492365e+19", "6.95e+0", "287480953019074392621.00299998234028431835091823442193675"); + times_test ("8.42371582961533136243e+0", "-4.7071941235449e-10", "-3.9652065651577439895485473058278107e-9"); + times_test ("-7.45065795641536747833628483446224560146193991951403486e+17", "1.27523917338709350722670736519147669728e+36", "-9.5013708935291045870600560683168551870317994342017416888060151292391323390390803175995871808e+53"); + times_test ("2.05416636316876816247008603104084729112e+37", "-2.67555245581664e+14", "-5.4960298576321336552408203766121162314254132314202368e+51"); + times_test ("6.02518139223983254774103596e+1", "-5.541610436514578623372748271926826526e+28", "-3.338920808512969500784406497155751094267976654888337866644787496e+30"); + times_test ("-1.886901000866449319960349324191903886e+27", "2.9119588739125107881913973682892608e-14", "-54945781136674.553048031354602674611785517327046962179124845815195874688"); + times_test ("-3.167630633483217259922541256223568e+20", "-1.976822247538314258143070135525568198864845149591441e-1", "62618427082535077150.84042450833457702256004904708731141210786339513630567393755281488"); + times_test ("-4.342121805414178979168499106872259725865474348828e+4", "2.87800764291519653e+5", "-12496659742.45073888635509104978249087676725149425279111442739516684"); + times_test ("3.48934964368845845248178606547230673370875533672897e+45", "3.60994798002748312248366391691804980174190472460657e+19", "1.25963706978427685634963685436483508162346103715778631358243181904380097203373116193801232752539713329e+65"); + times_test ("5.42527560030712498895e+17", "3.3118136084722e+4", "1.796750156280932065622648405138219e+22"); + times_test ("1.1270004847878401285903765398526874938853992e+30", "2.0458381647e+0", "2.30566060341436511755234793837415859085314757145484824e+30"); + times_test ("6.25593016708055943396626471164327645453174090870769922934835e+33", "5e+0", "3.127965083540279716983132355821638227265870454353849614674175e+34"); + times_test ("2.3033584574555686865161618899734095161045e+20", "1.3010709745e+8", "2.99683283286453354141726776018746569820565525883525e+28"); + times_test ("1.34211871248298281139772721139220298063196737768440691e-20", "-1.478359144e+9", "-1.98413347093272458362465744377928424672132387150944450161528504e-11"); + times_test ("-6e+0", "1.05671309643762e-9", "-6.34027857862572e-9"); + times_test ("6.4756599396864465846766547296e+24", "2.94968462813429622e+16", "1.9101154581118175282669146567918601241230402112e+41"); + times_test ("-3.091e+1", "5.667830565788117917508080275569794124182460349e+18", "-175192642788510724830.17476131786233637847984938759"); + times_test ("1e+0", "-4.6172103778523998784e+19", "-46172103778523998784"); + times_test ("-2.5570672065082385679679091913879025e+1", "-1.2063049743853270960595806834829465677969295004031501739e+29", "3.08460289104848063763132960929740754910194979655799625586510645610283250550119127523124475e+30"); + times_test ("-3.70293468184958402068082830264510960391603268883687825303e+45", "1.411163039553177355119999727715e+20", "-5.22544456090573674099746706657675074188431054961983786246940351702162084606420487372645e+65"); + times_test ("1.74787882197705299292198556022976167231705195e+35", "7.7333671996220816e+0", "1.351698875079142520032926258655417527276870238724265543433912e+36"); + times_test ("-4.096618331817365021e+11", "-1.013711236829518925258935118422711554106672e+5", "41527880359650616.57506268237434302892786107960903774595520112"); + times_test ("2.12048782119154454967332210439e+28", "-9.2197418205e+4", "-1.9550350244900609425611967419011549641995e+33"); + times_test ("-1.1505865830923532120744213733257299415660413583393e+16", "-8.46565236265629547979844640868246149886017535754876e-14", "974.0466025596414007536363196582134432561026804409558931080223917261617484174979797491453160432374268"); + times_test ("9.07420636404752362993662380875781571271e-14", "2.51474955483770475273773727474896143461917754897697324764e-9", "2.28193564144939774816732185434917998866319599098823390828301213887829237747907197261589099255044e-22"); + times_test ("1.246260472438897833535289124112549387151e+19", "-6.680412909470472488789414671059720951e+11", "-8.325534548643583067029478564395020366314784333266559701669016772756124900601e+30"); + times_test ("4.0294278740792929940247525071574944742596836e+33", "6.00085175738377949776908065147e+14", "2.4179999339419911926322112001876929096606969209945947707543711809044074892e+48"); + times_test ("1.55945832e+8", "1.1527307e+3", "179763548083.4424"); + times_test ("-3.211101384979001257677085706325437228950660943386036671e+5", "9.228686729748967e+7", "-29634248739434.237821402397860319787760148942989060826624350048886368857"); + times_test ("7.1768007105380238999489810862e+28", "-3.15802039762103328762026415391128e+24", "-2.2664483033540204459973246271168430597758318255590370472832336e+53"); + times_test ("-8.146245193307731671e+1", "2.43845e+5", "-19864211.59162123829314995"); + times_test ("-1.7260614660794362658661235883950941802e+20", "-6.765975e+4", "1.1678488727956813788943545545991497345878695e+25"); + times_test ("-1.0423339556844604967203052423172210806005595277e-15", "-1.65790186e-3", "1.728087403870424630609117961005471539558877558014551522e-18"); + times_test ("3.3874450138496810026558092372911790009595011319748e-7", "-1.844083119777027949884472374398549549372684360122809715262e+1", "-0.0000062467301692130573949905677401149904072205407708817196623282883165369601854286961699466138329393918717593976"); + times_test ("-4.5677632943648704446515762998538554442851348e-17", "3.582872388623075466216438867772511708e+23", "-16365712.9851458715575421433474376658852503648131234292126180950207040799233582384"); + times_test ("-2.86829101569688038860522495486e+2", "3.7e+0", "-1061.2676758078457437839332332982"); + times_test ("1.06077027679826318938182294804181993899494704147284057e+37", "-3.261253544293047623648926725904240616776040078855e+31", "-3.45944082488905300826935851931788717711099607836502248838085413796777056450136214579772327128364314735e+68"); + times_test ("-2.18507353576174076070959256350000774887e+0", "-1.59831147321681301466931141149354431e+1", "34.924281020304184328565238680515232418857862826204480512208558649806974297"); + times_test ("-1.99647745343238059689196134517981116780466772090884720632224e-1", "8.6467613748664636508931985451006098243078232494163917e+32", "-1.7263064130130867409299452087506032624045135897393310593388261234352860098403285199668529693824805691038528261408e+32"); + times_test ("-6e+0", "-3.4876006775596915566721213748733893e+7", "209256040.653581493400327282492403358"); + times_test ("5.28124391735772273591469590185765758579874870468433745e+33", "-2.147e+0", "-1.133883069056703071400885210128839083670991346895727250515e+34"); + times_test ("6.85038e+0", "-1.5901255569632960384981532502369e-9", "-1.0892964312910223916206979062357855022e-8"); + times_test ("7.983812710598619216930700499e-18", "-1.335137072858e+8", "-1.0659484332675135134229403579270339956142e-9"); + times_test ("-1.960334206940101e+2", "-2.959228e-9", "5.801075874534941202028e-7"); + times_test ("1e+0", "-9.164e+1", "-91.64"); + times_test ("2.027899432561029386047096809176e+12", "1.40213651157523255556127427614979949106e-5", "28433918.3619651531093388731497850317019747168257172892378111473796656"); + times_test ("-8.3594749784821954269345060852858640828490521460887e-13", "-7.164172033751721e-15", "5.98887168576894141563842978474039341215235493797906672056370436527e-27"); + times_test ("4.550077739716154666542802337e+11", "-2.7306574188036000270848865e+19", "-1.24247035360890335495046606524591731837703486895797505e+31"); + times_test ("9.4633378246343026774101810918412358e+19", "1.578450860979302005254127126947731754671912e+27", "1.49374137370320099547200047736473092846440961340814649863546698920428216288496e+47"); + times_test ("-5.2190603156319182229289905569617150480323e+40", "4.04355690292489982440257971296300398805279069834596e+48", "-2.1103567366054849391298527839468485796895719049012578983409941699614247722561603581562654508e+89"); + times_test ("-5.13097206174328014241389093854003358779365258633983078e+53", "-1.59332306217979e+12", "8.1752961173757536414155211183332535775263410017806193494494865359362e+65"); + times_test ("-3.00025764484794075488331e+16", "1.21837943722606727484247960651563238163989e+31", "-3.6554522208630400771401722295434531318286045235250273221033912359e+47"); + times_test ("-8.034506919e+9", "9.59917303867585553e-16", "-0.000007712462219591941585402941207"); + times_test ("-1.03623135167581303e+11", "-6.0727847191820070012464062e-17", "0.000006292809917994193771401113453514323750632786"); + times_test ("-1.776830835655537305590797996218970905e+19", "1.4297825967432706650609604367607227448e+19", "-2.540481806177089727480969780595820579837949700040264880146150148682940044e+38"); + times_test ("-7.06672750227869765640275129774849369371986497683548567624e+47", "0e+0", "0"); + times_test ("1.201486e+6", "-6.4618819204288244e+10", "-77638606610483465.130584"); + times_test ("-8.392439e+1", "-4.559646760722e+0", "382.66557300906980958"); + times_test ("-4.892684791905e+0", "1.325742128654573684900693679335408e+0", "-6.48643835085599458713483949506930948917827224"); + times_test ("-5.583623025078921446646733308770747651954925640892627777043e+48", "-2.49487928392226886507353963712136114e+9", "1.393046541450079222756134578078800193311267254493670540053212261265672987328881907800860430902e+58"); + times_test ("-2.96526320854720999501457709614986308646e+12", "1.58934709e+3", "-4712832451588571.3331953326153464351003636194014"); + times_test ("-2.278047134327102481e-9", "6.53948173493481078043032097446045568663006609238767572331335e+59", "-1.489724762625267407514295696211403251163397687148157704642933789435816632542135e+51"); + times_test ("-4.34649668141838505956e+10", "2.7566141566303188003001360098750592488e+19", "-1.1981614283744620987582158070935888399955230644767716858528e+30"); + times_test ("-3e-10", "3.285427839965717144526763107629871339325200898862235e+18", "-985628351.9897151433580289322889614017975602696586705"); + times_test ("2.6431444802225494336841837930134668e+25", "1.5757672131509605631302369006921e-6", "41649804115556309200.4022799068651144359462695399494757742954037228"); + times_test ("5.4197814884600979459047471764155193322e+12", "-3.45317672489168691123605172192567891610375269351773e-14", "-0.18715463289949233044577799707655967434015297575177174844144791767778460868554918438459906"); + times_test ("2.1804041368605641467299918902653637965488411876504e-18", "1.5595945850567196835592942943641516156866395747026257882e+46", "3.40054648508300657595934821590957250693570708065275875065240265811212908037363934338779869619908640604528e+28"); + times_test ("1.6644802913995172764608435e+25", "-1.64481887574951745057302561e+14", "-2.737768601606983206750201541817125086018588487702035e+39"); + times_test ("1.345297580765936668864521475544600213e+34", "5.255894981691269736920878216903973555596e+1", "7.070742803629092178385260348541240791936901232154070386845812623023948941948e+35"); + times_test ("-1.236303590387333100113303929204537712340659855471201673025413e+21", "-7.9e+2", "9.7667983640599314908951010407158479274912128582224932169007627e+23"); + times_test ("1.8325580806128635358765e+2", "-3.171748e+0", "-581.2412427067688694189217122"); + times_test ("-1.0243e+2", "-3.409589101402e-3", "0.34924421165660686"); + times_test ("-1.273997601117917175698667546852761764039275631891486e-10", "7.856245279828564906705161224850856859963860198e+2", "-1.0008837640295551637408536690012436719563557239798756225068083188519724150459019497133976810474228e-7"); + times_test ("2e+0", "2.0782554146127983844e+17", "415651082922559676.88"); + times_test ("-1.0017426e+1", "1.05631201445e+2", "-1058.15274376638057"); + times_test ("1.23321e+0", "2.76e+2", "340.36596"); + times_test ("6.5482994824671797204789687e+6", "-1.810350618538593530488926394601031399259372856417988086e+12", "-11854718018460410708.6469761335753156476928972597617168054353701088346263301669082"); + times_test ("-1.8464263e+0", "1.2578353631044943640519616250643946541369931149527985242e-12", "-2.32250029550618804198731651110963748297794789036777045368406646e-12"); + times_test ("2.306905117986512123647e-15", "1.92224194054550245e-13", "4.43442977065274435217191058558414143515e-28"); + times_test ("-7.7660157326825169689845327710896583341071831411984679e+23", "3.6431726508659866242336616738158288e+18", "-2.829293612350392270265658763343483917211646344882471424632373955590786112801497332869552e+42"); + times_test ("-1.804410431608216174757910743628838673593296632e-7", "-2.708299883920527521842766517861172987221865596e+20", "48868845624695.20830931105195115261702836652954741973993651473991827943522861106002863472672"); + times_test ("-1.800090865364229e+5", "-5.8264534155111055348482827550238e+10", "10488145570731753.6804095274061076304171665636502"); + times_test ("-3.60855354781654573978597356957428456e-15", "1.866546962201332812e-19", "-6.73553466261781541696603311041890681571157507335298272e-34"); + times_test ("-4.513629265554556014503659605626189283778885640833465154e+54", "-1.6679267957795545731497e-20", "7.5284031982332348463844383049275530663291324432825482209928639026696189755538e+34"); + times_test ("1.0941972e-2", "3.45343163878253161341020408675072450114411418654261458e+9", "37787352.29547257500304927763151199847123286539395206554115176"); + times_test ("1.24194883524432e-3", "0e+0", "0"); + times_test ("4.5115e-19", "-4.72349600277e+11", "-2.1310052216496855e-7"); + times_test ("5.7379616e+1", "-1.014091e-3", "-0.058188152169056"); + times_test ("3.665008e-19", "1.20318611886502374360861219376e+18", "0.440968675112926294051551255902795008"); + times_test ("3.33610310938677239000000947724228838577011e+13", "-6.096671817812092833664313029588e+1", "-2033912580831362.881020502005617192477576549025176845225368255784259601468"); + times_test ("2.583458940580655231541895311105492814e+17", "-1.5156221815587830068151379463e+26", "-3.9155476754903950432396966951972758516587513180224498790533678882e+43"); + times_test ("3.702736747441730847035655529e+20", "1.0018677975945079169067e+10", "3.7096527102316985801620293314995993182468964321443e+30"); + times_test ("-2.83630154283079925e+17", "6.41074464694029283507262773575118086890104876e+10", "-1.818280493281103999466755581106175564517622369590252755402143e+28"); + times_test ("4.4674110594344555786220486754e+28", "-6.727853004096336279764957767621729768e+4", "-3.00560849167492982673836524473329588821711484064022839144411493072e+33"); + times_test ("-1.5688404306246196345593833419224858e+19", "2.63605019e+6", "-4.135542115227710406357993024757603658362302e+25"); + times_test ("0e+0", "-2.64954402306017667049973249287275628634791783589648e+50", "0"); + times_test ("-3.5009076896538e+3", "-6.6430229e+3", "23256609.95315628647202"); + times_test ("-1.521924675204764636287003e-12", "3.7693609744915860629583e-20", "-5.7366834768326222380785330790588380575060209749e-32"); + times_test ("1.11236129544558345600503719108591547020411211e+44", "-3.1253884214607362312987e+14", "-3.476561113266691720093444060759595557505158595083676675212825697257e+58"); + times_test ("1.33815573609017992048200249790557568805710357380887861899e+52", "-2.5e+0", "-3.345389340225449801205006244763939220142758934522196547475e+52"); + times_test ("1.611548475376932804e-7", "4.9802375112902234248e+15", "802589416.83347697323623227532963471392"); + times_test ("4.166575179521503556226149051605877512974975774232e+25", "6.399872460241347446318418520381529620092936e+33", "2.6665549744944818866755013936324316057322003893851265592949522620090738985837783100394025152e+59"); + times_test ("2.35506389265e+0", "4.006712248230173437693154988324e-9", "9.4360633440453853293582738230620847394186e-9"); + times_test ("-7.242328039718679745240983432e-1", "-6.92464621048019340876524126396387834446077132758404786e+24", "5.015055941529240335287534191035479214939020902123532657328599638598099582175505552e+24"); + times_test ("-4.193894403896958727143737666044e+30", "3.261588840189662e-1", "-1.3678759184684195494824524833564292922177237128e+30"); + times_test ("1.5765195258987684156516463952714058260238e+39", "-6.4745770126610248e+16", "-1.020729708239542312739313896297935609020156882675181719024e+56"); + times_test ("-2.040489518370981132782249800266e+7", "-1.174334689904e+12", "23962176258085484397.98077967950839046714464"); + times_test ("-2.999e+0", "-2.745829033902881255806415521483615257e+36", "8.234741272674740886163440148929362155743e+36"); + times_test ("-1.421995402238039424217983713e-10", "-6.62685949e+4", "0.00000942336372605751879737308119715948637"); + times_test ("-2.91998097054133242068815e+15", "-2.008599636825475699484477749463054e+31", "5.8650727169666203572881875569551215932356120857036806101e+46"); + times_test ("2.6e+0", "7.4773359790825494286810609654593232269035859893021495060685e-13", "1.94410735456146285145707585101942403899493235721855887157781e-12"); + times_test ("7.50302677e+7", "-9.16389319e+6", "-687569359219906.963"); + times_test ("-3.4496300003784699749429090893221619407742937e+17", "2e+0", "-689926000075693994.98858181786443238815485874"); + times_test ("5.58909651552271e+14", "-2.9302356759838764984959768e+18", "-1.6377370006301816824127798758929684033128e+33"); + times_test ("-3.21467608558886180085443357632011447658817714543954802587541e+59", "-6.05654450954627843543147e+21", "1.94698287961429431939792169536178895975298009949974623312844888292490502665078131527e+81"); + times_test ("1.4473044599244751554764848267885956615840337279448e+31", "3.2978760548379995995551379e-19", "4773030722445.16982161490157947831158781808944842335126216028865139564758792"); + times_test ("-1.52212585961814532229294847288693e+27", "5.4807677063154665054707604339457540829262049e-20", "-83424182.56342800099858567431320449627410280372645389871308978482983651711957"); + times_test ("-9.90550793992759173966e+6", "3.335265462233194052458441615728696e+23", "-3.303749851791717304829547839188687665630386634122328336e+30"); + times_test ("2.51287438279233642085429923935090523723e+30", "-9.451335136867210002148028438967398611467216454584204034e+38", "-2.375001794861871280485178924285492901455882867966860732042873907744155803603055976356149298582e+69"); + times_test ("3.4082333651834518484189e+13", "4.35506385179170328272063457227625384554944253e+44", "1.4843073927180842671942017049002743738759608944705687993398956915817e+58"); + times_test ("6.5818547070316952187958008e-6", "-3.73951282e+8", "-2461.2930056322368417019602053766256"); + times_test ("1.97206174719719816981292592386e+16", "-9.0105789e+2", "-17769417968792207968.034967276795922554"); + times_test ("3.6619571048211390692219928266376703435e+7", "-2.4799589894315235042761055970638006e+26", "-9.0815034410138196343173744241842493541845089867523197724164419200175061e+33"); + times_test ("-7.84666331967208510490549760574105355103150267368e+19", "1.619717764380338390313718e+9", "-1.270937996998447419567301371334187807713815536655396765563064753098154224e+29"); + times_test ("9.483006538328174932945681176608e+30", "-5.3373488401022043702090517246506626e+23", "-5.06141139480275047286128600549610642611475683804095134453348204608e+54"); + times_test ("-1.4803912145480433328776377901902060963e+8", "-1.582058e+1", "2342064764.1054483391257298870727370763001854"); + times_test ("8.9882523984348881655495577517148277303020468059964733526e-10", "-1.9880593317254807355650321572764e-8", "-1.786917905661241317492297819003818060408519912904334361445796515881479577099002479285864e-17"); + times_test ("-1.28471301581497146597153639797443e+32", "1.42004323959128318e+2", "-1.8243480329229795026092654483949144472588365290874e+34"); + times_test ("9.7783e+3", "-1.36173859052909811217858436668287617315269353636409624e+45", "-1.3315488459770680070315851512735168083938983206629042263592e+49"); + times_test ("-4.67119137023742882426401e+14", "-1.212047464364320398948015745451394730100809445563379321597567e-2", "5661705655856.77098789712337972493426181265394901439758588512945491280590876618166367"); + times_test ("4.21209472e-13", "-4.905686e-9", "-2.066321409857792e-21"); + times_test ("-8.0534398142355474142562564558981481e+19", "-3.52823954947651480531133809737181713783475797e+44", "2.8414464861914654893810641177621530490552863751100871276411283589068922334715357e+64"); + times_test ("4.1668071977029939763287789711116957000695558377e-7", "-1.3024216206228e+9", "-542.693978325508121622979460863479145783998910882101044971956"); + times_test ("2.14936794322219777817392300235280096983947067201554505296068e-1", "5.56270924878341e+7", "11956308.9368006948399328359990270847329026003904275869850287225663085663188"); + times_test ("4.4808187810392761874440073637915549517e+38", "-7.646754766255997951108787766099794e+20", "-3.42637223706414760467636032872081913139464887999833237904238953370499498e+59"); + times_test ("2.6590306926035e-19", "6.065851175402e+9", "1.6129284452158934622539107e-9"); + times_test ("-2.99e-3", "5.30673982e+7", "-158671.520618"); + times_test ("2.7453398931708285228618465251335055626300456581132e+13", "-3.22074749108902263854425833e+12", "-8.842046573116551400389407780741144904662936292441998341089622224330041182956e+25"); + times_test ("-1.927554010995289666334e+11", "6.691946123062138e+4", "-12899087590872802.405021000232368662092"); + times_test ("3.1043442867282686296635094758709963529734603e-10", "-6.9061694467717526338079e-19", "-2.143912766526321799419146642311363281841178348205083711921322847637e-28"); + times_test ("-9.9460755574581062016784211082305572914306783520097982603599e+8", "-1.69419433e+4", "16850584815197.112739421417524916526495882012852028744317145606339367"); + times_test ("2.61564884146360410916221e+1", "-3.37673411255562774e+10", "-883235066943.67590562874468917360320357054"); + times_test ("-6.63e+3", "-2.3664010008e+2", "1568923.8635304"); + times_test ("2.6042340596970639861661053132244e-13", "-4.19696881552846756035609e+12", "-1.0929889136885679117123078859859216841502622841450076596"); + times_test ("9.66932408746122723475707863151647060844849114776240053344e+35", "3.543132415517187808951809e+20", "3.425969561042502580998764203892614576219316524854247783921994540516844698885299296e+56"); + times_test ("-8.75613931133e+11", "2.85579203853134364863246620418932562599339642887412e+50", "-2.50057129335675362001562521254298208477229393538495184240597796e+62"); + times_test ("-2.50801681357e+11", "5.6482598133343504471083657127414336e-11", "-14.165930579254300605382428195360012246785733952"); + times_test ("-2.30985517042381424317138251138e+7", "-1.356837662673868976569988292803227160100334665194252e-8", "0.313409849055299940654534970732121932438107278390194102752542104703069838330058776"); + times_test ("5.862908424337665828006849479349960917695532524969888e+2", "-7.671778766584342308528805252661904591265896365900259438e+11", "-449789363602621.67756677207730170927431389968466555033513219445179870196178056661700171117319697232337802944"); + times_test ("9.581282282850454426590480159624386252965047e+42", "-3e+0", "-2.8743846848551363279771440478873158758895141e+43"); + times_test ("6.80255891e+1", "6.4939628006286648775556960482793713797e-10", "4.4175564510625077864220559174474627948177228127e-8"); + times_test ("1.17e+1", "4.39880043917181857989519e+14", "5146596513831027.7384773723"); + times_test ("5.18057e+5", "1.12095183227955985516792e+15", "580716943375251939888.72713144"); + times_test ("7.9079109607883946443459466318246948653463050994769e+5", "3.36736267476382737799206797447753274243e-8", "0.026628804204714596632325780373652132822901517398195299752987744361561977288621298015434867"); + times_test ("1.9192337832e+6", "4.3746589806622647519097525128325765043728672520610978379588e-6", "8.39599330566629402128776374017937235269096935960460880109100828973216"); + times_test ("1.97054154322487963934e-16", "-5.29966794868061391983563001785802904827e+35", "-104432158581725291847.012347689094982662143786123082010509418"); + times_test ("6.9435803780806824e+0", "1.312029461736620484829099495123927022691450102807689e+51", "9.1101820259781574883358006463573816901697004118371527017012130869736e+51"); + times_test ("-2.02777011165205949332910260826373220997764e+19", "1.719346099690327466591195210611602452021664087e+46", "-3.48643863253758833917742037463014837753623268813161576588808665593545590271493786101468e+65"); + times_test ("-1.35689510306015930639203912344e-5", "-1.7775524374291928790914680036598415373039480612e+32", "2.411952197780322048592902790431885908730809493500413918235779385964135474528e+27"); + times_test ("-1.197093336042660715753664692387461089572e+10", "9.30322759e-19", "-1.113683175167722258780864100982789097855769169148e-8"); + times_test ("-7.22954e+3", "-1.80621201849899035625232371577275379091004324e-18", "1.30580820362191907401404243961277544415357940053096e-14"); + times_test ("-2.5487146811e+1", "1.23224022125341461664322693e+11", "-3140628742550.490076943920877369882023"); + times_test ("-1.18509703682338023839102000456883783748380745862220202e+28", "-6.3419775864e-20", "751585884.5242932927360537668009595161218552675515150636252804528"); + times_test ("7.1388416426585452586630469980942729444722426421412280025841e+11", "2.2273053664463959959973918980036896886955225978954e+4", "15900380300904382.68571628113627797346230258274544097276905843398058418502349718417824485312566047149642150314"); + times_test ("-4.048812287518331136928265811389922096053793e+42", "1.883843038956722868136968070669521788203167379034479609892e+28", "-7.627326843883853713943674629620475969636818573439332541709592124635715493176124730990752735286920356e+70"); + times_test ("-4.40496773173133229276988080861e+25", "2.6836361405552532182670933448535260065953975259e+0", "-1.1821330602853900620632833373905984586754469500681938106134905203144285417999e+26"); + times_test ("-2.10698470492551613923273067e+22", "4.9829981981459258350705361168e+25", "-1.0499100988164872148563717105895284884047064402922062256e+48"); + times_test ("4.153010660772414005280043833935812744967827327617095506753e-20", "2.527751586e-1", "1.0497779284442377486895243175380771288291439046358254767908369460258e-20"); + times_test ("-1.775786834688476262481212524832086861722161695595273e+16", "-7.18e-17", "1.275014947306325956461510592829438366716512097437406014"); + times_test ("-8.4572173659763154903842071410504969649015559593e-5", "1.55e+1", "-0.0013108686917263289010095521068628270295597411736915"); + times_test ("2.1957687570313298348687272820162816911371646883313165861e+55", "-2.38569977592e-5", "-5.238445031621780511465933279321833876337532446936158618177349386712e+50"); + times_test ("-1.27304464823058989292690796372853e+19", "7.469e+2", "-9.50837047763427591027107558108839057e+21"); + times_test ("1.075014243303345850436753650150338343736e+25", "6.02230306841873236690335765889046842703055475561e+27", "6.47406157603958142830356266103466419129027532770065365087223464829450025112366565435896e+52"); + times_test ("5.4644781816078472076480587668e-10", "5.533388289372726449619555652757e+18", "3023707957.76416324809553379608185627596205958651886704400676"); + times_test ("-3.51050282698153075e-6", "-2.38e+2", "0.0008354996728216043185"); + times_test ("6.8429855416436924582601339528425e+26", "-5.06163347121826253493439522309e-18", "-3463668466.0646345473598332283493482158871668931014551327133325"); + times_test ("-6.6943286454175063790486144e+19", "3.4328180225062095992833728348740385020789e+37", "-2.298041202256879703336604670399729877443829865654374596865856447616e+57"); + times_test ("3.4586536216937580446126883522083952059e+12", "-2.88703672447082268049428783480859803803275492e+13", "-9.985260023053895125434393341048712560458518029877932175692101389180863832497638028e+25"); + times_test ("1.544220975398677252000528288503556128937132048384443331e+49", "0e+0", "0"); + times_test ("7.7e+0", "5.629239278180308472085767973107775059451282267e-16", "4.33451424419883752350604133929298679577748734559e-15"); + times_test ("1.072717719201024052696349931792614756e+25", "1.3771846282397089347926178e-3", "1.4773303533240107890345190437679728361254161112010424681482568e+22"); + times_test ("-6.2982194473322433078922784904265197191653069665364692e+7", "-2.8678684613182319044997019428886e-19", "1.806246491546528554076417787115541085256514512890108233024447001160805124352749293112e-11"); + times_test ("-1.732465708088e+1", "2.71524489294637185383888961456871107141931061365e+31", "-4.7040686660906618703715451371754514270759411014339610482012e+32"); + times_test ("-8.96598237114090468243115825396177729e-12", "7.604366591101533e+15", "-68180.61679950920120868401395898211540605801952358557"); + times_test ("-9.71839881931499436381251357007593505557676492579357e+50", "6.57868431363921445315728822689471152257263421455e-10", "-6.39342778663174158137496675720663924284622907149091698424887623612741936565068134530253299923904435e+41"); + times_test ("-1.006931641466488693025e-9", "-3.4521295426580450451664697531545584755870088979e+4", "0.000034760584669436241976889349243420680611555496619415686043504166671475"); + times_test ("6.00947607e+5", "6.812758675764029679963178704882229955116307e+38", "4.094111023268882532850848090812335308350862098327349e+44"); + times_test ("-9.6836087377e-15", "-2.6459022649270745998e-12", "2.562188229174803984792301067246e-26"); + times_test ("1.055921827168468904939466656863008144e+27", "6.32912299980432425349782865630544e+17", "6.68305912232736312925806512224733448892859379422335164811681167150336e+44"); + times_test ("-9.98028905218791239e+3", "3.3600371506928e+6", "-33534141990.004018666701074203792"); + times_test ("-1.45239016384017840495355131293445684596538291022094579841e+42", "-5.6775437718634921734497447e+2", "8.246008729026601881844137255200165069034156821222471237266712949036717046752165927e+44"); + times_test ("-2.2979549681655763076566677319272798755304678418e+1", "-3.183497604578998e+15", "73155341365855197.813621009301952050894390937967417408666665164"); + times_test ("4.0066264588364721690045277668336e+31", "6.737893728955e+12", "2.6996223291259444273370994565149283876986888e+44"); + times_test ("5.846436541728802080043719344611e+21", "-1.2e-10", "-701572385007.45624960524632135332"); + times_test ("-3.182300165687177420393599644356615e+0", "2.365832971505851366517267883747439591747414512839432822e-15", "-7.52879065721125810057489253493734512785942465676134438014645481107031765439734970381753e-15"); + times_test ("3.825832626826099559783359922877e-15", "-6.5955112433918682619536836375146720871309857645017e+49", "-2.52333221055669854343885405756298648535866081882102237578852058574273365963353909e+35"); + times_test ("-2.86423604077436742725253566687e-18", "-3.9616e+1", "1.1346957499131733999803645297872192e-16"); + times_test ("-5.81865579e+4", "-3.0827768621936331602e-20", "1.7937617438481015688733727558e-15"); + times_test ("-3.65098386509026325842574744310157864397940281992715898768e+16", "7.543511472508780470316703042149589376987868468e+20", "-2.754123867225285049343404492717016138666722719241254048568925571123034276751089068825616530843187247424e+37"); + times_test ("4.71978532088277616359995233744199725174e+38", "-2.90845032007102932970578279149703516018735003308119692077e-12", "-1.37272611271880562032081502654149993248115310939203471275734361729098063870184524627400905246398e+27"); + times_test ("6.66954264794400293153673670798603436474391677055481161e-10", "-6.0831130005762409912165773287576e-8", "-4.0571581589605851371281721138429286134755181825367445092430588795115847031409503355736e-17"); + times_test ("-1.5359590725191838049406967873638064365696777077105943281364e+38", "-3.46671719279686986011120227659402959170189585e-3", "5.32473572413458873765078208479002392295654434125039963877442769432916923725014543243576464416487739394e+35"); + times_test ("-3.8918273124023755760911999559263803895614e+13", "-5.9049071497197518967775767842381303529437097e+25", "2.298087892247939399387630879792186664312313395569266522629770751383705096713167192558e+39"); + times_test ("1.6494930061e+4", "-1.4134663182e+6", "-23315028062.2881714102"); + times_test ("-1.38082e+2", "1.086557106158916053738635237440757e+4", "-1500339.78332635446532338230856294608074"); + times_test ("-3.236453714001566320662909602293056422741e-12", "-2.6292012409417075744241522002879275006552063e+30", "8509288121103316508.9776133643121846506311098158231648344441177311116642919353664683"); + times_test ("-5.56185157584785e-9", "-5.3863586550733398733233e+22", "299581273738013.61300657427800794659905"); + times_test ("-7.306228492885575e+1", "8.01710749999e-16", "-5.857481924695357768938364425e-14"); + times_test ("9.078851355998902214e+6", "-3e+0", "-27236554.067996706642"); + times_test ("-7.471572766864317095e+11", "-9.947035107615899737979837388819482785995e+39", "7.4319996621106228158954275728754194694522889053163705084525e+51"); + times_test ("-1.265903731885e-16", "-1.207e+1", "1.527945804385195e-15"); + times_test ("-4.726326821555207871753620716339193235463e+9", "-6.4126109518e+10", "303080951376910103067.328380769000717453065099436834"); + times_test ("-1.91406e-20", "-6.456816473704e+1", "1.235873413965787824e-18"); + times_test ("-3.1983053456730161e-8", "9e+0", "-2.87847481110571449e-7"); + times_test ("-1.1250473182304781788249e-4", "-1.657377060472918137667968348296e+8", "18646.276171817696089408668926562813557672385751973704"); + times_test ("1.1497865844851967254212601851139326807506796369434785706622e+39", "-7.76071990827718702947360345575041554086866713806786843198744e+45", "-8.923171636484296086155235679649166775015520367811462823386249811629379239580605875232547783752918665760034624822882768e+84"); + times_test ("-3.3497708586119180439409399519615946383638197694153e+35", "-4.8561981458432843062333291774478231682e+38", "1.626715103259106287442319579436450524467374682092885927992940109533202075360145310755346e+74"); + times_test ("1.06339694463513e+14", "3.012233219e+5", "32031996016130424203.8347"); + times_test ("1.9633039492389670984077672122431784083773501182422065509489e+19", "1.6692272776747540826414430546718929e-7", "3277200506436.25462718284982490613239885158226875205709983451693837979539541036807585665417281"); + times_test ("1.1467e-4", "6.77733085233686770034e-10", "7.771565288374686191979878e-14"); + times_test ("-5.1701628249523227514579183256087778174687577e-13", "2.132619358400722076540485378725800253187225047660162663738e+9", "-0.00110259893265770873100902961300808852480005642266384867114383755051015481735901792658688929318256982826"); + times_test ("2.18348342946585692342012771e+25", "-3.81634959382e-10", "-8332936099154723.6892526392312710267522"); + times_test ("1.023307551757890323892037392256508719427002369e+26", "-5.20694036686411877720526e+13", "-5.32830139896505265680420021857733687673247020557939546162596921926094e+39"); + times_test ("-2.8265491339447e+7", "-4.5434392049769450607387334481043271753316588900535258158e+55", "1.284225414995798036336141936613726795940619730566835387167617353958626e+63"); + times_test ("-8.02970908483254769090703403995505109862035476919e-11", "2.3071404145426391103284923337981992716315980206711699715e+9", "-0.18525666346637359394264144605477583625489813085571289205234643919692091911432433571550028203557141378085"); + times_test ("1.587431829883573713849409705849497e+25", "-1.49418e-12", "-23719088915754.3817175951099428620142746"); + times_test ("1.6140449345603180298849693965438089354593840997322e+28", "-9.03841799979613578000119003816765e+23", "-1.458841278900975455540967582013269342009334677839779329905619862068104285214370333e+52"); + times_test ("-3.723294e-8", "8.1668979393732624484790294912e+9", "-304.077620962808318348472796304080128"); + times_test ("-2.145634432722793043073725435570720754433983080847542e+20", "1.465950677153e-4", "-31453942495727714.83031405298777297962982768524603399340055607926"); + times_test ("2.278200008209245655472133211650862842e+14", "6.7270967926351916022156783304e-6", "1532567196.82058836270487268466918972063318028121075008094819589968"); + times_test ("3.1343999e+5", "3.14336961975866116898902330896465119306450054556291e+20", "9.852577421834585592213077760716471803076251203562330547709e+25"); + times_test ("-8.041439619908106697385565e+20", "7.78883706e+2", "-6.26334629272925752390308937810389e+23"); + times_test ("1.77601311247551979976524852558057621908110590977554e+24", "-9.63987036475e+11", "-1.7120536170360171827608873268662828982548556336301315370428215e+36"); + times_test ("9.807194626e+5", "-7.62599457122846035815911841262358376674896189395e-17", "-7.47896129768569306427921413491796612781212565774252219127e-11"); + times_test ("-1.92719707950824442875770342240518e+16", "-1.70525973966481953e-11", "328637.15900850293995476091245818788722108232371654"); + times_test ("1.16239377795254501916971749785697228868532854085e+35", "6.473102172409450243517628017455112739783779499e-12", "7.52429368925984729196132515935558757033934932864160658040770594113623888987378706054781403415e+23"); + times_test ("-1.179784405848068e+16", "-4e+0", "47191376233922720"); + times_test ("-7.538813675402315501713570566310033336449e+12", "3.41223043965380709597413486586383914131435e+12", "-2.572416950208617640223348424864689151961024519972222888201004983894402712962174315e+25"); + times_test ("-2.519610125898322011290936135004574898e+10", "-1.363124864524128033329953790490685211016e+16", "3.434543211518771369514488568838182872952969792353237320906862717950506676368e+26"); + times_test ("-4.4018359795112479954572037e+25", "8.064374150981933179268739012e+27", "-3.54980522900327467667853946121209296167777117106207444e+53"); + times_test ("-5.5876311411746274e+7", "5.34197880056852641608623989794750613e+11", "-29849007101551382575.802997685240605484431232661965962"); + times_test ("2.983561815076415871361124408351471429654035718756708688e-8", "1.118284411811800788510463e-16", "3.336470669476878476744869376687068610902363203935757551720993296308551931002544e-24"); + times_test ("2.134734577507378691205480523075055640400370419357e+26", "-2.40845e-11", "-5141401493197646.20883383956580011775712227213650036665"); + times_test ("3.47245322842069354627e-3", "-1.00754361885679357737028320286543060818544720573186927742e-9", "-3.4986480920739416255076813924095074265312312003153482496363088688338822362234e-12"); + times_test ("-3.794245568368302794408011786555814e+20", "-8.37060859067434635093e-16", "317601.4454971178330815419624905170794066260320367580702"); + times_test ("1.28940799891798555024002319648354556806250881774458599981e-9", "1.0028654150809960226369756911508906070980659188266e+9", "1.293102688043642049274122897660291144835301385402718280038596441757921696250413746340720089018990263022946"); + times_test ("-4.27636406710816966834122598758048794168539e+7", "8.8982999317788742062040151406652152536669424005e+25", "-3.8052370086610255197545273472972163674292703635630344454164911934066209770042628022378695e+33"); + times_test ("-2.948850630230385521369167273e+27", "6.672909985285753803977844488e+27", "-1.9677414815580527680894543930730406872388735650053041224e+55"); + times_test ("-4.58435850212e-12", "-3.37588403664294220132546582786902937780785e+14", "1547.6262685555257703338148001260909269985470795177642"); + times_test ("-2.5407577921477732e-3", "9.212688937755560725e+17", "-2340721120523603.242830965922612757"); + times_test ("9.70814828823927437608576282702e-4", "-1.0450399929711279076844e+23", "-101454032189042387227.18166504580735273535431725952488"); + times_test ("-8.986580647129736635012468025475589251e+25", "-2.32842674940416e+7", "2.092459476445462528863223485743121453574148915068416e+33"); + times_test ("1.13e+1", "-4.694730618579590045444086579344431326591112917465804e+45", "-5.30504559899493675135181783465920739904795759673635852e+46"); + times_test ("2.5304029888089e+11", "4.387914643257e-16", "0.000111031923279358510068465873"); + times_test ("7.292170304772241302551375e+0", "-3.6216283825126026376967892815e+18", "-26409530945878724879.8331593964512856913252717030870625"); + times_test ("9.49e+1", "-6.3604126376648187672456674994000370673e+26", "-6.0360315931439130101161384569306351768677e+28"); + times_test ("-1.176852634451796072215996403677e+9", "2.44904391e+8", "-288216377737162735.922250619700705845707"); + times_test ("1.373680713942569963597709e-10", "-4.5471428840104475371083297e+25", "-6246322483306348.1748793733532597161392782837366573"); + times_test ("-5.3314956749576410979116539202451154407e+37", "2.70915269844828616659642472037869598192445e+24", "-1.4443835894576860174475218340998015353555909569592060809911322322844730795855115e+62"); + times_test ("5.9e+0", "2.208687915206977e-18", "1.30312586997211643e-17"); + times_test ("-4.933577839564e-2", "-5.81527983789613597327083109083065394990114741585e+20", "28690135739107706650.0330893037590591643386059592539244906894"); + times_test ("-2.999683795083396322669132758034104118057863174352390023e+27", "-2.87555441825734267003450825531215971389862724174149604e+38", "8.62575399032701361118218619119383526371855243131272664024482478550553556850589314665513164176854330959000892e+65"); + times_test ("4e+0", "4.73e-13", "1.892e-12"); + times_test ("1.08754268552842900657636111617643472953987707185276968598108e+7", "1.81351345637832644608e-15", "1.9722732945916286331432129685647633013480203078627843626297182977144595945201664e-8"); + times_test ("1.476869487377797869802075095495419497297018e+4", "9.16978415362210821336e+12", "135425744223249370.6870672636130364222488062879808291121723576048"); + times_test ("-6.44960562766724813383113663723696894522318058842884424114e-4", "6.2987e+2", "-0.40624130966987695820562180336964496295277247572336761221668518"); + times_test ("3.45e-18", "-4.5651228859493759221433089678212482448435184321088e+19", "-157.4967395652534693139441593898330644471013859077536"); + times_test ("1.1116801887311179022882314500092e-16", "-2.3731060633715843891182383816509351972782343643683136984815e+27", "-263813499640.78831745125440250018216990705243508298365311908844491303220133333740292010298"); + times_test ("-3.411622226349151970376832394365767151948e+39", "2.272882453750169129e+6", "-7.754216297093075438917262330382150382606746020237641813292e+45"); + times_test ("4.813825375694300536878e-13", "-4.994458765e-10", "-2.404245234081581727695453283567e-22"); + times_test ("-3.4004823042485333889969440789299923572353e+11", "-5.055670795945782666596715941784e+23", "1.71917190777197318977613475600295720724871164612058192437613842059897752e+35"); + times_test ("-4.30182750049173941901359056714e-6", "-2.73059273e-2", "1.17465388985568150826129341738290608922e-7"); + times_test ("-4.383659202779121282988e+9", "-3.26708101440047648993067e-10", "1.432176975500159562983467763399865447357044196"); + times_test ("2.1032287098642227578833893517123706840232e+4", "-1.38738398481150077730631608976218467847e-19", "-2.917985828461377201803501253006512530189396739380234897663356402988476658020504e-15"); + times_test ("-1.82989876256793e+1", "-1.42680066252682303444e+22", "2.6109007667889361627836979692295092e+23"); + times_test ("-5.401957277401719742017451884201647908e-4", "5.57331798132165019229595829181742725699386949139427e-15", "-3.010682562847435019555936026646401099636466062637082424633510028806828395006935854868716e-18"); + times_test ("-1.7025584579461e+1", "-1.89357506715785170663032403281086721920633943e-19", "3.223922246345454748113384654355437033006187500650177244723e-18"); + times_test ("1.75701556278545512743452095698613449533241870186405314374e+21", "-8.0008069425919153153324522596175843489e+10", "-1.4057542312975910661097788666304204083938593139961296775572442278829856249685309185751666010886e+32"); + times_test ("-6.0477171077679290199698548748670345744496299140266e+49", "-2.133215459449e-13", "1.29010836286647401512022142630193335625187354733582678886073434e+37"); + times_test ("3.1064394721189e-1", "2.338713865381214106067869220656146181070789175e+10", "7265073065.4119709049662500151915998866163745003396324329075"); + times_test ("6.6922115778644e+14", "-1.502476598814833512714989209432e-14", "-10.0548912900589540851343695771817446668970208"); + times_test ("2.6e-17", "-2.671783935940821017261675012382562970940216397519591773e+33", "-69466382334461346.448803550321946637244445626335509386098"); + times_test ("3.5201757425530436264024119194857657081987590263e+15", "9.331e-7", "3284675985.37624500779609056207216798232026204744053"); + times_test ("-5.533255769459408437481792739718320122946890691e+22", "-3.531878e+2", "1.9542784320526756553356319177970861039193418399947698e+25"); + times_test ("4.645259e+4", "-2.1e+0", "-97550.439"); + times_test ("7.9497003230879251678395405634595e+18", "-6.1333445694821304513176871453320732006332281e+9", "-4.875825130562166374225780425406151552485642713795500618653851261127238861195e+28"); + times_test ("-1.005369818933571484481949e+22", "3.135206365030571431738055544939894677892415929474640739e-9", "-31520418555301.66425121334176205932818570557123668182427124267161869460305520311"); + times_test ("-4.60955142802279111987154280657676965775556e+21", "-6.999600895208299766764771673363791869163449812613584345e+21", "3.22650203020970252903982709059471354761827496584870916987798376422723879587819595266245394527082e+43"); + times_test ("-4.42474356385592335769671439693513e-8", "1.265050947084194578462859951e-16", "-5.59752603606063023437875039568685608110784446235152882197863e-24"); + times_test ("-7.077847732205e+4", "2.48584792112e+8", "-17594453071105.7057236696"); + times_test ("-6.37752233724066550730707883629e+6", "-7.6039885222e-19", "4.8494606652452138136652467701959692830638e-12"); + times_test ("-4.9433724780681818765776307e+5", "9.9959526923402244116455519e+25", "-4.941371743138620958161734043507096664065327269588333e+31"); + times_test ("-7.687435480669860197725359437664161385731838770011635683114e-7", "-1.35484826677385443562865421591361401540341e+40", "1.041530863692139265267608718767277789101867106231335917307662291374878215844509357688744319363501874e+34"); + times_test ("1.5012510295250038070878447757125272e+34", "2.88320380186540202497627762051674629931756151e+44", "4.328412675880839882083804634396863682183719498695681206471762208157714263548072e+78"); + times_test ("-3.38921068317929605930700761538953746656360127100567655710865e+13", "5.69632435242926704290367713950973308658385274436e+8", "-1.9306043350107657372594071514185142475260849897600810020660411944811434813428061119686645756800301569194714e+22"); + times_test ("-3.76914657349036275475693770766652109404782733181e+48", "3.827777748906093915789127662698600476674896035688672166e+4", "-1.442745538637205802306364313516282574241071243477898711033577246633708775227079459568580532954159340046e+53"); + times_test ("6.662411223035412967621756635110157016806417500183356102e-11", "4.11713781541407721882458165080172938861902902e+10", "2.743006518819825052303708822086363491806643065891389452604894242568840422017902043029187832413208004"); + times_test ("9.26006e+4", "1.782395040553430407053890679803958035e+8", "16505085019227.1987751434509284254396415821"); + times_test ("1.669194958318640515063913971576976e-16", "-1.244248914671339151175490292104155e+12", "-0.000207689401526283965328871962139541102573486386336878117842659193528"); + times_test ("3.16363014327124199446241593475618574106690619648e+25", "7.05008522459e+4", "2.23038621291441279938178011816995585372014349584271634674432e+30"); + times_test ("-1.2499416265e-6", "-2.481016161522992373850612e-15", "3.101125376306835804917930031300418e-21"); + times_test ("2.394272820993002468870139325593176e+14", "2.11414e-7", "50618279.4177414623953711635380955710864"); + times_test ("1.1378282788937355438301626273e-8", "-2.48363251338640047864014818842048577888e-19", "-2.825947308110970660255163888048770257922851289911580643177307651424e-27"); + times_test ("-1.117116020795727380964220670027372e+33", "1.2858e-9", "-1.4363877795391462664437949375211949176e+24"); + times_test ("4.22729745775217473e+7", "2.7e+0", "114137031.35930871771"); + times_test ("-3.209792098971668208636730400079e+8", "2.561617927875316631903780965290528364325200943605912675e+5", "-82222609854783.67957523073005932482022485150215647664198292591044805997494462687101325"); + times_test ("2.791486045907779287369132431599698256688456376693553e+31", "3.01582028398776570554202910416394185546415e+41", "8.41862023971748410598194194885358670636908149176554482057465593277092965649017887260312762495e+72"); + times_test ("-4.7987451889500086409222751881136004594238796502777e+3", "1.5763922061071358398417356638094106322793630666033e+48", "-7.56470451495490854118717493020497246765927486273345255064102022092233152887091090239341261644073641e+51"); + times_test ("1.596e+0", "1.1278061910963898e-3", "0.0017999786809898381208"); + times_test ("1.0019691597360265022444e+4", "-4.78747885958105888012393959e-8", "-0.0004796906170188423978033721353034376183189305015796"); + times_test ("-7.840057154240753070926001e+13", "1.6771465194137118428e+11", "-1.31489245682394495937803684715730739761446428e+25"); + times_test ("1.579380351053037416538973330388820879276958625730937001789542e+60", "-8.95594912974988579348053906659158935e+17", "-1.41448500805575195712136077006981122282508931148355054995764602589961835792946511370273959885777e+78"); + times_test ("-8.6259000350458193370640181250303642061228049e+9", "2.50287016417625378022383686736285763674288500041793504864e+46", "-2.1589507836883083080681542896478167565436950513317074358030118564198671094847163184099349451694730336e+56"); + times_test ("2.3565164149775678e-17", "3.29e-10", "7.752939005276198062e-27"); + + times_test ("-7.3082509513985065717321588249117283909294426665053038123171823802E45", "8.1139587436599483304895082011722489767478591E-41", "-592988.4670796104848902291110510024833882877779324139587779775769322761921828542989063538752670078960459222982"); + times_test ("4.1580690407774531635854811718695276837491313289E8", "4.51151976050001428945887983E-3", "1875921.0642990819646935715021378546121515533349338737465486653798953306087"); + times_test ("-5.94098742155317032555791061122172112467693488807700534435506921715E-24", "4.61016941217052394016E20", "-0.0027388958488934255950077406845338327546662445400484871083292926528860519832777944645744"); + times_test ("3.7504E-12", "-7.88007879736459852E17", "-2955344.7521636190289408"); + times_test ("-2.1186022052008407937878760699384240447915477894859451125820040738844629725E-19", "-7.216767917254229694821186934734207628E33", "1528946042391748.997410886033946108685159225196274137373381385049759221715038347354480872320019684962009305423"); + times_test ("-5E-13", "-2.75399279758638331766833072E26", "137699639879319.165883416536"); + times_test ("6E-5", "2.417496760754967572844203198215987E23", "14504980564529805437.065219189295922"); + times_test ("-4.945015198370467209539041539486792258261028978257673527352148835976343131637595762491692863E23", "3.21738997057546245991016675193089492784008451753637062802134E-9", "-1591004230358037.215453223084728812766073228229224818741711464362077222232342773738670279322956619570773005741693064394880256558629265661028200068969642"); + times_test ("8.944326872147001036632309667E-41", "1.34989853214019743744001484188796117541380712420727841534671603347856989127834147166127622e+48", "120739337.1569336009465330585026690676314127638673504378646869299090176172459431821906069831664699038568059542346321874"); + times_test ("-1.06387569312217787644613114942E-25", "-3.49651047707433733724368394353972842316097364325909366154237667988339210449181953609691895611E35", "37198525073.064174722364904333744771229085129180022174384101305415837978911883846550330098510374779170577866567699408319562"); + +) diff --git a/drafts/bs-big/__tests__/to_exponential_test.ml b/drafts/bs-big/__tests__/to_exponential_test.ml new file mode 100644 index 0000000..d1d126a --- /dev/null +++ b/drafts/bs-big/__tests__/to_exponential_test.ml @@ -0,0 +1,374 @@ +open Jest + +let () = + describe "to_exp_tests" (fun () -> + let open Expect in + + let to_exp_test_opt = + let count = ref 0 in + fun (exp, x, dp) -> + count := !count + 1; + let v = Big.fromString x |. Big.toExponential ~dp:dp () in + test ("to_exp_test_opt" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + let to_exp_test_no_opt = + let count = ref 0 in + fun (exp, x) -> + count := !count + 1; + let v = Big.fromString x |. Big.toExponential () in + test ("to_exp_test_no_opt" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + Big.setDP 20; + Big.setRM 1; + + to_exp_test_no_opt ("0e+0", "0"); + to_exp_test_no_opt ("0e+0", "-0"); + to_exp_test_opt ("0.0e+0", "0", 1); + to_exp_test_opt ("0.0e+0", "-0", 1); + to_exp_test_opt ("0.00e+0", "0", 2); + to_exp_test_opt ("0.00e+0", "-0", 2); + + to_exp_test_no_opt ("1e+0", "1"); + to_exp_test_no_opt ("1.1e+1", "11"); + to_exp_test_no_opt ("1.12e+2", "112"); + + to_exp_test_opt ("1e+0", "1", 0); + to_exp_test_opt ("1e+1", "11", 0); + to_exp_test_opt ("1e+2", "112", 0); + to_exp_test_opt ("1.0e+0", "1", 1); + to_exp_test_opt ("1.1e+1", "11", 1); + to_exp_test_opt ("1.1e+2", "112", 1); + to_exp_test_opt ("1.00e+0", "1", 2); + to_exp_test_opt ("1.10e+1", "11", 2); + to_exp_test_opt ("1.12e+2", "112", 2); + to_exp_test_opt ("1.000e+0", "1", 3); + to_exp_test_opt ("1.100e+1", "11", 3); + to_exp_test_opt ("1.120e+2", "112", 3); + to_exp_test_no_opt ("1e-1", "0.1"); + to_exp_test_no_opt ("1.1e-1", "0.11"); + to_exp_test_no_opt ("1.12e-1", "0.112"); + to_exp_test_opt ("1e-1", "0.1", 0); + to_exp_test_opt ("1e-1", "0.11", 0); + to_exp_test_opt ("1e-1", "0.112", 0); + to_exp_test_opt ("1.0e-1", "0.1", 1); + to_exp_test_opt ("1.1e-1", "0.11", 1); + to_exp_test_opt ("1.1e-1", "0.112", 1); + to_exp_test_opt ("1.00e-1", "0.1", 2); + to_exp_test_opt ("1.10e-1", "0.11", 2); + to_exp_test_opt ("1.12e-1", "0.112", 2); + to_exp_test_opt ("1.000e-1", "0.1", 3); + to_exp_test_opt ("1.100e-1", "0.11", 3); + to_exp_test_opt ("1.120e-1", "0.112", 3); + + to_exp_test_no_opt ("-1e+0", "-1"); + to_exp_test_no_opt ("-1.1e+1", "-11"); + to_exp_test_no_opt ("-1.12e+2", "-112"); + to_exp_test_opt ("-1e+0", "-1", 0); + to_exp_test_opt ("-1e+1", "-11", 0); + to_exp_test_opt ("-1e+2", "-112", 0); + to_exp_test_opt ("-1.0e+0", "-1", 1); + to_exp_test_opt ("-1.1e+1", "-11", 1); + to_exp_test_opt ("-1.1e+2", "-112", 1); + to_exp_test_opt ("-1.00e+0", "-1", 2); + to_exp_test_opt ("-1.10e+1", "-11", 2); + to_exp_test_opt ("-1.12e+2", "-112", 2); + to_exp_test_opt ("-1.000e+0", "-1", 3); + to_exp_test_opt ("-1.100e+1", "-11", 3); + to_exp_test_opt ("-1.120e+2", "-112", 3); + to_exp_test_no_opt ("-1e-1", "-0.1"); + to_exp_test_no_opt ("-1.1e-1", "-0.11"); + to_exp_test_no_opt ("-1.12e-1", "-0.112"); + to_exp_test_opt ("-1e-1", "-0.1", 0); + to_exp_test_opt ("-1e-1", "-0.11", 0); + to_exp_test_opt ("-1e-1", "-0.112", 0); + to_exp_test_opt ("-1.0e-1", "-0.1", 1); + to_exp_test_opt ("-1.1e-1", "-0.11", 1); + to_exp_test_opt ("-1.1e-1", "-0.112", 1); + to_exp_test_opt ("-1.00e-1", "-0.1", 2); + to_exp_test_opt ("-1.10e-1", "-0.11", 2); + to_exp_test_opt ("-1.12e-1", "-0.112", 2); + to_exp_test_opt ("-1.000e-1", "-0.1", 3); + to_exp_test_opt ("-1.100e-1", "-0.11", 3); + to_exp_test_opt ("-1.120e-1", "-0.112", 3); + + to_exp_test_no_opt ("0e+0", "0"); + to_exp_test_no_opt ("0e+0", "-0"); + to_exp_test_opt ("-5.0e-1", "-0.5", 1); + to_exp_test_opt ("0.00e+0", "0", 2); + to_exp_test_opt ("1e+1", "11.2356", 0); + to_exp_test_opt ("1.1236e+1", "11.2356", 4); + to_exp_test_opt ("1.1236e-4", "0.000112356", 4); + to_exp_test_opt ("-1.1236e-4", "-0.000112356", 4); + to_exp_test_no_opt ("1.12356e-4", "0.000112356"); + to_exp_test_no_opt ("-1.12356e-4", "-0.000112356"); + + to_exp_test_opt ("1.00e+0", "0.99976", 2); + to_exp_test_opt ("1.00e+2", "99.9979", 2); + to_exp_test_opt ("1.00e+5", "99991.27839", 2); + to_exp_test_opt ("1.000e+2", "99.999", 3); + to_exp_test_opt ("1.000e+7", "9999512.8", 3); + to_exp_test_opt ("1.00e+9", "999702726", 2); + to_exp_test_opt ("1.000e+3", "999.964717", 3); + + Big.setRM 0; + + to_exp_test_opt ("-2.856376815219143184897347685012382222462687620998915470135915e+6", "-2856376.815219143184897347685012382222462687620998915470135915511363444", 60); + to_exp_test_opt ("7.75700e-24", "0.000000000000000000000007757", 5); + to_exp_test_opt ("7.0e-1", "0.7", 1); + to_exp_test_opt ("5.2109749078977455423107465583658126e+37", "52109749078977455423107465583658126637", 34); + to_exp_test_opt ("3.631093819552528994444977110063007461579154042777868294000e-29", "0.00000000000000000000000000003631093819552528994444977110063007461579154042777868294", 57); + to_exp_test_opt ("-9.893937860425888e+8", "-989393786.042588804219191", 15); + to_exp_test_opt ("8.7978043622607467e+42", "8797804362260746751563912625017414439944006.5804807", 16); + to_exp_test_opt ("-4.6561702764394602621e-7", "-0.000000465617027643946026213823955447791862428108248596086901464075785390015", 19); + to_exp_test_opt ("-2.542770482242902215596924884302407e+8", "-254277048.224290221559692488430240765024783", 33); + to_exp_test_opt ("2.70000000e-8", "0.000000027", 8); + to_exp_test_opt ("-8.0291821891769794408790934252924453237e+16", "-80291821891769794.408790934252924453237503615825249362166", 37); + to_exp_test_opt ("-8.05295923004057358545854771e-16", "-0.0000000000000008052959230040573585458547716514262", 26); + to_exp_test_opt ("-2.786758e-21", "-0.00000000000000000000278675879025858093817787290334306", 6); + to_exp_test_opt ("-8.0160835624737225803853824687641777660406527e+20", "-801608356247372258038.538246876417776604065270622886204812876", 43); + to_exp_test_opt ("-7.2849054887999144694619191770897589e+27", "-7284905488799914469461919177.08975892527524", 34); + to_exp_test_opt ("-7.586e-17", "-0.00000000000000007586908", 3); + to_exp_test_opt ("-5.9508150933636580674249602941673984254864e+20", "-595081509336365806742.496029416739842548642249", 40); + to_exp_test_opt ("-3.526911897e-18", "-0.000000000000000003526911897770082481187", 9); + to_exp_test_opt ("-5.774e-22", "-0.0000000000000000000005774729035676859", 3); + to_exp_test_opt ("-6.4700957007714124190210074e-13", "-0.00000000000064700957007714124190210074383", 25); + to_exp_test_opt ("-5.610492e+21", "-5610492566512449795573", 6); + to_exp_test_opt ("-6.015e+23", "-601556443593022914280678", 3); + to_exp_test_opt ("-6.0673361553344e+11", "-606733615533.448288878", 13); + to_exp_test_opt ("-3.1e+26", "-315617199368461055533962323.071668327669249", 1); + to_exp_test_opt ("-9.1391079512104562032343e+24", "-9139107951210456203234346", 22); + to_exp_test_opt ("-2.0441e+21", "-2044198307917443182711", 4); + to_exp_test_opt ("-8.21283723216249535240085606500821783973097233e+23", "-821283723216249535240085.606500821783973097233814324", 44); + to_exp_test_opt ("-6.375e+14", "-637540984314799.4", 3); + to_exp_test_opt ("-2.17797482005219478530856429744726e+29", "-217797482005219478530856429744.7268928676963181", 32); + to_exp_test_opt ("-3.9547e+11", "-395476721391", 4); + to_exp_test_opt ("-6.8927e+21", "-6892798573971046301111", 4); + to_exp_test_opt ("-6.33842141402916538926e-12", "-0.000000000006338421414029165389261335065112712777", 20); + to_exp_test_opt ("-4.5727e-30", "-0.000000000000000000000000000004572725511159166", 4); + to_exp_test_opt ("-7.8847457779026882221249217577974e-17", "-0.000000000000000078847457779026882221249217577974", 31); + to_exp_test_opt ("-2.64916231640264927e+12", "-2649162316402.649271824", 17); + to_exp_test_opt ("-1.73604404e+28", "-17360440496948254515028685124.37795415803082546457797184294", 8); + to_exp_test_opt ("-8.680224985623e+16", "-86802249856236148.11694273469092873", 12); + to_exp_test_opt ("-4.3e-19", "-0.00000000000000000043859841576346037715462713764211635", 1); + to_exp_test_opt ("-7.68867535389098159141717105e-11", "-0.000000000076886753538909815914171710501337139", 26); + to_exp_test_opt ("-5.24325038611090505928389422325001606e+21", "-5243250386110905059283.894223250016067979080420266", 35); + to_exp_test_opt ("-1.38e-21", "-0.0000000000000000000013874592057586367688528204069850262406", 2); + to_exp_test_opt ("-7.308601949094508589445770582074109410615037e+24", "-7308601949094508589445770.5820741094106150373221910779", 42); + to_exp_test_opt ("-3.2638e+13", "-32638405387645.3309565877781780222317335852159983", 4); + to_exp_test_opt ("-3.55454737448094719019291183206515059962378e+22", "-35545473744809471901929.118320651505996237856336054914", 41); + to_exp_test_opt ("-5.3906242252792e-11", "-0.00000000005390624225279268530907215395611", 13); + to_exp_test_opt ("-8.86760873811213105078e+15", "-8867608738112131.050787", 20); + to_exp_test_opt ("-4.78129254835567e-23", "-0.00000000000000000000004781292548355671480462711435866243551", 14); + to_exp_test_opt ("-6.4694208834502691835879021438795583630205e-19", "-0.00000000000000000064694208834502691835879021438795583630205", 40); + to_exp_test_opt ("-9.324e-25", "-0.00000000000000000000000093242969", 3); + to_exp_test_opt ("-6.922220589076408182786e+19", "-69222205890764081827.8655148459740694252038421", 21); + to_exp_test_opt ("-4.193207546161458e+19", "-41932075461614585862.215078", 15); + to_exp_test_opt ("-7.98e+20", "-798827417648620333729.80696458197", 2); + to_exp_test_opt ("-2.53e-27", "-0.0000000000000000000000000025361014542495516754818606153", 2); + to_exp_test_opt ("-1.4930677606201e-20", "-0.0000000000000000000149306776062013560263804", 13); + to_exp_test_opt ("-2.4385708957357e+19", "-24385708957357294486.03887038886025345320045340124898971786", 13); + to_exp_test_opt ("-2.3170650157672525597815028610843e+18", "-2317065015767252559.781502861084367708776250552", 31); + to_exp_test_opt ("-6.9178198e+18", "-6917819884210952360.76327902290237387108459707859893972", 7); + to_exp_test_opt ("-5.8557793e-24", "-0.000000000000000000000005855779377", 7); + to_exp_test_opt ("-2.9760848e-12", "-0.00000000000297608486674725722", 7); + to_exp_test_opt ("-5.994209456542723342157e+23", "-599420945654272334215750.2697081334512770109182770472941827", 21); + to_exp_test_opt ("-2.176318765141873189550724e+24", "-2176318765141873189550724", 24); + to_exp_test_opt ("-3.015068240172763167642991583362591462e+17", "-301506824017276316.76429915833625914624", 36); + to_exp_test_opt ("-4.092360120459492827213341546580282588568024330771e+25", "-40923601204594928272133415.465802825885680243307714368088538", 48); + to_exp_test_opt ("-1.241037736e-28", "-0.00000000000000000000000000012410377364", 9); + + Big.setRM 1; + + to_exp_test_opt ("-5.002239116605888927178702930656e-39", "-0.00000000000000000000000000000000000000500223911660588892717870293065633642", 30); + to_exp_test_opt ("-8.52292947230244775435e+29", "-852292947230244775434968241532.494643593912804433318745222587246680109833509655450267792446", 20); + to_exp_test_opt ("-6.1169514510867e+10", "-61169514510.8673382", 13); + to_exp_test_opt ("-8.05745763527307676170759722175169266017831695215e+48", "-8057457635273076761707597221751692660178316952146", 47); + to_exp_test_opt ("-4.923572102098e+10", "-49235721020.9847017846898652687600227388412980598816", 12); + to_exp_test_opt ("-7.981341661715027117746906076515945e+41", "-798134166171502711774690607651594491039629", 33); + to_exp_test_opt ("-8.00e-3", "-0.008", 2); + to_exp_test_opt ("8.517466793430899278197016892000000000000e-15", "0.000000000000008517466793430899278197016892", 39); + to_exp_test_opt ("-3.032293512e+0", "-3.0322935124071923328711934463341802038", 9); + to_exp_test_opt ("-2.60682904403489305678908771323995810138267385200000000e-20", "-0.00000000000000000002606829044034893056789087713239958101382673852", 53); + to_exp_test_opt ("-3.935816927273980e+20", "-393581692727398036652.850960055902271", 15); + to_exp_test_opt ("-2.98297216346e-27", "-0.00000000000000000000000000298297216346039288935575576076143", 11); + to_exp_test_opt ("-3.01319315e+23", "-301319315398414808376087.572306433", 8); + to_exp_test_opt ("-8.870698526921188e-12", "-0.00000000000887069852692118832284144110732", 15); + to_exp_test_opt ("-3.27e+23", "-326739927744903524706793.652546266488323001284674736489440831", 2); + to_exp_test_opt ("-8.614e+12", "-8613828413581", 3); + to_exp_test_opt ("-6.1382445990593346026804e+12", "-6138244599059.3346026803630253203", 22); + to_exp_test_opt ("-7.9111971e+12", "-7911197130975", 7); + to_exp_test_opt ("-8.5902152501051e+29", "-859021525010507210136559039003.689834129033952321238", 13); + to_exp_test_opt ("-7.24491e-30", "-0.00000000000000000000000000000724490826045045451271534", 5); + to_exp_test_opt ("-8.4948070285349193974989221504919380656715136165603325e+24", "-8494807028534919397498922.15049193806567151361656033246", 52); + to_exp_test_opt ("-6.3295239596e-17", "-0.00000000000000006329523959626011114164", 10); + to_exp_test_opt ("-3.1725692353e+30", "-3172569235260846783669130724638.711", 10); + to_exp_test_opt ("-4.065727077e+11", "-406572707673.336570352310681187663765", 9); + to_exp_test_opt ("-6.82883869249998075574247223155497e+18", "-6828838692499980755.7424722315549682855987375899188309581152", 32); + to_exp_test_opt ("-2.56144400427045214943786338e+24", "-2561444004270452149437863.38354535663028539", 26); + to_exp_test_opt ("-4.97637439956044400125498868e+23", "-497637439956044400125498.8682100590602459937304614141772", 26); + to_exp_test_opt ("-4.307891929198702822746534506143e+29", "-430789192919870282274653450614.349564081", 30); + to_exp_test_opt ("-8.55e-27", "-0.00000000000000000000000000855367295711812079", 2); + to_exp_test_opt ("-7.906e+11", "-790612526329.410459220189562", 3); + to_exp_test_opt ("-3.1841363e-22", "-0.00000000000000000000031841363", 7); + to_exp_test_opt ("-6.2068049304845006e+20", "-620680493048450055389.3227069760888437941041", 16); + to_exp_test_opt ("-8.4809476e+18", "-8480947614295114807.320148688", 7); + to_exp_test_opt ("-2.287988570734255855e+23", "-228798857073425585542366.399034916953775", 18); + to_exp_test_opt ("-8.148647139762925073276164486240320698e+21", "-8148647139762925073276.1644862403206980851079", 36); + to_exp_test_opt ("-6.87643138785664756e-12", "-0.0000000000068764313878566475604352570287089535238582267443", 17); + to_exp_test_opt ("-3.709587e+18", "-3709586618852569033.55141868", 6); + to_exp_test_opt ("-6.8086794224e+28", "-68086794224433270564431694468.814537646575833889824621540849", 10); + to_exp_test_opt ("-4.966301085179e+19", "-49663010851788946007", 12); + to_exp_test_opt ("-5.34439184068052811184219234494114e+26", "-534439184068052811184219234.494113670484623394", 32); + to_exp_test_opt ("-2.798732412e+16", "-27987324119455299", 9); + to_exp_test_opt ("-1.554430791885961957e+15", "-1554430791885961.956863404519493346081223", 18); + to_exp_test_opt ("-6.90619083822075003978e+24", "-6906190838220750039778836.289105048686876596", 20); + to_exp_test_opt ("-1.108034176809770578315e+12", "-1108034176809.7705783154", 21); + to_exp_test_opt ("-1.43e+22", "-14266566332440117777110.63461224926682073525873105", 2); + to_exp_test_opt ("-9.15e+13", "-91477543307040.916791223", 2); + to_exp_test_opt ("-1.1001e+26", "-110010856476508992391958436.9355559264588205214557001854", 4); + to_exp_test_opt ("-1.2e+16", "-12148027447349021", 1); + to_exp_test_opt ("-4.4e+13", "-44268551660889.40880208546489742632181832780494", 1); + to_exp_test_opt ("-8.62058920338555484081691e+19", "-86205892033855548408.169086865949596390775", 23); + to_exp_test_opt ("-5.2e-13", "-0.00000000000051876025261394172", 1); + to_exp_test_opt ("-4.88063953404884862027221562057786242658496407473e-11", "-0.0000000000488063953404884862027221562057786242658496407473", 47); + to_exp_test_opt ("-5.255e+18", "-5254530327311322805.9528217", 3); + to_exp_test_opt ("-6.4630488003995117e-11", "-0.0000000000646304880039951167486", 16); + to_exp_test_opt ("-3.15214e-23", "-0.00000000000000000000003152137339126187", 5); + to_exp_test_opt ("-8.86563136e+11", "-886563136251.626990531858472111699416852", 8); + to_exp_test_opt ("-8.638990742871e-16", "-0.0000000000000008638990742870608", 12); + to_exp_test_opt ("-1.57817750020560815944470062e+12", "-1578177500205.60815944470062002898187", 26); + to_exp_test_opt ("-3.6558384593093900422637e-27", "-0.00000000000000000000000000365583845930939004226367940618", 22); + to_exp_test_opt ("-7.5e+12", "-7540535487033", 1); + to_exp_test_opt ("-6.7647935206791247e+19", "-67647935206791246567", 16); + to_exp_test_opt ("-3.0204818086245915027e+30", "-3020481808624591502749101182536.872936744534671794", 19); + to_exp_test_opt ("-8.40498662e+12", "-8404986622734.85", 8); + to_exp_test_opt ("-2.944135296894e-18", "-0.0000000000000000029441352968942548971", 12); + to_exp_test_opt ("-8.826099694855290261753e+11", "-882609969485.52902617534731", 21); + to_exp_test_opt ("-1.9717565867734925e-13", "-0.000000000000197175658677349252855292223369", 16); + to_exp_test_opt ("-4.91451975824866130376722e+20", "-491451975824866130376.722358803861287205044883122152013315", 23); + to_exp_test_opt ("-5.111649e+17", "-511164947156144375", 6); + to_exp_test_opt ("-9.496473458673099e+11", "-949647345867.30987953779868637405061", 15); + to_exp_test_opt ("-2.1903308925764762892e+21", "-2190330892576476289225", 19); + to_exp_test_opt ("-3.47598363e+25", "-34759836338593591584288059.755482689269713", 8); + to_exp_test_opt ("-2.9192144584989753156762701431e-24", "-0.0000000000000000000000029192144584989753156762701431", 28); + to_exp_test_opt ("-4.0456517973466503588734928438425e+23", "-404565179734665035887349.28438424933669843", 31); + to_exp_test_opt ("-1.297871549154944904150929e+17", "-129787154915494490.4150929407633398", 24); + to_exp_test_opt ("-1.4566530316908752e+18", "-1456653031690875152.6306667", 16); + to_exp_test_opt ("-3.5521e-12", "-0.00000000000355210483", 4); + to_exp_test_opt ("-9.1838324864110351307221525161e+17", "-918383248641103513.07221525161442", 28); + to_exp_test_opt ("-8.33245633316304149287131334e-22", "-0.00000000000000000000083324563331630414928713133382", 26); + to_exp_test_opt ("-4.593824606634605622464043606094613988489104e+15", "-4593824606634605.62246404360609461398848910424547985108092894", 42); + to_exp_test_opt ("-5.232e-26", "-0.0000000000000000000000000523185958604202852", 3); + to_exp_test_opt ("-3.8319390497954462e+25", "-38319390497954461897251251.444", 16); + to_exp_test_opt ("-1.00157678068191049988073716749599603712e+17", "-100157678068191049.9880737167495996037119953003896147", 38); + to_exp_test_opt ("-4.169977410059689809645035174132294864e+20", "-416997741005968980964.50351741322948635363513285839302", 36); + to_exp_test_opt ("-7.121660153198989278372512656775647e-11", "-0.0000000000712166015319898927837251265677564651728358", 33); + to_exp_test_opt ("-7.98924570545536548623603750084330391943e+19", "-79892457054553654862.360375008433039194317394396964358522", 38); + + Big.setRM 2; + + to_exp_test_opt ("-4.3502707501164e+36", "-4350270750116411997402439304498892819", 13); + to_exp_test_opt ("9.5e-21", "0.0000000000000000000094520280724178734152", 1); + to_exp_test_opt ("1.39631186750554172785676012693418617250072200744214625994656047727270672248243741907e+34", "13963118675055417278567601269341861.725007220074421462599465604772727067224824374190703237660781", 83); + to_exp_test_opt ("5.9446570e-26", "0.00000000000000000000000005944657036540768164877637239177740419063920648", 7); + to_exp_test_opt ("7.00000e-12", "0.000000000007", 5); + to_exp_test_opt ("-2.87e+14", "-287060740776209.3950381715", 2); + to_exp_test_opt ("3.411740542875509329e+24", "3411740542875509328514044", 18); + to_exp_test_opt ("-6.20235112738687046118395830000000000000000000000e-29", "-0.000000000000000000000000000062023511273868704611839583", 47); + to_exp_test_opt ("2.94349130121570276626863135396717336528655493e+19", "29434913012157027662.686313539671733652865549279174", 44); + to_exp_test_opt ("4.01255076512828067130306533670644537832e-10", "0.000000000401255076512828067130306533670644537831678294548", 38); + to_exp_test_opt ("-5.4277306444432e+11", "-542773064444.317654960431120452254700391693837992", 13); + to_exp_test_opt ("-4.355706886680889557797360814402e+30", "-4355706886680889557797360814401.536556745674646509159280626", 30); + to_exp_test_opt ("-1.29e-15", "-0.00000000000000128978312277001609181774216296380783932", 2); + to_exp_test_opt ("-1.0588973816292989769e+25", "-10588973816292989768709129.1767038708798755780352204", 19); + to_exp_test_opt ("-3.210569596e+10", "-32105695962.8803639621", 9); + to_exp_test_opt ("-7.18504270173744681360682714959e+28", "-71850427017374468136068271495.87", 29); + to_exp_test_opt ("-4.29794333519778779150824479010034817077204e-10", "-0.0000000004297943335197787791508244790100348170772040392", 41); + to_exp_test_opt ("-4.615682142828269066227773895179987062919e+20", "-461568214282826906622.7773895179987062919071922", 39); + to_exp_test_opt ("-1.3864477517287155526073e+13", "-13864477517287.15552607265", 22); + to_exp_test_opt ("-6.793120028e+13", "-67931200280922.72252141789646787475433427482", 9); + to_exp_test_opt ("-8.075e-18", "-0.000000000000000008074975073002274636799975", 3); + to_exp_test_opt ("-8.360228691054180854419062530687032074820667001e+24", "-8360228691054180854419062.530687032074820667001120752628", 45); + to_exp_test_opt ("-3.0763956760417194035216e-12", "-0.000000000003076395676041719403521594", 22); + to_exp_test_opt ("-2.5288383e+25", "-25288383009460922631988717.84659997837058450749", 7); + to_exp_test_opt ("-4.554185192e+29", "-455418519247311560996997520087.98189", 9); + to_exp_test_opt ("-9.135175372324138467397264e+11", "-913517537232.413846739726417", 24); + to_exp_test_opt ("-8.257259383044471855222900534859251889332388855848e-10", "-0.0000000008257259383044471855222900534859251889332388855848", 48); + to_exp_test_opt ("-7.651597268450922707e-13", "-0.000000000000765159726845092270720405167100094", 18); + to_exp_test_opt ("-8.952011763950994514e+26", "-895201176395099451377549961.34870447", 18); + to_exp_test_opt ("-2.7395479569618982298152060567357e-10", "-0.00000000027395479569618982298152060567357", 31); + to_exp_test_opt ("-1.31151451700453378841431e+24", "-1311514517004533788414313", 23); + to_exp_test_opt ("-5.915297930316863891e-10", "-0.0000000005915297930316863890707686339684395", 18); + to_exp_test_opt ("-1.449e-27", "-0.0000000000000000000000000014487033279693402845128265141859", 3); + to_exp_test_opt ("-3.7e+10", "-36919550406.826974442743517918128", 1); + to_exp_test_opt ("-3.945347688940382499631779106638865e+13", "-39453476889403.824996317791066388653", 33); + to_exp_test_opt ("-8.547704e-29", "-0.0000000000000000000000000000854770378842608635356", 6); + to_exp_test_opt ("-3.76e+25", "-37618296325402619735777629.467812385256281737441412", 2); + to_exp_test_opt ("-8.031066086398624e+28", "-80310660863986235667567286452", 15); + to_exp_test_opt ("-4.038276256088135496e-17", "-0.000000000000000040382762560881354955896694823328777602811", 18); + to_exp_test_opt ("-1.77173574740860868e+25", "-17717357474086086837250852", 17); + to_exp_test_opt ("-1.421967649e+21", "-1421967648805122645888", 9); + to_exp_test_opt ("-4.7e+11", "-469485715327", 1); + to_exp_test_opt ("-7.372223291560455075681748682810527006883e+16", "-73722232915604550.75681748682810527006882666313809409", 39); + to_exp_test_opt ("-8.9539396357e+14", "-895393963565598", 10); + to_exp_test_opt ("-8.14646103854802172250414801405e+10", "-81464610385.48021722504148014045579178726", 29); + to_exp_test_opt ("-1.2053415734425581e+12", "-1205341573442.5581371841633131879", 16); + to_exp_test_opt ("-8.35214176861046133596101313170854966756043001e+28", "-83521417686104613359610131317.0854966756043001041619492", 44); + to_exp_test_opt ("-3.7610694152e-28", "-0.00000000000000000000000000037610694151517628351", 10); + to_exp_test_opt ("-6.71e-12", "-0.00000000000670729337105720320122353", 2); + to_exp_test_opt ("-4.005517304396006251e+13", "-40055173043960.0625088492324182094858", 18); + to_exp_test_opt ("-6.0206e+28", "-60205974155921075891080012488.4566490314762809", 4); + to_exp_test_opt ("-6.36287561326e+11", "-636287561325.9124444291802472", 11); + to_exp_test_opt ("-3.11336117e-16", "-0.000000000000000311336117052129384933053792", 8); + to_exp_test_opt ("-5.3927134886536e+30", "-5392713488653639958906162302264.424436642808", 13); + to_exp_test_opt ("-3.82395446711276e-10", "-0.0000000003823954467112758458806849565215407952986440811", 14); + to_exp_test_opt ("-4.2858082253423e-27", "-0.0000000000000000000000000042858082253422975", 13); + to_exp_test_opt ("-2.9918792622984137284399075479267066e+14", "-299187926229841.3728439907547926706557", 34); + to_exp_test_opt ("-3.1949909651023223034303544498737e+27", "-3194990965102322303430354449.8737", 31); + to_exp_test_opt ("-9.1e-27", "-0.0000000000000000000000000090531861025", 1); + to_exp_test_opt ("-2.8e+11", "-279301037794", 1); + to_exp_test_opt ("-7.126913661498270214611054421e+13", "-71269136614982.70214611054420849", 27); + to_exp_test_opt ("-4.86337579169293342736515180299340135e+13", "-48633757916929.334273651518029934013479777304", 35); + to_exp_test_opt ("-3.406744915848058125e+25", "-34067449158480581246177934.3445612265793", 18); + to_exp_test_opt ("-5.542902272865090080311949446460659235171860088660477e+16", "-55429022728650900.803119494464606592351718600886604770155246", 51); + to_exp_test_opt ("-8.26224854264697737938997145336e+12", "-8262248542646.9773793899714533620028598662842221171", 29); + to_exp_test_opt ("-3.16331e+18", "-3163306186318700887", 5); + to_exp_test_opt ("-9.087531707575372e+25", "-90875317075753723792666377.6466517495", 15); + to_exp_test_opt ("-8.758548512438e+14", "-875854851243824.87435", 12); + to_exp_test_opt ("-3.9e-11", "-0.0000000000387093", 1); + to_exp_test_opt ("-3.987015017148130889206385341736666180313e+11", "-398701501714.813088920638534173666618031251290587", 39); + to_exp_test_opt ("-2.493129998e-11", "-0.00000000002493129997889845697168462", 9); + to_exp_test_opt ("-7.0892393575673871055576e+17", "-708923935756738710.5557595392277447617", 22); + to_exp_test_opt ("-4.931821627225927773384e-20", "-0.00000000000000000004931821627225927773384063578", 21); + to_exp_test_opt ("-5.245261764976094777313893054196562e-17", "-0.0000000000000000524526176497609477731389305419656234", 33); + to_exp_test_opt ("-6.66625797221972034223428591e+23", "-666625797221972034223428.590606426470365", 26); + to_exp_test_opt ("-4.06575860462e+17", "-406575860461750182.91372176567693718", 11); + to_exp_test_opt ("-8.90585675951e+19", "-89058567595113495345", 11); + + Big.setRM 1; + + to_exp_test_opt ("-2.033619450856645241153977e+0", "-2.03361945085664524115397653636144859", 24); + to_exp_test_opt ("1.130e+8", "112955590.0430616", 3); + to_exp_test_opt ("-2.1366468193419876852426155614364269e+10", "-21366468193.419876852426155614364269", 34); + to_exp_test_opt ("5.82086615659566151529e+7", "58208661.56595661515285734890860077163", 20); + to_exp_test_opt ("9.1615809372817426111208e+6", "9161580.937281742611120838868847823478250167882379624", 22); + to_exp_test_opt ("3.8976506901061164197e+1", "38.97650690106116419699490320634490920742414", 19); + to_exp_test_opt ("9.0994914931570087194607344641722310104e+6", "9099491.4931570087194607344641722310103895224905", 37); + to_exp_test_opt ("6.06e+5", "605633", 2); + to_exp_test_opt ("2.6999974790473705518992117e+1", "26.9999747904737055189921170044987", 25); + to_exp_test_opt ("6.7108801361722e+6", "6710880.136172156342982663450743452", 13); + to_exp_test_opt ("-8.0e+0", "-8", 1); + to_exp_test_opt ("3.000e-2", "0.03", 3); + to_exp_test_opt ("-4.7e+2", "-469", 1); + to_exp_test_opt ("-6.3000e+0", "-6.3", 4); + to_exp_test_opt ("-5.4e+2", "-542", 1); + to_exp_test_opt ("-5.2000e+0", "-5.2", 4); + to_exp_test_opt ("-9.00000e-2", "-0.09", 5); + to_exp_test_opt ("-3.1000e-1", "-0.31", 4); + to_exp_test_opt ("-4.4e+2", "-436", 1); + to_exp_test_opt ("-3.00e+0", "-3", 2); + to_exp_test_opt ("-5.00e-2", "-0.05", 2); + to_exp_test_opt ("1.00e-2", "0.01", 2); + to_exp_test_opt ("1e+2", "12.3e1", 0); + to_exp_test_opt ("1e+2", "12.3e1", -0); + ) diff --git a/drafts/bs-big/__tests__/to_fixed_test.ml b/drafts/bs-big/__tests__/to_fixed_test.ml new file mode 100644 index 0000000..3a90c11 --- /dev/null +++ b/drafts/bs-big/__tests__/to_fixed_test.ml @@ -0,0 +1,394 @@ +open Jest + +let () = + describe "to_fixed_test" (fun () -> + let open Expect in + + let to_fixed_test_opt = + let count = ref 0 in + fun (exp, x, dp) -> + count := !count + 1; + let v = Big.fromString x |. Big.toFixed ~dp:dp () in + test ("to_fixed_test_opt" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + let to_fixed_test_no_opt = + let count = ref 0 in + fun (exp, x) -> + count := !count + 1; + let v = Big.fromString x |. Big.toFixed () in + test ("to_fixed_test_opt" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + Big.setDP 20; + Big.setRM 1; + + to_fixed_test_opt ("0.0", "0", 1); + to_fixed_test_opt ("0.0", "0", 1); + to_fixed_test_opt ("0.0", "-0", 1); + to_fixed_test_opt ("0.00", "-0", 2); + + to_fixed_test_opt ("100.0", "99.9512986", 1); + to_fixed_test_opt ("10.0", "9.95036", 1); + to_fixed_test_opt ("1.0", "0.99", 1); + to_fixed_test_opt ("0.10", "0.09906", 2); + to_fixed_test_opt ("0.010", "0.0098034", 3); + + to_fixed_test_opt ("1111111111111111111111.00000000", "1111111111111111111111", 8); + to_fixed_test_opt ("0.1", "0.1", 1); + to_fixed_test_opt ("0.10", "0.1", 2); + to_fixed_test_opt ("0.100", "0.1", 3); + to_fixed_test_opt ("0.01", "0.01", 2); + to_fixed_test_opt ("0.010", "0.01", 3); + to_fixed_test_opt ("0.0100", "0.01", 4); + to_fixed_test_opt ("0.00", "0.001", 2); + to_fixed_test_opt ("0.001", "0.001", 3); + to_fixed_test_opt ("0.0010", "0.001", 4); + to_fixed_test_opt ("1.0000", "1", 4); + to_fixed_test_opt ("1.0", "1", 1); + to_fixed_test_opt ("1", "1", 0); + to_fixed_test_opt ("12", "12", 0); + to_fixed_test_opt ("1", "1.1", 0); + to_fixed_test_opt ("12", "12.1", 0); + to_fixed_test_opt ("1", "1.12", 0); + to_fixed_test_opt ("12", "12.12", 0); + to_fixed_test_opt ("0.0000006", "0.0000006", 7); + to_fixed_test_opt ("0.00000006", "0.00000006", 8); + to_fixed_test_opt ("0.000000060", "0.00000006", 9); + to_fixed_test_opt ("0.0000000600", "0.00000006", 10); + to_fixed_test_opt ("0", "0", 0); + to_fixed_test_opt ("0.0", "0", 1); + to_fixed_test_opt ("0.00", "0", 2); + + to_fixed_test_opt ("-1111111111111111111111.00000000", "-1111111111111111111111", 8); + to_fixed_test_opt ("-0.1", "-0.1", 1); + to_fixed_test_opt ("-0.10", "-0.1", 2); + to_fixed_test_opt ("-0.100", "-0.1", 3); + to_fixed_test_opt ("-0.01", "-0.01", 2); + to_fixed_test_opt ("-0.010", "-0.01", 3); + to_fixed_test_opt ("-0.0100", "-0.01", 4); + to_fixed_test_opt ("-0.00", "-0.001", 2); + to_fixed_test_opt ("-0.001", "-0.001", 3); + to_fixed_test_opt ("-0.0010", "-0.001", 4); + to_fixed_test_opt ("-1.0000", "-1", 4); + to_fixed_test_opt ("-1.0", "-1", 1); + to_fixed_test_opt ("-1", "-1", 0); + to_fixed_test_opt ("-1", "-1.1", 0); + to_fixed_test_opt ("-12", "-12.1", 0); + to_fixed_test_opt ("-1", "-1.12", 0); + to_fixed_test_opt ("-12", "-12.12", 0); + to_fixed_test_opt ("-0.00000", "-0.0000006", 5); + to_fixed_test_opt ("-0.0000006", "-0.0000006", 7); + to_fixed_test_opt ("-0.00000006", "-0.00000006", 8); + to_fixed_test_opt ("-0.000000060", "-0.00000006", 9); + to_fixed_test_opt ("-0.0000000600", "-0.00000006", 10); + to_fixed_test_opt ("0", "0", 0); + to_fixed_test_opt ("0", "-0", 0); + to_fixed_test_opt ("0.0", "-0", 1); + to_fixed_test_opt ("0.00", "-0", 2); + to_fixed_test_opt ("0.00", "-0.0", 2); + to_fixed_test_opt ("0.00", "-0.0000", 2); + to_fixed_test_opt ("0.0000", "-0", 4); + + to_fixed_test_no_opt ("1000", "1000"); + to_fixed_test_no_opt ("0.00001", "0.00001"); + to_fixed_test_opt ("0.00001", "0.00001", 5); + to_fixed_test_opt ("0.00000000000000000010", "0.0000000000000000001", 20); + to_fixed_test_opt ("0.00001000000000000", "0.00001", 17); + to_fixed_test_opt ("1.00000000000000000", "1", 17); + to_fixed_test_no_opt ("1000000000000000128", "1000000000000000128"); + to_fixed_test_opt ("100000000000000128.0", "100000000000000128", 1); + to_fixed_test_opt ("10000000000000128.00", "10000000000000128", 2); + to_fixed_test_opt ("10000000000000128.00000000000000000000", "10000000000000128", 20); + to_fixed_test_no_opt ("0", "0"); + to_fixed_test_opt ("-42.000", "-42", 3); + to_fixed_test_no_opt ("-1000000000000000128", "-1000000000000000128"); + to_fixed_test_opt ("-0.00000000000000000010", "-0.0000000000000000001", 20); + to_fixed_test_opt ("0.12312312312312300000", "0.123123123123123", 20); + + to_fixed_test_opt ("1", "0.5", 0); + to_fixed_test_opt ("-1", "-0.5", 0); + to_fixed_test_opt ("1.3", "1.25", 1); + to_fixed_test_opt ("234.2041", "234.20405", 4); + to_fixed_test_opt ("234.2041", "234.204050000000000000000000000000006", 4); + + Big.setRM 0; + + to_fixed_test_opt ("0.3", "0.3", 1); + to_fixed_test_opt ("-200258348374.3", "-200258348374.3595802551014614089785610548492885372322083789", 1); + to_fixed_test_opt ("-8996550690041157178188143247448286757711.5580857413", "-8996550690041157178188143247448286757711.55808574133329", 10); + to_fixed_test_opt ("-3172413669280032477.00", "-3172413669280032477", 2); + to_fixed_test_opt ("6547946357820.750067107731812021675", "6547946357820.750067107731812021675351468709784004", 21); + to_fixed_test_opt ("24188393190716631282750407915133817062572333100239.0000000000000000000", "24188393190716631282750407915133817062572333100239", 19); + to_fixed_test_opt ("539982361589798324286450574560330534901309503.82000000", "539982361589798324286450574560330534901309503.82", 8); + to_fixed_test_opt ("829898800701640360552652.0000", "829898800701640360552652", 4); + to_fixed_test_opt ("-1585782773394.4", "-1585782773394.44501382110847", 1); + to_fixed_test_opt ("-7604844176594943774211951887242195107.399", "-7604844176594943774211951887242195107.399576743428669618164", 3); + to_fixed_test_opt ("-0.00", "-0.0000000000000005153003506839", 2); + to_fixed_test_opt ("0.000", "0.00003", 3); + to_fixed_test_opt ("-5454249481540317712.560293859013731302", "-5454249481540317712.56029385901373130215526009738012974642338", 18); + to_fixed_test_opt ("15352607654972198961429295651185206861818141054385638.00000000000000000", "15352607654972198961429295651185206861818141054385638", 17); + to_fixed_test_opt ("91494535411039025233040.292", "91494535411039025233040.29224903220309368507011", 3); + to_fixed_test_opt ("2043369316.0", "2043369316", 1); + to_fixed_test_opt ("-0.0000000782350618457", "-0.0000000782350618457630647420312027682238301541350414", 19); + to_fixed_test_opt ("2122652.0", "2122652", 1); + to_fixed_test_opt ("-0.00841365", "-0.00841365099301981489219310202029642", 8); + to_fixed_test_opt ("0.0", "0.0007035", 1); + to_fixed_test_opt ("-0.00000000000000374916", "-0.0000000000000037491685778894015479084539735777088", 20); + to_fixed_test_opt ("534883638.00", "534883638", 2); + to_fixed_test_opt ("-2.0", "-2", 1); + to_fixed_test_opt ("-5634442247266825358399629799939027370665.0000000000000000000", "-5634442247266825358399629799939027370665", 19); + to_fixed_test_opt ("3331187169219186569122.000000000", "3331187169219186569122", 9); + to_fixed_test_opt ("0.0000000000", "0.0000000000006604395609805032330367635527", 10); + to_fixed_test_opt ("-0.0000000000000576901", "-0.00000000000005769013292086168690493327", 19); + to_fixed_test_opt ("-661.8", "-661.828596629053201916486", 1); + to_fixed_test_opt ("-6073555395665254434249128854999349235744174928042756.1153000000000", "-6073555395665254434249128854999349235744174928042756.1153", 13); + to_fixed_test_opt ("-5013086846966.000", "-5013086846966", 3); + to_fixed_test_opt ("0.004015", "0.00401523226833", 6); + to_fixed_test_opt ("3140295374107374579919222510.1462722", "3140295374107374579919222510.1462722819395532", 7); + to_fixed_test_opt ("-0.000000", "-0.00000000000000799876460379334679831886", 6); + to_fixed_test_opt ("-0.00", "-0.0003", 2); + to_fixed_test_opt ("-0.026760766726884267", "-0.026760766726884267750393307117624838556001925491", 18); + to_fixed_test_opt ("-20821740502968847857923433558797.0899", "-20821740502968847857923433558797.08997487843745", 4); + to_fixed_test_opt ("0.00000000002", "0.000000000020346524414696573703092255317751132892", 11); + to_fixed_test_opt ("45492073832204366341299301624.000000000", "45492073832204366341299301624", 9); + to_fixed_test_opt ("-22166905155222048275755520049666636.000000000000000", "-22166905155222048275755520049666636", 15); + to_fixed_test_opt ("-0.0047749609085292677147", "-0.00477496090852926771478756451899887586311084", 22); + to_fixed_test_opt ("0.0000000000066505751320542", "0.000000000006650575132054209449586010993453988006221893652", 25); + to_fixed_test_opt ("-5987959.1630276586738", "-5987959.163027658673856586", 13); + to_fixed_test_opt ("-1666.00", "-1666", 2); + to_fixed_test_opt ("634686619827216246836355610829.00000", "634686619827216246836355610829", 5); + to_fixed_test_opt ("-4775591515709.469953191321103401", "-4775591515709.4699531913211034017874029213583522324151968262", 18); + to_fixed_test_opt ("-0.00209248872211", "-0.002092488722118037239933953031151990638700454763", 14); + to_fixed_test_opt ("4592542353054190400811174084.8269203906", "4592542353054190400811174084.826920390637", 10); + to_fixed_test_opt ("-2719622410429690231797721788738949434271171.000000000", "-2719622410429690231797721788738949434271171", 9); + to_fixed_test_opt ("7481081126833353571249877375770446139269602514514.000000000000000", "7481081126833353571249877375770446139269602514514", 15); + to_fixed_test_opt ("-717308374940.1455264110", "-717308374940.145526411005821148802846366045624291352081913", 10); + to_fixed_test_opt ("-0.000000007", "-0.000000007385554720977", 9); + to_fixed_test_opt ("-0.000861389378754506340", "-0.000861389378754506340296565696012302905659179798", 21); + to_fixed_test_opt ("-5053251493102402525630380749.678", "-5053251493102402525630380749.6785380807585", 3); + to_fixed_test_opt ("-4.0", "-4", 1); + to_fixed_test_opt ("-91608.490784509096643367058", "-91608.49078450909664336705884736640894006", 21); + to_fixed_test_opt ("0.000", "0.000000008", 3); + to_fixed_test_opt ("-60759551763816025544062865222.0000000000", "-60759551763816025544062865222", 10); + to_fixed_test_opt ("1052.9354577213309", "1052.93545772133093448862729794627180236152", 13); + to_fixed_test_opt ("45267509474.0", "45267509474", 1); + to_fixed_test_opt ("3157315152.00", "3157315152", 2); + to_fixed_test_opt ("-0.5", "-0.5", 1); + to_fixed_test_opt ("0.0057546", "0.005754639024965241832260499185230186", 7); + to_fixed_test_opt ("-0.000", "-0.0006", 3); + to_fixed_test_opt ("3230791870040253164174259086.74466486260", "3230791870040253164174259086.7446648626", 11); + to_fixed_test_opt ("-4344423254203589122222715762047.000000", "-4344423254203589122222715762047", 6); + to_fixed_test_opt ("0.000000", "0.00000000000000000005", 6); + to_fixed_test_opt ("-0.00000000", "-0.0000000000000032995964759", 8); + to_fixed_test_opt ("29342667392627.13800502090", "29342667392627.1380050209", 11); + to_fixed_test_opt ("3553322646.0000", "3553322646", 4); + to_fixed_test_opt ("0.0000000", "0.000000000000711595888783922", 7); + to_fixed_test_opt ("128714169681975260747586179339689165715468750318817.0", "128714169681975260747586179339689165715468750318817", 1); + to_fixed_test_opt ("-203846045708188631.7", "-203846045708188631.714385911896349", 1); + to_fixed_test_opt ("6732937084326281547153681265380857817.680", "6732937084326281547153681265380857817.68", 3); + to_fixed_test_opt ("-80645.000", "-80645", 3); + to_fixed_test_opt ("0.0091340467346905226", "0.0091340467346905226577831006050168789952519932147436292", 19); + to_fixed_test_opt ("765350910755641789513513452874635492095713.000000000000000000", "765350910755641789513513452874635492095713", 18); + to_fixed_test_opt ("7619917853284.00", "7619917853284", 2); + to_fixed_test_opt ("-7584198211496430223.4315410358218089229", "-7584198211496430223.43154103582180892294235232", 19); + to_fixed_test_opt ("-2946097370887492968389.2786430820000", "-2946097370887492968389.278643082", 13); + to_fixed_test_opt ("-400129748.000", "-400129748", 3); + to_fixed_test_opt ("-76362970460470638842230785495147305876.114384970200", "-76362970460470638842230785495147305876.1143849702", 12); + to_fixed_test_opt ("334029398796150851211670406157956664329.0000000000000", "334029398796150851211670406157956664329", 13); + to_fixed_test_opt ("-0.000000000000", "-0.000000000000000000881892851839338487244179354", 12); + to_fixed_test_opt ("-70475264003.0000", "-70475264003", 4); + to_fixed_test_opt ("0.080", "0.0809", 3); + to_fixed_test_opt ("16917787280140934145228.000", "16917787280140934145228", 3); + to_fixed_test_opt ("25909519297999779346.000000000", "25909519297999779346", 9); + to_fixed_test_opt ("-355224.19720319810644", "-355224.19720319810644496969482", 14); + to_fixed_test_opt ("8482635122899359930368306655493255835883236244.0000000000000", "8482635122899359930368306655493255835883236244", 13); + to_fixed_test_opt ("41268046802033799763539654473098094614587.00000000000000000", "41268046802033799763539654473098094614587", 17); + to_fixed_test_opt ("8564065673925609331469179144.0", "8564065673925609331469179144", 1); + to_fixed_test_opt ("-231732424.30838", "-231732424.3083887160672296965273691583237367", 5); + to_fixed_test_opt ("-597740668669015342275289261436747905744110289638.43026849", "-597740668669015342275289261436747905744110289638.430268497449", 8); + to_fixed_test_opt ("8297509140414599.000000", "8297509140414599", 6); + to_fixed_test_opt ("-17320207086212822899.00", "-17320207086212822899", 2); + to_fixed_test_opt ("0.00", "0.000000000002", 2); + to_fixed_test_opt ("4972.517305", "4972.51730546661166855901714", 6); + to_fixed_test_opt ("0.000000", "0.0000000162819653537555368724511902456803362906", 6); + to_fixed_test_opt ("29485932208290816133111088923502731.000000", "29485932208290816133111088923502731", 6); + to_fixed_test_opt ("0.0000", "0.000000000006", 4); + + Big.setRM 1; + + to_fixed_test_opt ("733744593401073823825766410831877679446.0000000000000000000", "733744593401073823825766410831877679446", 19); + to_fixed_test_opt ("-64.6849459", "-64.6849458687691227978", 7); + to_fixed_test_opt ("-0.000000", "-0.00000000009", 6); + to_fixed_test_opt ("-62537287527837589298857228059657673223234916.95923265430000000", "-62537287527837589298857228059657673223234916.9592326543", 17); + to_fixed_test_opt ("3393668096256773847245721315080265089731.000000", "3393668096256773847245721315080265089731", 6); + to_fixed_test_opt ("0.0", "0.0000000000000056674956638008432348702401392", 1); + to_fixed_test_opt ("72516372734.6", "72516372734.6447", 1); + to_fixed_test_opt ("-418.28", "-418.2800731793741351", 2); + to_fixed_test_opt ("0.00", "0.001", 2); + to_fixed_test_opt ("8366217346845756726.00000000", "8366217346845756726", 8); + to_fixed_test_opt ("-0.000000", "-0.0000000000000092034548636370987112234384736726", 6); + to_fixed_test_opt ("0.35", "0.35474830751442135112334772517193392", 2); + to_fixed_test_opt ("64703289793894.5830", "64703289793894.58296866", 4); + to_fixed_test_opt ("-0.000000000000000036", "-0.000000000000000036461242408590182363418943891", 18); + to_fixed_test_opt ("5494508405056449117588.631948", "5494508405056449117588.631948458033233759999", 6); + to_fixed_test_opt ("-0.0", "-0.00393971618499838726739122333520030506235698", 1); + to_fixed_test_opt ("375581290738585826632.00000000", "375581290738585826632", 8); + to_fixed_test_opt ("254.96635275802300887", "254.96635275802300886544776010389418575738792480979736", 17); + to_fixed_test_opt ("21492347.69467571391498624445", "21492347.6946757139149862444482880595559468", 20); + to_fixed_test_opt ("313576441324233.0000000", "313576441324233", 7); + to_fixed_test_opt ("-8617.57089319166", "-8617.57089319166205141433276411273552139017", 11); + to_fixed_test_opt ("0.00000000014928376395", "0.00000000014928376394768755724252424022348932365406839448223", 20); + to_fixed_test_opt ("2.497624215622999568569", "2.49762421562299956856937732557160934323114203547832675", 21); + to_fixed_test_opt ("-288056106511636272271570523193926801058294502.000", "-288056106511636272271570523193926801058294502", 3); + to_fixed_test_opt ("-4798171567575228724.140", "-4798171567575228724.1400144613946894", 3); + to_fixed_test_opt ("8.49008", "8.49007655210654", 5); + to_fixed_test_opt ("-56633605.000", "-56633605", 3); + to_fixed_test_opt ("-4147381274685866.81753", "-4147381274685866.8175313", 5); + to_fixed_test_opt ("-534460490015293367127173277346694900936058.0000", "-534460490015293367127173277346694900936058", 4); + to_fixed_test_opt ("182707431911537249021116759327712693311898345504618668.43327000000000000000000", "182707431911537249021116759327712693311898345504618668.43327", 23); + to_fixed_test_opt ("210005324615278.4586839690045963321032", "210005324615278.458683969004596332103244549279", 22); + to_fixed_test_opt ("779837001772884165637922377221951347134695.644834", "779837001772884165637922377221951347134695.6448338", 6); + to_fixed_test_opt ("-0.000001", "-0.00000064188301390033596845335767993853284632527964514979079", 6); + to_fixed_test_opt ("13.0", "13", 1); + to_fixed_test_opt ("0.0000001269", "0.0000001269060795648365813491128357427111184222", 10); + to_fixed_test_opt ("18446632248354.00", "18446632248354", 2); + to_fixed_test_opt ("-1229249.79", "-1229249.7897249259", 2); + to_fixed_test_opt ("49082.0", "49082", 1); + to_fixed_test_opt ("-61.0", "-61", 1); + to_fixed_test_opt ("-893.0", "-893", 1); + to_fixed_test_opt ("5002282278.56974877690066484", "5002282278.569748776900664839184116538222902", 17); + to_fixed_test_opt ("41372.00", "41372", 2); + to_fixed_test_opt ("-4732022445962399687294885123498809.7625585825095", "-4732022445962399687294885123498809.7625585825095", 13); + to_fixed_test_opt ("-55484242.036895641", "-55484242.036895641", 9); + to_fixed_test_opt ("-41427133134.52583323427907663268339", "-41427133134.525833234279076632683393992706825", 23); + to_fixed_test_opt ("0.0", "0.00004300614085218825243480119971669264977421", 1); + to_fixed_test_opt ("-472025754597316278339412186866.7010659789", "-472025754597316278339412186866.701065978877597089729906019843", 10); + to_fixed_test_opt ("2.50869", "2.50869082352024406", 5); + to_fixed_test_opt ("-87154.000", "-87154", 3); + to_fixed_test_opt ("-0.0000000000071859183950976", "-0.0000000000071859183950975905578927950225183102336392", 25); + to_fixed_test_opt ("-10827138340266.44", "-10827138340266.44057558913", 2); + to_fixed_test_opt ("0.0000702", "0.0000701871613973530533582225769977", 7); + to_fixed_test_opt ("-4878237667448133503521416059497.376626000000", "-4878237667448133503521416059497.376626", 12); + to_fixed_test_opt ("8984687671347686046766702.01181862480", "8984687671347686046766702.0118186248", 11); + to_fixed_test_opt ("0.00000", "0.00000000076447711430809658905538", 5); + to_fixed_test_opt ("-184825.87743766370213607", "-184825.87743766370213606656669525883145102", 17); + to_fixed_test_opt ("-147007021210433212254058959161555.747000000000", "-147007021210433212254058959161555.747", 12); + to_fixed_test_opt ("641778680063060681850989295.4", "641778680063060681850989295.44394602812788754296411563", 1); + to_fixed_test_opt ("0.00", "0.000000000000000261099857", 2); + to_fixed_test_opt ("-69168585539.981086198312", "-69168585539.9810861983124008597329", 12); + to_fixed_test_opt ("-2441638.37765", "-2441638.37765405543", 5); + to_fixed_test_opt ("0.00", "0.00000005", 2); + to_fixed_test_opt ("-17865480328519059654833853633.668588983", "-17865480328519059654833853633.6685889825124607147114", 9); + to_fixed_test_opt ("5552449880075592383242782.42", "5552449880075592383242782.42273775283", 2); + to_fixed_test_opt ("-3.47445833771303714", "-3.4744583377130371421642122331960174443", 17); + to_fixed_test_opt ("-5543608156416096833838191852961329666675.00000000000000", "-5543608156416096833838191852961329666675", 14); + to_fixed_test_opt ("-6836042.000", "-6836042", 3); + to_fixed_test_opt ("0.00000912", "0.0000091177854552839774258855562071866", 8); + to_fixed_test_opt ("55986.00", "55986", 2); + to_fixed_test_opt ("0.0", "0.02", 1); + to_fixed_test_opt ("-0.0000", "-0.00000001", 4); + to_fixed_test_opt ("889659799897707059043156.0", "889659799897707059043156", 1); + to_fixed_test_opt ("0.000000", "0.00000000000000003", 6); + to_fixed_test_opt ("0.00000000000008179581450", "0.00000000000008179581449515246320423213581212698189913041", 23); + to_fixed_test_opt ("-981.4210", "-981.421", 4); + to_fixed_test_opt ("-3455913777070673553360330519337.00000000000000", "-3455913777070673553360330519337", 14); + to_fixed_test_opt ("0.00000000081700", "0.00000000081700228716634187537384600725", 14); + to_fixed_test_opt ("4822037.000", "4822037", 3); + to_fixed_test_opt ("-0.0000000064360437778", "-0.0000000064360437777672775206464043731", 19); + to_fixed_test_opt ("5290480.66496927901282867", "5290480.66496927901282867027658062129", 17); + to_fixed_test_opt ("-408612952552043095.000", "-408612952552043095", 3); + to_fixed_test_opt ("-513.0", "-513", 1); + to_fixed_test_opt ("-14964.000", "-14964", 3); + to_fixed_test_opt ("-19903753117563849440806175537514112075543387952.00000", "-19903753117563849440806175537514112075543387952", 5); + to_fixed_test_opt ("249443.0175143", "249443.0175142727704683419749", 7); + to_fixed_test_opt ("-74343756463586673907431837633.24", "-74343756463586673907431837633.23687651", 2); + to_fixed_test_opt ("-27.679", "-27.6785", 3); + to_fixed_test_opt ("-64259172643579684888737979.618833554815821332098", "-64259172643579684888737979.618833554815821332097716331", 21); + to_fixed_test_opt ("17230955766539391.00000000", "17230955766539391", 8); + to_fixed_test_opt ("582751886981240.177", "582751886981240.177383845390864465", 3); + to_fixed_test_opt ("191002031658424.51", "191002031658424.51247456500221220552332700327795408", 2); + to_fixed_test_opt ("-479015175846069070145.000000000", "-479015175846069070145", 9); + to_fixed_test_opt ("135507.00", "135507", 2); + to_fixed_test_opt ("-1819380757840.7931545894175", "-1819380757840.79315458941752033110677996441946221", 13); + to_fixed_test_opt ("56729395152942371.34113220", "56729395152942371.3411322", 8); + to_fixed_test_opt ("0.00000", "0.000000009", 5); + to_fixed_test_opt ("231631.31091406798", "231631.310914067979514934639396351953448", 11); + to_fixed_test_opt ("0.00", "0.00044659", 2); + to_fixed_test_opt ("-637697600918508531049573689760309.5119477000000000", "-637697600918508531049573689760309.5119477", 16); + to_fixed_test_opt ("-6.19247283", "-6.19247282501186063445037314", 8); + + Big.setRM 2; + + to_fixed_test_opt ("-6614662975368684488885953285955838893900074215956.00", "-6614662975368684488885953285955838893900074215956", 2); + to_fixed_test_opt ("8642393776898.000", "8642393776898", 3); + to_fixed_test_opt ("3612207878528.1106344698085142865", "3612207878528.1106344698085142865438924419", 19); + to_fixed_test_opt ("977910386.93", "977910386.9343537", 2); + to_fixed_test_opt ("-8937937492688941768401276851642629965923372.0", "-8937937492688941768401276851642629965923372", 1); + to_fixed_test_opt ("-8327876772303865517454752161.4376112752921904774", "-8327876772303865517454752161.43761127529219047742910886", 19); + to_fixed_test_opt ("-27707.00", "-27707", 2); + to_fixed_test_opt ("-7287595765894242586375.92700435484", "-7287595765894242586375.927004354837723619581861634319", 11); + to_fixed_test_opt ("-0.00000", "-0.000000000000023670858459165486137218740358207859", 5); + to_fixed_test_opt ("574676836802209077.64156", "574676836802209077.641563875647945277493356873895", 5); + to_fixed_test_opt ("-3041038455237222898218053653661.87952947815", "-3041038455237222898218053653661.87952947815", 11); + to_fixed_test_opt ("-628244132307.000", "-628244132307", 3); + to_fixed_test_opt ("316566935167341670725238.000", "316566935167341670725238", 3); + to_fixed_test_opt ("-77953301569468294124105528.0", "-77953301569468294124105528", 1); + to_fixed_test_opt ("0.0046", "0.00460227833968584", 4); + to_fixed_test_opt ("4323265763616518980379929221104.0", "4323265763616518980379929221104", 1); + to_fixed_test_opt ("1674500565014237781637959673471730398.1120033", "1674500565014237781637959673471730398.1120032995511774", 7); + to_fixed_test_opt ("872559441430499650732600166.00000", "872559441430499650732600166", 5); + to_fixed_test_opt ("-87858304.0000", "-87858304", 4); + to_fixed_test_opt ("-4158788.000", "-4158788", 3); + to_fixed_test_opt ("3983930437416823631395.9093", "3983930437416823631395.90934402583657", 4); + to_fixed_test_opt ("-14.5531937", "-14.5531936852106573016020290135814233645752955297443336", 7); + to_fixed_test_opt ("0.00000000002201", "0.00000000002200503795474854372849141363413146996972", 14); + to_fixed_test_opt ("0.0000000000000", "0.00000000000000000894955653982033503846831364474746320232", 13); + to_fixed_test_opt ("61564779.00", "61564779", 2); + to_fixed_test_opt ("-7.0", "-7", 1); + to_fixed_test_opt ("-0.000000000000028455976228", "-0.00000000000002845597622815028653703372125435938812845106", 24); + to_fixed_test_opt ("728982423193598397582409707715766595902844.0000000", "728982423193598397582409707715766595902844", 7); + to_fixed_test_opt ("14538075860529.2697937480", "14538075860529.269793748", 10); + to_fixed_test_opt ("0.000", "0.00000000000000000007021566096", 3); + to_fixed_test_opt ("-5136066535080.86830591678842264063462546263", "-5136066535080.86830591678842264063462546262988980471309228558", 29); + to_fixed_test_opt ("-3026751112367460839746524832112404665.000000000000000", "-3026751112367460839746524832112404665", 15); + to_fixed_test_opt ("-6694275398250090562.00", "-6694275398250090562", 2); + to_fixed_test_opt ("-50643997750937725516578696636829589244661366402743.000000000", "-50643997750937725516578696636829589244661366402743", 9); + to_fixed_test_opt ("2197374413.79714", "2197374413.7971355344377249354470626290268959873", 5); + to_fixed_test_opt ("0.0", "0.005020192658713355", 1); + to_fixed_test_opt ("-254956356194995318790657817617390203938.180000000", "-254956356194995318790657817617390203938.18", 9); + to_fixed_test_opt ("0.000", "0.000000000090726", 3); + to_fixed_test_opt ("-644164371869124953225087.14694842524000", "-644164371869124953225087.14694842524", 14); + to_fixed_test_opt ("-0.00000157175189018", "-0.0000015717518901763532026126676445445", 17); + to_fixed_test_opt ("883545726717772254369.08868386", "883545726717772254369.0886838593581297250598", 8); + to_fixed_test_opt ("-8890332541208932844712909996569216422867971798.000000000000000", "-8890332541208932844712909996569216422867971798", 15); + to_fixed_test_opt ("-0.000000000000", "-0.000000000000000019481454049470983547912235", 12); + to_fixed_test_opt ("740944636504591431790473918513.0000", "740944636504591431790473918513", 4); + to_fixed_test_opt ("-5679793084762496855854965276883350654245022549131067599715.800000", "-5679793084762496855854965276883350654245022549131067599715.8", 6); + to_fixed_test_opt ("51991398836962962151.4032644162159", "51991398836962962151.4032644162159099221", 13); + to_fixed_test_opt ("66958838053011544557752193.00000", "66958838053011544557752193", 5); + to_fixed_test_opt ("-670579843.2118208913941229137016", "-670579843.21182089139412291370155773837719883548843299002", 22); + to_fixed_test_opt ("-153613650899356538114572207.94248678450152160836", "-153613650899356538114572207.9424867845015216083607156497", 20); + to_fixed_test_opt ("-737846251706379871052.2861168", "-737846251706379871052.2861168267591416289887782899835", 7); + to_fixed_test_opt ("-65908055.0", "-65908055", 1); + to_fixed_test_opt ("3237039120306392313.80906374769", "3237039120306392313.80906374769434099092272015749692609", 11); + to_fixed_test_opt ("83640693821.00", "83640693821", 2); + to_fixed_test_opt ("-921776606869800052510163986912.6037663480501", "-921776606869800052510163986912.603766348050146856757561176111", 13); + to_fixed_test_opt ("6303883932563373.0", "6303883932563373", 1); + to_fixed_test_opt ("6373283811.5454531478622699", "6373283811.5454531478622698611321575271", 16); + to_fixed_test_opt ("6097017834070937658.000000000", "6097017834070937658", 9); + to_fixed_test_opt ("24524.17471335606758880", "24524.1747133560675887965670636565353165", 17); + to_fixed_test_opt ("82671976754257522256837287487178420454352.00000", "82671976754257522256837287487178420454352", 5); + to_fixed_test_opt ("-4134121508878287.32516638661", "-4134121508878287.32516638661094488", 11); + to_fixed_test_opt ("706494960751225536339363333.135485602348", "706494960751225536339363333.13548560234793", 12); + to_fixed_test_opt ("0.0000000", "0.00000000000000000005260494554647051", 7); + to_fixed_test_opt ("-2172823046.605754378126140867773679", "-2172823046.60575437812614086777367899344184998336", 24); + to_fixed_test_opt ("7182216670065915047.3", "7182216670065915047.265", 1); + to_fixed_test_opt ("-0.0001", "-0.00011347856", 4); + to_fixed_test_opt ("-1620.4750509689199484099", "-1620.475050968919948409915128915793493745056891952647", 19); + to_fixed_test_opt ("-2107001274569567393.00000000", "-2107001274569567393", 8); + to_fixed_test_opt ("0.00", "0.0000000004", 2); + to_fixed_test_opt ("-0.000", "-0.00000000000000000009622600511499459674774308", 3); + to_fixed_test_opt ("-1749656594942211427.14080828808148814976439530", "-1749656594942211427.1408082880814881497643953004161", 26); + to_fixed_test_opt ("-2483383057229762.00000000", "-2483383057229762", 8); + to_fixed_test_opt ("0.000000", "0.0000005", 6); + to_fixed_test_opt ("-0", "-0.5", 0); + ) diff --git a/drafts/bs-big/__tests__/to_precision_test.ml b/drafts/bs-big/__tests__/to_precision_test.ml new file mode 100644 index 0000000..7a244fc --- /dev/null +++ b/drafts/bs-big/__tests__/to_precision_test.ml @@ -0,0 +1,432 @@ +open Jest + +let () = + describe "to_prec_test" (fun () -> + let open Expect in + + let to_prec_test = + let count = ref 0 in + fun (exp, x, prec) -> + count := !count + 1; + let v = Big.fromString x |. Big.toPrecision ~sd:prec () in + test ("to_prec_test" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + Big.setDP 20; + Big.setRM 1; + + to_prec_test ("0", "0", 1); + to_prec_test ("0", "-0", 1); + to_prec_test ("0.0", "0", 2); + to_prec_test ("0.0", "-0", 2); + + + to_prec_test ("1e+27", "1.2345e+27", 1); + to_prec_test ("1.2e+27", "1.2345e+27", 2); + to_prec_test ("1.23e+27", "1.2345e+27", 3); + to_prec_test ("1.235e+27", "1.2345e+27", 4); + to_prec_test ("1.2345e+27", "1.2345e+27", 5); + to_prec_test ("1.23450e+27", "1.2345e+27", 6); + to_prec_test ("1.234500e+27", "1.2345e+27", 7); + + to_prec_test ("-1e+27", "-1.2345e+27", 1); + to_prec_test ("-1.2e+27", "-1.2345e+27", 2); + to_prec_test ("-1.23e+27", "-1.2345e+27", 3); + to_prec_test ("-1.235e+27", "-1.2345e+27", 4); + to_prec_test ("-1.2345e+27", "-1.2345e+27", 5); + to_prec_test ("-1.23450e+27", "-1.2345e+27", 6); + to_prec_test ("-1.234500e+27", "-1.2345e+27", 7); + + to_prec_test ("7", "7", 1); + to_prec_test ("7.0", "7", 2); + to_prec_test ("7.00", "7", 3); + + to_prec_test ("-7", "-7", 1); + to_prec_test ("-7.0", "-7", 2); + to_prec_test ("-7.00", "-7", 3); + + to_prec_test ("9e+1", "91", 1); + to_prec_test ("91", "91", 2); + to_prec_test ("91.0", "91", 3); + to_prec_test ("91.00", "91", 4); + + to_prec_test ("-9e+1", "-91", 1); + to_prec_test ("-91", "-91", 2); + to_prec_test ("-91.0", "-91", 3); + to_prec_test ("-91.00", "-91", 4); + + to_prec_test ("9e+1", "91.1234", 1); + to_prec_test ("91", "91.1234", 2); + to_prec_test ("91.1", "91.1234", 3); + to_prec_test ("91.12", "91.1234", 4); + to_prec_test ("91.123", "91.1234", 5); + to_prec_test ("91.1234", "91.1234", 6); + to_prec_test ("91.12340", "91.1234", 7); + to_prec_test ("91.123400", "91.1234", 8); + to_prec_test ("-9e+1", "-91.1234", 1); + to_prec_test ("-91", "-91.1234", 2); + to_prec_test ("-91.1", "-91.1234", 3); + to_prec_test ("-91.12", "-91.1234", 4); + to_prec_test ("-91.123", "-91.1234", 5); + to_prec_test ("-91.1234", "-91.1234", 6); + to_prec_test ("-91.12340", "-91.1234", 7); + to_prec_test ("-91.123400", "-91.1234", 8); + + to_prec_test ("5.55000000000000e-7", "0.000000555", 15); + to_prec_test ("-5.55000000000000e-7", "-0.000000555", 15); + to_prec_test ("-1.2e-9", "-.0000000012345", 2); + to_prec_test ("-1.2e-8", "-.000000012345", 2); + to_prec_test ("-1.2e-7", "-.00000012345", 2); + to_prec_test ("1e+8", "123456789", 1); + to_prec_test ("123456789", "123456789", 9); + to_prec_test ("1.2345679e+8", "123456789", 8); + to_prec_test ("1.234568e+8", "123456789", 7); + to_prec_test ("-1.234568e+8", "-123456789", 7); + + to_prec_test ("-0.0000012", "-.0000012345", 2); + to_prec_test ("-0.000012", "-.000012345", 2); + to_prec_test ("-0.00012", "-.00012345", 2); + to_prec_test ("-0.0012", "-.0012345", 2); + to_prec_test ("-0.012", "-.012345", 2); + to_prec_test ("-0.12", "-.12345", 2); + to_prec_test ("-1.2", "-1.2345", 2); + to_prec_test ("-12", "-12.345", 2); + to_prec_test ("-1.2e+2", "-123.45", 2); + to_prec_test ("-1.2e+3", "-1234.5", 2); + to_prec_test ("-1.2e+4", "-12345", 2); + to_prec_test ("-1.235e+4", "-12345.67", 4); + to_prec_test ("-1.234e+4", "-12344.67", 4); + + to_prec_test ("1.3", "1.25", 2); + to_prec_test ("1.4", "1.35", 2); + + to_prec_test ("1e+4", "9631.01", 1); + to_prec_test ("1.0e+7", "9950095.87", 2); + to_prec_test ("1e+1", "9.856839969", 1); + to_prec_test ("1e+2", "97.504", 1); + to_prec_test ("1e+5", "97802.6", 1); + to_prec_test ("1e+1", "9.9617", 1); + to_prec_test ("1e+3", "989.2", 1); + to_prec_test ("1.0e+5", "99576", 2); + to_prec_test ("1e+8", "96236483.87", 1); + + Big.setRM 0; + + to_prec_test ("-844789036.5239726", "-844789036.52397268892", 16); + to_prec_test ("-5056.20629012767878749185273209679064306054", "-5056.206290127678787491852732096790643060542", 42); + to_prec_test ("-0.3287519131314873763501859870298952500", "-0.32875191313148737635018598702989525", 37); + to_prec_test ("-60729764", "-60729764", 8); + to_prec_test ("-7.622e-14", "-0.00000000000007622481594531380999826456196664586", 4); + to_prec_test ("-4686402261639729535.736324492474", "-4686402261639729535.7363244924747488", 31); + to_prec_test ("-2.0", "-2", 2); + to_prec_test ("0.0000807327587149839799300000", "0.00008073275871498397993", 24); + to_prec_test ("-6.000000e-8", "-0.00000006", 7); + to_prec_test ("-3.83574993e+11", "-383574993535", 9); + to_prec_test ("7.6987000000000000e-14", "0.000000000000076987", 17); + to_prec_test ("80928866804.6112050947427973", "80928866804.6112050947427973864826014844575374353", 27); + to_prec_test ("-0.00730140", "-0.0073014067221009206110062377503733", 6); + to_prec_test ("2.72104773884160491036088486e+30", "2721047738841604910360884862459.4086993273252009015", 27); + to_prec_test ("3.008780781917733594e+25", "30087807819177335941398228.1424107931203", 19); + to_prec_test ("-1.31528920779613669158250146972297797867760000000000000000000e-19", "-0.00000000000000000013152892077961366915825014697229779786776", 60); + to_prec_test ("-8.5e+11", "-858982311008.257025719798657844609315293821", 2); + to_prec_test ("-3.6312e-12", "-0.0000000000036312827608449878", 5); + to_prec_test ("-0.0060000", "-0.006", 5); + to_prec_test ("-1e+1", "-12", 1); + to_prec_test ("5.779447e+14", "577944759667712", 7); + to_prec_test ("-8.753124714248104872487955947563035887800000000000e-13", "-0.00000000000087531247142481048724879559475630358878", 49); + to_prec_test ("0.000736948830704113912", "0.000736948830704113912970821957479", 18); + to_prec_test ("-4.65727e+23", "-465727983501322687372765", 6); + to_prec_test ("-0.00000332331666628036603", "-0.000003323316666280366035430077076052", 18); + to_prec_test ("3.533702e-8", "0.00000003533702791135712510338001418872124", 7); + to_prec_test ("-0.04340", "-0.0434", 4); + to_prec_test ("-597340.278566069086858587852236235470", "-597340.2785660690868585878522362354706741", 36); + to_prec_test ("6.000e-8", "0.00000006", 4); + to_prec_test ("-3.624323359112776296e-19", "-0.00000000000000000036243233591127762966338166", 19); + to_prec_test ("-68249040894032065692.62", "-68249040894032065692.62771690318493", 22); + to_prec_test ("8786096722661914.89732851", "8786096722661914.89732851188880184891692993684242690315", 24); + to_prec_test ("-1.8413321536281347264486372900000000000e-12", "-0.00000000000184133215362813472644863729", 38); + to_prec_test ("4.0e-9", "0.0000000040395827543504045", 2); + to_prec_test ("-2.9427e+16", "-29427119846374896", 5); + to_prec_test ("-917760614.4", "-917760614.45404359204911454", 10); + to_prec_test ("8e+4", "89427", 1); + to_prec_test ("0.00000920323988134356953828667260", "0.0000092032398813435695382866726", 27); + to_prec_test ("8.2e+16", "82068995955708118", 2); + to_prec_test ("3.35195944828e+26", "335195944828445911672446409.3379497158141", 12); + to_prec_test ("-3.89774891030e-9", "-0.00000000389774891030223957363124620581272897758735065471", 12); + to_prec_test ("-4", "-4", 1); + to_prec_test ("8", "8", 1); + to_prec_test ("1.41172955693912934219137966000000e-10", "0.000000000141172955693912934219137966", 33); + to_prec_test ("9.21481e+13", "92148111958857", 6); + to_prec_test ("-5.859975978432853e-18", "-0.0000000000000000058599759784328539", 16); + to_prec_test ("-72.0", "-72", 3); + to_prec_test ("3785098751297.8929911950994079707157472", "3785098751297.89299119509940797071574729867819252140059", 38); + to_prec_test ("4.38e+16", "43893416753778361.297703358127215475077814", 3); + to_prec_test ("-33110.29096", "-33110.2909623520267070846514", 10); + to_prec_test ("-74.38305251784882707720486436292121914036495", "-74.3830525178488270772048643629212191403649548392158614", 43); + to_prec_test ("-4.31091381814e+27", "-4310913818147299779611829988.1707181186375975966133328", 12); + to_prec_test ("-1e+7", "-19238355", 1); + to_prec_test ("-8.203834974e+12", "-8203834974826.23347025", 10); + to_prec_test ("-7.4775e+5", "-747754.16564979702874976822", 5); + to_prec_test ("-9.291256959320e+23", "-929125695932058727753757.0232350927089256760451379", 13); + to_prec_test ("8.5e+11", "853985704471", 2); + to_prec_test ("-6.6560212", "-6.65602121044617863313449309597493831", 8); + to_prec_test ("1785977942777.20398797", "1785977942777.2039879764361236566223563439", 21); + to_prec_test ("6.1333504356e+23", "613335043569565749922342.8859983523919141148812213832", 11); + to_prec_test ("-5.6e+8", "-565718507", 2); + to_prec_test ("87732918932081", "87732918932081.5225691355449629111825", 14); + to_prec_test ("34510.55200915393645123", "34510.55200915393645123649", 22); + to_prec_test ("80406604570281847.64813851700344044652354", "80406604570281847.648138517003440446523542379", 40); + to_prec_test ("4350.66340515", "4350.66340515436550356256", 12); + to_prec_test ("-1.795651762606996e+19", "-17956517626069967584.285356976401607845756322546530214497", 16); + to_prec_test ("9.162e+24", "9162436195089050810891391.493612", 4); + to_prec_test ("-7.82552e+6", "-7825522.1080200627404337", 6); + to_prec_test ("-358162040.1796393759838430", "-358162040.17963937598384303781972517649539", 25); + to_prec_test ("-20732451778.4", "-20732451778.464877395794562570976729066571095229", 12); + to_prec_test ("-239748.58739", "-239748.5873964402372997371903319", 11); + to_prec_test ("-6.106537e+9", "-6106537070.58700935776016694", 7); + to_prec_test ("4e+23", "405561947729011104089456.7617832102516", 1); + to_prec_test ("-1.7252987e+10", "-17252987633.58674364430598655792", 8); + to_prec_test ("61.38960691398015334867512513960", "61.3896069139801533486751251396015198659145775291764", 31); + to_prec_test ("-891.3505", "-891.35058685025619", 7); + to_prec_test ("1.5e+8", "153705028.906", 2); + to_prec_test ("5.80e+18", "5805164734299168659.6173113885173384955443", 3); + to_prec_test ("-1.719875889271327", "-1.719875889271327133154458155573493605566221534", 16); + to_prec_test ("113.672129563", "113.672129563441659725876055771857758675550104070419635029", 12); + to_prec_test ("-7.79500528146220810843979e+22", "-77950052814622081084397.91853869253589242574", 24); + to_prec_test ("4.53106985e+27", "4531069852787151785292512309.2901993579425172826443679877", 9); + to_prec_test ("45285.246089613169416440797840714", "45285.2460896131694164407978407142422013937", 32); + to_prec_test ("307760226411464.7333268079863299", "307760226411464.73332680798632996332324381779707", 31); + + Big.setRM 1; + + to_prec_test ("7.905300379788e+16", "79053003797878062.6454954", 13); + to_prec_test ("-6.83490000000e-13", "-0.00000000000068349", 12); + to_prec_test ("-62760641815.69084973661201201", "-62760641815.690849736612012010742308663", 28); + to_prec_test ("0.000704", "0.000704496313", 3); + to_prec_test ("82926865286287.8852357368342860830310721063079299643", "82926865286287.88523573683428608303107210630792996432", 51); + to_prec_test ("-0.00032388272393900301214220090249", "-0.00032388272393900301214220090248744799603424908", 29); + to_prec_test ("8.6e+12", "8621641486938.4837308885005093571508566552428700982454", 2); + to_prec_test ("2", "2", 1); + to_prec_test ("1.4641440117052559075e+20", "146414401170525590746.047955203899370771105088", 20); + to_prec_test ("3511.925583", "3511.925583", 10); + to_prec_test ("2861824.253079699095728", "2861824.253079699095727765750377038689", 22); + to_prec_test ("-3.940097756e+10", "-39400977564.548924098664431671700066962", 10); + to_prec_test ("-888", "-888", 3); + to_prec_test ("-0.000302106125213724988141721256104", "-0.00030210612521372498814172125610432438685", 30); + to_prec_test ("6943.4804552555315615809650428503", "6943.480455255531561580965042850266831249032130818358478956", 32); + to_prec_test ("3365678", "3365678.3397481381125085749", 7); + to_prec_test ("-5.3943374314e+19", "-53943374313769567458.386865325", 11); + to_prec_test ("-6.67880509225510150542252852147049489938254298497979", "-6.6788050922551015054225285214704948993825429849797925563674", 51); + to_prec_test ("1.36424e+18", "1364240644139816224.60228356028", 6); + to_prec_test ("1.410236477950416725e+23", "141023647795041672538410.84935693266374259666015274447", 19); + to_prec_test ("-802.817765", "-802.81776500697712984253334522", 9); + to_prec_test ("-5.276210722424690668896260075355037218851", "-5.27621072242469066889626007535503721885096", 40); + to_prec_test ("-0.000874209568970788", "-0.0008742095689707877849902027926289294748756775668387", 15); + to_prec_test ("0.092053833162002", "0.09205383316200189249855864903410820435666385119723209239", 14); + to_prec_test ("7.0656298318128209e-14", "0.0000000000000706562983181282092835675843980510112", 17); + to_prec_test ("-8.66511516852116659e+18", "-8665115168521166587", 18); + to_prec_test ("3.3490648464e+22", "33490648463534229842937.79268276945692333064632966129475", 11); + to_prec_test ("-39041587174692569176.82740706154183894", "-39041587174692569176.827407061541838942655371389185", 37); + to_prec_test ("-3834.0", "-3834", 5); + to_prec_test ("-0.008912382644814418776268630", "-0.00891238264481441877626863", 25); + to_prec_test ("-2.1e+5", "-206119", 2); + to_prec_test ("4.83340000000e-8", "0.000000048334", 12); + to_prec_test ("3.185196533675230520000000000000e-19", "0.000000000000000000318519653367523052", 31); + to_prec_test ("6.0431217298488095562718496137220939447806000000000000000e-17", "0.000000000000000060431217298488095562718496137220939447806", 56); + to_prec_test ("196.519569070149034", "196.51956907014903416531531", 18); + to_prec_test ("0.0000046405006597117307566000", "0.0000046405006597117307566", 23); + to_prec_test ("9.10e+16", "90974867783311624.1073050261392195984211985571898902", 3); + to_prec_test ("0.0009", "0.0009", 1); + to_prec_test ("-784.344", "-784.3442317667756502522526185951859933319162", 6); + to_prec_test ("4.407336482399797058693e+28", "44073364823997970586929155979.43263841350505", 22); + to_prec_test ("-3.0000000000e-13", "-0.0000000000003", 11); + to_prec_test ("0.800", "0.8", 3); + to_prec_test ("0.04643398170143261158595951942031", "0.046433981701432611585959519420314960367263", 31); + to_prec_test ("-8e+26", "-786589693451258754942279859.3834", 1); + to_prec_test ("-26.0", "-26", 3); + to_prec_test ("-8.462226728e+11", "-846222672789.2087639320702375427266333530942524245", 10); + to_prec_test ("-4e-7", "-0.0000004019666978288041783154210868", 1); + to_prec_test ("-315609.775843992", "-315609.775843992", 15); + to_prec_test ("-3.319e+9", "-3318880945", 4); + to_prec_test ("-6", "-6.2847", 1); + to_prec_test ("7.754663772705e+20", "775466377270546647581.033426922028458904663", 13); + to_prec_test ("-7.2577466365074249372160551716563e+25", "-72577466365074249372160551.71656300408", 32); + to_prec_test ("-7.8e+14", "-775743793612078", 2); + to_prec_test ("132441.1194131940273344", "132441.119413194027334448511114274180643744", 22); + to_prec_test ("-2e+8", "-175718250.88225246544054572629398592939731158738360059", 1); + to_prec_test ("8603217351572193.39188696", "8603217351572193.391886964766947146712574336", 24); + to_prec_test ("-9.1544942231978215224e+22", "-91544942231978215224182.9277714", 20); + to_prec_test ("2.67483212861962e+22", "26748321286196185405759.132664", 15); + to_prec_test ("-5812371.3", "-5812371.311809024582418495005304074", 8); + to_prec_test ("-4.56681272e+10", "-45668127184.1622", 9); + to_prec_test ("-6.833879652430027734e+28", "-68338796524300277341620461049.174596381", 19); + to_prec_test ("3.5253e+11", "352531868532", 5); + to_prec_test ("6.18754e+9", "6187538472.1814915517411034136013806202710623466754380762318", 6); + to_prec_test ("-4.91199142018364313968271511239982195e+28", "-49119914201836431396827151123.99821949990542", 36); + to_prec_test ("-2.50e+18", "-2498994955335714645.22910610209", 3); + to_prec_test ("112714.50647532453078481574527706184222476885", "112714.50647532453078481574527706184222476884905812", 44); + to_prec_test ("1.3e+10", "13358297773", 2); + to_prec_test ("3.85346866600e+27", "3853468666000315958109987025.078941", 12); + to_prec_test ("-6.849e+16", "-68490080550892289", 4); + to_prec_test ("9.095", "9.094726073939375", 4); + to_prec_test ("4.6722099483e+12", "4672209948311.8638324115985415208264055834", 11); + to_prec_test ("-75494281.3585391383", "-75494281.3585391382541907932608754414663476859104837422712", 18); + to_prec_test ("7.9e+2", "787.7709059965548561711769118765", 2); + to_prec_test ("6103081090513.979878497219802", "6103081090513.9798784972198017843", 28); + to_prec_test ("-6207456599626114.392919", "-6207456599626114.39291886624528055513014220851925", 22); + to_prec_test ("844941600554602638837.461606663208684075561936", "844941600554602638837.461606663208684075561935576396", 45); + to_prec_test ("159438905444627555.28986", "159438905444627555.28985729196359392", 23); + to_prec_test ("-3688253681705278.414841830526919796661181971979", "-3688253681705278.4148418305269197966611819719792068915", 46); + to_prec_test ("-63", "-63.164640732796214571844119", 2); + to_prec_test ("2.8e+11", "276059026705.36069", 2); + to_prec_test ("357378.987253867425946425403370727230144", "357378.9872538674259464254033707272301441754336", 39); + to_prec_test ("1597.52674152596523825479", "1597.526741525965238254790848976407269408999607", 24); + to_prec_test ("4.63310587686706257280646279e+30", "4633105876867062572806462788592.801009", 27); + to_prec_test ("-6.21108762339449e+20", "-621108762339448671355.1393522133", 15); + to_prec_test ("8380435.063269894549337249", "8380435.063269894549337248813357930541546715547", 25); + + Big.setRM 2; + + to_prec_test ("0.08000", "0.08", 4); + to_prec_test ("-4.5132e+21", "-4513243388120382069815.8508153058993058875", 5); + to_prec_test ("-73549", "-73549.2594630551663822238", 5); + to_prec_test ("1.275868004728922895890883e+29", "127586800472892289589088296800.6", 25); + to_prec_test ("-0.0003715444034899460421534099962225699000", "-0.0003715444034899460421534099962225699", 37); + to_prec_test ("-6.9625565265e+24", "-6962556526511822306135536", 11); + to_prec_test ("1.67583703641e+13", "16758370364138.915293525076269061228714877", 12); + to_prec_test ("-173594.95064085553515176707313947534918109631092170", "-173594.950640855535151767073139475349181096310921699", 50); + to_prec_test ("-6.9503965525e+19", "-69503965525000308384.151383", 11); + to_prec_test ("4.411225e+20", "441122486054080817112", 7); + to_prec_test ("2.467044064783596937642371770e+31", "24670440647835969376423717700462.39", 28); + to_prec_test ("3.9711897549481645654e+24", "3971189754948164565361634.8039734590476326224193520402091769", 20); + to_prec_test ("-1.4757613208690e+21", "-1475761320868963235919.64499841336073105746686372924161", 14); + to_prec_test ("91683083887068.6191146", "91683083887068.61911461351134520171343337804061135", 21); + to_prec_test ("-7923074181102822.578", "-7923074181102822.5778", 19); + to_prec_test ("-6.800e-8", "-0.000000068", 4); + to_prec_test ("-2.57954671081460000000e-10", "-0.00000000025795467108146", 21); + to_prec_test ("5.5352911972e-9", "0.000000005535291197169667611325365189624523452", 11); + to_prec_test ("6.0488358e+8", "604883577", 8); + to_prec_test ("3", "3", 1); + to_prec_test ("-4.072637936805672015603149446630136089530560102165", "-4.0726379368056720156031494466301360895305601021653459970194", 49); + to_prec_test ("-7.2e+10", "-71689970391", 2); + to_prec_test ("655754242958.1563938760094919", "655754242958.15639387600949190369", 28); + to_prec_test ("-7.575535014e-9", "-0.00000000757553501363609536678641245355", 10); + to_prec_test ("7.547067960578900230644488e-10", "0.00000000075470679605789002306444877998602723", 25); + to_prec_test ("-3.64561456763e+12", "-3645614567625.4", 12); + to_prec_test ("9.0e-7", "0.0000009", 2); + to_prec_test ("7e+2", "687", 1); + to_prec_test ("517277827334839.8174848543680868", "517277827334839.8174848543680868015165926618", 31); + to_prec_test ("7e+2", "655.46270361324473194", 1); + to_prec_test ("1632131488313153.49737424823493573157", "1632131488313153.497374248234935731568", 36); + to_prec_test ("274068317992.5998880719845028748169734442", "274068317992.5998880719845028748169734442394151076", 40); + to_prec_test ("-7.060e-9", "-0.00000000706025531009734073", 4); + to_prec_test ("0.004444", "0.0044439457493", 4); + to_prec_test ("7.2482770689153111154104782082023e+28", "72482770689153111154104782082.022764082943227214833851", 32); + to_prec_test ("5.9130694036072794206e+24", "5913069403607279420613864.152", 20); + to_prec_test ("8.43384561300245347961437966e+23", "843384561300245347961437.96592523791", 27); + to_prec_test ("0.0000035198821282510000000", "0.000003519882128251", 20); + to_prec_test ("-1.00371560130267706870097e-9", "-0.00000000100371560130267706870096885251", 24); + to_prec_test ("17504218.4970302", "17504218.49703016415913667026121376499", 15); + to_prec_test ("-5e-9", "-0.000000005169058703", 1); + to_prec_test ("6.922803246e+10", "69228032455", 10); + to_prec_test ("-16", "-16", 2); + to_prec_test ("-1.355147513468192707127939151e+40", "-13551475134681927071279391508441439066206.58705380600075", 28); + to_prec_test ("81670324.1197758695", "81670324.1197758695212865075629796973196504241126", 18); + to_prec_test ("0.00005", "0.00004797485174640366805332660647", 1); + to_prec_test ("-4.864397594e-10", "-0.0000000004864397594461335282648538530108953965681345", 10); + to_prec_test ("47694105.2312532", "47694105.23125322528167211284521303", 15); + to_prec_test ("-4.962106181e+26", "-496210618135432953927871636.779236", 10); + to_prec_test ("1.2800030559497062236642e+37", "12800030559497062236641930592334626609.7332", 23); + to_prec_test ("-574830783.7", "-574830783.6689168903917696583746514637433390929", 10); + to_prec_test ("5969.431086199057470", "5969.43108619905746956015212970904111744101", 19); + to_prec_test ("-4.8e+3", "-4814.32904953003285", 2); + to_prec_test ("4.297e+16", "42973001760252134", 4); + to_prec_test ("-5.7628e+6", "-5762846.590152347665179652381407653797146356303622218259885", 5); + to_prec_test ("904864662232032.160612401810317927291657403142932", "904864662232032.16061240181031792729165740314293194205879163", 48); + to_prec_test ("7.9892e+20", "798923115068265241915.537619430376605", 5); + to_prec_test ("-8.97759349384000643", "-8.97759349384000643427096282979", 18); + to_prec_test ("841598023200278219780", "841598023200278219780.04764720909930685", 21); + to_prec_test ("7.294115e+17", "729411462980818078", 7); + to_prec_test ("-493854.469231", "-493854.46923056217873", 12); + to_prec_test ("1.16760483177812e+16", "11676048317781198.761924013", 15); + to_prec_test ("4.91431629960536e+17", "491431629960536053.49611060493021241774", 15); + to_prec_test ("-3.913572045646832654662206785248961969115394056441165e+26", "-391357204564683265466220678.524896196911539405644116478", 52); + to_prec_test ("-1138622.4269179222525707405725062065185867", "-1138622.42691792225257074057250620651858665807616", 41); + to_prec_test ("7.76249141450727328958717460526e+24", "7762491414507273289587174.60526424654003", 30); + to_prec_test ("-8.34305e+12", "-8343051798787.85784573983", 6); + to_prec_test ("-448090139696.5", "-448090139696.540044682", 13); + to_prec_test ("-249554483941810.04760758280384259798256931579", "-249554483941810.0476075828038425979825693157901967215767", 44); + to_prec_test ("-4937249656843391.056849", "-4937249656843391.056849458", 22); + to_prec_test ("-4.90029240789e+24", "-4900292407887576632220011.4", 12); + to_prec_test ("884134", "884134.30546381722", 6); + to_prec_test ("-67686.285431006", "-67686.2854310057290328136776917246126204655", 14); + to_prec_test ("5.1454907927786956678e+21", "5145490792778695667848.5080878826658832100351133", 20); + to_prec_test ("-3.75540093e+9", "-3755400930.115945946791361377756114557824815082", 9); + to_prec_test ("790548.1", "790548.055405", 7); + to_prec_test ("21.9776441681934305611827", "21.9776441681934305611826542081066055", 24); + to_prec_test ("-8.62915591e+12", "-8629155908036.5010483", 9); + to_prec_test ("-62521191175", "-62521191175.03721539877599449", 11); + to_prec_test ("-6.394701017023514561889355048e+22", "-63947010170235145618893.55048264587643", 28); + to_prec_test ("-4.4791e+5", "-447912.9929543492037", 5); + to_prec_test ("876897.06887720787797443065", "876897.0688772078779744306464727", 26); + to_prec_test ("-609834676.749497163216150672711104329822616519", "-609834676.749497163216150672711104329822616518762", 45); + to_prec_test ("-2.9407315435e+18", "-2940731543474095094.56340709357589521", 11); + to_prec_test ("243028.94040290384317164750687246", "243028.940402903843171647506872458168411478", 32); + to_prec_test ("5313610990.737", "5313610990.7373810218", 13); + to_prec_test ("-3.56e+4", "-35566.4678487", 3); + + Big.setRM 3; + + to_prec_test ("7.905300379788e+16", "79053003797878062.6454954", 13); + to_prec_test ("-6.83490000000e-13", "-0.00000000000068349", 12); + to_prec_test ("-62760641815.69084973661201202", "-62760641815.690849736612012010742308663", 28); + to_prec_test ("0.000705", "0.000704496313", 3); + to_prec_test ("82926865286287.8852357368342860830310721063079299644", "82926865286287.88523573683428608303107210630792996432", 51); + to_prec_test ("-0.00032388272393900301214220090249", "-0.00032388272393900301214220090248744799603424908", 29); + to_prec_test ("8.7e+12", "8621641486938.4837308885005093571508566552428700982454", 2); + to_prec_test ("2", "2", 1); + to_prec_test ("1.4641440117052559075e+20", "146414401170525590746.047955203899370771105088", 20); + to_prec_test ("3511.925583", "3511.925583", 10); + to_prec_test ("2861824.253079699095728", "2861824.253079699095727765750377038689", 22); + to_prec_test ("-3.940097757e+10", "-39400977564.548924098664431671700066962", 10); + to_prec_test ("-888", "-888", 3); + to_prec_test ("-0.000302106125213724988141721256105", "-0.00030210612521372498814172125610432438685", 30); + to_prec_test ("6943.4804552555315615809650428503", "6943.480455255531561580965042850266831249032130818358478956", 32); + to_prec_test ("3365679", "3365678.3397481381125085749", 7); + to_prec_test ("-5.3943374314e+19", "-53943374313769567458.386865325", 11); + to_prec_test ("-6.67880509225510150542252852147049489938254298497980", "-6.6788050922551015054225285214704948993825429849797925563674", 51); + to_prec_test ("1.36425e+18", "1364240644139816224.60228356028", 6); + to_prec_test ("1.410236477950416726e+23", "141023647795041672538410.84935693266374259666015274447", 19); + to_prec_test ("-802.817766", "-802.81776500697712984253334522", 9); + to_prec_test ("-5.276210722424690668896260075355037218851", "-5.27621072242469066889626007535503721885096", 40); + to_prec_test ("-0.000874209568970788", "-0.0008742095689707877849902027926289294748756775668387", 15); + to_prec_test ("0.092053833162002", "0.09205383316200189249855864903410820435666385119723209239", 14); + to_prec_test ("7.0656298318128210e-14", "0.0000000000000706562983181282092835675843980510112", 17); + to_prec_test ("-8.66511516852116659e+18", "-8665115168521166587", 18); + to_prec_test ("3.3490648464e+22", "33490648463534229842937.79268276945692333064632966129475", 11); + to_prec_test ("-39041587174692569176.82740706154183895", "-39041587174692569176.827407061541838942655371389185", 37); + to_prec_test ("-3834.0", "-3834", 5); + to_prec_test ("-0.008912382644814418776268630", "-0.00891238264481441877626863", 25); + to_prec_test ("-2.1e+5", "-206119", 2); + to_prec_test ("4.83340000000e-8", "0.000000048334", 12); + to_prec_test ("3.185196533675230520000000000000e-19", "0.000000000000000000318519653367523052", 31); + to_prec_test ("6.0431217298488095562718496137220939447806000000000000000e-17", "0.000000000000000060431217298488095562718496137220939447806", 56); + to_prec_test ("196.519569070149035", "196.51956907014903416531531", 18); + to_prec_test ("0.0000046405006597117307566000", "0.0000046405006597117307566", 23); + to_prec_test ("9.10e+16", "90974867783311624.1073050261392195984211985571898902", 3); + to_prec_test ("0.0009", "0.0009", 1); + to_prec_test ("-784.345", "-784.3442317667756502522526185951859933319162", 6); + to_prec_test ("4.407336482399797058693e+28", "44073364823997970586929155979.43263841350505", 22); + to_prec_test ("-3.0000000000e-13", "-0.0000000000003", 11); + to_prec_test ("0.800", "0.8", 3); + to_prec_test ("0.04643398170143261158595951942032", "0.046433981701432611585959519420314960367263", 31); + to_prec_test ("-8e+26", "-786589693451258754942279859.3834", 1); + to_prec_test ("-26.0", "-26", 3); + to_prec_test ("-8.462226728e+11", "-846222672789.2087639320702375427266333530942524245", 10); + to_prec_test ("-5e-7", "-0.0000004019666978288041783154210868", 1); + to_prec_test ("-315609.775843992", "-315609.775843992", 15); + to_prec_test ("-3.319e+9", "-3318880945", 4); + to_prec_test ("-7", "-6.2847", 1); + to_prec_test ("7.754663772706e+20", "775466377270546647581.033426922028458904663", 13); + to_prec_test ("-7.2577466365074249372160551716564e+25", "-72577466365074249372160551.71656300408", 32); +) diff --git a/drafts/bs-big/__tests__/to_string_test.ml b/drafts/bs-big/__tests__/to_string_test.ml new file mode 100644 index 0000000..627e279 --- /dev/null +++ b/drafts/bs-big/__tests__/to_string_test.ml @@ -0,0 +1,992 @@ +open Jest + +let () = + describe "to_string_test" (fun () -> + let open Expect in + + let to_string_test = + let count = ref 0 in + fun (exp, x) -> + count := !count + 1; + let v = Big.fromString x |. Big.toString in + test ("test_to_string" ^ string_of_int !count) (fun () -> expect v |> toBe exp) + in + + Big.setNE (-7); + Big.setPE 21; + + to_string_test ("0", "0"); + to_string_test ("9", "9"); + to_string_test ("90", "90"); + to_string_test ("90.12", "90.12"); + to_string_test ("0.1", "0.1"); + to_string_test ("0.01", "0.01"); + to_string_test ("0.0123", "0.0123"); + to_string_test ("1111111111111111111", "1111111111111111111"); + to_string_test ("11111111111111111111", "11111111111111111111"); + to_string_test ("111111111111111111111", "111111111111111111111"); + to_string_test ("0.00001", "0.00001"); + to_string_test ("0.000001", "0.000001"); + + to_string_test ("1e-7", "0.0000001"); + to_string_test ("1.2e-7", "0.00000012"); + to_string_test ("1.23e-7", "0.000000123"); + to_string_test ("1e-8", "0.00000001"); + to_string_test ("1.2e-8", "0.000000012"); + to_string_test ("1.23e-8", "0.0000000123"); + to_string_test ("-1e-7", "-0.0000001"); + to_string_test ("-1.2e-7", "-0.00000012"); + to_string_test ("-1.23e-7", "-0.000000123"); + to_string_test ("-1e-8", "-0.00000001"); + to_string_test ("-1.2e-8", "-0.000000012"); + to_string_test ("-1.23e-8", "-0.0000000123"); + + to_string_test ("0", "-0"); + to_string_test ("-9", "-9"); + to_string_test ("-90", "-90"); + to_string_test ("-90.12", "-90.12"); + to_string_test ("-0.1", "-0.1"); + to_string_test ("-0.01", "-0.01"); + to_string_test ("-0.0123", "-0.0123"); + to_string_test ("-1111111111111111111", "-1111111111111111111"); + to_string_test ("-11111111111111111111", "-11111111111111111111"); + to_string_test ("-111111111111111111111", "-111111111111111111111"); + to_string_test ("-0.00001", "-0.00001"); + to_string_test ("-0.000001", "-0.000001"); + + to_string_test ("-0.00002880972004499178518524380571906338098072371970938177432917135459615370973", "-2.880972004499178518524380571906338098072371970938177432917135459615370973e-5"); + to_string_test ("0.004062", "4.062e-3"); + to_string_test ("-0.206499585624247", "-2.06499585624247e-1"); + to_string_test ("-3217152390551.3480681585096", "-3.2171523905513480681585096e+12"); + to_string_test ("-0.40559318155029357183161762311247760893712676112986144952", "-4.0559318155029357183161762311247760893712676112986144952e-1"); + to_string_test ("0.67557005614746", "6.7557005614746e-1"); + to_string_test ("2151.831421496", "2.151831421496e+3"); + to_string_test ("-0.1022172129444977165472535878409456456335734198775387674763620211", "-1.022172129444977165472535878409456456335734198775387674763620211e-1"); + to_string_test ("-230807.1307795", "-2.308071307795e+5"); + to_string_test ("0.002624512719656034051820141160621618555340964456445", "2.624512719656034051820141160621618555340964456445e-3"); + to_string_test ("0.00001327437838824505056", "1.327437838824505056e-5"); + to_string_test ("-9951290509.3429612599596526988511098538865484988394", "-9.9512905093429612599596526988511098538865484988394e+9"); + to_string_test ("-3427642993691330.341017204453", "-3.427642993691330341017204453e+15"); + to_string_test ("-37824866439491973.50741863066968911367117518074717651871061595", "-3.782486643949197350741863066968911367117518074717651871061595e+16"); + to_string_test ("-752565.9663775", "-7.525659663775e+5"); + to_string_test ("0.0410317752667061957691693201", "4.10317752667061957691693201e-2"); + to_string_test ("2.5", "2.5e+0"); + to_string_test ("0.001164502035787451528115883000625978204981335782911350225248841560576941", "1.164502035787451528115883000625978204981335782911350225248841560576941e-3"); + to_string_test ("-92525086100.53245", "-9.252508610053245e+10"); + to_string_test ("71909248250.092670577", "7.1909248250092670577e+10"); + to_string_test ("-0.000029839925870209739408399", "-2.9839925870209739408399e-5"); + to_string_test ("-223.93", "-2.2393e+2"); + to_string_test ("-0.000259240816662184155275574744458044334917585", "-2.59240816662184155275574744458044334917585e-4"); + to_string_test ("485824484771564977316.86962509957823510727432", "4.8582448477156497731686962509957823510727432e+20"); + to_string_test ("-18257504137.6607202783942428100860671852104", "-1.82575041376607202783942428100860671852104e+10"); + to_string_test ("1207719.135268928473061847066565333537875194537162", "1.207719135268928473061847066565333537875194537162e+6"); + to_string_test ("-3", "-3e+0"); + to_string_test ("-31621064264859.749410561631439237598765358", "-3.1621064264859749410561631439237598765358e+13"); + to_string_test ("-54.47464", "-5.447464e+1"); + to_string_test ("-11.5", "-1.15e+1"); + to_string_test ("0.569182274127", "5.69182274127e-1"); + to_string_test ("5", "5e+0"); + to_string_test ("381.62010663178723664752926995655828448751389488899637765782586264", "3.8162010663178723664752926995655828448751389488899637765782586264e+2"); + to_string_test ("18668065.48", "1.866806548e+7"); + to_string_test ("223807275510855910.6988025822523469037817173438124946663186", "2.238072755108559106988025822523469037817173438124946663186e+17"); + to_string_test ("15173665864491.945786", "1.5173665864491945786e+13"); + to_string_test ("-251.56445330169957142953167749737702776442537230366599", "-2.5156445330169957142953167749737702776442537230366599e+2"); + to_string_test ("0.0000747343483945109530854605989856965703549253246797858230222012", "7.47343483945109530854605989856965703549253246797858230222012e-5"); + to_string_test ("-3095291.956", "-3.095291956e+6"); + to_string_test ("8590.419179188907071273310109584707017019342529023922994463304837665", "8.590419179188907071273310109584707017019342529023922994463304837665e+3"); + to_string_test ("-0.000002681085217615878927905287650187567705621444210005590775053806026369", "-2.681085217615878927905287650187567705621444210005590775053806026369e-6"); + to_string_test ("0.00000248044514182", "2.48044514182e-6"); + to_string_test ("-1.38339", "-1.38339e+0"); + to_string_test ("265815510006244.257349767564387359753901857238", "2.65815510006244257349767564387359753901857238e+14"); + to_string_test ("288046583927539014.556402201511015", "2.88046583927539014556402201511015e+17"); + to_string_test ("6459.1", "6.4591e+3"); + to_string_test ("446.1824", "4.461824e+2"); + to_string_test ("2.616635870641879", "2.616635870641879e+0"); + to_string_test ("-4085948139.5804686188882798", "-4.0859481395804686188882798e+9"); + to_string_test ("45458990.221135", "4.5458990221135e+7"); + to_string_test ("229849.695421", "2.29849695421e+5"); + to_string_test ("7.85927694849110186784769009469", "7.85927694849110186784769009469e+0"); + to_string_test ("697498231.03150555927", "6.9749823103150555927e+8"); + to_string_test ("-1090915789387.96911391171700684", "-1.09091578938796911391171700684e+12"); + to_string_test ("-0.120429337172718", "-1.20429337172718e-1"); + to_string_test ("913792605266.5301219", "9.137926052665301219e+11"); + to_string_test ("0.0873642688709634", "8.73642688709634e-2"); + to_string_test ("-21603884141633471.858655613534445827759992354862479336548698767", "-2.1603884141633471858655613534445827759992354862479336548698767e+16"); + to_string_test ("12.91982044990511129067920212999349413176623775307358115384657666844065", "1.291982044990511129067920212999349413176623775307358115384657666844065e+1"); + to_string_test ("0.0019086760429407683234932444875158352387775521972728951440817006035554", "1.9086760429407683234932444875158352387775521972728951440817006035554e-3"); + to_string_test ("-78330.1825415413331166762813674735976496678", "-7.83301825415413331166762813674735976496678e+4"); + to_string_test ("4560775.849", "4.560775849e+6"); + to_string_test ("199832274592037770879.2236", "1.998322745920377708792236e+20"); + to_string_test ("-20.74300801013397685207589423690045359233", "-2.074300801013397685207589423690045359233e+1"); + to_string_test ("-6505752.09135542952252455354085623", "-6.50575209135542952252455354085623e+6"); + to_string_test ("0", "0e+0"); + to_string_test ("-218837142747859.23497622147534484506798006756785404226264059321898534689", "-2.1883714274785923497622147534484506798006756785404226264059321898534689e+14"); + to_string_test ("992610690.16", "9.9261069016e+8"); + to_string_test ("-0.0000364256683518569714198080887356701966951222545151062855406806097704164", "-3.64256683518569714198080887356701966951222545151062855406806097704164e-5"); + to_string_test ("0.00000928774725799597452720977358774052299631189443", "9.28774725799597452720977358774052299631189443e-6"); + to_string_test ("-0.005434426149751121309048951009022312656054485654112967897440271106066", "-5.434426149751121309048951009022312656054485654112967897440271106066e-3"); + to_string_test ("2.1714946", "2.1714946e+0"); + to_string_test ("0.000006781622347012320873794747282794246412400005134449059641940179", "6.781622347012320873794747282794246412400005134449059641940179e-6"); + to_string_test ("2.13", "2.13e+0"); + to_string_test ("-28.0725174096", "-2.80725174096e+1"); + to_string_test ("0.000050052572229552162438382075420392610439202759423472256249007310645", "5.0052572229552162438382075420392610439202759423472256249007310645e-5"); + to_string_test ("-28190608186955.67000386761846269433359128370160432", "-2.819060818695567000386761846269433359128370160432e+13"); + to_string_test ("6115836580.06931776667946472", "6.11583658006931776667946472e+9"); + to_string_test ("3127055.98", "3.12705598e+6"); + to_string_test ("-0.00000278086669318447179655304", "-2.78086669318447179655304e-6"); + to_string_test ("-19854.337795671507151567789137457495269813344795660135609697504472", "-1.9854337795671507151567789137457495269813344795660135609697504472e+4"); + to_string_test ("16557108569.03005723004894135118172469151458", "1.655710856903005723004894135118172469151458e+10"); + to_string_test ("8447179435644004778.514210275024009", "8.447179435644004778514210275024009e+18"); + to_string_test ("33024.01969986989181558", "3.302401969986989181558e+4"); + to_string_test ("-0.00000702495553976446537245326608574770080797449009928127905658985785323597741349", "-7.02495553976446537245326608574770080797449009928127905658985785323597741349e-6"); + to_string_test ("0.0001097914385362789240230012522029502986760487614749277", "1.097914385362789240230012522029502986760487614749277e-4"); + to_string_test ("1.67669241", "1.67669241e+0"); + to_string_test ("5.0598473256548127", "5.0598473256548127e+0"); + to_string_test ("146398550409534.32", "1.4639855040953432e+14"); + to_string_test ("-55339611176.494079841526043079614", "-5.5339611176494079841526043079614e+10"); + to_string_test ("602222732065006149.6", "6.022227320650061496e+17"); + to_string_test ("-4600698101679072.64824427288266592988058099344507821735484", "-4.60069810167907264824427288266592988058099344507821735484e+15"); + to_string_test ("0.13255667462360854362969930852", "1.3255667462360854362969930852e-1"); + to_string_test ("-61525865178604724426.398", "-6.1525865178604724426398e+19"); + to_string_test ("15187995032.00996401112180591408712891586", "1.518799503200996401112180591408712891586e+10"); + to_string_test ("159950633.980480337780026144119910434350827825760366", "1.59950633980480337780026144119910434350827825760366e+8"); + to_string_test ("-764.8", "-7.648e+2"); + to_string_test ("-31.662121934648835053529869160168892970483", "-3.1662121934648835053529869160168892970483e+1"); + to_string_test ("0.03666727306518206862708073", "3.666727306518206862708073e-2"); + to_string_test ("-0.00028843261916109", "-2.8843261916109e-4"); + to_string_test ("478.49", "4.7849e+2"); + to_string_test ("-62.627190076223933399553699369552867555985635522", "-6.2627190076223933399553699369552867555985635522e+1"); + to_string_test ("156548216895997686.578615255", "1.56548216895997686578615255e+17"); + to_string_test ("8388218102792.292405470516", "8.388218102792292405470516e+12"); + to_string_test ("0.0036317133235", "3.6317133235e-3"); + to_string_test ("4514788796646646.42224023997023", "4.51478879664664642224023997023e+15"); + to_string_test ("41201.30645135922512", "4.120130645135922512e+4"); + to_string_test ("0.004502698911439375781698700519896", "4.502698911439375781698700519896e-3"); + to_string_test ("1", "1e+0"); + to_string_test ("3555.0291", "3.5550291e+3"); + to_string_test ("-3591377193611873751.3353113792", "-3.5913771936118737513353113792e+18"); + to_string_test ("-27081149345253.645950476439003274", "-2.7081149345253645950476439003274e+13"); + to_string_test ("633675232487518.576287395312347", "6.33675232487518576287395312347e+14"); + to_string_test ("547.912745337206643", "5.47912745337206643e+2"); + to_string_test ("-1369789020071.5871864408090320565841144805", "-1.3697890200715871864408090320565841144805e+12"); + to_string_test ("14.37", "1.437e+1"); + to_string_test ("-352890772277830924312.60265470726", "-3.5289077227783092431260265470726e+20"); + to_string_test ("-0.8263363420562821806512025997732471776", "-8.263363420562821806512025997732471776e-1"); + to_string_test ("-3.90321003458651663108762157", "-3.90321003458651663108762157e+0"); + to_string_test ("14353.2834182", "1.43532834182e+4"); + to_string_test ("-0.0000071527952119", "-7.1527952119e-6"); + to_string_test ("3237586.98790145745425063520074214062128950915646430035937338199676", "3.23758698790145745425063520074214062128950915646430035937338199676e+6"); + to_string_test ("-20.891434", "-2.0891434e+1"); + to_string_test ("7869302.9900499", "7.8693029900499e+6"); + to_string_test ("-146423440.13", "-1.4642344013e+8"); + to_string_test ("0.0001507", "1.507e-4"); + to_string_test ("-0.00026117760659270894594481410304037863053", "-2.6117760659270894594481410304037863053e-4"); + to_string_test ("2123550805855611.6796631", "2.1235508058556116796631e+15"); + to_string_test ("-2267146878608434212.0596889", "-2.2671468786084342120596889e+18"); + to_string_test ("-39589210486412.3716342418324338321", "-3.95892104864123716342418324338321e+13"); + to_string_test ("-11323534649360.42945605732789", "-1.132353464936042945605732789e+13"); + to_string_test ("-253480938953960.03129886270901867817052499", "-2.5348093895396003129886270901867817052499e+14"); + to_string_test ("878485741141478152036.782", "8.78485741141478152036782e+20"); + to_string_test ("40.72", "4.072e+1"); + to_string_test ("0.00000419651493687959734699558527", "4.19651493687959734699558527e-6"); + to_string_test ("-5539611145832.73638919574913889280760421", "-5.53961114583273638919574913889280760421e+12"); + to_string_test ("988848038030744178.1829136155908503186753749975178", "9.888480380307441781829136155908503186753749975178e+17"); + to_string_test ("-49.655", "-4.9655e+1"); + to_string_test ("-92019024363681427.51", "-9.201902436368142751e+16"); + to_string_test ("0.40179862349934895209970133009437007843603241944946845532608648027", "4.0179862349934895209970133009437007843603241944946845532608648027e-1"); + to_string_test ("0.00027323435290229", "2.7323435290229e-4"); + to_string_test ("-287.307413075519263341", "-2.87307413075519263341e+2"); + to_string_test ("489173.689099058495720286", "4.89173689099058495720286e+5"); + to_string_test ("0.00000147215454893076048653261289571696023288538969518393799203798", "1.47215454893076048653261289571696023288538969518393799203798e-6"); + to_string_test ("0.000074449450587117231184246544545675658438023541362", "7.4449450587117231184246544545675658438023541362e-5"); + to_string_test ("1.169311569", "1.169311569e+0"); + to_string_test ("-21949352412.9904826825522111998359879599288366014040193774185970714131093", "-2.19493524129904826825522111998359879599288366014040193774185970714131093e+10"); + to_string_test ("-218879937679551392.189024", "-2.18879937679551392189024e+17"); + to_string_test ("1541540107.1145132154683674", "1.5415401071145132154683674e+9"); + to_string_test ("-7509.580144660349789159418324905916726", "-7.509580144660349789159418324905916726e+3"); + to_string_test ("798968.361269712405243689738", "7.98968361269712405243689738e+5"); + to_string_test ("-23914810.356", "-2.3914810356e+7"); + to_string_test ("-0.0000011686639705418429850704560989878569387703202111178051017322584", "-1.1686639705418429850704560989878569387703202111178051017322584e-6"); + to_string_test ("66398146.86494006855852173107370871122679", "6.639814686494006855852173107370871122679e+7"); + to_string_test ("-13061.00785831952599100135398795", "-1.306100785831952599100135398795e+4"); + to_string_test ("24386.12747311816804599078050671055594988810784455859", "2.438612747311816804599078050671055594988810784455859e+4"); + to_string_test ("23.1482440256844245825852224454660373564879353266268453019435951916384499", "2.31482440256844245825852224454660373564879353266268453019435951916384499e+1"); + to_string_test ("-12.066", "-1.2066e+1"); + to_string_test ("3824249690.744942003288636719934967371432", "3.824249690744942003288636719934967371432e+9"); + to_string_test ("-4035.15351126", "-4.03515351126e+3"); + to_string_test ("-186385.04210983462432868870963586536412803139826621335", "-1.8638504210983462432868870963586536412803139826621335e+5"); + to_string_test ("-0.0008554911175315826215076839473647265", "-8.554911175315826215076839473647265e-4"); + to_string_test ("0.00126070187425794865401", "1.26070187425794865401e-3"); + to_string_test ("0.0016431437584973628209451788", "1.6431437584973628209451788e-3"); + to_string_test ("-78797.344273597515126427785281070901556", "-7.8797344273597515126427785281070901556e+4"); + to_string_test ("0.000027197516733214969419979043489", "2.7197516733214969419979043489e-5"); + to_string_test ("34231.6666792804527911832867793479095", "3.42316666792804527911832867793479095e+4"); + to_string_test ("-0.0016026339968302068544304748262863", "-1.6026339968302068544304748262863e-3"); + to_string_test ("1.1489744061887", "1.1489744061887e+0"); + to_string_test ("34.802794480472992829077222920294423597551", "3.4802794480472992829077222920294423597551e+1"); + to_string_test ("-0.13968357011235485005920820153289818014836286594729971084655744864563", "-1.3968357011235485005920820153289818014836286594729971084655744864563e-1"); + to_string_test ("36782356.605705226582252036652683058", "3.6782356605705226582252036652683058e+7"); + to_string_test ("-0.0000041171213382692649586879633642089089959393863795", "-4.1171213382692649586879633642089089959393863795e-6"); + to_string_test ("19.387350669785", "1.9387350669785e+1"); + to_string_test ("-22867.530537", "-2.2867530537e+4"); + to_string_test ("-7115.37994036808268478263377221529848", "-7.11537994036808268478263377221529848e+3"); + to_string_test ("-1837.414453982931593965797407518506", "-1.837414453982931593965797407518506e+3"); + to_string_test ("-0.00038303400838648252101595120613261049796436260145181784", "-3.8303400838648252101595120613261049796436260145181784e-4"); + to_string_test ("199834393757638560.48365651429302047", "1.9983439375763856048365651429302047e+17"); + to_string_test ("64706.4911792715", "6.47064911792715e+4"); + to_string_test ("-2", "-2e+0"); + to_string_test ("-0.000001886004002403469961362572546672", "-1.886004002403469961362572546672e-6"); + to_string_test ("-0.0000310103946215031028586927929479250572359767776057431945832", "-3.10103946215031028586927929479250572359767776057431945832e-5"); + to_string_test ("-55060735.322112208733188720279601757782733608564", "-5.5060735322112208733188720279601757782733608564e+7"); + to_string_test ("-1.1", "-1.1e+0"); + to_string_test ("54839153693259579.9795", "5.48391536932595799795e+16"); + to_string_test ("0.0041759310069240548770474304055254667169662955214058456572", "4.1759310069240548770474304055254667169662955214058456572e-3"); + to_string_test ("0.0001955365160381498364947545", "1.955365160381498364947545e-4"); + to_string_test ("3.27323", "3.27323e+0"); + to_string_test ("70.6", "7.06e+1"); + to_string_test ("-0.026508636799607573347975491", "-2.6508636799607573347975491e-2"); + to_string_test ("25188781.150611", "2.5188781150611e+7"); + to_string_test ("-0.018894991938338647856502400607763862237528708988761254099175589727552", "-1.8894991938338647856502400607763862237528708988761254099175589727552e-2"); + to_string_test ("617807816691763257.508357656061659471644432794446692740861", "6.17807816691763257508357656061659471644432794446692740861e+17"); + to_string_test ("73183170035928.81575660902505", "7.318317003592881575660902505e+13"); + to_string_test ("0.0000164455107650189184357371", "1.64455107650189184357371e-5"); + to_string_test ("-0.93599961", "-9.3599961e-1"); + to_string_test ("14734.9184214899580591121", "1.47349184214899580591121e+4"); + to_string_test ("15946.29165654625272129", "1.594629165654625272129e+4"); + to_string_test ("122966441.290185145609340122412", "1.22966441290185145609340122412e+8"); + to_string_test ("-129.654371704230659398725613745012717737573933658257", "-1.29654371704230659398725613745012717737573933658257e+2"); + to_string_test ("0.0001761377819621266803778554313207263082401264088237246981620072", "1.761377819621266803778554313207263082401264088237246981620072e-4"); + to_string_test ("-7", "-7e+0"); + to_string_test ("-15309785476025143.756408973719659838", "-1.5309785476025143756408973719659838e+16"); + to_string_test ("-3670228393526736.52", "-3.67022839352673652e+15"); + to_string_test ("0.000731", "7.31e-4"); + to_string_test ("5.6183847424066950657818656796546070156921299115031071", "5.6183847424066950657818656796546070156921299115031071e+0"); + to_string_test ("-1.1", "-1.1e+0"); + to_string_test ("20.7271796351", "2.07271796351e+1"); + to_string_test ("-3.7", "-3.7e+0"); + to_string_test ("-24017356010538845.10861917433652302066375691548110464881649", "-2.401735601053884510861917433652302066375691548110464881649e+16"); + to_string_test ("-0.00952946836809535253950074785587127807727767", "-9.52946836809535253950074785587127807727767e-3"); + to_string_test ("0.00012968834094598251424610958860395289575847", "1.2968834094598251424610958860395289575847e-4"); + to_string_test ("-0.3459913", "-3.459913e-1"); + to_string_test ("-158067352.4", "-1.580673524e+8"); + to_string_test ("-0.000014790343125179690326739", "-1.4790343125179690326739e-5"); + to_string_test ("0.0193943717016794836655634658134262659293302509313781667025177208", "1.93943717016794836655634658134262659293302509313781667025177208e-2"); + to_string_test ("113542357.4117024541705333527869936887227315756680969573589892339805447390658", "1.135423574117024541705333527869936887227315756680969573589892339805447390658e+8"); + to_string_test ("-0.154220377", "-1.54220377e-1"); + to_string_test ("0.0427523", "4.27523e-2"); + to_string_test ("1085202870092846001.489480354353962808914322", "1.085202870092846001489480354353962808914322e+18"); + to_string_test ("-52122.564", "-5.2122564e+4"); + to_string_test ("-69", "-6.9e+1"); + to_string_test ("45453557279.70926480053", "4.545355727970926480053e+10"); + to_string_test ("-8459227194561.009568405224959256810337570435527435", "-8.459227194561009568405224959256810337570435527435e+12"); + to_string_test ("0.16711094626502869265467433959064784065092439761523318705", "1.6711094626502869265467433959064784065092439761523318705e-1"); + to_string_test ("758439672656.17494756140912792", "7.5843967265617494756140912792e+11"); + to_string_test ("-0.0000108140557920934375827728189164762", "-1.08140557920934375827728189164762e-5"); + to_string_test ("1134838730.3350646724840481462521912", "1.1348387303350646724840481462521912e+9"); + to_string_test ("0.001816435719305977", "1.816435719305977e-3"); + to_string_test ("-0.0940451841857620585410399891420224321683214142", "-9.40451841857620585410399891420224321683214142e-2"); + to_string_test ("0.7088984300959367781273668039450998309536026408287804482", "7.088984300959367781273668039450998309536026408287804482e-1"); + to_string_test ("10.11847", "1.011847e+1"); + to_string_test ("27512.990770009509682231716955970446038275546", "2.7512990770009509682231716955970446038275546e+4"); + to_string_test ("-262611924651.02616702076749905814718436605807480522286301086176286", "-2.6261192465102616702076749905814718436605807480522286301086176286e+11"); + to_string_test ("18176137775866581965.65220583044244674108496842671900180386069435393", "1.817613777586658196565220583044244674108496842671900180386069435393e+19"); + to_string_test ("3", "3e+0"); + to_string_test ("39632.958108", "3.9632958108e+4"); + to_string_test ("0.00001549607612980463131760552343556214", "1.549607612980463131760552343556214e-5"); + to_string_test ("-0.0002821935547414936046805564857061667284704668", "-2.821935547414936046805564857061667284704668e-4"); + to_string_test ("-551423700538313.88650175935008238", "-5.5142370053831388650175935008238e+14"); + to_string_test ("-301262672059247735962.5446352061744371", "-3.012626720592477359625446352061744371e+20"); + to_string_test ("9798548.38", "9.79854838e+6"); + to_string_test ("614106949056.88254499703107", "6.1410694905688254499703107e+11"); + to_string_test ("-843417433172646.11103502049784353019792165900544779976", "-8.4341743317264611103502049784353019792165900544779976e+14"); + to_string_test ("71772998054220350.6199053786417894454778759434551", "7.17729980542203506199053786417894454778759434551e+16"); + to_string_test ("26127.67128955864044319543855168943866783836987763512222412737570813263582", "2.612767128955864044319543855168943866783836987763512222412737570813263582e+4"); + to_string_test ("0.2174051275943", "2.174051275943e-1"); + to_string_test ("14819984281.646113452644795447671498797132793211504582", "1.4819984281646113452644795447671498797132793211504582e+10"); + to_string_test ("-6.1055742757466659414848358753699291", "-6.1055742757466659414848358753699291e+0"); + to_string_test ("-0.00278009647645774520888672", "-2.78009647645774520888672e-3"); + to_string_test ("-8", "-8e+0"); + to_string_test ("0.0001932756987116", "1.932756987116e-4"); + to_string_test ("-1427.55676936", "-1.42755676936e+3"); + to_string_test ("-4308265.450990136180314017965687867619821782418765402651680879802", "-4.308265450990136180314017965687867619821782418765402651680879802e+6"); + to_string_test ("-14764.295551728", "-1.4764295551728e+4"); + to_string_test ("32407196483712.858", "3.2407196483712858e+13"); + to_string_test ("-9031613841.5599312282178947560345781775076023374702435675", "-9.0316138415599312282178947560345781775076023374702435675e+9"); + to_string_test ("1.181276663040786318554659584401553323591140011739928518544", "1.181276663040786318554659584401553323591140011739928518544e+0"); + to_string_test ("-340504354335.733698674534076124", "-3.40504354335733698674534076124e+11"); + to_string_test ("124.62", "1.2462e+2"); + to_string_test ("1224195207.8161779474322009098689115570439412639424248684652463172151", "1.2241952078161779474322009098689115570439412639424248684652463172151e+9"); + to_string_test ("1119.12718", "1.11912718e+3"); + to_string_test ("0.000027598900625749819216061372512462013369951813779259177038113519776430637", "2.7598900625749819216061372512462013369951813779259177038113519776430637e-5"); + to_string_test ("-0.2378864924178403430225587451225421820351977716909", "-2.378864924178403430225587451225421820351977716909e-1"); + to_string_test ("1", "1e+0"); + to_string_test ("3723294.2192478", "3.7232942192478e+6"); + to_string_test ("-5505758244567677.6279234027709813", "-5.5057582445676776279234027709813e+15"); + to_string_test ("-67.0310470315", "-6.70310470315e+1"); + to_string_test ("-151649585771.1467103869359504134", "-1.516495857711467103869359504134e+11"); + to_string_test ("0.0000306096040904601918096649004656293448975968675516", "3.06096040904601918096649004656293448975968675516e-5"); + to_string_test ("721.283", "7.21283e+2"); + to_string_test ("-48637044145.4786442129095136", "-4.86370441454786442129095136e+10"); + to_string_test ("-2572238801890.2521824", "-2.5722388018902521824e+12"); + to_string_test ("-5316372473.4757358803014", "-5.3163724734757358803014e+9"); + to_string_test ("0.00118776973921526839247261123686159477417394701902220530418", "1.18776973921526839247261123686159477417394701902220530418e-3"); + to_string_test ("-12290.8999158558", "-1.22908999158558e+4"); + to_string_test ("-0.000486", "-4.86e-4"); + to_string_test ("-0.09334438126859174540560942334639938787877", "-9.334438126859174540560942334639938787877e-2"); + to_string_test ("-4.4317453027359230155416285", "-4.4317453027359230155416285e+0"); + to_string_test ("-107574728665451963465.18", "-1.0757472866545196346518e+20"); + to_string_test ("-31471643511178362029.433469935596411784231062585793111687", "-3.1471643511178362029433469935596411784231062585793111687e+19"); + to_string_test ("-0.00689091184682954564861", "-6.89091184682954564861e-3"); + to_string_test ("897286.69761140449", "8.9728669761140449e+5"); + to_string_test ("0.0197267269633964192530888893336737249549912519516905709516379279382", "1.97267269633964192530888893336737249549912519516905709516379279382e-2"); + to_string_test ("-9085745140296646707.595729912921842871369180815000510589645209971992", "-9.085745140296646707595729912921842871369180815000510589645209971992e+18"); + to_string_test ("-0.1206187959034199776275871", "-1.206187959034199776275871e-1"); + to_string_test ("-7303259015078.2453854196594173144674112623228862616652102923", "-7.3032590150782453854196594173144674112623228862616652102923e+12"); + to_string_test ("0.0124798567886469061363033042342515652221", "1.24798567886469061363033042342515652221e-2"); + to_string_test ("-113159474049511294445.875473787888549291049337833665002583025055", "-1.13159474049511294445875473787888549291049337833665002583025055e+20"); + to_string_test ("-1767673140861267.59335300185", "-1.76767314086126759335300185e+15"); + to_string_test ("-362026.3406455024496951023882", "-3.620263406455024496951023882e+5"); + to_string_test ("-0.000091257315403724519002125296591299372846887214", "-9.1257315403724519002125296591299372846887214e-5"); + to_string_test ("-1433099765.1252592306982244284995211", "-1.4330997651252592306982244284995211e+9"); + to_string_test ("1.2", "1.2e+0"); + to_string_test ("0.000001078352855066736570899140253900227918125178107068596442799409510188996", "1.078352855066736570899140253900227918125178107068596442799409510188996e-6"); + to_string_test ("0.2046210986820378299960504393721912824755038800128253512921731", "2.046210986820378299960504393721912824755038800128253512921731e-1"); + to_string_test ("0.04759871903104957602393025435745858", "4.759871903104957602393025435745858e-2"); + to_string_test ("3941893.3", "3.9418933e+6"); + to_string_test ("36459.755727713692495264456", "3.6459755727713692495264456e+4"); + to_string_test ("-0.9863195151850363629459822385967", "-9.863195151850363629459822385967e-1"); + to_string_test ("-0.0047144819909257048872723283151182", "-4.7144819909257048872723283151182e-3"); + to_string_test ("-0.0007825511268515549890552260085443398197863467224984", "-7.825511268515549890552260085443398197863467224984e-4"); + to_string_test ("0.1786123901436175166432952958", "1.786123901436175166432952958e-1"); + to_string_test ("-0.0000016969302866616445296068120590400816410860690384878", "-1.6969302866616445296068120590400816410860690384878e-6"); + to_string_test ("0.079976989296930785672456071832470472475914984294362190190730923812662757", "7.9976989296930785672456071832470472475914984294362190190730923812662757e-2"); + to_string_test ("16881328018550470208.942960851501308073802548", "1.6881328018550470208942960851501308073802548e+19"); + to_string_test ("-5951003297737895799.841739942862465868357642531643122454214301", "-5.951003297737895799841739942862465868357642531643122454214301e+18"); + to_string_test ("-4037564747.647", "-4.037564747647e+9"); + to_string_test ("44119091159998694.71442", "4.411909115999869471442e+16"); + to_string_test ("1561110432.12799413048007605058613974053266", "1.56111043212799413048007605058613974053266e+9"); + to_string_test ("0.000003007102939303342333402218226698428440002400951915007001166", "3.007102939303342333402218226698428440002400951915007001166e-6"); + to_string_test ("-55847888288344304.865241671241495088591034962915279623356071", "-5.5847888288344304865241671241495088591034962915279623356071e+16"); + to_string_test ("1.21112353237213949208471024255232051", "1.21112353237213949208471024255232051e+0"); + to_string_test ("-791987705442.0227619406612893", "-7.919877054420227619406612893e+11"); + to_string_test ("20.8", "2.08e+1"); + to_string_test ("254033508236704262.8992302274070247770891804917317", "2.540335082367042628992302274070247770891804917317e+17"); + to_string_test ("-102.2687519172273078355962447671534215318126300048752740587224098724123", "-1.022687519172273078355962447671534215318126300048752740587224098724123e+2"); + to_string_test ("0.014484528239940798124452074106184521879025484379395881", "1.4484528239940798124452074106184521879025484379395881e-2"); + to_string_test ("2842598.4491035879", "2.8425984491035879e+6"); + to_string_test ("-67549074172216.85407160955443945802615", "-6.754907417221685407160955443945802615e+13"); + to_string_test ("-293288764.9432794053102151638", "-2.932887649432794053102151638e+8"); + to_string_test ("-0.0062466936313091302417170977289146375265791892052", "-6.2466936313091302417170977289146375265791892052e-3"); + to_string_test ("69487883846161660.509624572036661", "6.9487883846161660509624572036661e+16"); + to_string_test ("-2", "-2e+0"); + to_string_test ("-0.00054", "-5.4e-4"); + to_string_test ("57.708753151244573709600243187251875445184", "5.7708753151244573709600243187251875445184e+1"); + to_string_test ("-0.00000119509808657632201069297269593462344072593188585", "-1.19509808657632201069297269593462344072593188585e-6"); + to_string_test ("78514461833.1571270663922179997230597716173376662749823", "7.85144618331571270663922179997230597716173376662749823e+10"); + to_string_test ("-618.03100300670845771157553", "-6.1803100300670845771157553e+2"); + to_string_test ("-0.11598629818600582366847595835479040075597499305328943857503067559", "-1.1598629818600582366847595835479040075597499305328943857503067559e-1"); + to_string_test ("0.00224964517052591032873552760076273924665415", "2.24964517052591032873552760076273924665415e-3"); + to_string_test ("10725742038533.46395717314609612", "1.072574203853346395717314609612e+13"); + to_string_test ("7591352.1076282059615946593668291506154510833280005974236964814275", "7.5913521076282059615946593668291506154510833280005974236964814275e+6"); + to_string_test ("0.135379403", "1.35379403e-1"); + to_string_test ("760337.442", "7.60337442e+5"); + to_string_test ("0.00058411840245061832782892155140034320223933924", "5.8411840245061832782892155140034320223933924e-4"); + to_string_test ("319997434.346732329628912176299", "3.19997434346732329628912176299e+8"); + to_string_test ("-2.669081046235095182496478130547267975025950071921248479294750262645", "-2.669081046235095182496478130547267975025950071921248479294750262645e+0"); + to_string_test ("0.32923741648480183876", "3.2923741648480183876e-1"); + to_string_test ("55686749246728.336621021460055199967992", "5.5686749246728336621021460055199967992e+13"); + to_string_test ("4260394830751775145.907785939337", "4.260394830751775145907785939337e+18"); + to_string_test ("0.00058575109", "5.8575109e-4"); + to_string_test ("-24466.8906205389026747706267675206851135617876689626802954345221098167623", "-2.44668906205389026747706267675206851135617876689626802954345221098167623e+4"); + to_string_test ("-709382861315295.5996571957727269594", "-7.093828613152955996571957727269594e+14"); + to_string_test ("-84705935480446.9473914181433", "-8.47059354804469473914181433e+13"); + to_string_test ("819079787657398.2675812804332223869667707898614571098025213849", "8.190797876573982675812804332223869667707898614571098025213849e+14"); + to_string_test ("-0.000033545119955625859536337261247", "-3.3545119955625859536337261247e-5"); + to_string_test ("2.085565771", "2.085565771e+0"); + to_string_test ("33685255.01", "3.368525501e+7"); + to_string_test ("-2979.6281804", "-2.9796281804e+3"); + to_string_test ("-303466.3743338129", "-3.034663743338129e+5"); + to_string_test ("2399645.6206920447867357096707234643063930403917610472", "2.3996456206920447867357096707234643063930403917610472e+6"); + to_string_test ("30512072102832075901.09815665631", "3.051207210283207590109815665631e+19"); + to_string_test ("0.1244547630367243681193698926963558579", "1.244547630367243681193698926963558579e-1"); + to_string_test ("-0.000025", "-2.5e-5"); + to_string_test ("-0.00000387300446776730031837", "-3.87300446776730031837e-6"); + to_string_test ("-3141685265.9", "-3.1416852659e+9"); + to_string_test ("-1015.63657", "-1.01563657e+3"); + to_string_test ("-3140896193615.468892710764300529263282372823931548225985252292756193730991", "-3.140896193615468892710764300529263282372823931548225985252292756193730991e+12"); + to_string_test ("-342518749.376998", "-3.42518749376998e+8"); + to_string_test ("-11396.7", "-1.13967e+4"); + to_string_test ("0.0001838944804619", "1.838944804619e-4"); + to_string_test ("2.6", "2.6e+0"); + to_string_test ("-0.0001889410809224060217135271843", "-1.889410809224060217135271843e-4"); + to_string_test ("65.9219184", "6.59219184e+1"); + to_string_test ("-76589629724495621800.5726446", "-7.65896297244956218005726446e+19"); + to_string_test ("-5705.557", "-5.705557e+3"); + to_string_test ("66743.9228199198730325761372147436413412", "6.67439228199198730325761372147436413412e+4"); + to_string_test ("-276692974283735.635166475417554126625507482799949004176929579144", "-2.76692974283735635166475417554126625507482799949004176929579144e+14"); + to_string_test ("910289.71137606239294325630961514165048773642477", "9.1028971137606239294325630961514165048773642477e+5"); + to_string_test ("-0.003765993413779666", "-3.765993413779666e-3"); + to_string_test ("0.00045881406314145316229", "4.5881406314145316229e-4"); + to_string_test ("0.000327718523270256955212608280725886870087594582134246261128222025053", "3.27718523270256955212608280725886870087594582134246261128222025053e-4"); + to_string_test ("138961.4542815", "1.389614542815e+5"); + to_string_test ("2.5098", "2.5098e+0"); + to_string_test ("448844063459829899379.2627682", "4.488440634598298993792627682e+20"); + to_string_test ("-346607997015501569044.86", "-3.4660799701550156904486e+20"); + to_string_test ("497555865514.3258452484621441", "4.975558655143258452484621441e+11"); + to_string_test ("613695.52408485402", "6.1369552408485402e+5"); + to_string_test ("-2291443086470.412635620629728511864", "-2.291443086470412635620629728511864e+12"); + to_string_test ("1336.4003426285098", "1.3364003426285098e+3"); + to_string_test ("0.003798035051087452366417482608781759250533001029858715488014309401340765", "3.798035051087452366417482608781759250533001029858715488014309401340765e-3"); + to_string_test ("1087205.5496041394985269591889885762299", "1.0872055496041394985269591889885762299e+6"); + to_string_test ("1872605076211495.42428231075", "1.87260507621149542428231075e+15"); + to_string_test ("23.07", "2.307e+1"); + to_string_test ("-12.582985395776722428", "-1.2582985395776722428e+1"); + to_string_test ("3.227", "3.227e+0"); + to_string_test ("-225575588286911.7100970797432948551", "-2.255755882869117100970797432948551e+14"); + to_string_test ("-0.0001469439295087278762772093799427071737626195283246829284494882708", "-1.469439295087278762772093799427071737626195283246829284494882708e-4"); + to_string_test ("-29932162823.48", "-2.993216282348e+10"); + to_string_test ("0.00000206944808232414578854574331051", "2.06944808232414578854574331051e-6"); + to_string_test ("26.8793", "2.68793e+1"); + to_string_test ("-1488326590691960451.6", "-1.4883265906919604516e+18"); + to_string_test ("0.00605", "6.05e-3"); + to_string_test ("-0.00830238387765944110622350441919871", "-8.30238387765944110622350441919871e-3"); + to_string_test ("-52506.14124", "-5.250614124e+4"); + to_string_test ("4312.7252426581254371982029", "4.3127252426581254371982029e+3"); + to_string_test ("12143292068.81075135630101492", "1.214329206881075135630101492e+10"); + to_string_test ("4933672204.6654294524881069977955050371687512110143094601085142859763675", "4.9336722046654294524881069977955050371687512110143094601085142859763675e+9"); + to_string_test ("0.0253845928061595101414943", "2.53845928061595101414943e-2"); + to_string_test ("0.04562403666212652405", "4.562403666212652405e-2"); + to_string_test ("-1.57938213", "-1.57938213e+0"); + to_string_test ("0.0012878658618462071626559", "1.2878658618462071626559e-3"); + to_string_test ("11763.7953454890805125069825497313330552079913", "1.17637953454890805125069825497313330552079913e+4"); + to_string_test ("-519071565674013084.2611", "-5.190715656740130842611e+17"); + to_string_test ("-775188599801.6", "-7.751885998016e+11"); + to_string_test ("-30.084887956777177722", "-3.0084887956777177722e+1"); + to_string_test ("94832470785207548599.67992871", "9.483247078520754859967992871e+19"); + to_string_test ("0", "0e+0"); + to_string_test ("-616275944415819696013.2602703308667690013023817761903225173", "-6.162759444158196960132602703308667690013023817761903225173e+20"); + to_string_test ("0.000321408291220652310916288991857553443674150442809554094732922147", "3.21408291220652310916288991857553443674150442809554094732922147e-4"); + to_string_test ("15802596862708758325.17480858", "1.580259686270875832517480858e+19"); + to_string_test ("-114.173689050215691920564150090469271", "-1.14173689050215691920564150090469271e+2"); + to_string_test ("0.00019088007970084191568800513166969901510303536098212624726153383274", "1.9088007970084191568800513166969901510303536098212624726153383274e-4"); + to_string_test ("545848247156447694.6984243876166001697519634919415844932835780995", "5.458482471564476946984243876166001697519634919415844932835780995e+17"); + to_string_test ("-0.0051", "-5.1e-3"); + to_string_test ("309.50165777266482496347070821", "3.0950165777266482496347070821e+2"); + to_string_test ("-1072.215707969991971767213276642022682961756602343287936341684", "-1.072215707969991971767213276642022682961756602343287936341684e+3"); + to_string_test ("0.0065374581634020855090532059615401", "6.5374581634020855090532059615401e-3"); + to_string_test ("-1388719742558148.5032", "-1.3887197425581485032e+15"); + to_string_test ("-187602.7661839329168039", "-1.876027661839329168039e+5"); + to_string_test ("26.400917323220285", "2.6400917323220285e+1"); + to_string_test ("-170728931943.641200548180472865801740274276", "-1.70728931943641200548180472865801740274276e+11"); + to_string_test ("51014.685022932885073621811424", "5.1014685022932885073621811424e+4"); + to_string_test ("-18.21642915281034540610129", "-1.821642915281034540610129e+1"); + to_string_test ("-0.6227138273085978906908505332587962401137210861249000879893374399933692", "-6.227138273085978906908505332587962401137210861249000879893374399933692e-1"); + to_string_test ("1499847247119687.2252994442469150323324026983", "1.4998472471196872252994442469150323324026983e+15"); + to_string_test ("36388528379321.055813719364046", "3.6388528379321055813719364046e+13"); + to_string_test ("17581398705.03527479664950417525259898597", "1.758139870503527479664950417525259898597e+10"); + to_string_test ("-1924971375972.85907827180789678254401122044538", "-1.92497137597285907827180789678254401122044538e+12"); + to_string_test ("-17095684686.85093592645458637877226118519253882682991902616917", "-1.709568468685093592645458637877226118519253882682991902616917e+10"); + to_string_test ("-167.1383605966", "-1.671383605966e+2"); + to_string_test ("-0.6254865939943957356340728255129772571", "-6.254865939943957356340728255129772571e-1"); + to_string_test ("28.4640302041251739", "2.84640302041251739e+1"); + to_string_test ("-109933356061408370.80557196152390301897627539", "-1.0993335606140837080557196152390301897627539e+17"); + to_string_test ("-0.0000087160755423395617232", "-8.7160755423395617232e-6"); + to_string_test ("1585538525614.196440989810246491408", "1.585538525614196440989810246491408e+12"); + to_string_test ("0.52290891220265741430171810512051732402724658702481831285148819376", "5.2290891220265741430171810512051732402724658702481831285148819376e-1"); + to_string_test ("4627609920.49521518014082557093474836905001622", "4.62760992049521518014082557093474836905001622e+9"); + to_string_test ("4158893562112.7510192473", "4.1588935621127510192473e+12"); + to_string_test ("1436.317", "1.436317e+3"); + to_string_test ("-9717.3574589", "-9.7173574589e+3"); + to_string_test ("-5.9311", "-5.9311e+0"); + to_string_test ("248582.46466183", "2.4858246466183e+5"); + to_string_test ("51365850972458.020253272518944754", "5.1365850972458020253272518944754e+13"); + to_string_test ("5.3", "5.3e+0"); + to_string_test ("0.000015561742553844994399730412968933732917659524683895437294775665328358153833", "1.5561742553844994399730412968933732917659524683895437294775665328358153833e-5"); + to_string_test ("18468.55140897970661437091391172784331", "1.846855140897970661437091391172784331e+4"); + to_string_test ("45955143297422.842822135126974402481015478328651290339068428", "4.5955143297422842822135126974402481015478328651290339068428e+13"); + to_string_test ("92479750799.813227775777657670884090127390669952952357", "9.2479750799813227775777657670884090127390669952952357e+10"); + to_string_test ("-170157.2824", "-1.701572824e+5"); + to_string_test ("-193370285.538938", "-1.93370285538938e+8"); + to_string_test ("-1232107269218.80635234018899385974055760073429439374", "-1.23210726921880635234018899385974055760073429439374e+12"); + to_string_test ("37068310121876.02935716633548864953989273236", "3.706831012187602935716633548864953989273236e+13"); + to_string_test ("-0.001926064141589895", "-1.926064141589895e-3"); + to_string_test ("-12969801.42859202295406", "-1.296980142859202295406e+7"); + to_string_test ("1.446706519403338261442417", "1.446706519403338261442417e+0"); + to_string_test ("-15364761976988617820.97", "-1.536476197698861782097e+19"); + to_string_test ("98.8", "9.88e+1"); + to_string_test ("-27222876350.64584691135937995025336477676676997618", "-2.722287635064584691135937995025336477676676997618e+10"); + to_string_test ("-0.07070551", "-7.070551e-2"); + to_string_test ("-81.3", "-8.13e+1"); + to_string_test ("-0.986349607617211324597412", "-9.86349607617211324597412e-1"); + to_string_test ("0.1473237069657530481921451180563", "1.473237069657530481921451180563e-1"); + to_string_test ("0.178593896967188202891449920680850621329927355608091167388280234380926", "1.78593896967188202891449920680850621329927355608091167388280234380926e-1"); + to_string_test ("-5517709380633866.96041387468501211138", "-5.51770938063386696041387468501211138e+15"); + to_string_test ("-0.0007746616564605653338849241691095223040637242453", "-7.746616564605653338849241691095223040637242453e-4"); + to_string_test ("0", "0e+0"); + to_string_test ("-0.060169186984251066154082076310779822638630488081688602956563304157289", "-6.0169186984251066154082076310779822638630488081688602956563304157289e-2"); + to_string_test ("25383101422.4423854978224", "2.53831014224423854978224e+10"); + to_string_test ("0.000001722331291720493399327096", "1.722331291720493399327096e-6"); + to_string_test ("746.87", "7.4687e+2"); + to_string_test ("-168143.3769474876407", "-1.681433769474876407e+5"); + to_string_test ("-5696.889543735", "-5.696889543735e+3"); + to_string_test ("336439.45265", "3.3643945265e+5"); + to_string_test ("1405.59846856945543583453508", "1.40559846856945543583453508e+3"); + to_string_test ("237446896515913.955792070004418707549459070646017081232295929", "2.37446896515913955792070004418707549459070646017081232295929e+14"); + to_string_test ("-1000.806", "-1.000806e+3"); + to_string_test ("123389.374454689364681116404843180604778353643", "1.23389374454689364681116404843180604778353643e+5"); + to_string_test ("1.1176839366", "1.1176839366e+0"); + to_string_test ("-2254615348477.19", "-2.25461534847719e+12"); + to_string_test ("1446096738774.77917774857571753701305096816", "1.44609673877477917774857571753701305096816e+12"); + to_string_test ("11659236.7999737683550493270191771518647632989491765069037625661009", "1.16592367999737683550493270191771518647632989491765069037625661009e+7"); + to_string_test ("474525.3", "4.745253e+5"); + to_string_test ("306457.9939898334603303298655114440891592833271455597935704", "3.064579939898334603303298655114440891592833271455597935704e+5"); + to_string_test ("0.00002847515780360138119033679045297679454", "2.847515780360138119033679045297679454e-5"); + to_string_test ("1596804598940.4813258", "1.5968045989404813258e+12"); + to_string_test ("-0.000006391170621716959617919740565820486739065193514093521742460547264", "-6.391170621716959617919740565820486739065193514093521742460547264e-6"); + to_string_test ("-473076308.649120345473011", "-4.73076308649120345473011e+8"); + to_string_test ("-878207964247462.8", "-8.782079642474628e+14"); + to_string_test ("-11128557966827.22966", "-1.112855796682722966e+13"); + to_string_test ("-0.000014354892348825211423874345573543139903584975953081203832383875537", "-1.4354892348825211423874345573543139903584975953081203832383875537e-5"); + to_string_test ("1163290187581.915546961178403317", "1.163290187581915546961178403317e+12"); + to_string_test ("66576328239778.9221010881719386547426171", "6.65763282397789221010881719386547426171e+13"); + to_string_test ("16813819268503.43", "1.681381926850343e+13"); + to_string_test ("7.608", "7.608e+0"); + to_string_test ("11.451", "1.1451e+1"); + to_string_test ("0.1922806905431647016463821", "1.922806905431647016463821e-1"); + to_string_test ("44848451452586076.092278628409241023", "4.4848451452586076092278628409241023e+16"); + to_string_test ("4686238000150.70382", "4.68623800015070382e+12"); + to_string_test ("-4695.35", "-4.69535e+3"); + to_string_test ("-1983.891808001543469238", "-1.983891808001543469238e+3"); + to_string_test ("-1889.02703741954574174912952944455", "-1.88902703741954574174912952944455e+3"); + to_string_test ("35457.09614", "3.545709614e+4"); + to_string_test ("32.1", "3.21e+1"); + to_string_test ("17.191386008285", "1.7191386008285e+1"); + to_string_test ("72079850.05005464262982", "7.207985005005464262982e+7"); + to_string_test ("-255013711.584", "-2.55013711584e+8"); + to_string_test ("-1811484.668115", "-1.811484668115e+6"); + to_string_test ("0.00363319", "3.63319e-3"); + to_string_test ("869661.973264908396349783701", "8.69661973264908396349783701e+5"); + to_string_test ("0.05192167736562581786679001500854748090234383575716316", "5.192167736562581786679001500854748090234383575716316e-2"); + to_string_test ("1.9487431397621384432294662785541135947571028102", "1.9487431397621384432294662785541135947571028102e+0"); + to_string_test ("-40.4495090522601103979", "-4.04495090522601103979e+1"); + to_string_test ("28464851104.22990107740844", "2.846485110422990107740844e+10"); + to_string_test ("9057355.112792", "9.057355112792e+6"); + to_string_test ("2345.0874442435", "2.3450874442435e+3"); + to_string_test ("-0.0004587666076676070018", "-4.587666076676070018e-4"); + to_string_test ("25644837433.052", "2.5644837433052e+10"); + to_string_test ("-0.0813033", "-8.13033e-2"); + to_string_test ("104270936.663424352561033777037436212287235735086698002099393", "1.04270936663424352561033777037436212287235735086698002099393e+8"); + to_string_test ("-0.0001278605520852616671853139997654658857207788577296192382717356659507903", "-1.278605520852616671853139997654658857207788577296192382717356659507903e-4"); + to_string_test ("3.2", "3.2e+0"); + to_string_test ("0.00004385545212765103340926", "4.385545212765103340926e-5"); + to_string_test ("617298348206916139928.4280232746359395559755", "6.172983482069161399284280232746359395559755e+20"); + to_string_test ("-1039598802845498.9", "-1.0395988028454989e+15"); + to_string_test ("-136472767053355263.803357925713228523834700927", "-1.36472767053355263803357925713228523834700927e+17"); + to_string_test ("6686106.00966845277017671235008645686364712952519700429650727", "6.68610600966845277017671235008645686364712952519700429650727e+6"); + to_string_test ("-1.28437447589675625894263646", "-1.28437447589675625894263646e+0"); + to_string_test ("7255816.80175928465638553952", "7.25581680175928465638553952e+6"); + to_string_test ("1.913186249682945262", "1.913186249682945262e+0"); + to_string_test ("-239610.078286802134757752042940657560396207793018", "-2.39610078286802134757752042940657560396207793018e+5"); + to_string_test ("1824062535.125953860448793680581", "1.824062535125953860448793680581e+9"); + to_string_test ("143663085933469033811.845726707878", "1.43663085933469033811845726707878e+20"); + to_string_test ("-2.623365", "-2.623365e+0"); + to_string_test ("51.4", "5.14e+1"); + to_string_test ("-0.002713956452636791112860101983746083147835473825563663197299641194994291", "-2.713956452636791112860101983746083147835473825563663197299641194994291e-3"); + to_string_test ("23683475.76857523129953167", "2.368347576857523129953167e+7"); + to_string_test ("438888090072164.446744747716480585", "4.38888090072164446744747716480585e+14"); + to_string_test ("-18795766590.876227458586674", "-1.8795766590876227458586674e+10"); + to_string_test ("1", "1e+0"); + to_string_test ("-0.00052634985121596383285768913499081865029860268677", "-5.2634985121596383285768913499081865029860268677e-4"); + to_string_test ("105829462968115.1975", "1.058294629681151975e+14"); + to_string_test ("468435.28992053729", "4.6843528992053729e+5"); + to_string_test ("1846489897520109.8715192525464204", "1.8464898975201098715192525464204e+15"); + to_string_test ("52376.8738438780776514097903786413319412608929071044928019", "5.23768738438780776514097903786413319412608929071044928019e+4"); + to_string_test ("-3116.0382285086879890762181552", "-3.1160382285086879890762181552e+3"); + to_string_test ("-32.3", "-3.23e+1"); + to_string_test ("4381.835863935170505493389465883363", "4.381835863935170505493389465883363e+3"); + to_string_test ("-165246341553.196523942434377973750070062506177191779164855705595256077559", "-1.65246341553196523942434377973750070062506177191779164855705595256077559e+11"); + to_string_test ("131463737561555.227840078959933769449", "1.31463737561555227840078959933769449e+14"); + to_string_test ("-64274482438198.12338384", "-6.427448243819812338384e+13"); + to_string_test ("-55.454727", "-5.5454727e+1"); + to_string_test ("0.00009717525025399550713686849913956172026124576144750225419737337393085648", "9.717525025399550713686849913956172026124576144750225419737337393085648e-5"); + to_string_test ("308.25959181284769470446754944967753432202198524450589150147579", "3.0825959181284769470446754944967753432202198524450589150147579e+2"); + to_string_test ("-0.0004788485313310332561375607045337471634311364865082251102927546302522", "-4.788485313310332561375607045337471634311364865082251102927546302522e-4"); + to_string_test ("-0.00001674901333535441800495", "-1.674901333535441800495e-5"); + to_string_test ("0.0002109152895285069571392567905111065321238498247841125198378", "2.109152895285069571392567905111065321238498247841125198378e-4"); + to_string_test ("1.8231876866378834252226768", "1.8231876866378834252226768e+0"); + to_string_test ("93303195849247612.1179468353063516778756323", "9.33031958492476121179468353063516778756323e+16"); + to_string_test ("29250048.5238", "2.92500485238e+7"); + to_string_test ("39114.2994953333700262004334845808507590484518898551674729031", "3.91142994953333700262004334845808507590484518898551674729031e+4"); + to_string_test ("0.0005054595146099124050321344193608438", "5.054595146099124050321344193608438e-4"); + to_string_test ("-0.00000261573741630302119", "-2.61573741630302119e-6"); + to_string_test ("-3942.464375", "-3.942464375e+3"); + to_string_test ("-3516832336235414.4", "-3.5168323362354144e+15"); + to_string_test ("2932.653064227619313029108820790178", "2.932653064227619313029108820790178e+3"); + to_string_test ("1774849188.5", "1.7748491885e+9"); + to_string_test ("-0.0002027560662251712073209658732784123702", "-2.027560662251712073209658732784123702e-4"); + to_string_test ("0.00444876564937645706130197514776656311551429", "4.44876564937645706130197514776656311551429e-3"); + to_string_test ("240253285740.838116226498651453699832893449270360277233", "2.40253285740838116226498651453699832893449270360277233e+11"); + to_string_test ("-7812.5", "-7.8125e+3"); + to_string_test ("0.00001908835118349029561417171733623571576159447", "1.908835118349029561417171733623571576159447e-5"); + to_string_test ("0.2384", "2.384e-1"); + to_string_test ("10276060261519.01008", "1.027606026151901008e+13"); + to_string_test ("-624.68608", "-6.2468608e+2"); + to_string_test ("1908594605470.78947212", "1.90859460547078947212e+12"); + to_string_test ("-28710692938.0080069772", "-2.87106929380080069772e+10"); + to_string_test ("9322478927859.7226939388", "9.3224789278597226939388e+12"); + to_string_test ("462.39278989717", "4.6239278989717e+2"); + to_string_test ("-292431845.123982205", "-2.92431845123982205e+8"); + to_string_test ("25360.527879143279940028900068932", "2.5360527879143279940028900068932e+4"); + to_string_test ("-5243.17", "-5.24317e+3"); + to_string_test ("-887126.1", "-8.871261e+5"); + to_string_test ("-178855521286448910.81847", "-1.7885552128644891081847e+17"); + to_string_test ("144.2512", "1.442512e+2"); + to_string_test ("0.27596543435213575657016815774010982522459215678803", "2.7596543435213575657016815774010982522459215678803e-1"); + to_string_test ("-253740766.92573966065983255295671290684914", "-2.5374076692573966065983255295671290684914e+8"); + to_string_test ("39700389548445.6259811459023887888", "3.97003895484456259811459023887888e+13"); + to_string_test ("-1892773154533250.9175616099286242603674149016132592843892582", "-1.8927731545332509175616099286242603674149016132592843892582e+15"); + to_string_test ("-296875635.459708175104685570522448224822586239556382712456482872564385186", "-2.96875635459708175104685570522448224822586239556382712456482872564385186e+8"); + to_string_test ("6024461977597039.793", "6.024461977597039793e+15"); + to_string_test ("96939842474248948569.99133712747636693", "9.693984247424894856999133712747636693e+19"); + to_string_test ("-2349", "-2.349e+3"); + to_string_test ("12.37220312294423096847137245814517168644123454251402373", "1.237220312294423096847137245814517168644123454251402373e+1"); + to_string_test ("-0.000762219", "-7.62219e-4"); + to_string_test ("-5037872113222595.853342945932403900813107", "-5.037872113222595853342945932403900813107e+15"); + to_string_test ("0.013627449843979201277465601769", "1.3627449843979201277465601769e-2"); + to_string_test ("367.73299807918251456434671994008495006247774681820454975695966689163", "3.6773299807918251456434671994008495006247774681820454975695966689163e+2"); + to_string_test ("-1774201339889.272577961174157286022083347159", "-1.774201339889272577961174157286022083347159e+12"); + to_string_test ("0.383405861086782832620684731034382", "3.83405861086782832620684731034382e-1"); + to_string_test ("-0.000026", "-2.6e-5"); + to_string_test ("49.430443587", "4.9430443587e+1"); + to_string_test ("-5.1913887226490591309931479", "-5.1913887226490591309931479e+0"); + to_string_test ("-15717762.475111621342076", "-1.5717762475111621342076e+7"); + to_string_test ("-4", "-4e+0"); + to_string_test ("-4631.0846464039792793925640221891309792535940896378049095621424621", "-4.6310846464039792793925640221891309792535940896378049095621424621e+3"); + to_string_test ("1413738075378069949.56029998552506378068322011", "1.41373807537806994956029998552506378068322011e+18"); + to_string_test ("46931268921942747.2708649335933082133203056020370678708294465898173515", "4.69312689219427472708649335933082133203056020370678708294465898173515e+16"); + to_string_test ("0.00093414", "9.3414e-4"); + to_string_test ("-1.58705863899010271178421", "-1.58705863899010271178421e+0"); + to_string_test ("-0.0164558511781215799863524531521382142453343", "-1.64558511781215799863524531521382142453343e-2"); + to_string_test ("-0.000033962690504168429144", "-3.3962690504168429144e-5"); + to_string_test ("0.0000591597601664039239323473979662138718624059870072", "5.91597601664039239323473979662138718624059870072e-5"); + to_string_test ("4861599649260088570.0003442852280303481644428810265", "4.8615996492600885700003442852280303481644428810265e+18"); + to_string_test ("-6581.92178891754198277809950661445424444", "-6.58192178891754198277809950661445424444e+3"); + to_string_test ("0.000443442744", "4.43442744e-4"); + to_string_test ("862885496525896.393004927631306078", "8.62885496525896393004927631306078e+14"); + to_string_test ("-409.565286307201", "-4.09565286307201e+2"); + to_string_test ("-749168762.7771507445838618797279002344648652959333491", "-7.491687627771507445838618797279002344648652959333491e+8"); + to_string_test ("-4.182", "-4.182e+0"); + to_string_test ("-0.0043097149091842239110508832659037353003224", "-4.3097149091842239110508832659037353003224e-3"); + to_string_test ("2.95560963", "2.95560963e+0"); + to_string_test ("0.000001082047849865643097457831831148083", "1.082047849865643097457831831148083e-6"); + to_string_test ("0.0510067515295825124101945807336780815643699536571457299156099", "5.10067515295825124101945807336780815643699536571457299156099e-2"); + to_string_test ("153.466306", "1.53466306e+2"); + to_string_test ("2793067936490.72982349", "2.79306793649072982349e+12"); + to_string_test ("-138901662.313822438", "-1.38901662313822438e+8"); + to_string_test ("0.000620515986219", "6.20515986219e-4"); + to_string_test ("0", "0e+0"); + to_string_test ("3206026277639.0275609", "3.2060262776390275609e+12"); + to_string_test ("290.10236", "2.9010236e+2"); + to_string_test ("0.7811084054", "7.811084054e-1"); + to_string_test ("0.00003711588621150377156474674880860543078563", "3.711588621150377156474674880860543078563e-5"); + to_string_test ("3.31960901176478283939912192394193264568314426394636493469769291109662224", "3.31960901176478283939912192394193264568314426394636493469769291109662224e+0"); + to_string_test ("0.0000791778413118107043058411496928", "7.91778413118107043058411496928e-5"); + to_string_test ("-0.00000576468043734782848403816473286085118790737089898", "-5.76468043734782848403816473286085118790737089898e-6"); + to_string_test ("-3912585254.19202315528932215114", "-3.91258525419202315528932215114e+9"); + to_string_test ("137338031.6", "1.373380316e+8"); + to_string_test ("30.6932491548981985262774346527488686091809", "3.06932491548981985262774346527488686091809e+1"); + to_string_test ("-66086832545865997366.195847618443721060270259871066071067306791701732791373", "-6.6086832545865997366195847618443721060270259871066071067306791701732791373e+19"); + to_string_test ("0", "0e+0"); + to_string_test ("-13.722117", "-1.3722117e+1"); + to_string_test ("-248974688672485931.4590191059407968746631", "-2.489746886724859314590191059407968746631e+17"); + to_string_test ("91240.086239589202214406295668563051026987384777308158011222153", "9.1240086239589202214406295668563051026987384777308158011222153e+4"); + to_string_test ("-3.5338148998559444417330716022294390666021991", "-3.5338148998559444417330716022294390666021991e+0"); + to_string_test ("2.6", "2.6e+0"); + to_string_test ("1734825599220.52", "1.73482559922052e+12"); + to_string_test ("-57170562.129942072027205098329198887303", "-5.7170562129942072027205098329198887303e+7"); + to_string_test ("20544612.11313", "2.054461211313e+7"); + to_string_test ("70939237017.42726", "7.093923701742726e+10"); + to_string_test ("462378955285.99297", "4.6237895528599297e+11"); + to_string_test ("0.000021", "2.1e-5"); + to_string_test ("20.525076131988", "2.0525076131988e+1"); + to_string_test ("-4", "-4e+0"); + to_string_test ("-47404317.48625779235567137343123255675323465033029752022294", "-4.740431748625779235567137343123255675323465033029752022294e+7"); + to_string_test ("-55857.8945831230338325704270665815655", "-5.58578945831230338325704270665815655e+4"); + to_string_test ("15619130.056541672746265564818", "1.5619130056541672746265564818e+7"); + to_string_test ("-509103.24488138920961073312263453791501627781957", "-5.0910324488138920961073312263453791501627781957e+5"); + to_string_test ("-2244957856765271.426502853008077", "-2.244957856765271426502853008077e+15"); + to_string_test ("0.000017030812826690437402788006802232371231953628", "1.7030812826690437402788006802232371231953628e-5"); + to_string_test ("-0.0000014775344940131996506012024340852769516067326910849981594100829151750930077", "-1.4775344940131996506012024340852769516067326910849981594100829151750930077e-6"); + to_string_test ("6.77583900119174558047", "6.77583900119174558047e+0"); + to_string_test ("18031872515950.28615557432172221913302696131248029", "1.803187251595028615557432172221913302696131248029e+13"); + to_string_test ("-0.000025191400016242244719402602345892709609", "-2.5191400016242244719402602345892709609e-5"); + to_string_test ("5.254", "5.254e+0"); + to_string_test ("8853.6719", "8.8536719e+3"); + to_string_test ("-26.2912940386", "-2.62912940386e+1"); + + to_string_test ("3.171194102379077141557759899307946350455841e+27", "3171194102379077141557759899.307946350455841"); + to_string_test ("4.924353466898191177698653319742594890634579e+37", "49243534668981911776986533197425948906.34579"); + to_string_test ("5.690616778176956027307884725933410349604387915634524e+49", "56906167781769560273078847259334103496043879156345.24"); + to_string_test ("6.4986735507448912857131832908423940757e+38", "649867355074489128571318329084239407570.0"); + to_string_test ("1.25934313355319666474752550204680303068865719647e+33", "1259343133553196664747525502046803.03068865719647"); + to_string_test ("1.23014105337660651106978059198916100450966081493207e+27", "1230141053376606511069780591.98916100450966081493207"); + to_string_test ("1.386164712267169624993434287237e+23", "138616471226716962499343.4287237"); + to_string_test ("1.39853642894726883996875746770529e+28", "13985364289472688399687574677.0529"); + to_string_test ("5.10614446965318674547416709785208086304398889160563e+28", "51061444696531867454741670978.5208086304398889160563"); + to_string_test ("1.46685947134456101512731611558e+23", "146685947134456101512731.6115580"); + to_string_test ("3.69960105771344554151928256518906564810300119e+25", "36996010577134455415192825.6518906564810300119"); + to_string_test ("3.05345735395805567424714891401667575466462830113819e+48", "3053457353958055674247148914016675754664628301138.19"); + to_string_test ("1.559806666149836070330006415033e+24", "1559806666149836070330006.415033"); + to_string_test ("2.8416297367859233303497847667971781197616950846e+28", "28416297367859233303497847667.971781197616950846"); + to_string_test ("2.1364951568189836563102481625533538320051163977e+41", "213649515681898365631024816255335383200511.63977"); + to_string_test ("9.034542832410912578330021146413119399e+28", "90345428324109125783300211464.13119399"); + to_string_test ("7.026094393430852002585511641212897686956090955e+39", "7026094393430852002585511641212897686956.090955"); + to_string_test ("9.435538492497050138580201734902181057468044875e+43", "94355384924970501385802017349021810574680448.75"); + to_string_test ("2.315089265590404012562599592854156357726817712e+26", "231508926559040401256259959.2854156357726817712"); + to_string_test ("9.85209894663520857685703881781194082356123765e+39", "9852098946635208576857038817811940823561.23765"); + to_string_test ("2.65213505469049775997232325076980590625670234690917845e+41", "265213505469049775997232325076980590625670.234690917845"); + to_string_test ("9.023159535576504097005203913521871601640521009e+36", "9023159535576504097005203913521871601.640521009"); + to_string_test ("2.456680359828937628024631306792185367572610021e+43", "24566803598289376280246313067921853675726100.21"); + to_string_test ("3.20634106832106387482375790792609337383007782520694e+24", "3206341068321063874823757.90792609337383007782520694"); + to_string_test ("2.717780449744210117995586561524987067807146882e+43", "27177804497442101179955865615249870678071468.82"); + to_string_test ("2.86757572635270377540170639151e+22", "28675757263527037754017.0639151"); + to_string_test ("1.08862827358094757110520739146065028362703e+30", "1088628273580947571105207391460.65028362703"); + to_string_test ("1.696622337138949329874242519485119916519994150606e+39", "1696622337138949329874242519485119916519.994150606"); + to_string_test ("4.958075942313945962737499249994583773691625306e+36", "4958075942313945962737499249994583773.691625306"); + to_string_test ("8.67210047206219429882716380856729877038463e+37", "86721004720621942988271638085672987703.8463"); + to_string_test ("1.35467074874780607458660332165839e+30", "1354670748747806074586603321658.39"); + to_string_test ("5.21963089810195859130639819168579622e+24", "5219630898101958591306398.19168579622"); + to_string_test ("1.8688440918945220036354844302195749309220888e+26", "186884409189452200363548443.02195749309220888"); + to_string_test ("2.556582211914618427489836174964272160475e+25", "25565822119146184274898361.74964272160475"); + to_string_test ("7.4140139575523848563560806694561950037847e+26", "741401395755238485635608066.94561950037847"); + to_string_test ("1.9191049758936644006660416648962209488e+24", "1919104975893664400666041.66489622094880"); + to_string_test ("1.5893308320910765122063972428358196502e+36", "1589330832091076512206397242835819650.2"); + to_string_test ("1.350769554904381289856048945926109233407469025099095e+35", "135076955490438128985604894592610923.3407469025099095"); + to_string_test ("3.4955955888709903930650733178004053283303e+27", "3495595588870990393065073317.8004053283303"); + to_string_test ("3.765499741127994356229674741445362678695091917e+28", "37654997411279943562296747414.453626786950919170"); + to_string_test ("3.770936274989628272472264790077542e+21", "3770936274989628272472.264790077542"); + to_string_test ("6.62710314240271241900085261e+21", "6627103142402712419000.85261"); + to_string_test ("1.316934076085443594506478729911134464048168888698e+42", "1316934076085443594506478729911134464048168.888698"); + to_string_test ("2.9510339604105305444519680156145845428324011e+35", "295103396041053054445196801561458454.28324011"); + to_string_test ("2.32664625710064626302675792506518986748623800519362825e+45", "2326646257100646263026757925065189867486238005.19362825"); + to_string_test ("9.05841068683497571038524585222884373e+29", "905841068683497571038524585222.884373"); + to_string_test ("2.104525700707071438146923949322482428742115356534e+28", "21045257007070714381469239493.22482428742115356534"); + to_string_test ("7.024685053227353728838050757013069476546171879163e+24", "7024685053227353728838050.757013069476546171879163"); + to_string_test ("7.2863751084180259357725026103712116366349e+23", "728637510841802593577250.26103712116366349"); + to_string_test ("9.71891517062070497407760297561206525471485e+27", "9718915170620704974077602975.61206525471485"); + to_string_test ("6.4741508681889057488168545664375944171354681e+23", "647415086818890574881685.45664375944171354681"); + to_string_test ("1.6942797476135028024654429183339522530812281e+31", "16942797476135028024654429183339.522530812281"); + to_string_test ("3.87899618892199653560586133205982498365799449e+27", "3878996188921996535605861332.05982498365799449"); + to_string_test ("6.2615173898555524447350478811537912100608066376e+42", "6261517389855552444735047881153791210060806.6376"); + to_string_test ("8.34563827640030036035405e+22", "83456382764003003603540.5"); + to_string_test ("5.73284757676406662905522205317450204e+31", "57328475767640666290552220531745.0204"); + to_string_test ("1.09314948671137385444979381052e+26", "109314948671137385444979381.052"); + to_string_test ("8.86015267575800230944962406406137570452e+28", "88601526757580023094496240640.6137570452"); + to_string_test ("8.7435115902725784785213467357972025071925716822259e+38", "874351159027257847852134673579720250719.25716822259"); + to_string_test ("1.511686617338690801597376192985164124335711475e+36", "1511686617338690801597376192985164124.335711475"); + to_string_test ("3.862183052662673704009308528932528900914181684535e+42", "3862183052662673704009308528932528900914181.684535"); + to_string_test ("3.862360154857656116978304538802550298055142749413e+37", "38623601548576561169783045388025502980.55142749413"); + to_string_test ("1.7557601024183018471184139748851879933153788645e+26", "175576010241830184711841397.48851879933153788645"); + to_string_test ("4.1705118500557863903425612212241828e+28", "41705118500557863903425612212.241828"); + to_string_test ("1.015453056007471546100232031232797626130792432862e+30", "1015453056007471546100232031232.797626130792432862"); + to_string_test ("2.8538363119129962635325743474766089129608347262536e+29", "285383631191299626353257434747.660891296083472625360"); + to_string_test ("1.42167287636895617482014385649865679412e+27", "1421672876368956174820143856.49865679412"); + to_string_test ("9.6100608486394273371410715209128478362564609e+29", "961006084863942733714107152091.28478362564609"); + to_string_test ("6.628723659367639746219006678948604246e+24", "6628723659367639746219006.678948604246"); + to_string_test ("1.91781433973790573018323517395847264353e+35", "191781433973790573018323517395847264.35300"); + to_string_test ("3.36834833123607650204419305291838348810644243e+42", "3368348331236076502044193052918383488106442.43"); + to_string_test ("1.71911767411984485012054040057806822618e+28", "17191176741198448501205404005.7806822618"); + to_string_test ("3.6562357737624542715177216071738074863798786e+36", "3656235773762454271517721607173807486.3798786"); + to_string_test ("8.57520635819763350659219863901837233e+21", "8575206358197633506592.19863901837233"); + to_string_test ("1.245913688722124452316952395765916246e+21", "1245913688722124452316.9523957659162460"); + to_string_test ("8.8964578294856908705314945178917896807516003057782324e+46", "88964578294856908705314945178917896807516003057.782324"); + to_string_test ("1.5579884689150031101693496143656840264980386818704e+23", "155798846891500311016934.961436568402649803868187040"); + to_string_test ("8.5051864582679908692564183699252612773409509082078e+37", "85051864582679908692564183699252612773.409509082078"); + to_string_test ("8.8798692074080075787375315447486123809923959833e+26", "887986920740800757873753154.47486123809923959833"); + to_string_test ("2.6484576511218782036901501152986249531234497168718e+40", "26484576511218782036901501152986249531234.497168718"); + to_string_test ("7.6404110248649153016903650163544816581006668605e+23", "764041102486491530169036.50163544816581006668605"); + to_string_test ("1.41787251451628994917275472e+24", "1417872514516289949172754.72"); + to_string_test ("4.2104854597998748621925225253125873386e+31", "42104854597998748621925225253125.87338600"); + to_string_test ("2.22735863520665290933246331848e+24", "2227358635206652909332463.31848"); + to_string_test ("6.6860727859954777667223002708162369e+32", "668607278599547776672230027081623.69"); + to_string_test ("6.8357371699714755863090081855483865237790749503e+22", "68357371699714755863090.081855483865237790749503"); + to_string_test ("1.78557003827723798504978687588959254956675353035516771e+37", "17855700382772379850497868758895925495.6675353035516771"); + to_string_test ("3.88694369953891826304770521327308322619393047272853992e+29", "388694369953891826304770521327.308322619393047272853992"); + to_string_test ("6.53989976127167541385228442576702092890124e+35", "653989976127167541385228442576702092.89012400"); + to_string_test ("1.80118254923064703459780878790624318318152203e+37", "18011825492306470345978087879062431831.8152203"); + to_string_test ("2.029177448999173372119989892440779088e+22", "20291774489991733721199.89892440779088"); + to_string_test ("7.078660611250891118657496594735238821341408353e+35", "707866061125089111865749659473523882.1341408353"); + to_string_test ("1.096715852238427070115466117322983113926e+36", "1096715852238427070115466117322983113.926"); + to_string_test ("2.86532834287791967206284176556306849118939923884e+42", "2865328342877919672062841765563068491189399.23884"); + to_string_test ("9.4435575887407391033782269887533990447300682186075521e+24", "9443557588740739103378226.9887533990447300682186075521"); + to_string_test ("2.196175657558897384981748559894e+29", "219617565755889738498174855989.4"); + to_string_test ("1.7224191355912435440309996131683233957399227e+29", "172241913559124354403099961316.83233957399227"); + to_string_test ("8.089765204288655830674576596713309516483099e+31", "80897652042886558306745765967133.09516483099"); + to_string_test ("2.07166412218470429605806831507e+24", "2071664122184704296058068.31507"); + to_string_test ("1.4327673900218857772756403845335511690820534667844161e+25", "14327673900218857772756403.845335511690820534667844161"); + to_string_test ("5.96685124808828989098666066158574653883332e+34", "59668512480882898909866606615857465.3883332"); + to_string_test ("3.1497590158477647299507840130228337905235603e+22", "31497590158477647299507.840130228337905235603"); + to_string_test ("1.68055184413854558094765106936369527289778050531295766e+40", "16805518441385455809476510693636952728977.8050531295766"); + to_string_test ("1.308323895602314056642638704891037710277185276986927e+40", "13083238956023140566426387048910377102771.85276986927"); + to_string_test ("3.295254020832544012761679098484189727227833e+41", "329525402083254401276167909848418972722783.3"); + to_string_test ("2.9072795594202554837396927026502083307998e+35", "290727955942025548373969270265020833.07998"); + to_string_test ("1.3689991541714377699994556138826283759e+29", "136899915417143776999945561388.26283759"); + to_string_test ("3.36806306935615523082781617061106400210297708457466e+40", "33680630693561552308278161706110640021029.7708457466"); + to_string_test ("1.730864210471288302007789478210233615399858e+21", "1730864210471288302007.789478210233615399858"); + to_string_test ("1.98572237681530700377986658329680798e+32", "198572237681530700377986658329680.798"); + to_string_test ("1.279811707773498944767714003821019551877654490239992e+40", "12798117077734989447677140038210195518776.54490239992"); + to_string_test ("3.8084703153428358911632007387325702215541573567757e+45", "3808470315342835891163200738732570221554157356.7757"); + to_string_test ("1.3810837466649418967673665311541682533151e+37", "13810837466649418967673665311541682533.151"); + to_string_test ("1.75045497942020277400523024600228150483494020715374e+39", "1750454979420202774005230246002281504834.94020715374"); + to_string_test ("3.854570457401828825080672674176371617252885568525e+42", "3854570457401828825080672674176371617252885.568525"); + to_string_test ("2.524007970392697273821209419290910149e+32", "252400797039269727382120941929091.0149"); + to_string_test ("9.19536554437673037098591509995026767872538589562761e+45", "9195365544376730370985915099950267678725385895.62761"); + to_string_test ("1.183552401830090152504539986275312716505e+23", "118355240183009015250453.9986275312716505"); + to_string_test ("3.49082770706667347770412719905221035269e+36", "3490827707066673477704127199052210352.69"); + to_string_test ("1.09667668559108738350612984427121459528827e+35", "109667668559108738350612984427121459.528827"); + to_string_test ("4.7727335155560138656406364912e+21", "4772733515556013865640.6364912"); + to_string_test ("1.39511686402859313308703279767446898138923566399e+34", "13951168640285931330870327976744689.8138923566399"); + to_string_test ("1.83547377703310193838625323613810597146659646688e+38", "183547377703310193838625323613810597146.659646688"); + to_string_test ("3.387626848249516099010371969816649097243645e+35", "338762684824951609901037196981664909.7243645"); + to_string_test ("4.854485927348228918413753679671472155071e+35", "485448592734822891841375367967147215.5071"); + to_string_test ("1.1145412703080371165560398973334199e+32", "111454127030803711655603989733341.99"); + to_string_test ("2.130358009562539933673297313517219743395888826178226e+42", "2130358009562539933673297313517219743395888.826178226"); + to_string_test ("1.26860370623505030126846090707878e+22", "12686037062350503012684.6090707878"); + to_string_test ("3.717693087339892916526272044454e+24", "3717693087339892916526272.044454"); + to_string_test ("1.866503037113138887457365815904225e+28", "18665030371131388874573658159.04225"); + + to_string_test ("0.0011263455635", "0.0011263455635000000000"); + to_string_test ("0.00005599616782279678868859860419", "0.00005599616782279678868859860419000000000000000"); + to_string_test ("0.9689457348938820467495", "0.9689457348938820467495000000000000"); + to_string_test ("1", "1"); + to_string_test ("0.2629", "0.262900000000000000000"); + to_string_test ("0.0002393737516931411861504801546", "0.00023937375169314118615048015460000000000000000000"); + to_string_test ("0.00009774061917141138033028467", "0.00009774061917141138033028467000000000"); + to_string_test ("0.00292455", "0.0029245500000000"); + to_string_test ("-0.00068986952351457757", "-0.00068986952351457757000000"); + to_string_test ("0.07084936", "0.070849360000000000000"); + to_string_test ("-0.373", "-0.373000"); + to_string_test ("-2", "-2"); + to_string_test ("0.0001519", "0.000151900000000000000000"); + to_string_test ("0.04237079", "0.04237079000000000000000000"); + to_string_test ("0.158559483548985350300576037", "0.1585594835489853503005760370000"); + to_string_test ("0.030884214498496080583519", "0.0308842144984960805835190000"); + to_string_test ("0.0003332979853556912152", "0.0003332979853556912152000000000000000000"); + to_string_test ("0.00520795233040325458241", "0.0052079523304032545824100000000000000000000"); + to_string_test ("0.99273493786", "0.9927349378600000000"); + to_string_test ("-0.000056112029122076268731916105493", "-0.000056112029122076268731916105493000000000000000000000"); + to_string_test ("0.000072668203", "0.0000726682030000000000000000"); + to_string_test ("-0.0005728825407", "-0.0005728825407000000"); + to_string_test ("-0.0028471515206570661019", "-0.0028471515206570661019000000"); + to_string_test ("-0.0000050495", "-0.0000050495000"); + to_string_test ("0.6814238", "0.68142380000000000000"); + to_string_test ("-0.001801323516988438237306678", "-0.00180132351698843823730667800000000"); + to_string_test ("0.00044672901248005231185", "0.00044672901248005231185000"); + to_string_test ("-0.00659562", "-0.0065956200000"); + to_string_test ("0.000005709242556800505995757422", "0.0000057092425568005059957574220000000000000"); + to_string_test ("-0.03858", "-0.038580000000000000000"); + to_string_test ("-0.0014652", "-0.0014652000000000"); + to_string_test ("-0.000589007499920538307504", "-0.000589007499920538307504000000000000000"); + to_string_test ("-0.0005315422668709676158", "-0.000531542266870967615800000000000"); + to_string_test ("0.00013213666126560646", "0.0001321366612656064600"); + to_string_test ("0.000004344703015318018265878045", "0.000004344703015318018265878045000000000000000000000"); + to_string_test ("-0.00136764606625344", "-0.00136764606625344000000000000000000"); + to_string_test ("-0.0000537651227073897413202", "-0.000053765122707389741320200"); + to_string_test ("0.886613170228603", "0.88661317022860300000000000000000"); + to_string_test ("0.3139844285751256457512672", "0.31398442857512564575126720000"); + to_string_test ("-0.002851248", "-0.0028512480000000000000000"); + to_string_test ("-0.0000042877", "-0.00000428770000000000000000"); + to_string_test ("-0.03693105129", "-0.03693105129000000000"); + to_string_test ("-0.000016644061440832683", "-0.000016644061440832683000000000000"); + to_string_test ("5", "5"); + to_string_test ("-0.0068772750612813", "-0.00687727506128130000000000"); + to_string_test ("-0.00000417995882", "-0.00000417995882000000000"); + to_string_test ("0.000051728443482958305115", "0.00005172844348295830511500000000000000"); + to_string_test ("-0.63054490172322775078", "-0.63054490172322775078000"); + to_string_test ("0.846227130773152", "0.846227130773152000000000000000000000"); + to_string_test ("-0.00053925", "-0.00053925000000000000000"); + to_string_test ("-0.00011657745", "-0.00011657745000000000"); + to_string_test ("-0.0000606908449266106674509767236", "-0.000060690844926610667450976723600000000000000"); + to_string_test ("-0.000015232774296786", "-0.00001523277429678600000000000"); + to_string_test ("-0.0000018870130044533213759607", "-0.00000188701300445332137596070000"); + to_string_test ("0.07387110922584445111868", "0.0738711092258444511186800"); + to_string_test ("0.0028958950171847760130772342397", "0.00289589501718477601307723423970000000000000"); + to_string_test ("0.07773", "0.07773000000000000000000"); + to_string_test ("-0.15623754221748168238257", "-0.15623754221748168238257000000000"); + to_string_test ("-0.000031014107607510859290785", "-0.00003101410760751085929078500000000000000000000"); + to_string_test ("-0.155253876", "-0.155253876000000"); + to_string_test ("-0.162423714137733125085121498", "-0.16242371413773312508512149800"); + to_string_test ("0.627526444840677348430187497", "0.62752644484067734843018749700000000000000000000"); + to_string_test ("-0.15349114378505726347993", "-0.1534911437850572634799300000000000000000"); + to_string_test ("0.00000428050624985303744021063060711", "0.00000428050624985303744021063060711000000000"); + to_string_test ("-0.0000017826243", "-0.00000178262430000000000000"); + to_string_test ("-0.1325584873060896817812", "-0.132558487306089681781200000000"); + to_string_test ("0.000008265906442925047", "0.0000082659064429250470000"); + to_string_test ("-0.000037199177255", "-0.00003719917725500000000000"); + to_string_test ("-0.0014975740625744085757661916", "-0.00149757406257440857576619160000000000000000"); + to_string_test ("-0.00000104174992201057110845958171286", "-0.0000010417499220105711084595817128600000000000"); + to_string_test ("0.0002657674796", "0.0002657674796000000000000000000"); + to_string_test ("-0.000005691567765087952481381", "-0.0000056915677650879524813810000000000000000000"); + to_string_test ("0.000001192218291518612772", "0.0000011922182915186127720000"); + to_string_test ("-0.0000128575347", "-0.000012857534700000000000000000"); + to_string_test ("0.00062701379", "0.000627013790000000000000000"); + to_string_test ("-0.156608766578157915298", "-0.156608766578157915298000000"); + to_string_test ("-0.001899267273700873", "-0.0018992672737008730000000000000000000"); + to_string_test ("0.0000968", "0.00009680000000000000000000"); + to_string_test ("0.00085424843402", "0.0008542484340200"); + to_string_test ("0.000175", "0.00017500000"); + to_string_test ("-0.17051", "-0.17051000"); + to_string_test ("0.00113697", "0.00113697000000000000000000"); + to_string_test ("0.000001488862050355755060487623167", "0.000001488862050355755060487623167000000000000"); + to_string_test ("0.00002699569741159526", "0.00002699569741159526000"); + to_string_test ("0.00001287192636853", "0.00001287192636853000000000000000000"); + to_string_test ("-0.00000366090353062717043913357274082", "-0.0000036609035306271704391335727408200000"); + to_string_test ("0.031338265111184040022", "0.0313382651111840400220000000"); + to_string_test ("-0.00001653", "-0.000016530000000000000"); + to_string_test ("-0.0133754851476993216067501924", "-0.0133754851476993216067501924000000000000000000"); + to_string_test ("0.000005353", "0.00000535300000000000000000000"); + to_string_test ("0.14873216211842", "0.14873216211842000"); + to_string_test ("0.0001192511854", "0.000119251185400000000"); + to_string_test ("0.01756492192", "0.017564921920000000000000000"); + to_string_test ("-0.0000063762", "-0.000006376200000000000"); + to_string_test ("0.000735826754123", "0.00073582675412300"); + to_string_test ("-0.00485", "-0.0048500000"); + to_string_test ("0.344385", "0.3443850000000"); + to_string_test ("0.0430122427567419", "0.0430122427567419000000000"); + to_string_test ("-0.0142796237025954885313450737", "-0.014279623702595488531345073700000000000000000000"); + to_string_test ("0.006634970245679", "0.0066349702456790000000000"); + to_string_test ("-0.114512015038681223032047", "-0.114512015038681223032047000000"); + to_string_test ("-0.0000028785917141346585355976738197", "-0.000002878591714134658535597673819700000000000000000000"); + to_string_test ("-0.000279430425345862869074928275", "-0.000279430425345862869074928275000000000"); + to_string_test ("-0.00002942229173991521526962587123", "-0.00002942229173991521526962587123000000000000000"); + to_string_test ("0.005067015345015442599363084", "0.005067015345015442599363084000000000000"); + to_string_test ("0.005115013126", "0.00511501312600000000000000000000"); + to_string_test ("-0.0000023463883841184598257656291715", "-0.000002346388384118459825765629171500"); + to_string_test ("-0.00408188867653506526747439165461", "-0.0040818886765350652674743916546100000000"); + to_string_test ("0.03283946746237808822", "0.0328394674623780882200000000000"); + to_string_test ("0.00000121571653184750325515", "0.000001215716531847503255150000"); + to_string_test ("-0.00116", "-0.00116000"); + to_string_test ("-0.000120516661966204019689061641", "-0.00012051666196620401968906164100000000000000000"); + to_string_test ("0.0184", "0.01840000000000000000000"); + to_string_test ("0.0062145242", "0.0062145242000"); + to_string_test ("0.000604475131718102196", "0.0006044751317181021960000000000000000"); + to_string_test ("-0.1441651481585831", "-0.144165148158583100"); + to_string_test ("-0.0000014631", "-0.000001463100000000000000000000"); + to_string_test ("0.0279484047801525225287254316875", "0.0279484047801525225287254316875000000000000000000000"); + to_string_test ("-0.00126806436344", "-0.001268064363440000000000000"); + to_string_test ("162145242000", "00162145242000.0"); + + to_string_test ("0", "0."); + to_string_test ("0", "000."); + to_string_test ("1", "1."); + to_string_test ("12", "12."); + to_string_test ("9876543210", "9876543210."); + to_string_test ("0", ".0"); + to_string_test ("0", ".00"); + to_string_test ("0.2", ".2"); + to_string_test ("0.34", ".34"); + to_string_test ("0", "0.e0"); + to_string_test ("0", "0.e+4"); + to_string_test ("980", "98.e1"); + to_string_test ("0.0003", "3.e-4"); + ) diff --git a/drafts/bs-big/package.json b/drafts/bs-big/package.json new file mode 100644 index 0000000..e0498dd --- /dev/null +++ b/drafts/bs-big/package.json @@ -0,0 +1,34 @@ +{ + "name": "bs-big.js", + "version": "1.0.3", + "scripts": { + "clean": "bsb -clean-world", + "build": "bsb -make-world", + "watch": "bsb -make-world -w", + "test": "npm run build && jest" + }, + "keywords": [ + "BuckleScript", + "Reason", + "Reasonml" + ], + "author": "Alexander P Chang", + "license": "MIT", + "peerDependencies": { + "big.js": "^5.2.2" + }, + "devDependencies": { + "@glennsl/bs-jest": "^0.4.9", + "big.js": "^5.2.2", + "bs-platform": "^5.2.1" + }, + "description": "Bucklescript bindings to big.js.", + "repository": { + "type": "git", + "url": "git+https://github.com/alexchang8/bs-big.js.git" + }, + "bugs": { + "url": "https://github.com/alexchang8/bs-big.js/issues" + }, + "homepage": "https://github.com/alexchang8/bs-big.js#readme" +} diff --git a/drafts/bs-big/src/Big.ml b/drafts/bs-big/src/Big.ml new file mode 100644 index 0000000..7c48496 --- /dev/null +++ b/drafts/bs-big/src/Big.ml @@ -0,0 +1,118 @@ +type t = { + c: int array; + e: int; + s: int +} [@@bs.deriving abstract] + +type big = { + mutable dp: int [@bs.as "DP"]; + mutable rm: int [@bs.as "RM"]; + mutable ne: int [@bs.as "NE"]; + mutable pe: int [@bs.as "PE"] +} [@@bs.deriving abstract] + +exception Unknown_error +exception Div_by_zero +exception Invalid_number +exception Invalid_decimal_places +exception Invalid_rounding_mode +exception No_square_root +exception Invalid_precision + +let try_wrap f js_msg exn = + try f () + with Js.Exn.Error e -> + match Js.Exn.message e with + | Some m when m = js_msg -> raise exn + | Some m -> Js.log m; raise Unknown_error + | None -> raise Unknown_error + +external fromStringExn: string -> t = "big.js" [@@bs.new] [@@bs.module] + +let fromString s = + try_wrap (fun () -> fromStringExn s) "[big.js] Invalid number" Invalid_number + +external fromFloat: float -> t = "big.js" [@@bs.new] [@@bs.module] + +external fromInt: int -> t = "big.js" [@@bs.new] [@@bs.module] + +external bigJsObj: big = "big.js" [@@bs.val] [@@bs.module] + +let setDP n = + if n >= 0 then dpSet bigJsObj n else raise Invalid_decimal_places + +let setRM n = + if n >= 0 && n <= 3 then rmSet bigJsObj n else raise Invalid_rounding_mode + +let setNE = neSet bigJsObj + +let setPE = peSet bigJsObj + +let getDP () = dpGet bigJsObj + +let getRM () = rmGet bigJsObj + +let getNE () = neGet bigJsObj + +let getPE () = peGet bigJsObj + +external abs: t -> t = "abs"[@@bs.send] + +external cmp: t -> t -> int = "cmp"[@@bs.send] + +external divExn: t -> t -> t = "div" [@@bs.send] + +let div x y = + try_wrap (fun () -> divExn x y) "[big.js] Division by zero" Div_by_zero + +external eq: t -> t -> bool = "eq"[@@bs.send] + +external gt: t -> t -> bool = "gt"[@@bs.send] + +external gte: t -> t -> bool = "gte"[@@bs.send] + +external lt: t -> t -> bool = "lt"[@@bs.send] + +external lte: t -> t -> bool = "lte"[@@bs.send] + +external minus: t -> t -> t = "minus"[@@bs.send] + +external modExn: t -> t -> t = "mod" [@@bs.send] + +let mod_ x y = + try_wrap (fun () -> modExn x y) "[big.js] Division by zero" Div_by_zero + +external plus: t -> t -> t = "plus"[@@bs.send] + +external pow: t -> int -> t = "pow"[@@bs.send] + +external round: t -> ?dp:int -> ?rm:int -> unit -> t = "round"[@@bs.send] + +external sqrtExn: t -> t = "sqrt" [@@bs.send] + +let sqrt x = + try_wrap (fun () -> sqrtExn x) "[big.js] No square root" No_square_root + +external times: t -> t -> t = "times"[@@bs.send] + +external toExponential: t -> ?dp:int -> unit -> string = "toExponential"[@@bs.send] + +external toFixed: t -> ?dp:int -> unit -> string = "toFixed"[@@bs.send] + +external toPrecisionExn: t -> ?sd:int -> unit -> string = "toPrecision" [@@bs.send] + +let toPrecision x ?sd () = + try_wrap (fun () -> toPrecisionExn x ?sd ()) "[big.js] Invalid precision" + Invalid_precision + +external valueOf: t -> string = "valueOf"[@@bs.send] + +external toString: t -> string = "toString"[@@bs.send] + +external toJson: t -> string = "toJson"[@@bs.send] + +let c = cGet + +let e = eGet + +let s = sGet diff --git a/drafts/bs-big/src/Big.mli b/drafts/bs-big/src/Big.mli new file mode 100644 index 0000000..4a4fc55 --- /dev/null +++ b/drafts/bs-big/src/Big.mli @@ -0,0 +1,166 @@ +(**The abstract type representing a big number *) +type t + +exception Unknown_error + +exception Div_by_zero + +exception Invalid_number + +exception Invalid_decimal_places + +exception Invalid_rounding_mode + +exception No_square_root + +exception Invalid_precision + +(**[fromString x] Returns a big number with [x] interpreted as a decimal. + + Raises [Invalid_number] if the string is not a valid number +*) +val fromString: string -> t + +(**[fromFloat x] Returns a big number with value [x] *) +val fromFloat: float -> t + +(**[fromInt x] Returns a big number with value [x] *) +val fromInt: int -> t + +(**[setDP x] Sets the maximum number of decimal places of the results of + operations involving division to [x]. It is only used by [div], [sqrt], and + [pow] + + Raises [Invalid_decimal_places] if [x] is negative*) +val setDP: int -> unit + +(**[setRM x] Sets the rounding mode used in the above operations and by [round], + [toExponential], [toFixed] and [toPrecision] to [x]. 0 rounds down, 1 rounds + half up, 2 rounds half even, and 3 rounds away from 0 + + Raises [Invalid_rounding_mode] if [x] is not one of 0,1,2 or 3 + *) +val setRM: int -> unit + +(**[setRM x] Sets the negative exponent value at and below which toString returns exponential + notation to [x]. *) +val setNE: int -> unit + +(**[setPE x] Sets the positive exponent at which [toString] returns exponential notation + to [x]. *) +val setPE: int -> unit + +(**Returns the current value of DP. + + Default: 20*) +val getDP: unit -> int + +(**Returns the current value of RM. + + Default: 1*) +val getRM: unit -> int + +(**Returns the current value of NE. + + Default: -7*) +val getNE: unit -> int + +(**Returns the current value of PE. + + Default: 21*) +val getPE: unit -> int + +(**[abs x] Returns the absolute value of [x] as a Big number. *) +val abs: t -> t + +(**[cmp x y] Returns 1 if [x] > [y], -1 if [x] < [y], and 0 if [x] = [y]*) +val cmp: t -> t -> int + +(**[div x y] Returns the Big number represented by x/y. + + Raises [Div_by_zero] if [y] is 0. +*) +val div: t -> t -> t + +(**[eq x y] Returns true if the value of x is equal to the value of y. *) +val eq: t -> t -> bool + +(**[gt x y] Returns true if the value of x is greater than the value of y. *) +val gt: t -> t -> bool + +(**[gte x y] Returns true if the value of x is greater than or equal to the value of y. *) +val gte: t -> t -> bool + +(**[lt x y] Returns true if the value of x is less than the value of y. *) +val lt: t -> t -> bool + +(**[lte x y] Returns true if the value of x is less than or equal to the value of y. *) +val lte: t -> t -> bool + +(**[minus x y] Returns the value of x-y. *) +val minus: t -> t -> t + +(**[mod_ x y] Returns [x] modulo [n]. *) +val mod_: t -> t -> t + +(**[plus x y] Returns the value of x + y. *) +val plus: t -> t -> t + +(**[pow x n] Returns [x] to the power [n]. *) +val pow: t -> int -> t + +(**[round x dp rm ()] returns the value [x] with a maximum of [dp] decimal places + if provided, rounded using rounding mode [rm]. + + If [dp] is ommitted, will round to a whole number. If [rm] is ommitted, will + use rounding mode RM. + *) +val round: t -> ?dp:int -> ?rm:int -> unit -> t + +(**[sqrt x] Returns the square root of x. + + Raises [No_square_root] if the root of x would be imaginary. +*) +val sqrt: t -> t + +(**[times x y] Returns the value of x*y *) +val times: t -> t -> t + +(**[toExponential x dp ()] Returns a string representing [x] in exponential notation + to a fixed number of [dp] decimal places. + + If [dp] is ommitted, defaults to the number of digits needed to represent [x] + exactly*) +val toExponential: t -> ?dp:int -> unit -> string + +(**[toFixed x dp ()] Returns a string representing [x] with a fixed number of + [dp] decimal places. + + If [dp] is ommitted, it is simply the value in normal notation. + *) +val toFixed: t -> ?dp:int -> unit -> string + +(**[toPrecision x sd ()] Returns a string representing [x] with [sd] significant + digits. + + If [sd] is ommitted, returns the same as [toString]. + *) +val toPrecision: t -> ?sd:int -> unit -> string + +(**[toString x] Returns a string representing the value of x*) +val toString: t -> string + +(**[valueOf x] Same as [toString] but the sign is included for -0*) +val valueOf: t -> string + +(**Same as valueOf*) +val toJson: t -> string + +(**[c x] Returns the significand of [x]*) +val c: t -> int array + +(**[e x] Returns the exponent of [x]*) +val e: t -> int + +(**[s x] Returns the sign of [x]. Either -1 or 1.*) +val s: t -> int diff --git a/drafts/bs-bn/CHANGELOG.md b/drafts/bs-bn/CHANGELOG.md new file mode 100644 index 0000000..8202a6e --- /dev/null +++ b/drafts/bs-bn/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +(modification: no type change headlines) and this project adheres to +[Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## [0.0.2] - 2017-12-30 +- Added `"allowed-build-kinds": "js"` to `bsconfig.json` + +## [0.0.1] - 2017-12-30 +- Initial version \ No newline at end of file diff --git a/drafts/bs-bn/LICENSE b/drafts/bs-bn/LICENSE new file mode 100644 index 0000000..6c9c5c9 --- /dev/null +++ b/drafts/bs-bn/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Javier Chávarri + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-bn/README.md b/drafts/bs-bn/README.md new file mode 100644 index 0000000..f8134ea --- /dev/null +++ b/drafts/bs-bn/README.md @@ -0,0 +1,55 @@ +# bs-bn.js +[BuckleScript](https://bucklescript.github.io/) bindings for [bn.js](https://github.com/indutny/bn.js/). + +### State + +This is a work in progress, so proceed with caution. However, 90% of the tests in the original library have been migrated to Reason, so the coverage is mostly complete. + +Constructors, binary ops, arithmetic ops, and reduction ops are available. There are some functions related to prime numbers that have not been bound yet. Feel free to open an issue / PR if you need them. + +### Installation + +1. Make sure you have `bn.js` installed. If not, run `npm install bn.js --save` +2. Install the bindings: `npm install bs-bn.js --save` +3. Add the bindings to `bsconfig.json` + +```json +{ + "bs-dependencies": [ + "bs-bn.js" + ] +} +``` + +### Using it + +Create new big numbers from float numbers: + +```reason +let a = Bn.fromFloat(12345.); +``` + +You can use `float_of_int` if you prefer to use ints. The main reason why floats were selected is that ints are trimmed to 32 bits in BuckleScript, so float is a safer choice. + +You can create big numbers also from other types: + +```reason +let s = Bn.fromString(~base=16, ~endian=`le, "1A6B765D8CDF"); +let a = Bn.fromArray([|1, 2, 3|]); +let b = Bn.fromBuffer(Node.Buffer.fromString("12345")); +``` + +Operations always keep the affected big number as the last param to enable piping: + +```reason +let a = Bn.fromString(~base=16, "ffffffff"); +let b = a |> Bn.abs |> Bn.mul(Bn.fromFloat(3.)); +``` + +### Full API + +Check the interface file [`Bn.rei`](https://github.com/jchavarri/bs-bn.js/blob/master/src/Bn.rei). + +### TODO + +- Explore adding infix operators: `let result = Bn.Infix.(bn1 + bn2);` diff --git a/drafts/bs-bn/__tests__/ArithmeticSpec.re b/drafts/bs-bn/__tests__/ArithmeticSpec.re new file mode 100644 index 0000000..0fb47bc --- /dev/null +++ b/drafts/bs-bn/__tests__/ArithmeticSpec.re @@ -0,0 +1,744 @@ +open Jest; + +let () = + describe( + "add", + ExpectJs.( + () => { + test("adds numbers", () => + expect( + Bn.fromFloat(14.) + |> Bn.add(Bn.fromFloat(26.)) + |> Bn.toString(~base=16) + ) + |> toBe("28") + ); + test("adds numbers case 2", () => { + let k = Bn.fromFloat(float_of_int(0x1234)); + let r = ref(k); + for (_ in 0 to 256) { + r := Bn.add(k, r^); + }; + expect(Bn.toString(~base=16, r^)) |> toBe("125868"); + }); + test("handles carry properly (in-place)", () => { + let k = Bn.fromString(~base=16, "abcdefabcdefabcdef"); + let r = Bn.fromString(~base=16, "deadbeef"); + for (_ in 0 to 256) { + Bn.iadd(k, r); + }; + expect(Bn.toString(~base=16, r)) |> toBe("ac79bd9b79be7a277bde"); + }); + test("does positive + negative", () => { + let a = Bn.fromString(~base=16, "abcd"); + let b = Bn.fromString(~base=16, "-abce"); + Bn.iadd(a, b); + expect(b |> Bn.toString(~base=16)) |> toBe("-1"); + }); + } + ) + ); + +let () = + describe( + "iaddn", + ExpectJs.( + () => { + test("allows a sign change", () => { + let a = Bn.fromFloat(-100.); + Bn.iaddn(200., a); + expect(a |> Bn.toString) |> toBe("100"); + }); + test("adds a negative number", () => { + let a = Bn.fromFloat(-100.); + Bn.iaddn(-200., a); + expect(a |> Bn.toString) |> toBe("-300"); + }); + test("allows neg + pos with big number", () => { + let a = Bn.fromFloat(~base=10, -1000000000.); + Bn.iaddn(200., a); + expect(a |> Bn.toString) |> toBe("-999999800"); + }); + test("carries limb", () => { + let a = Bn.fromString(~base=16, "3ffffff"); + Bn.iaddn(1., a); + expect(a |> Bn.toString(~base=16)) |> toBe("4000000"); + }); + test("throws error with num eq 0x4000000", () => + expect(() => + Bn.fromFloat(0.) |> Bn.iaddn(float_of_int(0x4000000)) + ) + |> toThrow + ); + } + ) + ); + +let () = + describe( + "sub", + ExpectJs.( + () => { + test("subtracts small numbers", () => { + let a = Bn.fromFloat(26.); + expect(a |> Bn.sub(Bn.fromFloat(14.)) |> Bn.toString(~base=16)) + |> toBe("c"); + }); + test("subtracts small numbers 2", () => { + let a = Bn.fromFloat(14.); + expect(a |> Bn.sub(Bn.fromFloat(26.)) |> Bn.toString(~base=16)) + |> toBe("-c"); + }); + test("subtracts small numbers 3", () => { + let a = Bn.fromFloat(26.); + expect(a |> Bn.sub(Bn.fromFloat(26.)) |> Bn.toString(~base=16)) + |> toBe("0"); + }); + test("subtracts small numbers 4", () => { + let a = Bn.fromFloat(-26.); + expect(a |> Bn.sub(Bn.fromFloat(26.)) |> Bn.toString(~base=16)) + |> toBe("-34"); + }); + let a = + Bn.fromString( + ~base=16, + "31ff3c61db2db84b9823d320907a573f6ad37c437abe458b1802cda041d6384a7d8daef41395491e2" + ); + let b = + Bn.fromString( + ~base=16, + "6f0e4d9f1d6071c183677f601af9305721c91d31b0bbbae8fb790000" + ); + let r = + Bn.fromString( + ~base=16, + "31ff3c61db2db84b9823d3208989726578fd75276287cd9516533a9acfb9a6776281f34583ddb91e2" + ); + test("subtracts big numbers", () => + expect(a |> Bn.sub(b) |> Bn.cmp(r)) |> toBe(Equality.Equal) + ); + test("subtracts numbers in place", () => { + let c = Bn.clone(b); + Bn.isub(a, c); + expect(c |> Bn.neg |> Bn.cmp(r)) |> toBe(Equality.Equal); + }); + test("subtracts with carry", () => { + let a = Bn.fromString(~base=16, "12345"); + let b = Bn.fromString(~base=16, "1000000000000"); + Bn.isub(b, a); + expect(a |> Bn.toString(~base=16)) |> toBe("-fffffffedcbb"); + }); + } + ) + ); + +let () = + describe( + "isubn", + ExpectJs.( + () => { + test("subtracts negative number", () => { + let a = + Bn.fromString( + ~base=16, + "7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b" + ); + Bn.isubn(-1., a); + expect(a |> Bn.toString(~base=16)) + |> toBe( + "7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681c" + ); + }); + test("works for positive numbers", () => { + let a = Bn.fromFloat(-100.); + Bn.isubn(200., a); + expect(a |> Bn.toString) |> toBe("-300"); + }); + test("does not allow a sign change", () => { + let a = Bn.fromFloat(-100.); + Bn.isubn(-200., a); + expect(a |> Bn.toString) |> toBe("100"); + }); + test("changes sign on small numbers at 0", () => { + let a = Bn.fromFloat(0.); + expect(a |> Bn.subn(2.) |> Bn.toString) |> toBe("-2"); + }); + test("changes sign on small numbers at 1", () => { + let a = Bn.fromFloat(1.); + expect(a |> Bn.subn(2.) |> Bn.toString) |> toBe("-1"); + }); + test("throws error with num eq 0x4000000", () => { + let a = Bn.fromFloat(0.); + expect(() => + Bn.isubn(float_of_int(0x4000000), a) + ) |> toThrow; + }); + } + ) + ); + +let testMethod = (name, mul) => + describe( + name, + ExpectJs.( + () => { + let offsets = [ + (1, "smallMulTo"), + (250, "comb10MulTo"), + (1000, "bigMulTo"), + (15000, "jumboMulTo") + ]; + let mulTests = [ + (x => mul(x, x) |> Bn.isNeg, false), + (x => mul(x, Bn.neg(x)) |> Bn.isNeg, true), + (x => mul(Bn.neg(x), x) |> Bn.isNeg, true), + (x => mul(Bn.neg(x), Bn.neg(x)) |> Bn.isNeg, false) + ]; + List.iter2( + ((offset, name), (mulTest, mulTestResult)) => + test( + "multiplies numbers of different signs - " ++ name, + () => { + let a = Bn.fromFloat(1.); + Bn.ishln(offset, a); + expect(mulTest(a)) |> toBe(mulTestResult); + } + ), + offsets, + mulTests + ); + test("multiplies with carry", () => { + let n = Bn.fromFloat(float_of_int(0x1001)); + let r = ref(n); + for (_ in 0 to 3) { + r := Bn.mul(n, r^); + }; + expect(r^ |> Bn.toString(~base=16)) |> toBe("100500a00a005001"); + }); + test("multiplies big numbers", () => { + let n = + Bn.fromString( + ~base=16, + "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" + ); + expect(Bn.mul(n, n) |> Bn.toString(~base=16)) + |> toBe( + "39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9" + ++ "b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9" + ++ "978a8bd8acaa40" + ); + }); + test("multiplies neg number on 0", () => + expect( + Bn.mul( + Bn.fromString("-100000000000"), + Bn.fromString("3") |> Bn.div(Bn.fromString("4")) + ) + |> Bn.toString(~base=16) + ) + |> toBe("0") + ); + } + ) + ); + +testMethod("mul", Bn.mul); + +testMethod("mulf", Bn.mulf); + +let () = + describe( + "imul", + ExpectJs.( + () => { + test("multiplies numbers in place", () => { + let a = Bn.fromString(~base=16, "abcdef01234567890abcd"); + let b = Bn.fromString(~base=16, "abcdef01234567890abcd"); + let c = Bn.mul(b, a); + Bn.imul(b, a); + expect(a |> Bn.toString(~base=16)) + |> toBe(c |> Bn.toString(~base=16)); + }); + test("multiplies large numbers in place", () => { + let a = + Bn.fromString( + ~base=16, + "abcdef01234567890abcd214a25123f512361e6d236" + ); + let b = + Bn.fromString( + ~base=16, + "deadbeefa551edebabba8121234fd21bac0341324dd" + ); + let c = Bn.mul(b, a); + Bn.imul(b, a); + expect(a |> Bn.toString(~base=16)) + |> toBe(c |> Bn.toString(~base=16)); + }); + test("multiplies by 0", () => { + let a = Bn.fromString(~base=16, "abcdef01234567890abcd"); + let b = Bn.fromString(~base=16, "0"); + let c = Bn.mul(b, a); + Bn.imul(b, a); + expect(a |> Bn.toString(~base=16)) + |> toBe(c |> Bn.toString(~base=16)); + }); + test("regresses mul big numbers in-place", () => { + let qs = Fixtures.DhGroups.P17.qs; + let q = Bn.fromString(~base=16, Fixtures.DhGroups.P17.q); + Bn.isqr(q); + expect(q |> Bn.toString(~base=16)) |> toBe(qs); + }); + } + ) + ); + +let () = + describe( + "muln", + ExpectJs.( + () => { + test("multiplies number by small number", () => { + let a = Bn.fromString(~base=16, "abcdef01234567890abcd"); + let b = Bn.fromString(~base=16, "dead"); + let c = Bn.mul(b, a); + expect(Bn.muln(float_of_int(0xdead), a) |> Bn.toString(~base=16)) + |> toBe(c |> Bn.toString(~base=16)); + }); + test("throws with num eq 0x4000000", () => + expect(() => + Bn.fromFloat(0.) |> Bn.imuln(float_of_int(0x4000000)) + ) + |> toThrow + ); + } + ) + ); + +let () = + describe( + "pow", + ExpectJs.( + () => + test("raises number to the power", () => { + let a = Bn.fromString(~base=16, "ab"); + let b = Bn.fromString(~base=10, "13"); + let c = Bn.pow(b, a); + expect(c |> Bn.toString(~base=16)) + |> toBe("15963da06977df51909c9ba5b"); + }) + ) + ); + +let () = + describe( + "div", + ExpectJs.( + () => { + [ + (256, 10, 25), + ((-256), 10, (-25)), + (256, (-10), (-25)), + ((-256), (-10), 25) + ] + |> List.iter(((x, y, r)) => + test("divides small numbers (<=26 bits)", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + let c = Bn.div(b, a); + expect(c |> Bn.toString(~base=10)) |> toBe(string_of_int(r)); + }) + ); + [ + ("1222222225255589", "611111124969028", "1"), + ("-1222222225255589", "611111124969028", "-1"), + ("1222222225255589", "-611111124969028", "-1"), + ("-1222222225255589", "-611111124969028", "1"), + ("611111124969028", "1222222225255589", "0"), + ("-611111124969028", "1222222225255589", "0"), + ("611111124969028", "-1222222225255589", "0"), + ("-611111124969028", "-1222222225255589", "0") + ] + |> List.iter(((x, y, r)) => + test("divides large numbers (>53 bits)", () => { + let a = Bn.fromString(x); + let b = Bn.fromString(y); + let c = Bn.div(b, a); + expect(c |> Bn.toString(~base=10)) |> toBe(r); + }) + ); + [ + ("69527932928", "16974594", "fff"), + ("-69527932928", "16974594", "-fff") + ] + |> List.iter(((x, y, r)) => + test("divides dec numbers", () => { + let a = Bn.fromString(x); + let b = Bn.fromString(y); + let c = Bn.div(b, a); + expect(c |> Bn.toString(~base=16)) |> toBe(r); + }) + ); + test("divides hex numbers", () => { + let a = + Bn.fromString( + ~base=16, + "39e58a8055b6fb264b75ec8c646509784204ac15a8c24e05babc9729ab9" + ++ "b055c3a9458e4ce3289560a38e08ba8175a9446ce14e608245ab3a9" + ++ "978a8bd8acaa40" + ); + let b = + Bn.fromString( + ~base=16, + "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" + ); + expect(Bn.div(b, a) |> Bn.toString(~base=16)) + |> toBe(b |> Bn.toString(~base=16)); + }); + } + ) + ); + +let () = + describe( + "idivn", + ExpectJs.( + () => + [ + ("10", 3., "5", 16), + ("12", 3., "6", 16), + ("10000000000000000", 3., "3333333333333333", 10), + ( + "100000000000000000000000000000", + 3., + "33333333333333333333333333333", + 10 + ) + ] + |> List.iter(((x, n, r, base)) => + test("divides numbers in-place", () => { + let a = Bn.fromString(~base, x); + Bn.idivn(n, a); + expect(a |> Bn.toString(~base)) |> toBe(r); + }) + ) + ) + ); + +let () = + describe( + "divRound", + ExpectJs.( + () => { + [ + (9, 20, 0), + (10, 20, 1), + (150, 20, 8), + (149, 20, 7), + (149, 17, 9), + (144, 17, 8), + ((-144), 17, (-8)) + ] + |> List.iter(((x, y, r)) => + test("divides numbers with rounding", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + expect(Bn.divRound(b, a) |> Bn.toString) + |> toBe(string_of_int(r)); + }) + ); + test("returns 1 on exact division", () => { + let a = Bn.fromFloat(144.); + let b = Bn.fromFloat(144.); + expect(Bn.divRound(b, a) |> Bn.toString) |> toBe("1"); + }); + } + ) + ); + +let () = + describe( + "mod", + ExpectJs.( + () => { + [ + (256, 10, 6), + ((-256), 10, (-6)), + (256, (-10), 6), + ((-256), (-10), (-6)), + (10, 256, 10), + ((-10), 256, (-10)), + (10, (-256), 10), + ((-10), (-256), (-10)) + ] + |> List.iter(((x, y, r)) => + test("modulos small numbers (<=26 bits)", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + expect(Bn.mod_(b, a) |> Bn.toString) |> toBe(string_of_int(r)); + }) + ); + [ + ("1222222225255589", "611111124969028", "611111100286561"), + ("-1222222225255589", "611111124969028", "-611111100286561"), + ("1222222225255589", "-611111124969028", "611111100286561"), + ("-1222222225255589", "-611111124969028", "-611111100286561"), + ("611111124969028", "1222222225255589", "611111124969028"), + ("-611111124969028", "1222222225255589", "-611111124969028"), + ("611111124969028", "-1222222225255589", "611111124969028"), + ("-611111124969028", "-1222222225255589", "-611111124969028") + ] + |> List.iter(((x, y, r)) => + test("modulos large numbers (>53 bits)", () => { + let a = Bn.fromString(x); + let b = Bn.fromString(y); + expect(Bn.mod_(b, a) |> Bn.toString) |> toBe(r); + }) + ); + [("10", "256", "a"), ("69527932928", "16974594", "102f302")] + |> List.iter(((x, y, r)) => + test("modulos numbers 1", () => { + let a = Bn.fromString(x); + let b = Bn.fromString(y); + expect(Bn.mod_(b, a) |> Bn.toString(~base=16)) |> toBe(r); + }) + ); + [ + (178, 10, 17, 8, 8), + ((-178), 10, (-17), (-8), 2), + (178, (-10), (-17), 8, 8), + ((-178), (-10), 17, (-8), 2), + ((-4), (-3), 1, (-1), 2) + ] + |> List.iter(((x, y, rDiv, rMod, rUmod)) => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + test("modulos numbers 2 - div", () => + expect(Bn.div(b, a) |> Bn.toNumber) |> toBe(float_of_int(rDiv)) + ); + test("modulos numbers 2 - mod", () => + expect(Bn.mod_(b, a) |> Bn.toNumber) |> toBe(float_of_int(rMod)) + ); + test("modulos numbers 2 - umod", () => + expect(Bn.umod(b, a) |> Bn.toNumber) + |> toBe(float_of_int(rUmod)) + ); + }); + test("carries the sign inside division", () => { + let a = + Bn.fromString( + ~base=16, + "945304eb96065b2a98b57a48a06ae28d285a71b5" + ); + let b = + Bn.fromString( + ~base=16, + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + ); + expect(a |> Bn.mul(b) |> Bn.mod_(a) |> Bn.cmpn(0.)) + |> toBe(Equality.Equal); + }); + } + ) + ); + +let () = + describe( + "mod", + ExpectJs.( + () => + test("carries the sign inside division", () => { + let a = + Bn.fromString( + ~base=16, + "945304eb96065b2a98b57a48a06ae28d285a71b5" + ); + let b = + Bn.fromString( + ~base=16, + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + ); + expect(a |> Bn.mul(b) |> Bn.mod_(a) |> Bn.cmpn(0.)) + |> toBe(Equality.Equal); + }) + ) + ); + +let () = + describe( + "modrn", + ExpectJs.( + () => + [ + ("10", 256, "10"), + ("100", 256, "0"), + ("1001", 256, "1"), + ("100000000001", 256, "1"), + ( + "100000000001", + 257, + Bn.fromString(~base=16, "100000000001") + |> Bn.mod_(Bn.fromFloat(257.)) + |> Bn.toString(~base=16) + ), + ( + "123456789012", + 3, + Bn.fromString(~base=16, "123456789012") + |> Bn.mod_(Bn.fromFloat(3.)) + |> Bn.toString(~base=16) + ) + ] + |> List.iter(((x, y, r)) => + test("act like mod on small numbers", () => { + let a = Bn.fromString(~base=16, x); + expect(a |> Bn.modn(float_of_int(y)) |> Bn.toString(~base=16)) + |> toBe(r); + }) + ) + ) + ); + +let () = + describe( + "abs", + ExpectJs.( + () => { + [(0x1001, "4097"), ((-0x1001), "4097")] + |> List.iter(((x, r)) => + test("returns absolute value", () => { + let a = Bn.fromFloat(float_of_int(x)); + expect(a |> Bn.abs |> Bn.toString) |> toBe(r); + }) + ); + test("returns absolute value for long numbers", () => { + let a = Bn.fromString(~base=16, "ffffffff"); + expect(a |> Bn.abs |> Bn.toString) |> toBe("4294967295"); + }); + } + ) + ); + +let () = + describe( + "invm", + ExpectJs.( + () => + [ + ("257", "3"), + ("fffffffffffffffffffffffffffffffeffffffffffffffff", "deadbeef"), + ("872d9b030ba368706b68932cf07a0e0c", "65537"), + ("5", "6") + ] + |> List.iter(((x, y)) => + test("inverts relatively-prime numbers", () => { + let p = Bn.fromString(~base=16, x); + let a = Bn.fromString(~base=16, y); + let b = a |> Bn.invm(p); + expect(a |> Bn.mul(b) |> Bn.mod_(p) |> Bn.toString(~base=16)) + |> toBe("1"); + }) + ) + ) + ); + +let () = + describe( + "gcd", + ExpectJs.( + () => + [ + (3, 2, "1"), + (18, 12, "6"), + ((-18), 12, "6"), + ((-18), (-12), "6"), + ((-18), 0, "18"), + (0, (-18), "18"), + (2, 0, "2"), + (0, 3, "3"), + (0, 0, "0") + ] + |> List.iter(((x, y, r)) => + test("returns GCD", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + expect(a |> Bn.gcd(b) |> Bn.toString) |> toBe(r); + }) + ) + ) + ); + +let () = + describe( + "egcd", + ExpectJs.( + () => { + [(3, 2, "1"), (18, 12, "6"), ((-18), 12, "6"), (0, 12, "12")] + |> List.iter(((x, y, r)) => + test("returns EGCD", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + let result = a |> Bn.egcd(b); + expect(result.gcd |> Bn.toString) |> toBe(r); + }) + ); + test("does not allow 0 input", () => + expect(() => + Bn.fromString("1") |> Bn.egcd(Bn.fromString("0")) + ) + |> toThrow + ); + test("does not allow negative input", () => + expect(() => + Bn.fromString("1") |> Bn.egcd(Bn.fromString("-1")) + ) + |> toThrow + ); + } + ) + ); + +let () = + describe( + "max", + ExpectJs.( + () => + [(3, 2, "3"), (2, 3, "3"), (2, 2, "2"), (2, (-2), "2")] + |> List.iter(((x, y, r)) => + test("returns maximum", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + expect(a |> Bn.max(b) |> Bn.toString) |> toBe(r); + }) + ) + ) + ); + +let () = + describe( + "min", + ExpectJs.( + () => + [(3, 2, "2"), (2, 3, "2"), (2, 2, "2"), (2, (-2), "-2")] + |> List.iter(((x, y, r)) => + test("returns minimun", () => { + let a = Bn.fromFloat(float_of_int(x)); + let b = Bn.fromFloat(float_of_int(y)); + expect(a |> Bn.min(b) |> Bn.toString) |> toBe(r); + }) + ) + ) + ); + +let () = + describe( + "ineg", + ExpectJs.( + () => + test("does not change sign for zero", () => { + let a = Bn.fromString("0"); + Bn.ineg(a); + expect(a |> Bn.toString) |> toBe("0"); + }) + ) + ); \ No newline at end of file diff --git a/drafts/bs-bn/__tests__/BinarySpec.re b/drafts/bs-bn/__tests__/BinarySpec.re new file mode 100644 index 0000000..34449f4 --- /dev/null +++ b/drafts/bs-bn/__tests__/BinarySpec.re @@ -0,0 +1,444 @@ +open Jest; + +let () = + describe( + "shl", + ExpectJs.( + () => + [ + ("69527932928", 13, "2060602000000"), + ("69527932928", 45, "206060200000000000000") + ] + |> List.iter(((x, bits, r)) => + test("shifts left numbers", () => + expect( + Bn.fromString(x) |> Bn.shln(bits) |> Bn.toString(~base=16) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "ushl", + ExpectJs.( + () => + [ + ("69527932928", 13, "2060602000000"), + ("69527932928", 45, "206060200000000000000") + ] + |> List.iter(((x, bits, r)) => + test("shifts left numbers", () => + expect( + Bn.fromString(x) |> Bn.ushln(bits) |> Bn.toString(~base=16) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "shr", + ExpectJs.( + () => + [ + ("69527932928", 13, "818180"), + ("69527932928", 17, "81818"), + ("69527932928", 256, "0") + ] + |> List.iter(((x, bits, r)) => + test("shifts right numbers", () => + expect( + Bn.fromString(x) |> Bn.shrn(bits) |> Bn.toString(~base=16) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "ushr", + ExpectJs.( + () => + [ + ("69527932928", 13, "818180"), + ("69527932928", 17, "81818"), + ("69527932928", 256, "0") + ] + |> List.iter(((x, bits, r)) => + test("shifts right numbers", () => + expect( + Bn.fromString(x) |> Bn.ushrn(bits) |> Bn.toString(~base=16) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "bincn", + ExpectJs.( + () => { + let twoToFour = Bn.fromFloat(2.); + Bn.bincn(1, twoToFour); + [ + (0, 1, "2"), + (2, 1, "4"), + (2, 1, twoToFour |> Bn.toString(~base=16)), + (0xffffff, 1, "1000001"), + (2, 63, "8000000000000002") + ] + |> List.iter(((x, bits, r)) => + test("increments bits", () => { + let bn = Bn.fromFloat(float_of_int(x)); + Bn.bincn(bits, bn); + expect(bn |> Bn.toString(~base=16)) |> toBe(r); + }) + ); + } + ) + ); + +let () = + describe( + "imaskn", + ExpectJs.( + () => { + [ + ("0", 1, "0"), + ("3", 1, "1"), + ("123456789", 4, "9"), + ("123456789", 16, "6789"), + ("123456789", 28, "3456789") + ] + |> List.iter(((x, bits, r)) => + test("masks bits in place", () => { + let bn = Bn.fromString(~base=16, x); + Bn.imaskn(bits, bn); + expect(bn |> Bn.toString(~base=16)) |> toBe(r); + }) + ); + [(0xe3, 56, "e3"), (0xe3, 26, "e3")] + |> List.iter(((x, bits, r)) => + test("does not mask when number is bigger than length", () => { + let bn = Bn.fromFloat(float_of_int(x)); + Bn.imaskn(bits, bn); + expect(bn |> Bn.toString(~base=16)) |> toBe(r); + }) + ); + } + ) + ); + +let () = + describe( + "testn", + ExpectJs.( + () => { + [ + "ff", + "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + ] + |> List.iter(x => { + let bn = Bn.fromString(~base=16, x); + let bl = Bn.bitLength(bn); + for (i in 0 to bl - 1) { + test("masks bits in place", () => + expect(Bn.testn(i, bn)) |> toBe(true) + ); + }; + test("false if length is greater than bitLength", () => + expect(Bn.testn(bl, bn)) |> toBe(false) + ); + }); + let xbits = + "01111001010111001001000100011101" + ++ "11010011101100011000111001011101" + ++ "10010100111000000001011000111101" + ++ "01011111001111100100011110000010" + ++ "01011010100111010001010011000100" + ++ "01101001011110100001001111100110" + ++ "001110010111"; + let x = + Bn.fromString( + "23478905234580795234378912401239784125643978256123048348957342" + ); + for (i in 0 to Bn.bitLength(x) - 1) { + test("works with bit " ++ string_of_int(i), () => + expect(Bn.testn(i, x)) |> toBe(xbits.[i] === '1' ? true : false) + ); + }; + test("has short-cuts", () => { + let x = Bn.fromString(~base=16, "abcd"); + expect(Bn.testn(128, x)) |> toBe(false); + }); + } + ) + ); + +let () = + describe( + "and", + ExpectJs.( + () => { + test("ands numbers", () => + expect( + Bn.fromString(~base=2, "1010101010101010101010101010101010101010") + |> Bn.and_( + Bn.fromString( + ~base=2, + "101010101010101010101010101010101010101" + ) + ) + |> Bn.toString(~base=2) + ) + |> toBe("0") + ); + test("ands numbers of different limb-length", () => + expect( + Bn.fromString(~base=16, "abcd0000ffff") + |> Bn.and_(Bn.fromString(~base=16, "abcd")) + |> Bn.toString(~base=16) + ) + |> toBe("abcd") + ); + } + ) + ); + +let () = + describe( + "iand", + ExpectJs.( + () => { + test("iands numbers", () => { + let bn = + Bn.fromString(~base=2, "1010101010101010101010101010101010101010"); + Bn.iand( + Bn.fromString(~base=2, "101010101010101010101010101010101010101"), + bn + ); + expect(bn |> Bn.toString(~base=2)) |> toBe("0"); + }); + test("iands numbers - 2", () => { + let bn = + Bn.fromString(~base=2, "1000000000000000000000000000000000000001"); + Bn.iand(Bn.fromString(~base=2, "1"), bn); + expect(bn |> Bn.toString(~base=2)) |> toBe("1"); + }); + test("iands numbers - 3", () => { + let bn = Bn.fromString(~base=2, "1"); + Bn.iand( + Bn.fromString(~base=2, "1000000000000000000000000000000000000001"), + bn + ); + expect(bn |> Bn.toString(~base=2)) |> toBe("1"); + }); + } + ) + ); + +let () = + describe( + "or", + ExpectJs.( + () => { + test("ors numbers", () => + expect( + Bn.fromString(~base=2, "1010101010101010101010101010101010101010") + |> Bn.or_( + Bn.fromString( + ~base=2, + "101010101010101010101010101010101010101" + ) + ) + |> Bn.toString(~base=2) + ) + |> toBe("1111111111111111111111111111111111111111") + ); + test("ors numbers of different limb-length", () => + expect( + Bn.fromString(~base=16, "abcd00000000") + |> Bn.or_(Bn.fromString(~base=16, "abcd")) + |> Bn.toString(~base=16) + ) + |> toBe("abcd0000abcd") + ); + } + ) + ); + +let () = + describe( + "ior", + ExpectJs.( + () => { + test("iors numbers", () => { + let bn = + Bn.fromString(~base=2, "1010101010101010101010101010101010101010"); + Bn.ior( + Bn.fromString(~base=2, "101010101010101010101010101010101010101"), + bn + ); + expect(bn |> Bn.toString(~base=2)) + |> toBe("1111111111111111111111111111111111111111"); + }); + test("iors numbers - 2", () => { + let bn = + Bn.fromString(~base=2, "1000000000000000000000000000000000000000"); + Bn.ior(Bn.fromString(~base=2, "1"), bn); + expect(bn |> Bn.toString(~base=2)) + |> toBe("1000000000000000000000000000000000000001"); + }); + test("iors numbers - 3", () => { + let bn = Bn.fromString(~base=2, "1"); + Bn.ior( + Bn.fromString(~base=2, "1000000000000000000000000000000000000000"), + bn + ); + expect(bn |> Bn.toString(~base=2)) + |> toBe("1000000000000000000000000000000000000001"); + }); + } + ) + ); + +let () = + describe( + "xor", + ExpectJs.( + () => { + test("xors numbers", () => + expect( + Bn.fromString(~base=2, "11001100110011001100110011001100") + |> Bn.xor( + Bn.fromString(~base=2, "1100110011001100110011001100110") + ) + |> Bn.toString(~base=2) + ) + |> toBe("10101010101010101010101010101010") + ); + test("xors numbers of different limb-length", () => + expect( + Bn.fromString(~base=16, "abcd0000ffff") + |> Bn.xor(Bn.fromString(~base=16, "abcd")) + |> Bn.toString(~base=16) + ) + |> toBe("abcd00005432") + ); + } + ) + ); + +let () = + describe( + "ixor", + ExpectJs.( + () => { + test("ixors numbers", () => { + let bn = Bn.fromString(~base=2, "11001100110011001100110011001100"); + Bn.ixor( + Bn.fromString(~base=2, "1100110011001100110011001100110"), + bn + ); + expect(bn |> Bn.toString(~base=2)) + |> toBe("10101010101010101010101010101010"); + }); + test("ixors numbers - 2", () => { + let bn = Bn.fromString(~base=2, "11001100110011001100110011001100"); + Bn.ixor(Bn.fromString(~base=2, "1"), bn); + expect(bn |> Bn.toString(~base=2)) + |> toBe("11001100110011001100110011001101"); + }); + test("ixors numbers - 3", () => { + let bn = Bn.fromString(~base=2, "1"); + Bn.ixor( + Bn.fromString(~base=2, "11001100110011001100110011001100"), + bn + ); + expect(bn |> Bn.toString(~base=2)) + |> toBe("11001100110011001100110011001101"); + }); + } + ) + ); + +let () = + describe( + "setn", + ExpectJs.( + () => { + test("allows single bits to be set", () => { + let bn = Bn.fromFloat(0.); + Bn.setn(2, true, bn); + expect(bn |> Bn.toString(~base=2)) |> toBe("100"); + }); + test("allows single bits to be set - 2", () => { + let bn = Bn.fromFloat(0.); + Bn.setn(27, true, bn); + expect(bn |> Bn.toString(~base=2)) + |> toBe("1000000000000000000000000000"); + }); + test("allows single bits to be set - 3", () => { + let bn = Bn.fromFloat(0.); + Bn.setn(63, true, bn); + expect(bn |> Bn.toString(~base=16)) + |> toBe(Bn.fromFloat(1.) |> Bn.ushln(63) |> Bn.toString(~base=16)); + }); + test("allows single bits to be set - 4", () => { + let bn = Bn.fromString(~base=2, "1000000000000000000000000001"); + Bn.setn(27, false, bn); + expect(bn |> Bn.toString(~base=2)) |> toBe("1"); + }); + test("allows single bits to be set - 5", () => { + let bn = Bn.fromString(~base=2, "101"); + Bn.setn(2, false, bn); + expect(bn |> Bn.toString(~base=2)) |> toBe("1"); + }); + } + ) + ); + +let () = + describe( + "notn", + ExpectJs.( + () => + [ + ("111000111", 9, "111000"), + ("000111000", 9, "111000111"), + ("111000111", 32, "11111111111111111111111000111000"), + ("000111000", 32, "11111111111111111111111111000111"), + ( + "111000111", + 68, + "11111111111111111111111111111111" + ++ "111111111111111111111111111000111000" + ), + ( + "000111000", + 68, + "11111111111111111111111111111111" + ++ "111111111111111111111111111111000111" + ) + ] + |> List.iter(((x, bitwidth, r)) => + test("allows bitwise negation", () => + expect( + Bn.fromString(~base=2, x) + |> Bn.notn(bitwidth) + |> Bn.toString(~base=2) + ) + |> toBe(r) + ) + ) + ) + ); \ No newline at end of file diff --git a/drafts/bs-bn/__tests__/ConstructorSpec.re b/drafts/bs-bn/__tests__/ConstructorSpec.re new file mode 100644 index 0000000..0c02d84 --- /dev/null +++ b/drafts/bs-bn/__tests__/ConstructorSpec.re @@ -0,0 +1,225 @@ +open Jest; + +let () = + describe( + "from float", + ExpectJs.( + () => { + test( + "one limb number", + () => expect(Bn.fromFloat(12345.) |> Bn.toString(~base=16)) |> toBe("3039") + ); + test( + "two-limb number", + () => + expect(Bn.fromFloat(float_of_int(0x4123456)) |> Bn.toString(~base=16)) + |> toBe("4123456") + ); + test( + "accepts 52 bits of precision", + () => + expect( + Bn.fromFloat(~base=10, Js.Math.pow_float(~base=2., ~exp=52.)) + |> Bn.toString(~base=10) + ) + |> toBe("4503599627370496") + ); + test( + "accepts max safe value", + () => { + let num = Js.Math.pow_float(~base=2., ~exp=53.) -. 1.; + expect(Bn.fromFloat(~base=10, num) |> Bn.toString(~base=10)) + |> toBe("9007199254740991") + } + ); + test( + "does not accept unsafe value", + () => { + let num = Js.Math.pow_float(~base=2., ~exp=53.); + expect(() => Bn.fromFloat(~base=10, num)) |> toThrow + } + ); + test( + "accepts two-limb LE number", + () => + expect(Bn.fromFloat(~endian=`le, float_of_int(0x4123456)) |> Bn.toString(~base=16)) + |> toBe("56341204") + ) + } + ) + ); + +let () = + describe( + "from string", + ExpectJs.( + () => { + test( + "accepts base-16", + () => + expect(Bn.fromString(~base=16, "1A6B765D8CDF") |> Bn.toString(~base=16)) + |> toBe("1a6b765d8cdf") + ); + test( + "accepts base-16 ex 2", + () => + expect(Bn.fromString(~base=16, "1A6B765D8CDF") |> Bn.toString) + |> toBe("29048849665247") + ); + test( + "accepts no base", + () => + expect(Bn.fromString("10000000000000000") |> Bn.toString) |> toBe("10000000000000000") + ); + test( + "accepts base-36", + () => { + let base36 = "zzZzzzZzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"; + expect(Bn.fromString(~base=36, base36) |> Bn.toString(~base=36)) + |> toBe(String.lowercase(base36)) + } + ); + test( + "accepts base-16 LE integer", + () => + expect(Bn.fromString(~base=16, ~endian=`le, "1A6B765D8CDF") |> Bn.toString(~base=16)) + |> toBe("df8c5d766b1a") + ) + } + ) + ); + +let () = + describe( + "from array", + ExpectJs.( + () => { + test("accepts empty array", () => expect(Bn.fromArray([||]) |> Bn.toString) |> toBe("0")); + test( + "imports/exports big endian case 1", + () => expect(Bn.fromArray([|1, 2, 3|]) |> Bn.toString(~base=16)) |> toBe("10203") + ); + test( + "imports/exports big endian case 2", + () => expect(Bn.fromArray([|1, 2, 3, 4|]) |> Bn.toString(~base=16)) |> toBe("1020304") + ); + test( + "imports/exports big endian case 3", + () => + expect(Bn.fromArray([|1, 2, 3, 4, 5|]) |> Bn.toString(~base=16)) |> toBe("102030405") + ); + test( + "imports/exports big endian case 4", + () => + expect(Bn.fromArray([|1, 2, 3, 4, 5, 6, 7, 8|]) |> Bn.toString(~base=16)) + |> toBe("102030405060708") + ); + test( + "imports/exports big endian case 5", + () => + expect(Bn.fromArray([|1, 2, 3, 4|]) |> Bn.toArray |> Js.Array.joinWith(",")) + |> toBe("1,2,3,4") + ); + test( + "imports/exports big endian case 6", + () => + expect( + Bn.fromArray([|1, 2, 3, 4, 5, 6, 7, 8|]) |> Bn.toArray |> Js.Array.joinWith(",") + ) + |> toBe("1,2,3,4,5,6,7,8") + ); + test( + "imports/exports little endian case 1", + () => + expect(Bn.fromArray(~base=10, ~endian=`le, [|1, 2, 3|]) |> Bn.toString(~base=16)) + |> toBe("30201") + ); + test( + "imports/exports little endian case 2", + () => + expect(Bn.fromArray(~base=10, ~endian=`le, [|1, 2, 3, 4|]) |> Bn.toString(~base=16)) + |> toBe("4030201") + ); + test( + "imports/exports little endian case 3", + () => + expect(Bn.fromArray(~base=10, ~endian=`le, [|1, 2, 3, 4, 5|]) |> Bn.toString(~base=16)) + |> toBe("504030201") + ); + test( + "imports/exports little endian case 4", + () => + expect(Bn.fromArray(~endian=`le, [|1, 2, 3, 4, 5, 6, 7, 8|]) |> Bn.toString(~base=16)) + |> toBe("807060504030201") + ); + test( + "imports/exports little endian case 5", + () => + expect( + Bn.fromArray([|1, 2, 3, 4|]) |> Bn.toArray(~endian=`le) |> Js.Array.joinWith(",") + ) + |> toBe("4,3,2,1") + ); + test( + "imports/exports little endian case 6", + () => + expect( + Bn.fromArray([|1, 2, 3, 4, 5, 6, 7, 8|]) + |> Bn.toArray(~endian=`le) + |> Js.Array.joinWith(",") + ) + |> toBe("8,7,6,5,4,3,2,1") + ); + test( + "import little endian with implicit base", + () => + expect(Bn.fromArray(~endian=`le, [|1, 2, 3, 4, 5|]) |> Bn.toString(~base=16)) + |> toBe("504030201") + ) + } + ) + ); + +let () = + describe( + "from buffer", + ExpectJs.( + () => { + test( + "does not fail on empty Buffer", + () => expect(Bn.fromBuffer(Node.Buffer.fromString("")) |> Bn.toString) |> toBe("0") + ); + test( + "imports/exports big endian", + /* TODO - Check if there's a way to set Buffer with 'hex' */ + () => + expect(Bn.fromBuffer(Node.Buffer.fromString("12345")) |> Bn.toString(~base=16)) + |> toBe("3132333435") + ); + test( + "imports/exports little endian", + /* TODO - Check if there's a way to set Buffer with 'hex' */ + () => + expect( + Bn.fromBuffer(~endian=`le, Node.Buffer.fromString("12345")) |> Bn.toString(~base=16) + ) + |> toBe("3534333231") + ) + } + ) + ); + +let () = + describe( + "clone", + ExpectJs.( + () => + test( + "clones an existing BN", + () => { + let num = Bn.fromFloat(12345.); + expect(Bn.clone(num) |> Bn.toString(~base=10)) |> toBe("12345") + } + ) + ) + ); \ No newline at end of file diff --git a/drafts/bs-bn/__tests__/RedSpec.re b/drafts/bs-bn/__tests__/RedSpec.re new file mode 100644 index 0000000..4ed2963 --- /dev/null +++ b/drafts/bs-bn/__tests__/RedSpec.re @@ -0,0 +1,196 @@ +open Jest; + +let testMethod = (name, fn) => + describe( + name ++ " method", + ExpectJs.( + () => { + [ + ((a, b) => a |> Bn.redAdd(b), "97"), + ((a, b) => a |> Bn.redSub(b), "149"), + ((a, b) => b |> Bn.redSub(a), "108"), + ( + (a, b) => { + a |> Bn.redIAdd(b); + a; + }, + "97" + ), + ( + (a, b) => { + a |> Bn.redISub(b); + a; + }, + "149" + ), + ( + (a, b) => { + b |> Bn.redISub(a); + b; + }, + "108" + ) + ] + |> List.iter(((op, r)) => + test("supports add, iadd, sub, isub operations", () => { + let p = Bn.fromFloat(257.); + let m = fn(p); + let a = Bn.fromFloat(123.) |> Bn.toRed(m); + let b = Bn.fromFloat(231.) |> Bn.toRed(m); + expect(op(a, b) |> Bn.fromRed |> Bn.toString) |> toBe(r); + }) + ); + [ + (m, a) => ( + a |> Bn.toRed(m) |> Bn.redPow(Bn.fromFloat(0.)) |> Bn.fromRed, + Bn.fromFloat(1.) + ), + (m, a) => ( + a |> Bn.toRed(m) |> Bn.redPow(Bn.fromFloat(3.)) |> Bn.fromRed, + a |> Bn.sqr |> Bn.mul(a) + ), + (m, a) => ( + a |> Bn.toRed(m) |> Bn.redPow(Bn.fromFloat(8.)) |> Bn.fromRed, + a |> Bn.sqr |> Bn.sqr |> Bn.sqr + ), + (m, a) => ( + a |> Bn.toRed(m) |> Bn.redPow(Bn.fromFloat(9.)) |> Bn.fromRed, + a |> Bn.sqr |> Bn.sqr |> Bn.sqr |> Bn.mul(a) + ), + (m, a) => ( + a |> Bn.toRed(m) |> Bn.redPow(Bn.fromFloat(17.)) |> Bn.fromRed, + a |> Bn.sqr |> Bn.sqr |> Bn.sqr |> Bn.sqr |> Bn.mul(a) + ), + (m, a) => ( + a + |> Bn.toRed(m) + |> Bn.redPow(Bn.fromString(~base=16, "deadbeefabbadead")) + |> Bn.fromRed, + Bn.fromString( + ~base=16, + "3aa0e7e304e320b68ef61592bcb00341866d6fa66e11a4d6" + ) + ) + ] + |> List.iter(op => + test("supports pow and mul operations", () => { + let p192 = + Bn.fromString( + ~base=16, + "fffffffffffffffffffffffffffffffeffffffffffffffff" + ); + let m = fn(p192); + let a = Bn.fromFloat(123.); + let (left, right) = op(m, a); + expect(Bn.cmp(left, right)) |> toBe(Equality.Equal); + }) + ); + { + let p = Bn.fromFloat(263.); + let m = fn(p); + let q = Bn.fromFloat(11.); + let qr = ref(Bn.redSqrt(q |> Bn.toRed(m))); + test("supports sqrtm operations", () => + expect(qr^ |> Bn.redSqr |> Bn.fromRed |> Bn.cmp(q)) + |> toBe(Equality.Equal) + ); + qr := Bn.redSqrt(q |> Bn.toRed(m)); + test("supports sqrtm operations 2", () => + expect(qr^ |> Bn.redSqr |> Bn.fromRed |> Bn.cmp(q)) + |> toBe(Equality.Equal) + ); + }; + { + let p = + Bn.fromString( + ~base=16, + "fffffffffffffffffffffffffffffffeffffffffffffffff" + ); + let m = fn(p); + let q = Bn.fromFloat(13.); + let qr = ref(Bn.redSqrt(q |> Bn.toRed(m))); + test("supports sqrtm operations 3", () => + expect(qr^ |> Bn.redSqr |> Bn.fromRed |> Bn.cmp(q)) + |> toBe(Equality.Equal) + ); + qr := Bn.redSqrt(q |> Bn.toRed(m)); + test("supports sqrtm operations 4", () => + expect(qr^ |> Bn.redSqr |> Bn.fromRed |> Bn.cmp(q)) + |> toBe(Equality.Equal) + ); + }; + { + /* // Tonelli-shanks */ + let p = Bn.fromFloat(13.); + let m = fn(p); + let q = Bn.fromFloat(10.) |> Bn.toRed(m); + test("supports sqrtm operations 5", () => + expect(q |> Bn.redSqrt |> Bn.fromRed |> Bn.toString) |> toBe("7") + ); + }; + test("supports invm operations", () => { + let p = Bn.fromFloat(257.); + let m = fn(p); + let a = Bn.fromFloat(3.) |> Bn.toRed(m); + let b = Bn.redInvm(a); + expect(a |> Bn.redMul(b) |> Bn.fromRed |> Bn.toString(~base=16)) + |> toBe("1"); + }); + test("supports imul operations", () => { + let p = + Bn.fromString( + ~base=16, + "fffffffffffffffffffffffffffffffeffffffffffffffff" + ); + let m = fn(p); + let a = Bn.fromString(~base=16, "deadbeefabbadead"); + let b = Bn.fromString(~base=16, "abbadeadbeefdead"); + let c = a |> Bn.mul(b) |> Bn.mod_(p); + let ar = a |> Bn.toRed(m); + ar |> Bn.redIMul(b |> Bn.toRed(m)); + expect(ar |> Bn.fromRed |> Bn.toString(~base=16)) + |> toBe(c |> Bn.toString(~base=16)); + }); + test("supports pow(base, 0) == 1", () => { + let base = Bn.fromFloat(256.) |> Bn.toRed(Bn.redWithPrime(`k256)); + let exponent = Bn.fromFloat(0.); + let result = base |> Bn.redPow(exponent); + expect(result |> Bn.fromRed |> Bn.toString) |> toBe("1"); + }); + test("supports shl numbers", () => { + let base = Bn.fromFloat(256.) |> Bn.toRed(Bn.redWithPrime(`k256)); + let result = base |> Bn.redShl(1); + expect(result |> Bn.fromRed |> Bn.toString) |> toBe("512"); + }); + test("reduces when converting to red", () => { + let p = Bn.fromFloat(257.); + let m = fn(p); + let a = Bn.fromFloat(5.) |> Bn.toRed(m); + expect( + { + a |> Bn.redISub(Bn.fromFloat(512.) |> Bn.toRed(m)); + a |> Bn.redISub(Bn.fromFloat(512.) |> Bn.toRed(m)); + a |> Bn.fromRed |> Bn.toString; + } + ) + |> toBe("9"); + }); + test("supports redNeg and zero value", () => { + let a = Bn.fromFloat(0.) |> Bn.toRed(Bn.redWithPrime(`k256)) |> Bn.redNeg; + expect(a |> Bn.fromRed |> Bn.isZero) |> toBe(true); + }); + test("does not allow modulus <= 1 - test 1", () => { + expect(() => Bn.red(Bn.fromFloat(0.))) |> toThrow; + }); + test("does not allow modulus <= 1 - test 2", () => { + expect(() => Bn.red(Bn.fromFloat(1.))) |> toThrow; + }); + } + ) + ); + +testMethod("Plain", Bn.red); + +testMethod("Montgomery", Bn.mont); + +/* TODO: Pseudo-Mersenne Primes tests */ diff --git a/drafts/bs-bn/__tests__/UtilsSpec.re b/drafts/bs-bn/__tests__/UtilsSpec.re new file mode 100644 index 0000000..36e45c3 --- /dev/null +++ b/drafts/bs-bn/__tests__/UtilsSpec.re @@ -0,0 +1,716 @@ +open Jest; + +let compareArrays = (a, b) => + switch (Array.length(a) === Array.length(b)) { + | false => false + | true => + let equal = ref(true); + for (i in 0 to Array.length(a) - 1) { + equal := a[i] === b[i] && equal^; + }; + equal^; + }; + +let () = + describe( + "toString", + ExpectJs.( + () => { + test("adds binary padding", () => + expect( + Bn.fromFloat(0.) + |> Bn.toString(~base=2, ~padding=256) + |> Js.String.length + ) + |> toBe(256) + ); + test("adds hex padding, has length of 8 from leading 15", () => + expect( + Bn.fromString(~base=16, "ffb9602") + |> Bn.toString(~base=16, ~padding=2) + |> Js.String.length + ) + |> toBe(8) + ); + test("adds hex padding, has length of 8 from leading zero", () => + expect( + Bn.fromString(~base=16, "fb9604") + |> Bn.toString(~base=16, ~padding=8) + |> Js.String.length + ) + |> toBe(8) + ); + test("adds hex padding, has length of 8 from leading zeros", () => + expect( + Bn.fromFloat(0.) + |> Bn.toString(~base=16, ~padding=8) + |> Js.String.length + ) + |> toBe(8) + ); + test("adds hex padding, has length of 64 from leading 15", () => + expect( + Bn.fromString( + ~base=16, + "ffb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003" + ) + |> Bn.toString(~base=16, ~padding=2) + |> Js.String.length + ) + |> toBe(64) + ); + test("adds hex padding, has length of 64 from leading 15", () => + expect( + Bn.fromString( + ~base=16, + "fb96ff654e61130ba8422f0debca77a0ea74ae5ea8bca9b54ab64aabf01003" + ) + |> Bn.toString(~base=16, ~padding=64) + |> Js.String.length + ) + |> toBe(64) + ); + } + ) + ); + +let () = + describe( + "isNeg", + ExpectJs.( + () => { + test("returns true for negative numbers", () => + expect(Bn.fromFloat(-1.) |> Bn.isNeg) |> toBe(true) + ); + test("returns false for positive numbers", () => + expect(Bn.fromFloat(1.) |> Bn.isNeg) |> toBe(false) + ); + test("returns false for positive numbers 2", () => + expect(Bn.fromFloat(0.) |> Bn.isNeg) |> toBe(false) + ); + test("returns true for negative numbers 3", () => + expect(Bn.fromFloat(-0.) |> Bn.isNeg) |> toBe(false) + ); + } + ) + ); + +let () = + describe( + "isOdd", + ExpectJs.( + () => + [ + (0, false), + (1, true), + (2, false), + ((-0), false), + ((-1), true), + ((-2), false) + ] + |> List.iter(((x, r)) => + test("returns true for odd numbers", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.isOdd) |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "isEven", + ExpectJs.( + () => + [ + (0, true), + (1, false), + (2, true), + ((-0), true), + ((-1), false), + ((-2), true) + ] + |> List.iter(((x, r)) => + test("returns true for odd numbers", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.isEven) |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "isZero", + ExpectJs.( + () => + [(0, true), (1, false), (0xffffffff, false)] + |> List.iter(((x, r)) => + test("returns true for zero", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.isZero) |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "bitLength", + ExpectJs.( + () => { + [ + (0, 0), + (0x1, 1), + (0x2, 2), + (0x3, 2), + (0x4, 3), + (0x8, 4), + (0x10, 5), + (0x100, 9), + (0x123456, 21) + ] + |> List.iter(((x, r)) => + test("returns proper bitLength", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.bitLength) |> toBe(r) + ) + ); + [("123456789", 33), ("8023456789", 40)] + |> List.iter(((x, r)) => + test("returns proper bitLength for long numbers", () => + expect(Bn.fromString(~base=16, x) |> Bn.bitLength) |> toBe(r) + ) + ); + } + ) + ); + +let () = + describe( + "byteLength", + ExpectJs.( + () => { + [ + (0, 0), + (0x1, 1), + (0x2, 1), + (0x3, 1), + (0x4, 1), + (0x8, 1), + (0x10, 1), + (0x100, 2), + (0x123456, 3) + ] + |> List.iter(((x, r)) => + test("returns proper byteLength", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.byteLength) + |> toBe(r) + ) + ); + [("123456789", 5), ("8023456789", 5)] + |> List.iter(((x, r)) => + test("returns proper byteLength for long numbers", () => + expect(Bn.fromString(~base=16, x) |> Bn.byteLength) |> toBe(r) + ) + ); + } + ) + ); + +let () = + describe( + "toArray", + ExpectJs.( + () => { + test("returns [0] for `0`", () => + expect( + compareArrays(Bn.toArray(~endian=`be, Bn.fromFloat(0.)), [|0|]) + ) + |> toBe(true) + ); + test("returns [0] for `0` with le", () => + expect( + compareArrays(Bn.toArray(~endian=`le, Bn.fromFloat(0.)), [|0|]) + ) + |> toBe(true) + ); + test("zero pads to desired lengths", () => + expect( + compareArrays( + Bn.toArray( + ~length=5, + ~endian=`be, + Bn.fromFloat(float_of_int(0x123456)) + ), + [|0x00, 0x00, 0x12, 0x34, 0x56|] + ) + ) + |> toBe(true) + ); + test("zero pads to desired lengths with le", () => + expect( + compareArrays( + Bn.toArray( + ~length=5, + ~endian=`le, + Bn.fromFloat(float_of_int(0x123456)) + ), + [|0x56, 0x34, 0x12, 0x00, 0x00|] + ) + ) + |> toBe(true) + ); + test("throws when naturally larger than desired length", () => + expect(() => + Bn.toArray( + ~length=2, + ~endian=`be, + Bn.fromFloat(float_of_int(0x123456)) + ) + ) + |> toThrow + ); + } + ) + ); + +let () = + describe( + "toBuffer", + ExpectJs.( + () => + test("returns Buffer", () + /* TODO: Add bs-node and check values inside buffer */ + => + expect( + Bn.fromFloat(float_of_int(0x123456)) + |> Bn.toBuffer(~endian=`be, ~length=5) + |> Node.Buffer.isBuffer + ) + |> toBe(true) + ) + ) + ); + +let () = + describe( + "toNumber", + ExpectJs.( + () => { + [ + 0x123456, + 0x3ffffff, + 0x4000000, + 0x10000000000000, + 0x10040004004000, + (-0x123456), + (-0x3ffffff), + (-0x4000000), + (-0x10000000000000), + (-0x10040004004000) + ] + |> List.iter(x => + test("returns proper Number if below the limit", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.toNumber) + |> toBe(float_of_int(x)) + ) + ); + test("throws when number exceeds 53 bits", () => + expect(() => + Bn.fromFloat(1.) |> Bn.ushln(54) |> Bn.toNumber + ) + |> toThrow + ); + } + ) + ); + +let () = + describe( + "zeroBits", + ExpectJs.( + () => + [ + (0, 0), + (0x1, 0), + (0x2, 1), + (0x3, 0), + (0x4, 2), + (0x8, 3), + (0x10, 4), + (0x100, 8), + (0x1000000, 24), + (0x123456, 1) + ] + |> List.iter(((x, r)) => + test("returns proper zeroBits", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.zeroBits) |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "toJSON", + ExpectJs.( + () => + test("returns hex string", () => + expect(Bn.fromFloat(float_of_int(0x123)) |> Bn.toJSON) |> toBe("123") + ) + ) + ); + +let () = + describe( + "cmpn", + ExpectJs.( + () => { + [ + (42, 42, Equality.Equal), + (42, 43, Equality.Less), + (42, 41, Equality.Greater), + (0x3fffffe, 0x3fffffe, Equality.Equal), + (0x3fffffe, 0x3ffffff, Equality.Less), + (0x3fffffe, 0x3fffffd, Equality.Greater), + (42, (-42), Equality.Greater), + ((-42), 42, Equality.Less), + ((-42), (-42), Equality.Equal) + ] + |> List.iter(((x, y, r)) => + test("returns equality value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) |> Bn.cmpn(float_of_int(y)) + ) + |> toBe(r) + ) + ); + test("throws when number exceeds 53 bits", () => + expect(() => + Bn.fromFloat(float_of_int(0x3fffffe)) + |> Bn.cmpn(float_of_int(0x4000000)) + ) + |> toThrow + ); + } + ) + ); + +let () = + describe( + "cmp", + ExpectJs.( + () => + [ + (42, 42, Equality.Equal), + (42, 43, Equality.Less), + (42, 41, Equality.Greater), + (0x3fffffe, 0x3fffffe, Equality.Equal), + (0x3fffffe, 0x3ffffff, Equality.Less), + (0x3fffffe, 0x3fffffd, Equality.Greater), + (0x3fffffe, 0x4000000, Equality.Less), + (42, (-42), Equality.Greater), + ((-42), 42, Equality.Less), + ((-42), (-42), Equality.Equal) + ] + |> List.iter(((x, y, r)) => + test("returns equality value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) + |> Bn.cmp(Bn.fromFloat(float_of_int(y))) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "gtn", + ExpectJs.( + () => + [(3, 2, true), (3, 3, false), (3, 4, false)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.gtn(float_of_int(y))) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "gt", + ExpectJs.( + () => + [(3, 2, true), (3, 3, false), (3, 4, false)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) + |> Bn.gt(Bn.fromFloat(float_of_int(y))) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "gten", + ExpectJs.( + () => + [(3, 2, true), (3, 3, true), (3, 4, false)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) |> Bn.gten(float_of_int(y)) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "gte", + ExpectJs.( + () => + [(3, 2, true), (3, 3, true), (3, 4, false)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) + |> Bn.gte(Bn.fromFloat(float_of_int(y))) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "ltn", + ExpectJs.( + () => + [(3, 2, false), (3, 3, false), (3, 4, true)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.ltn(float_of_int(y))) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "lt", + ExpectJs.( + () => + [(3, 2, false), (3, 3, false), (3, 4, true)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) + |> Bn.lt(Bn.fromFloat(float_of_int(y))) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "lten", + ExpectJs.( + () => + [(3, 2, false), (3, 3, true), (3, 4, true)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) |> Bn.lten(float_of_int(y)) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "lte", + ExpectJs.( + () => + [(3, 2, false), (3, 3, true), (3, 4, true)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) + |> Bn.lte(Bn.fromFloat(float_of_int(y))) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "eqn", + ExpectJs.( + () => + [(3, 2, false), (3, 3, true), (3, 4, false)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect(Bn.fromFloat(float_of_int(x)) |> Bn.eqn(float_of_int(y))) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "eq", + ExpectJs.( + () => + [(3, 2, false), (3, 3, true), (3, 4, false)] + |> List.iter(((x, y, r)) => + test("returns value correctly", () => + expect( + Bn.fromFloat(float_of_int(x)) + |> Bn.eq(Bn.fromFloat(float_of_int(y))) + ) + |> toBe(r) + ) + ) + ) + ); + +let () = + describe( + "fromTwos", + ExpectJs.( + () => { + [ + ("00000000", 32, 0), + ("00000001", 32, 1), + ("7fffffff", 32, 2147483647), + ("80000000", 32, (-2147483648)), + ("f0000000", 32, (-268435456)), + ("f1234567", 32, (-249346713)), + ("ffffffff", 32, (-1)), + ("fffffffe", 32, (-2)), + ("fffffffffffffffffffffffffffffffe", 128, (-2)), + ( + "ffffffffffffffffffffffffffffffff" + ++ "fffffffffffffffffffffffffffffffe", + 256, + (-2) + ), + ( + "ffffffffffffffffffffffffffffffff" + ++ "ffffffffffffffffffffffffffffffff", + 256, + (-1) + ) + ] + |> List.iter(((n, width, r)) => + test("converts from two's complement to numbers", () => + expect( + Bn.fromString(~base=16, n) + |> Bn.fromTwos(width) + |> Bn.toNumber + ) + |> toBe(float_of_int(r)) + ) + ); + [ + ( + "7fffffffffffffffffffffffffffffff" + ++ "ffffffffffffffffffffffffffffffff", + 256, + "5789604461865809771178549250434395392663499" + ++ "2332820282019728792003956564819967" + ), + ( + "80000000000000000000000000000000" + ++ "00000000000000000000000000000000", + 256, + "-578960446186580977117854925043439539266349" + ++ "92332820282019728792003956564819968" + ) + ] + |> List.iter(((n, width, r)) => + test("converts from two's complement to large numbers", () => + expect( + Bn.fromString(~base=16, n) + |> Bn.fromTwos(width) + |> Bn.toString + ) + |> toBe(r) + ) + ); + } + ) + ); + +let () = + describe( + "toTwos", + ExpectJs.( + () => + [ + ("0", 32, "0"), + ("1", 32, "1"), + ("2147483647", 32, "7fffffff"), + ("-2147483648", 32, "80000000"), + ("-268435456", 32, "f0000000"), + ("-249346713", 32, "f1234567"), + ("-1", 32, "ffffffff"), + ("-2", 32, "fffffffe"), + ("-2", 128, "fffffffffffffffffffffffffffffffe"), + ( + "-2", + 256, + "ffffffffffffffffffffffffffffffff" + ++ "fffffffffffffffffffffffffffffffe" + ), + ( + "-1", + 256, + "ffffffffffffffffffffffffffffffff" + ++ "ffffffffffffffffffffffffffffffff" + ), + ( + "5789604461865809771178549250434395392663" ++ + "4992332820282019728792003956564819967", + 256, + "7fffffffffffffffffffffffffffffff" + ++ "ffffffffffffffffffffffffffffffff" + ), + ( + "-578960446186580977117854925043439539266" ++ + "34992332820282019728792003956564819968", + 256, + "80000000000000000000000000000000" + ++ "00000000000000000000000000000000" + ), + + ] + |> List.iter(((n, width, r)) => + test("converts from numbers to two's complement", () => + expect( + Bn.fromString(n) + |> Bn.toTwos(width) + |> Bn.toString(~base=16) + ) + |> toBe(r) + ) + ) + ) + ); diff --git a/drafts/bs-bn/package.json b/drafts/bs-bn/package.json new file mode 100644 index 0000000..20bab12 --- /dev/null +++ b/drafts/bs-bn/package.json @@ -0,0 +1,35 @@ +{ + "name": "bs-bn.js", + "version": "0.0.2", + "description": "BuckleScript bindings to bn.js", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "npm run build && jest", + "watch:jest": "jest --watchAll" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jchavarri/bs-bn.js" + }, + "keywords": [ + "reason", + "reasonml", + "bucklescript" + ], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/jchavarri/bs-bn.js/issues" + }, + "homepage": "https://github.com/jchavarri/bs-bn.js", + "devDependencies": { + "bn.js": "^4.11.8", + "bs-jest": "reasonml-community/bs-jest", + "bs-platform": "^2.1.0" + }, + "peerDependencies": { + "bn.js": "^4.0.0" + } +} diff --git a/drafts/bs-bn/src/Bn.re b/drafts/bs-bn/src/Bn.re new file mode 100644 index 0000000..15a60b7 --- /dev/null +++ b/drafts/bs-bn/src/Bn.re @@ -0,0 +1,353 @@ +type t = Types.bn; + +/* ---- Arithmetic ---- */ +/* Add */ +[@bs.send.pipe : t] external add : t => t = ""; + +[@bs.send.pipe : t] external addn : float => t = ""; + +[@bs.send.pipe : t] external iadd : t => unit = ""; + +[@bs.send.pipe : t] external iaddn : float => unit = ""; + +[@bs.send.pipe : t] external sub : t => t = ""; + +[@bs.send.pipe : t] external subn : float => t = ""; + +[@bs.send.pipe : t] external isub : t => unit = ""; + +[@bs.send.pipe : t] external isubn : float => unit = ""; + +[@bs.send] external abs : t => t = ""; + +[@bs.send] external iabs : t => unit = ""; + +[@bs.send.pipe : t] external mul : t => t = ""; + +[@bs.send.pipe : t] external mulf : t => t = ""; + +[@bs.send.pipe : t] external imul : t => unit = ""; + +[@bs.send.pipe : t] external imuln : float => unit = ""; + +[@bs.send.pipe : t] external muln : float => t = ""; + +[@bs.send] external sqr : t => t = ""; + +[@bs.send] external isqr : t => unit = ""; + +[@bs.send.pipe : t] external pow : t => t = ""; + +[@bs.send.pipe : t] external div : t => t = ""; + +[@bs.send.pipe : t] external mod_ : t => t = "mod"; + +[@bs.send.pipe : t] external umod : t => t = ""; + +[@bs.send.pipe : t] external divRound : t => t = ""; + +[@bs.send.pipe : t] external modn : float => t = ""; + +[@bs.send.pipe : t] external idivn : float => unit = ""; + +[@bs.send.pipe : t] external divn : float => t = ""; + +[@bs.send.pipe : t] external cmp : t => Equality.abs_t = ""; + +let cmp = (a, b) => Equality.tFromJs(cmp(a, b)); + +[@bs.send.pipe : t] external cmpn : float => Equality.abs_t = ""; + +let cmpn = (a, b) => Equality.tFromJs(cmpn(a, b)); + +[@bs.send.pipe : t] external ucmp : t => Equality.abs_t = ""; + +let ucmp = (a, b) => Equality.tFromJs(ucmp(a, b)); + +[@bs.send.pipe : t] external gtn : float => bool = ""; + +[@bs.send.pipe : t] external gt : t => bool = ""; + +[@bs.send.pipe : t] external gten : float => bool = ""; + +[@bs.send.pipe : t] external gte : t => bool = ""; + +[@bs.send.pipe : t] external ltn : float => bool = ""; + +[@bs.send.pipe : t] external lt : t => bool = ""; + +[@bs.send.pipe : t] external lten : float => bool = ""; + +[@bs.send.pipe : t] external lte : t => bool = ""; + +[@bs.send.pipe : t] external eqn : float => bool = ""; + +[@bs.send.pipe : t] external eq : t => bool = ""; + +[@bs.send] external neg : t => t = ""; + +[@bs.send] external ineg : t => unit = ""; + +[@bs.send] external isNeg : t => bool = ""; + +[@bs.send] external isOdd : t => bool = ""; + +[@bs.send] external isEven : t => bool = ""; + +[@bs.send] external isZero : t => bool = ""; + +[@bs.send] external bitLength : t => int = ""; + +[@bs.send] external byteLength : t => int = ""; + +[@bs.send.pipe : t] external toTwos : int => t = ""; + +[@bs.send.pipe : t] external fromTwos : int => t = ""; + +[@bs.send] external zeroBits : t => int = ""; + +[@bs.send.pipe : t] external invm : t => t = ""; + +[@bs.send.pipe : t] external gcd : t => t = ""; + +[@bs.send.pipe : t] external egcd : t => Types.abs_egcd = ""; + +let egcd = (a, b) => Types.egcdFromJs(egcd(a, b)); + +[@bs.module "bn.js"] external max : (t, t) => t = ""; + +[@bs.module "bn.js"] external min : (t, t) => t = ""; + +[@bs.send.pipe : t] external iushln : int => unit = ""; + +[@bs.send.pipe : t] external ishln : int => unit = ""; + +[@bs.send.pipe : t] external iushrn : int => unit = ""; + +[@bs.send.pipe : t] external ishrn : int => unit = ""; + +[@bs.send.pipe : t] external shln : int => t = ""; + +[@bs.send.pipe : t] external ushln : int => t = ""; + +[@bs.send.pipe : t] external shrn : int => t = ""; + +[@bs.send.pipe : t] external ushrn : int => t = ""; + +[@bs.send.pipe : t] external andln : int => int = ""; + +[@bs.send.pipe : t] external bincn : int => unit = ""; + +[@bs.send.pipe : t] external testn : int => bool = ""; + +[@bs.send.pipe : t] external imaskn : int => unit = ""; + +[@bs.send.pipe : t] external maskn : int => t = ""; + +[@bs.send.pipe : t] external iuor : t => unit = ""; + +[@bs.send.pipe : t] external ior : t => unit = ""; + +[@bs.send.pipe : t] external uor : t => t = ""; + +[@bs.send.pipe : t] external or_ : t => t = "or"; + +[@bs.send.pipe : t] external iuand : t => unit = ""; + +[@bs.send.pipe : t] external iand : t => unit = ""; + +[@bs.send.pipe : t] external uand : t => t = ""; + +[@bs.send.pipe : t] external and_ : t => t = "and"; + +[@bs.send.pipe : t] external iuxor : t => unit = ""; + +[@bs.send.pipe : t] external ixor : t => unit = ""; + +[@bs.send.pipe : t] external uxor : t => t = ""; + +[@bs.send.pipe : t] external xor : t => t = ""; + +[@bs.send.pipe : t] external inotn : int => unit = ""; + +[@bs.send.pipe : t] external notn : int => t = ""; + +[@bs.send.pipe : t] external setn : (int, bool) => unit = ""; + +/* ---- Fast reduction ---- */ +[@bs.send.pipe : t] external toRed : Types.red_context => Types.red = ""; + +/* ---- Export ---- */ +/* To string */ +[@bs.send] external toNumber : t => float = ""; + +[@bs.send] external toJSON : t => string = ""; + +[@bs.send.pipe : t] +external toStringWithBaseAndPadding : (int, int) => string = "toString"; + +[@bs.send.pipe : t] +external toStringWithPadding : (int, int) => string = "toString"; + +[@bs.send.pipe : t] external toStringWithBase : int => string = "toString"; + +[@bs.send.pipe : t] external toStringDefault : unit => string = "toString"; + +let toString = (~base=?, ~padding=?) => + switch (base, padding) { + | (Some(b), Some(p)) => toStringWithBaseAndPadding(b, p) + | (Some(b), None) => toStringWithBase(b) + | (None, Some(p)) => toStringWithPadding(10, p) + | (None, None) => toStringDefault() + }; + +/* To array */ +[@bs.send.pipe : t] +external toArrayWithEndian : Endianness.abs_t => array(int) = "toArray"; + +[@bs.send.pipe : t] external toArrayWithLength : int => array(int) = "toArray"; + +[@bs.send.pipe : t] +external toArrayWithEndianAndLength : (Endianness.abs_t, int) => array(int) = + "toArray"; + +[@bs.send.pipe : t] external toArrayDefault : unit => array(int) = "toArray"; + +let toArray = (~endian=?, ~length=?) => + switch (endian, length) { + | (Some(e), Some(l)) => toArrayWithEndianAndLength(Endianness.tToJs(e), l) + | (Some(e), None) => toArrayWithEndian(Endianness.tToJs(e)) + | (None, Some(l)) => toArrayWithLength(l) + | (None, None) => toArrayDefault() + }; + +/* To Buffer */ +[@bs.send.pipe : t] +external toBufferWithEndian : Endianness.abs_t => Node.Buffer.t = "toBuffer"; + +[@bs.send.pipe : t] +external toBufferWithLength : int => Node.Buffer.t = "toBuffer"; + +[@bs.send.pipe : t] +external toBufferWithEndianAndLength : (Endianness.abs_t, int) => Node.Buffer.t = + "toBuffer"; + +[@bs.send.pipe : t] +external toBufferDefault : unit => Node.Buffer.t = "toBuffer"; + +let toBuffer = (~endian=?, ~length=?) => + switch (endian, length) { + | (Some(e), Some(l)) => toBufferWithEndianAndLength(Endianness.tToJs(e), l) + | (Some(e), None) => toBufferWithEndian(Endianness.tToJs(e)) + | (None, Some(l)) => toBufferWithLength(l) + | (None, None) => toBufferDefault() + }; + +/* ---- Creation ---- */ +/* From float */ +[@bs.module "bn.js"] [@bs.new] external numberFromFloat : float => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromFloatWithBase : (float, int) => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromFloatWithEndianness : (float, Endianness.abs_t) => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromFloatWithBaseAndEndianness : + (float, int, Endianness.abs_t) => t = + "BN"; + +let fromFloat = (~base=?, ~endian=?, v) => + switch (base, endian) { + | (Some(b), Some(e)) => + numberFromFloatWithBaseAndEndianness(v, b, Endianness.tToJs(e)) + | (Some(b), None) => numberFromFloatWithBase(v, b) + | (None, Some(e)) => numberFromFloatWithEndianness(v, Endianness.tToJs(e)) + | (None, None) => numberFromFloat(v) + }; + +/* From string */ +[@bs.module "bn.js"] [@bs.new] external numberFromString : string => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromStringWithBase : (string, int) => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromStringWithEndianness : (string, Endianness.abs_t) => t = + "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromStringWithBaseAndEndianness : + (string, int, Endianness.abs_t) => t = + "BN"; + +let fromString = (~base=?, ~endian=?, v) => + switch (base, endian) { + | (Some(b), Some(e)) => + numberFromStringWithBaseAndEndianness(v, b, Endianness.tToJs(e)) + | (Some(b), None) => numberFromStringWithBase(v, b) + | (None, Some(e)) => numberFromStringWithEndianness(v, Endianness.tToJs(e)) + | (None, None) => numberFromString(v) + }; + +/* From array */ +[@bs.module "bn.js"] [@bs.new] +external numberFromArray : array(int) => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromArrayWithBase : (array(int), int) => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromArrayWithEndianness : (array(int), Endianness.abs_t) => t = + "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromArrayWithBaseAndEndianness : + (array(int), int, Endianness.abs_t) => t = + "BN"; + +let fromArray = (~base=?, ~endian=?, v) => + switch (base, endian) { + | (Some(b), Some(e)) => + numberFromArrayWithBaseAndEndianness(v, b, Endianness.tToJs(e)) + | (Some(b), None) => numberFromArrayWithBase(v, b) + | (None, Some(e)) => numberFromArrayWithEndianness(v, Endianness.tToJs(e)) + | (None, None) => numberFromArray(v) + }; + +/* From buffer */ +[@bs.module "bn.js"] [@bs.new] +external numberFromBuffer : Node.Buffer.t => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromBufferWithBase : (Node.Buffer.t, int) => t = "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromBufferWithEndianness : + (Node.Buffer.t, Endianness.abs_t) => t = + "BN"; + +[@bs.module "bn.js"] [@bs.new] +external numberFromBufferWithBaseAndEndianness : + (Node.Buffer.t, int, Endianness.abs_t) => t = + "BN"; + +let fromBuffer = (~base=?, ~endian=?, v) => + switch (base, endian) { + | (Some(b), Some(e)) => + numberFromBufferWithBaseAndEndianness(v, b, Endianness.tToJs(e)) + | (Some(b), None) => numberFromBufferWithBase(v, b) + | (None, Some(e)) => numberFromBufferWithEndianness(v, Endianness.tToJs(e)) + | (None, None) => numberFromBuffer(v) + }; + +/* Clone */ +[@bs.module "bn.js"] [@bs.new] external clone : t => t = "BN"; + +/* Utils */ +[@bs.module "bn.js"] [@bs.new] external copy : (t, t) => unit = "BN"; + +[@bs.module "bn.js"] [@bs.new] external inspect : t => string = "BN"; + +include Red; \ No newline at end of file diff --git a/drafts/bs-bn/src/Bn.rei b/drafts/bs-bn/src/Bn.rei new file mode 100644 index 0000000..042e82e --- /dev/null +++ b/drafts/bs-bn/src/Bn.rei @@ -0,0 +1,348 @@ +type t = Types.bn; + +/* ------- Arithmetic ------- */ +/** Returns the addition of two big numbers. */ +let add: (t, t) => t; + +/** Returns the addition of a float and a big number. */ +let addn: (float, t) => t; + +/** Adds a big number to another, storing the result in the second (side effect). */ +let iadd: (t, t) => unit; + +/** Adds a float to a big number, storing the result in the second (side effect). */ +let iaddn: (float, t) => unit; + +/** Returns the subtraction of two big numbers (the second minus the first). */ +let sub: (t, t) => t; + +/** Returns the subtraction of a float from a big number. */ +let subn: (float, t) => t; + +/** Subtracts a big number from another, storing the result in the second (side effect). */ +let isub: (t, t) => unit; + +/** Subtracts a float from a big number, storing the result in the second (side effect). */ +let isubn: (float, t) => unit; + +/** Returns the absolute value. */ +let abs: t => t; + +/** Calculates the absolute value and stores it in the big number passed as param (side effect). */ +let iabs: t => unit; + +/** Returns the multiplication of two big numbers. */ +let mul: (t, t) => t; + +/** Returns the multiplication of two big numbers, using FFT. */ +let mulf: (t, t) => t; + +/** Multiplies a big number with another, storing the result in the second (side effect). */ +let imul: (t, t) => unit; + +/** Multiplies a float with a big number, storing the result in the second (side effect). */ +let imuln: (float, t) => unit; + +/** Returns the multiplication of a float with a big number. */ +let muln: (float, t) => t; + +/** Returns the square root of a big number. */ +let sqr: t => t; + +/** Calculates the square root of a big number and stores it in the big number passed as param (side effect). */ +let isqr: t => unit; + +/** Returns the power considering the first param as exponent and the second as base. */ +let pow: (t, t) => t; + +/** Returns the quotient after dividing two big numbers. The first param is the divisor and the second is the divident: div(a, b) is equivalent to b / a. */ +let div: (t, t) => t; + +/** Returns the remainder after dividing two big numbers. The first param is the divisor and the second is the divident: mod_(a, b) is equivalent to b % a. */ +let mod_: (t, t) => t; + +/** Returns the unsigned remainder after dividing two big numbers. The first param is the divisor and the second is the divident: umod(a, b) is equivalent to b % a. */ +let umod: (t, t) => t; + +/** Returns the rounded quotient after dividing two big numbers. The first param is the divisor and the second is the divident: divRound(a, b) is equivalent to Math.round(b / a). */ +let divRound: (t, t) => t; + +/** Returns the remainder after dividing a big number by a float. The first param is the divisor and the second is the divident: modn(a, b) is equivalent to b % a. */ +let modn: (float, t) => t; + +/** Calculates the quotient after dividing a big number by a float, storing the result in the big number (side effect). The first param is the divisor and the second is the divident: idivn(a, b) is equivalent to b / a. */ +let idivn: (float, t) => unit; + +/** Returns the quotient after dividing a big number by a float. The first param is the divisor and the second is the divident: divn(a, b) is equivalent to b / a. */ +let divn: (float, t) => t; + +/** Compares two big numbers and returns the results of the comparison (equal, less than, greater). */ +let cmp: (t, t) => Equality.t; + +/** Compares a float with a big number and returns the results of the comparison (equal, less than, greater). */ +let cmpn: (float, t) => Equality.t; + +/** Compares two unsigned big numbers and returns the results of the comparison (equal, less than, greater). */ +let ucmp: (t, t) => Equality.t; + +/** Takes a float and a big number and returns true if the second is greater than the first. */ +let gtn: (float, t) => bool; + +/** Takes two big numbers and returns true if the second is greater than the first. */ +let gt: (t, t) => bool; + +/** Takes a float and a big number and returns true if the second is greater or equal than the first. */ +let gten: (float, t) => bool; + +/** Takes two big numbers and returns true if the second is greater or equal than the first. */ +let gte: (t, t) => bool; + +/** Takes a float and a big number and returns true if the second is less than the first. */ +let ltn: (float, t) => bool; + +/** Takes two big numbers and returns true if the second is less than the first. */ +let lt: (t, t) => bool; + +/** Takes a float and a big number and returns true if the second is less or equal than the first. */ +let lten: (float, t) => bool; + +/** Takes two big numbers and returns true if the second is less or equal than the first. */ +let lte: (t, t) => bool; + +/** Takes a float and a big number and returns true if they are equal. */ +let eqn: (float, t) => bool; + +/** Takes two big numbers and returns true if they are equal. */ +let eq: (t, t) => bool; + +/** Returns the negative version of a big number. */ +let neg: t => t; + +/** Calculates the negative version of a big number, storing the result in that same reference (side effect). */ +let ineg: t => unit; + +/** Returns true if the big number is negative. */ +let isNeg: t => bool; + +/** Returns true if the number is odd. */ +let isOdd: t => bool; + +/** Returns true if the number is even. */ +let isEven: t => bool; + +/** Returns true if the number is zero. */ +let isZero: t => bool; + +/** Returns the number of used bits in a big number. */ +let bitLength: t => int; + +/** Returns the number of used bytes in a big number. */ +let byteLength: t => int; + +/** Returns the two's complement of a given big number, with some width passed as first param. */ +let toTwos: (int, t) => t; + +/** Returns a big number from a given two's complement, with some width passed as first param. */ +let fromTwos: (int, t) => t; + +/** Returns the number of trailing zero bits in a big number. */ +let zeroBits: t => int; + +/** Returns the inverted value of the second param, modulo the first param. */ +let invm: (t, t) => t; + +/** Returns the greater common divisor of two big numbers. */ +let gcd: (t, t) => t; + +/** Returns the results of the extended greater common divisor ax + by = gcd(a, b). The result is a record with shape: { a: ..., b: ..., gcd: ... } */ +let egcd: (t, t) => Types.egcd; + +/** Returns the max of two big numbers. */ +let max: (t, t) => t; + +/** Returns the min of two big numbers. */ +let min: (t, t) => t; + +/* ------- Binary ------- */ +/** Unsigned shift left n bits (first param) a big number (second param), storing the result in the same reference (side effect). */ +let iushln: (int, t) => unit; + +/** Shift left n bits (first param) a big number (second param), storing the result in the same reference (side effect). */ +let ishln: (int, t) => unit; + +/** Unsigned shift right n bits (first param) a big number (second param), storing the result in the same reference (side effect). */ +let iushrn: (int, t) => unit; + +/** Shift right n bits (first param) a big number (second param), storing the result in the same reference (side effect). */ +let ishrn: (int, t) => unit; + +/** Returns the result of shifting left n bits (first param) a big number (second param). */ +let shln: (int, t) => t; + +/** Returns the result of unsigned shifting left n bits (first param) a big number (second param). */ +let ushln: (int, t) => t; + +/** Returns the result of shifting right n bits (first param) a big number (second param). */ +let shrn: (int, t) => t; + +/** Returns the result of unsigned shifting right n bits (first param) a big number (second param). */ +let ushrn: (int, t) => t; + +/** Adds an int and the first word of a big number. */ +let andln: (int, t) => int; + +/** Increments at the bit position (first param), storing the result in the same reference (side effect). */ +let bincn: (int, t) => unit; + +/** Tests if bit as position n (first param) is set */ +let testn: (int, t) => bool; + +/** Return only lowers bits of a big number, storing the result in the same reference (side effect). */ +let imaskn: (int, t) => unit; + +/** Return only lowers bits of a big number. */ +let maskn: (int, t) => t; + +/** Applies the binary unsigned `or` operation between two big numbers, storing the result in the second (side effect). */ +let iuor: (t, t) => unit; + +/** Applies the binary `or` operation between two big numbers, storing the result in the second (side effect). */ +let ior: (t, t) => unit; + +/** Returns the binary unsigned `or` operation between two big numbers. */ +let uor: (t, t) => t; + +/** Returns the binary `or` operation between two big numbers. */ +let or_: (t, t) => t; + +/** Applies the binary unsigned `and` operation between two big numbers, storing the result in the second (side effect). */ +let iuand: (t, t) => unit; + +/** Applies the binary `and` operation between two big numbers, storing the result in the second (side effect). */ +let iand: (t, t) => unit; + +/** Returns the binary unsigned `and` operation between two big numbers. */ +let uand: (t, t) => t; + +/** Returns the binary `and` operation between two big numbers. */ +let and_: (t, t) => t; + +/** Applies the binary unsigned `xor` operation between two big numbers, storing the result in the second (side effect). */ +let iuxor: (t, t) => unit; + +/** Applies the binary `xor` operation between two big numbers, storing the result in the second (side effect). */ +let ixor: (t, t) => unit; + +/** Returns the binary unsigned `xor` operation between two big numbers. */ +let uxor: (t, t) => t; + +/** Returns the binary `xor` operation between two big numbers. */ +let xor: (t, t) => t; + +/** Returns the binary `not` operation from a big numbers, taking a given bitwidth as first param, and storing the result in the second (side effect). */ +let inotn: (int, t) => unit; + +/** Returns the binary `not` operation from a big numbers, taking a given bitwidth as first param. */ +let notn: (int, t) => t; + +/** Sets the value passed as second param in the position passed as first param, storing the result in the big number passed as third param (side effect). */ +let setn: (int, bool, t) => unit; + +/* ------- Export ------- */ +/** Returns a big number represented as a number. */ +let toNumber: t => float; + +/** Returns a big number represented as a JSON compatible hex string (alias of toString(~base=16)) */ +let toJSON: t => string; + +/** Returns a big number represented as a string. */ +let toString: (~base: int=?, ~padding: int=?, t) => string; + +/** Returns a big number represented as an array. */ +let toArray: (~endian: Endianness.t=?, ~length: int=?, t) => array(int); + +/** Returns a big number represented as a NodeJS Buffer. */ +let toBuffer: (~endian: Endianness.t=?, ~length: int=?, t) => Node.Buffer.t; + +/* ------- Import ------- */ +/** Creates a big number from a float. */ +let fromFloat: (~base: int=?, ~endian: Endianness.t=?, float) => t; + +/** Creates a big number from a string. */ +let fromString: (~base: int=?, ~endian: Endianness.t=?, string) => t; + +/** Creates a big number from an array. */ +let fromArray: (~base: int=?, ~endian: Endianness.t=?, array(int)) => t; + +/** Creates a big number from a Buffer. */ +let fromBuffer: (~base: int=?, ~endian: Endianness.t=?, Node.Buffer.t) => t; + +/** Returns a new copy of a big number. */ +let clone: t => t; + +/* ------- Utils ------- */ +/** Copies the big number passed as first param into the big number passed as second param (side effect). */ +let copy: (t, t) => unit; + +/** For debugging purposes: prints a big number as a string (including structural information). */ +let inspect: t => string; + +/* ------- Fast reduction ------- */ +/** Returns a reduction context using the Plain method. */ +let red: t => Types.red_context; + +/** Returns a reduction context using the Montgomery method. */ +let mont: t => Types.red_context; + +/** Given a prime number, returns a reduction context using the Plain method. */ +let redWithPrime: Types.prime => Types.red_context; + +/** Given a prime number, returns a reduction context using the Montgomery method. */ +let montWithPrime: Types.prime => Types.red_context; + +/** Converts a big number to a reducted one, taking a reduction context as param. */ +let toRed: (Types.red_context, t) => Types.red; + +/** Converts a reducted big number to a regular big number. */ +let fromRed: Types.red => t; + +/** Returns the addition of two reducted big numbers. */ +let redAdd: (Types.red, Types.red) => Types.red; + +/** Adds two reducted big numbers, storing the result in the instance passed as second param (side effect). */ +let redIAdd: (Types.red, Types.red) => unit; + +/** Returns the subtraction of two reducted big numbers (the second minus the first). */ +let redSub: (Types.red, Types.red) => Types.red; + +/** Subtracts two reducted big numbers (the second minus the first), storing the result in the instance passed as second param (side effect). */ +let redISub: (Types.red, Types.red) => unit; + +/** Returns the result of shifting left n bits (first param) a reducted big number (second param). */ +let redShl: (int, Types.red) => Types.red; + +/** Returns the subtraction of two reducted big numbers. */ +let redMul: (Types.red, Types.red) => Types.red; + +/** Returns the subtraction of two reducted big numbers, storing the result in the instance passed as second param (side effect). */ +let redIMul: (Types.red, Types.red) => unit; + +/** Returns the square root of a reducted big number. */ +let redSqr: Types.red => Types.red; + +/** Applies the square root of a reducted big number, storing the result in the same instance passed as param (side effect). */ +let redISqr: Types.red => unit; + +/** Returns the square root modulo reduction context's prime of a reducted big number. */ +let redSqrt: Types.red => Types.red; + +/** Returns the modular inverse of a reducted big number. */ +let redInvm: Types.red => Types.red; + +/** Returns the negative version of a reducted big number. */ +let redNeg: Types.red => Types.red; + +/** Returns the power, considering the first param as exponent (regular big number) and the second as base (reducted big number). */ +let redPow: (t, Types.red) => Types.red; + + diff --git a/drafts/bs-bn/src/Endianness.re b/drafts/bs-bn/src/Endianness.re new file mode 100644 index 0000000..7a20f5d --- /dev/null +++ b/drafts/bs-bn/src/Endianness.re @@ -0,0 +1,2 @@ +[@bs.deriving {jsConverter: newType}] +type t = [ | `be | `le]; \ No newline at end of file diff --git a/drafts/bs-bn/src/Equality.re b/drafts/bs-bn/src/Equality.re new file mode 100644 index 0000000..682c51c --- /dev/null +++ b/drafts/bs-bn/src/Equality.re @@ -0,0 +1,5 @@ +[@bs.deriving {jsConverter: newType}] +type t = + [@bs.as 1] | Greater + [@bs.as 0] | Equal + [@bs.as (-1)] | Less; \ No newline at end of file diff --git a/drafts/bs-bn/src/Fixtures.re b/drafts/bs-bn/src/Fixtures.re new file mode 100644 index 0000000..5aba593 --- /dev/null +++ b/drafts/bs-bn/src/Fixtures.re @@ -0,0 +1,272 @@ +module DhGroups = { + module P16 = { + let prime = + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1" + ++ "29024e088a67cc74020bbea63b139b22514a08798e3404dd" + ++ "ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245" + ++ "e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed" + ++ "ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d" + ++ "c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f" + ++ "83655d23dca3ad961c62f356208552bb9ed529077096966d" + ++ "670c354e4abc9804f1746c08ca18217c32905e462e36ce3b" + ++ "e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9" + ++ "de2bcbf6955817183995497cea956ae515d2261898fa0510" + ++ "15728e5a8aaac42dad33170d04507a33a85521abdf1cba64" + ++ "ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7" + ++ "abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b" + ++ "f12ffa06d98a0864d87602733ec86a64521f2b18177b200c" + ++ "bbe117577a615d6c770988c0bad946e208e24fa074e5ab31" + ++ "43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7" + ++ "88719a10bdba5b2699c327186af4e23c1a946834b6150bda" + ++ "2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6" + ++ "287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed" + ++ "1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9" + ++ "93b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199" + ++ "ffffffffffffffff"; + let priv = + "6d5923e6449122cbbcc1b96093e0b7e4fd3e469f58daddae" + ++ "53b49b20664f4132675df9ce98ae0cfdcac0f4181ccb643b" + ++ "625f98104dcf6f7d8e81961e2cab4b5014895260cb977c7d" + ++ "2f981f8532fb5da60b3676dfe57f293f05d525866053ac7e" + ++ "65abfd19241146e92e64f309a97ef3b529af4d6189fa416c" + ++ "9e1a816c3bdf88e5edf48fbd8233ef9038bb46faa95122c0" + ++ "5a426be72039639cd2d53d37254b3d258960dcb33c255ede" + ++ "20e9d7b4b123c8b4f4b986f53cdd510d042166f7dd7dca98" + ++ "7c39ab36381ba30a5fdd027eb6128d2ef8e5802a2194d422" + ++ "b05fe6e1cb4817789b923d8636c1ec4b7601c90da3ddc178" + ++ "52f59217ae070d87f2e75cbfb6ff92430ad26a71c8373452" + ++ "ae1cc5c93350e2d7b87e0acfeba401aaf518580937bf0b6c" + ++ "341f8c49165a47e49ce50853989d07171c00f43dcddddf72" + ++ "94fb9c3f4e1124e98ef656b797ef48974ddcd43a21fa06d0" + ++ "565ae8ce494747ce9e0ea0166e76eb45279e5c6471db7df8" + ++ "cc88764be29666de9c545e72da36da2f7a352fb17bdeb982" + ++ "a6dc0193ec4bf00b2e533efd6cd4d46e6fb237b775615576" + ++ "dd6c7c7bbc087a25e6909d1ebc6e5b38e5c8472c0fc429c6" + ++ "f17da1838cbcd9bbef57c5b5522fd6053e62ba21fe97c826" + ++ "d3889d0cc17e5fa00b54d8d9f0f46fb523698af965950f4b" + ++ "941369e180f0aece3870d9335f2301db251595d173902cad" + ++ "394eaa6ffef8be6c"; + let pub_ = + "d53703b7340bc89bfc47176d351e5cf86d5a18d9662eca3c" + ++ "9759c83b6ccda8859649a5866524d77f79e501db923416ca" + ++ "2636243836d3e6df752defc0fb19cc386e3ae48ad647753f" + ++ "bf415e2612f8a9fd01efe7aca249589590c7e6a0332630bb" + ++ "29c5b3501265d720213790556f0f1d114a9e2071be3620bd" + ++ "4ee1e8bb96689ac9e226f0a4203025f0267adc273a43582b" + ++ "00b70b490343529eaec4dcff140773cd6654658517f51193" + ++ "13f21f0a8e04fe7d7b21ffeca85ff8f87c42bb8d9cb13a72" + ++ "c00e9c6e9dfcedda0777af951cc8ccab90d35e915e707d8e" + ++ "4c2aca219547dd78e9a1a0730accdc9ad0b854e51edd1e91" + ++ "4756760bab156ca6e3cb9c625cf0870def34e9ac2e552800" + ++ "d6ce506d43dbbc75acfa0c8d8fb12daa3c783fb726f187d5" + ++ "58131779239c912d389d0511e0f3a81969d12aeee670e48f" + ++ "ba41f7ed9f10705543689c2506b976a8ffabed45e33795b0" + ++ "1df4f6b993a33d1deab1316a67419afa31fbb6fdd252ee8c" + ++ "7c7d1d016c44e3fcf6b41898d7f206aa33760b505e4eff2e" + ++ "c624bc7fe636b1d59e45d6f904fc391419f13d1f0cdb5b6c" + ++ "2378b09434159917dde709f8a6b5dc30994d056e3f964371" + ++ "11587ac7af0a442b8367a7bd940f752ddabf31cf01171e24" + ++ "d78df136e9681cd974ce4f858a5fb6efd3234a91857bb52d" + ++ "9e7b414a8bc66db4b5a73bbeccfb6eb764b4f0cbf0375136" + ++ "b024b04e698d54a5"; + }; + module P17 = { + let prime = + "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd1" + ++ "29024e088a67cc74020bbea63b139b22514a08798e3404dd" + ++ "ef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245" + ++ "e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7ed" + ++ "ee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3d" + ++ "c2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f" + ++ "83655d23dca3ad961c62f356208552bb9ed529077096966d" + ++ "670c354e4abc9804f1746c08ca18217c32905e462e36ce3b" + ++ "e39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9" + ++ "de2bcbf6955817183995497cea956ae515d2261898fa0510" + ++ "15728e5a8aaac42dad33170d04507a33a85521abdf1cba64" + ++ "ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7" + ++ "abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6b" + ++ "f12ffa06d98a0864d87602733ec86a64521f2b18177b200c" + ++ "bbe117577a615d6c770988c0bad946e208e24fa074e5ab31" + ++ "43db5bfce0fd108e4b82d120a92108011a723c12a787e6d7" + ++ "88719a10bdba5b2699c327186af4e23c1a946834b6150bda" + ++ "2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6" + ++ "287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed" + ++ "1f612970cee2d7afb81bdd762170481cd0069127d5b05aa9" + ++ "93b4ea988d8fddc186ffb7dc90a6c08f4df435c934028492" + ++ "36c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bd" + ++ "f8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831" + ++ "179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1b" + ++ "db7f1447e6cc254b332051512bd7af426fb8f401378cd2bf" + ++ "5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6" + ++ "d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f3" + ++ "23a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aa" + ++ "cc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be328" + ++ "06a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55c" + ++ "da56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee" + ++ "12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"; + let priv = + "6017f2bc23e1caff5b0a8b4e1fc72422b5204415787801dc" + ++ "025762b8dbb98ab57603aaaa27c4e6bdf742b4a1726b9375" + ++ "a8ca3cf07771779589831d8bd18ddeb79c43e7e77d433950" + ++ "e652e49df35b11fa09644874d71d62fdaffb580816c2c88c" + ++ "2c4a2eefd4a660360316741b05a15a2e37f236692ad3c463" + ++ "fff559938fc6b77176e84e1bb47fb41af691c5eb7bb81bd8" + ++ "c918f52625a1128f754b08f5a1403b84667231c4dfe07ed4" + ++ "326234c113931ce606037e960f35a2dfdec38a5f057884d3" + ++ "0af8fab3be39c1eeb390205fd65982191fc21d5aa30ddf51" + ++ "a8e1c58c0c19fc4b4a7380ea9e836aaf671c90c29bc4bcc7" + ++ "813811aa436a7a9005de9b507957c56a9caa1351b6efc620" + ++ "7225a18f6e97f830fb6a8c4f03b82f4611e67ab9497b9271" + ++ "d6ac252793cc3e5538990dbd894d2dbc2d152801937d9f74" + ++ "da4b741b50b4d40e4c75e2ac163f7b397fd555648b249f97" + ++ "ffe58ffb6d096aa84534c4c5729cff137759bd34e80db4ab" + ++ "47e2b9c52064e7f0bf677f72ac9e5d0c6606943683f9d12f" + ++ "180cf065a5cb8ec3179a874f358847a907f8471d15f1e728" + ++ "7023249d6d13c82da52628654438f47b8b5cdf4761fbf6ad" + ++ "9219eceac657dbd06cf2ab776ad4c968f81c3d039367f0a4" + ++ "d77c7ec4435c27b6c147071665100063b5666e06eb2fb2cc" + ++ "3159ba34bc98ca346342195f6f1fb053ddc3bc1873564d40" + ++ "1c6738cdf764d6e1ff25ca5926f80102ea6593c17170966b" + ++ "b5d7352dd7fb821230237ea3ebed1f920feaadbd21be295a" + ++ "69f2083deae9c5cdf5f4830eb04b7c1f80cc61c17232d79f" + ++ "7ecc2cc462a7965f804001c89982734e5abba2d31df1b012" + ++ "152c6b226dff34510b54be8c2cd68d795def66c57a3abfb6" + ++ "896f1d139e633417f8c694764974d268f46ece3a8d6616ea" + ++ "a592144be48ee1e0a1595d3e5edfede5b27cec6c48ceb2ff" + ++ "b42cb44275851b0ebf87dfc9aa2d0cb0805e9454b051dfe8" + ++ "a29fadd82491a4b4c23f2d06ba45483ab59976da1433c9ce" + ++ "500164b957a04cf62dd67595319b512fc4b998424d1164dd" + ++ "bbe5d1a0f7257cbb04ec9b5ed92079a1502d98725023ecb2"; + let pub_ = + "3bf836229c7dd874fe37c1790d201e82ed8e192ed61571ca" + ++ "7285264974eb2a0171f3747b2fc23969a916cbd21e14f7e2" + ++ "f0d72dcd2247affba926f9e7bb99944cb5609aed85e71b89" + ++ "e89d2651550cb5bd8281bd3144066af78f194032aa777739" + ++ "cccb7862a1af401f99f7e5c693f25ddce2dedd9686633820" + ++ "d28d0f5ed0c6b5a094f5fe6170b8e2cbc9dff118398baee6" + ++ "e895a6301cb6e881b3cae749a5bdf5c56fc897ff68bc73f2" + ++ "4811bb108b882872bade1f147d886a415cda2b93dd90190c" + ++ "be5c2dd53fe78add5960e97f58ff2506afe437f4cf4c912a" + ++ "397c1a2139ac6207d3ab76e6b7ffd23bb6866dd7f87a9ae5" + ++ "578789084ff2d06ea0d30156d7a10496e8ebe094f5703539" + ++ "730f5fdbebc066de417be82c99c7da59953071f49da7878d" + ++ "a588775ff2a7f0084de390f009f372af75cdeba292b08ea8" + ++ "4bd13a87e1ca678f9ad148145f7cef3620d69a891be46fbb" + ++ "cad858e2401ec0fd72abdea2f643e6d0197b7646fbb83220" + ++ "0f4cf7a7f6a7559f9fb0d0f1680822af9dbd8dec4cd1b5e1" + ++ "7bc799e902d9fe746ddf41da3b7020350d3600347398999a" + ++ "baf75d53e03ad2ee17de8a2032f1008c6c2e6618b62f225b" + ++ "a2f350179445debe68500fcbb6cae970a9920e321b468b74" + ++ "5fb524fb88abbcacdca121d737c44d30724227a99745c209" + ++ "b970d1ff93bbc9f28b01b4e714d6c9cbd9ea032d4e964d8e" + ++ "8fff01db095160c20b7646d9fcd314c4bc11bcc232aeccc0" + ++ "fbedccbc786951025597522eef283e3f56b44561a0765783" + ++ "420128638c257e54b972a76e4261892d81222b3e2039c61a" + ++ "ab8408fcaac3d634f848ab3ee65ea1bd13c6cd75d2e78060" + ++ "e13cf67fbef8de66d2049e26c0541c679fff3e6afc290efe" + ++ "875c213df9678e4a7ec484bc87dae5f0a1c26d7583e38941" + ++ "b7c68b004d4df8b004b666f9448aac1cc3ea21461f41ea5d" + ++ "d0f7a9e6161cfe0f58bcfd304bdc11d78c2e9d542e86c0b5" + ++ "6985cc83f693f686eaac17411a8247bf62f5ccc7782349b5" + ++ "cc1f20e312fa2acc0197154d1bfee507e8db77e8f2732f2d" + ++ "641440ccf248e8643b2bd1e1f9e8239356ab91098fcb431d"; + let q = + "a899c59999bf877d96442d284359783bdc64b5f878b688fe" + ++ "51407f0526e616553ad0aaaac4d5bed3046f10a1faaf42bb" + ++ "2342dc4b7908eea0c46e4c4576897675c2bfdc4467870d3d" + ++ "cd90adaed4359237a4bc6924bfb99aa6bf5f5ede15b574ea" + ++ "e977eac096f3c67d09bda574c6306c6123fa89d2f086b8dc" + ++ "ff92bc570c18d83fe6c810ccfd22ce4c749ef5e6ead3fffe" + ++ "c63d95e0e3fde1df9db6a35fa1d107058f37e41957769199" + ++ "d945dd7a373622c65f0af3fd9eb1ddc5c764bbfaf7a3dc37" + ++ "2548e683b970dac4aa4b9869080d2376c9adecebb84e172c" + ++ "09aeeb25fb8df23e60033260c4f8aac6b8b98ab894b1fb84" + ++ "ebb83c0fb2081c3f3eee07f44e24d8fabf76f19ed167b0d7" + ++ "ff971565aa4efa3625fce5a43ceeaa3eebb3ce88a00f597f" + ++ "048c69292b38dba2103ecdd5ec4ccfe3b2d87fa6202f334b" + ++ "c1cab83b608dfc875b650b69f2c7e23c0b2b4adf149a6100" + ++ "db1b6dbad4679ecb1ea95eafaba3bd00db11c2134f5a8686" + ++ "358b8b2ab49a1b2e85e1e45caeac5cd4dc0b3b5fffba8871" + ++ "1c6baf399edd48dad5e5c313702737a6dbdcede80ca358e5" + ++ "1d1c4fe42e8948a084403f61baed38aa9a1a5ce2918e9f33" + ++ "100050a430b47bc592995606440272a4994677577a6aaa1b" + ++ "a101045dbec5a4e9566dab5445d1af3ed19519f07ac4e2a8" + ++ "bd0a84b01978f203a9125a0be020f71fab56c2c9e344d4f4" + ++ "12d53d3cd8eb74ca5122002e931e3cb0bd4b7492436be17a" + ++ "d7ebe27148671f59432c36d8c56eb762655711cfc8471f70" + ++ "83a8b7283bcb3b1b1d47d37c23d030288cfcef05fbdb4e16" + ++ "652ee03ee7b77056a808cd700bc3d9ef826eca9a59be959c" + ++ "947c865d6b372a1ca2d503d7df6d7611b12111665438475a" + ++ "1c64145849b3da8c2d343410df892d958db232617f9896f1" + ++ "de95b8b5a47132be80dd65298c7f2047858409bf762dbc05" + ++ "a62ca392ac40cfb8201a0607a2cae07d99a307625f2b2d04" + ++ "fe83fbd3ab53602263410f143b73d5b46fc761882e78c782" + ++ "d2c36e716a770a7aefaf7f76cea872db7bffefdbc4c2f9e0" + ++ "39c19adac915e7a63dcb8c8c78c113f29a3e0bc10e100ce0"; + let qs = + "6f0a2fb763eaeb8eb324d564f03d4a55fdcd709e5f1b65e9" + ++ "5702b0141182f9f945d71bc3e64a7dfdae7482a7dd5a4e58" + ++ "bc38f78de2013f2c468a621f08536969d2c8d011bb3bc259" + ++ "2124692c91140a5472cad224acdacdeae5751dadfdf068b8" + ++ "77bfa7374694c6a7be159fc3d24ff9eeeecaf62580427ad8" + ++ "622d48c51a1c4b1701d768c79d8c819776e096d2694107a2" + ++ "f3ec0c32224795b59d32894834039dacb369280afb221bc0" + ++ "90570a93cf409889b818bb30cccee98b2aa26dbba0f28499" + ++ "08e1a3cd43fa1f1fb71049e5c77c3724d74dc351d9989057" + ++ "37bbda3805bd6b1293da8774410fb66e3194e18cdb304dd9" + ++ "a0b59b583dcbc9fc045ac9d56aea5cfc9f8a0b95da1e11b7" + ++ "574d1f976e45fe12294997fac66ca0b83fc056183549e850" + ++ "a11413cc4abbe39a211e8c8cbf82f2a23266b3c10ab9e286" + ++ "07a1b6088909cddff856e1eb6b2cde8bdac53fa939827736" + ++ "ca1b892f6c95899613442bd02dbdb747f02487718e2d3f22" + ++ "f73734d29767ed8d0e346d0c4098b6fdcb4df7d0c4d29603" + ++ "5bffe80d6c65ae0a1b814150d349096baaf950f2caf298d2" + ++ "b292a1d48cf82b10734fe8cedfa16914076dfe3e9b51337b" + ++ "ed28ea1e6824bb717b641ca0e526e175d3e5ed7892aebab0" + ++ "f207562cc938a821e2956107c09b6ce4049adddcd0b7505d" + ++ "49ae6c69a20122461102d465d93dc03db026be54c303613a" + ++ "b8e5ce3fd4f65d0b6162ff740a0bf5469ffd442d8c509cd2" + ++ "3b40dab90f6776ca17fc0678774bd6eee1fa85ababa52ec1" + ++ "a15031eb677c6c488661dddd8b83d6031fe294489ded5f08" + ++ "8ad1689a14baeae7e688afa3033899c81f58de39b392ca94" + ++ "af6f15a46f19fa95c06f9493c8b96a9be25e78b9ea35013b" + ++ "caa76de6303939299d07426a88a334278fc3d0d9fa71373e" + ++ "be51d3c1076ab93a11d3d0d703366ff8cde4c11261d488e5" + ++ "60a2bdf3bfe2476032294800d6a4a39d306e65c6d7d8d66e" + ++ "5ec63eee94531e83a9bddc458a2b508285c0ee10b7bd94da" + ++ "2815a0c5bd5b2e15cbe66355e42f5af8955cdfc0b3a4996d" + ++ "288db1f4b32b15643b18193e378cb7491f3c3951cdd044b1" + ++ "a519571bffac2da986f5f1d506c66530a55f70751e24fa8e" + ++ "d83ac2347f4069fb561a5565e78c6f0207da24e889a93a96" + ++ "65f717d9fe8a2938a09ab5f81be7ccecf466c0397fc15a57" + ++ "469939793f302739765773c256a3ca55d0548afd117a7cae" + ++ "98ca7e0d749a130c7b743d376848e255f8fdbe4cb4480b63" + ++ "cd2c015d1020cf095d175f3ca9dcdfbaf1b2a6e6468eee4c" + ++ "c750f2132a77f376bd9782b9d0ff4da98621b898e251a263" + ++ "4301ba2214a8c430b2f7a79dbbfd6d7ff6e9b0c137b025ff" + ++ "587c0bf912f0b19d4fff96b1ecd2ca990c89b386055c60f2" + ++ "3b94214bd55096f17a7b2c0fa12b333235101cd6f28a128c" + ++ "782e8a72671adadebbd073ded30bd7f09fb693565dcf0bf3" + ++ "090c21d13e5b0989dd8956f18f17f4f69449a13549c9d80a" + ++ "77e5e61b5aeeee9528634100e7bc390672f0ded1ca53555b" + ++ "abddbcf700b9da6192255bddf50a76b709fbed251dce4c7e" + ++ "1ca36b85d1e97c1bc9d38c887a5adf140f9eeef674c31422" + ++ "e65f63cae719f8c1324e42fa5fd8500899ef5aa3f9856aa7" + ++ "ce10c85600a040343204f36bfeab8cfa6e9deb8a2edd2a8e" + ++ "018d00c7c9fa3a251ad0f57183c37e6377797653f382ec7a" + ++ "2b0145e16d3c856bc3634b46d90d7198aff12aff88a30e34" + ++ "e2bfaf62705f3382576a9d3eeb0829fca2387b5b654af46e" + ++ "5cf6316fb57d59e5ea6c369061ac64d99671b0e516529dd5" + ++ "d9c48ea0503e55fee090d36c5ea8b5954f6fcc0060794e1c" + ++ "b7bc24aa1e5c0142fd4ce6e8fd5aa92a7bf84317ea9e1642" + ++ "b6995bac6705adf93cbce72433ed0871139970d640f67b78" + ++ "e63a7a6d849db2567df69ac7d79f8c62664ac221df228289" + ++ "d0a4f9ebd9acb4f87d49da64e51a619fd3f3baccbd9feb12" + ++ "5abe0cc2c8d17ed1d8546da2b6c641f4d3020a5f9b9f26ac" + ++ "16546c2d61385505612275ea344c2bbf1ce890023738f715" + ++ "5e9eba6a071678c8ebd009c328c3eb643679de86e69a9fa5" + ++ "67a9e146030ff03d546310a0a568c5ba0070e0da22f2cef8" + ++ "54714b04d399bbc8fd261f9e8efcd0e83bdbc3f5cfb2d024" + ++ "3e398478cc598e000124eb8858f9df8f52946c2a1ca5c400"; + }; +}; \ No newline at end of file diff --git a/drafts/bs-bn/src/Red.re b/drafts/bs-bn/src/Red.re new file mode 100644 index 0000000..1c62103 --- /dev/null +++ b/drafts/bs-bn/src/Red.re @@ -0,0 +1,41 @@ +[@bs.module "bn.js"] external red : Types.bn => Types.red_context = ""; + +[@bs.module "bn.js"] +external redWithPrime : Types.abs_prime => Types.red_context = "red"; + +let redWithPrime = a => redWithPrime(Types.primeToJs(a)); + +[@bs.module "bn.js"] external mont : Types.bn => Types.red_context = ""; + +[@bs.module "bn.js"] +external montWithPrime : Types.abs_prime => Types.red_context = "mont"; + +let montWithPrime = a => montWithPrime(Types.primeToJs(a)); + +[@bs.send] external fromRed : Types.red => Types.bn = ""; + +[@bs.send.pipe : Types.red] external redAdd : Types.red => Types.red = ""; + +[@bs.send.pipe : Types.red] external redIAdd : Types.red => unit = ""; + +[@bs.send.pipe : Types.red] external redSub : Types.red => Types.red = ""; + +[@bs.send.pipe : Types.red] external redISub : Types.red => unit = ""; + +[@bs.send.pipe : Types.red] external redShl: (int) => Types.red = ""; + +[@bs.send.pipe : Types.red] external redMul : Types.red => Types.red = ""; + +[@bs.send.pipe : Types.red] external redIMul : Types.red => unit = ""; + +[@bs.send] external redSqr : Types.red => Types.red = ""; + +[@bs.send] external redISqr : Types.red => unit = ""; + +[@bs.send] external redSqrt : Types.red => Types.red = ""; + +[@bs.send] external redInvm : Types.red => Types.red = ""; + +[@bs.send] external redNeg : Types.red => Types.red = ""; + +[@bs.send.pipe : Types.red] external redPow : Types.bn => Types.red = ""; diff --git a/drafts/bs-bn/src/Types.re b/drafts/bs-bn/src/Types.re new file mode 100644 index 0000000..82268af --- /dev/null +++ b/drafts/bs-bn/src/Types.re @@ -0,0 +1,13 @@ +type bn; +type red; +type red_context; + +[@bs.deriving {jsConverter: newType}] +type egcd = { + a: bn, + b: bn, + gcd: bn +}; + +[@bs.deriving {jsConverter: newType}] +type prime = [ | `k256 | `p224 | `p192 | `p25519]; diff --git a/drafts/bs-broadcast-channel/LICENSE b/drafts/bs-broadcast-channel/LICENSE new file mode 100644 index 0000000..21fed16 --- /dev/null +++ b/drafts/bs-broadcast-channel/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Alexis Munsayac + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-broadcast-channel/README.md b/drafts/bs-broadcast-channel/README.md new file mode 100644 index 0000000..4b96342 --- /dev/null +++ b/drafts/bs-broadcast-channel/README.md @@ -0,0 +1,63 @@ +# bs-broadcast-channel +> ReasonML bindings for Broadcast Channel + +[![NPM](https://img.shields.io/npm/v/bs-broadcast-channel.svg)](https://www.npmjs.com/package/bs-broadcast-channel) + +## Install + +npm +```bash +npm i --save bs-broadcast-channel +``` + +yarn +```bash +yarn add bs-broadcast-channel +``` + +After installing, add it to the dependencies + +bsconfig.json +```json +{ + "bs-dependencies": [ + "bs-broadcast-channel", + ], +} +``` + +## Usage + +```reason +open BsBroadcastChannel; + +/** + * Create a channel + */ + +let channel = BroadcastChannel.make("My app"); + +/** + * Listen to messages + */ +channel->BroadcastChannel.addEventListener("message", (data: MessageEvent.t) => { + /** + * get our data + */ + Js.log(data->MessageEvent.data); +}); + +/** + * Post message + */ +channel->BroadcastChannel.postMessage("Hello World"); + +/** + * Close our channel + */ +channel->BroadcastChannel.close(); +``` + +## License + +MIT © [lxsmnsyc](https://github.com/lxsmnsyc) \ No newline at end of file diff --git a/drafts/bs-broadcast-channel/example/.gitignore b/drafts/bs-broadcast-channel/example/.gitignore new file mode 100644 index 0000000..9c32a28 --- /dev/null +++ b/drafts/bs-broadcast-channel/example/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.merlin +.bsb.lock +npm-debug.log +/lib/bs/ +/node_modules/ +/bundleOutput/ \ No newline at end of file diff --git a/drafts/bs-broadcast-channel/example/README.md b/drafts/bs-broadcast-channel/example/README.md new file mode 100644 index 0000000..e55514e --- /dev/null +++ b/drafts/bs-broadcast-channel/example/README.md @@ -0,0 +1,61 @@ +# ReasonReact Template & Examples + +This is: +- A template for your new ReasonReact project. +- A collection of thin examples illustrating ReasonReact usage. +- Extra helper documentation for ReasonReact (full ReasonReact docs [here](https://reasonml.github.io/reason-react/)). + +`src` contains 4 sub-folders, each an independent, self-contained ReasonReact example. Feel free to delete any of them and shape this into your project! This template's more malleable than you might be used to =). + +The point of this template and examples is to let you understand and personally tweak the entirely of it. We **don't** give you an opaque, elaborate mega build setup just to put some boxes on the screen. It strikes to stay transparent, learnable, and simple. You're encouraged to read every file; it's a great feeling, having the full picture of what you're using and being able to touch any part. + +## Run + +```sh +npm install +npm run server +# in a new tab +npm start +``` + +Open a new web page to `http://localhost:8000/`. Change any `.re` file in `src` to see the page auto-reload. **You don't need any bundler when you're developing**! + +**How come we don't need any bundler during development**? We highly encourage you to open up `index.html` to check for yourself! + +# Features Used + +| | Blinking Greeting | Reducer from ReactJS Docs | Fetch Dog Pictures | Reason Using JS Using Reason | +|---------------------------|-------------------|---------------------------|--------------------|------------------------------| +| No props | | ✓ | | | +| Has props | | | | ✓ | +| Children props | ✓ | | | | +| No state | | | | ✓ | +| Has state | ✓ | | ✓ | | +| Has state with useReducer | | ✓ | | | +| ReasonReact using ReactJS | | | | ✓ | +| ReactJS using ReasonReact | | | | ✓ | +| useEffect | ✓ | | ✓ | | +| Dom attribute | ✓ | ✓ | | ✓ | +| Styling | ✓ | ✓ | ✓ | ✓ | +| React.array | | | ✓ | | + +# Bundle for Production + +We've included a convenience `UNUSED_webpack.config.js`, in case you want to ship your project to production. You can rename and/or remove that in favor of other bundlers, e.g. Rollup. + +We've also provided a barebone `indexProduction.html`, to serve your bundle. + +```sh +npm install webpack webpack-cli +# rename file +mv UNUSED_webpack.config.js webpack.config.js +# call webpack to bundle for production +./node_modules/.bin/webpack +open indexProduction.html +``` + +# Handle Routing Yourself + +To serve the files, this template uses a minimal dependency called `moduleserve`. A URL such as `localhost:8000/scores/john` resolves to the file `scores/john.html`. If you'd like to override this and handle URL resolution yourself, change the `server` command in `package.json` from `moduleserve ./ --port 8000` to `moduleserve ./ --port 8000 --spa` (for "single page application"). This will make `moduleserve` serve the default `index.html` for any URL. Since `index.html` loads `Index.bs.js`, you can grab hold of the URL in the corresponding `Index.re` and do whatever you want. + +By the way, ReasonReact comes with a small [router](https://reasonml.github.io/reason-react/docs/en/router) you might be interested in. diff --git a/drafts/bs-broadcast-channel/example/UNUSED_webpack.config.js b/drafts/bs-broadcast-channel/example/UNUSED_webpack.config.js new file mode 100644 index 0000000..3260e8f --- /dev/null +++ b/drafts/bs-broadcast-channel/example/UNUSED_webpack.config.js @@ -0,0 +1,14 @@ +const path = require('path'); + +module.exports = { + entry: './src/Index.bs.js', + // If you ever want to use webpack during development, change 'production' + // to 'development' as per webpack documentation. Again, you don't have to + // use webpack or any other bundler during development! Recheck README if + // you didn't know this + mode: 'production', + output: { + path: path.join(__dirname, "bundleOutput"), + filename: 'index.js', + }, +}; \ No newline at end of file diff --git a/drafts/bs-broadcast-channel/example/bsconfig.json b/drafts/bs-broadcast-channel/example/bsconfig.json new file mode 100644 index 0000000..585fa11 --- /dev/null +++ b/drafts/bs-broadcast-channel/example/bsconfig.json @@ -0,0 +1,22 @@ +{ + "name": "reason-react-examples", + "reason": { + "react-jsx": 3 + }, + "sources": { + "dir" : "src", + "subdirs" : true + }, + "bsc-flags": ["-bs-super-errors", "-bs-no-version-header"], + "package-specs": [{ + "module": "commonjs", + "in-source": true + }], + "suffix": ".bs.js", + "namespace": true, + "bs-dependencies": [ + "reason-react", + "bs-broadcast-channel" + ], + "refmt": 3 +} diff --git a/drafts/bs-broadcast-channel/example/index.html b/drafts/bs-broadcast-channel/example/index.html new file mode 100644 index 0000000..4941f86 --- /dev/null +++ b/drafts/bs-broadcast-channel/example/index.html @@ -0,0 +1,22 @@ + + + + + ReasonReact Examples + + + + + + + + + + diff --git a/drafts/bs-broadcast-channel/example/indexProduction.html b/drafts/bs-broadcast-channel/example/indexProduction.html new file mode 100644 index 0000000..1597bfa --- /dev/null +++ b/drafts/bs-broadcast-channel/example/indexProduction.html @@ -0,0 +1,10 @@ + + + + + ReasonReact Examples + + + + + diff --git a/drafts/bs-broadcast-channel/example/package.json b/drafts/bs-broadcast-channel/example/package.json new file mode 100644 index 0000000..d24ba80 --- /dev/null +++ b/drafts/bs-broadcast-channel/example/package.json @@ -0,0 +1,28 @@ +{ + "name": "example", + "version": "0.1.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w -ws _ ", + "clean": "bsb -clean-world", + "server": "moduleserve ./ --port 8000", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "BuckleScript", + "ReasonReact", + "reason-react" + ], + "author": "", + "license": "MIT", + "dependencies": { + "react": "^16.8.1", + "react-dom": "^16.8.1", + "reason-react": ">=0.7.0", + "bs-broadcast-channel": "link:.." + }, + "devDependencies": { + "bs-platform": "^7.0.1", + "moduleserve": "^0.9.0" + } +} diff --git a/drafts/bs-broadcast-channel/example/src/App.re b/drafts/bs-broadcast-channel/example/src/App.re new file mode 100644 index 0000000..8e9ff8a --- /dev/null +++ b/drafts/bs-broadcast-channel/example/src/App.re @@ -0,0 +1,67 @@ +open BsBroadcastChannel; + +type t = + | Add(string) +; + +[@react.component] +let make = (~channel: BroadcastChannel.t) => { + let (data, dispatch) = React.useReducer( + (state: list(string), action: t) => { + Js.log(state); + Js.log(action); + switch (action) { + | Add(value) => [value, ...state]; + } + }, + [], + ); + + let current: React.Ref.t(string) = React.useRef(""); + + React.useEffect1(() => { + let callback = (data) => { + Js.log(data); + let value = MessageEvent.data(data); + dispatch(Add(value)) + }; + + channel->BroadcastChannel.addEventListener("message", callback); + + Some(() => { + channel->BroadcastChannel.removeEventListener("message", callback); + }); + }, [| channel |]); + + let submit = React.useCallback0(_ => { + let value = React.Ref.current(current); + channel->BroadcastChannel.postMessage(value); + Js.log(value); + dispatch(Add(value)) + }); + let onChange = React.useCallback0((event) => { + let value = ReactEvent.Form.target(event)##value; + Js.log(value); + React.Ref.setCurrent(current, value); + (); + }); + +
+ + +
    + { + ReasonReact.array( + Array.of_list( + data |> List.map((value) =>
  • { ReasonReact.string(value) }
  • ) + ) + ) + } +
+
+} \ No newline at end of file diff --git a/drafts/bs-broadcast-channel/example/src/Index.re b/drafts/bs-broadcast-channel/example/src/Index.re new file mode 100644 index 0000000..d59a428 --- /dev/null +++ b/drafts/bs-broadcast-channel/example/src/Index.re @@ -0,0 +1,13 @@ +open BsBroadcastChannel; + +// Entry point +[@bs.val] external document: Js.t({..}) = "document"; + +let channel = BroadcastChannel.make("My App"); + +// All 4 examples. +ReactDOMRe.render( + , + document##body, +); + diff --git a/drafts/bs-broadcast-channel/example/watcher.js b/drafts/bs-broadcast-channel/example/watcher.js new file mode 100644 index 0000000..894a19c --- /dev/null +++ b/drafts/bs-broadcast-channel/example/watcher.js @@ -0,0 +1,39 @@ +// This is our simple, robust watcher. It hooks into the BuckleScript build +// system to listen for build events. +// See package.json's `start` script and `./node_modules/.bin/bsb --help` + +// Btw, if you change this file and reload the page, your browser cache +// _might_ not pick up the new version. If you're in Chrome, do Force Reload. + +var websocketReloader; +var LAST_SUCCESS_BUILD_STAMP = localStorage.getItem('LAST_SUCCESS_BUILD_STAMP') || 0; +// package.json's `start` script's `bsb -ws _` means it'll pipe build events +// through a websocket connection to a default port of 9999. This is +// configurable, e.g. `-ws 5000` +var webSocketPort = 9999; + +function setUpWebSocket() { + if (websocketReloader == null || websocketReloader.readyState !== 1) { + try { + websocketReloader = new WebSocket(`ws://localhost:${webSocketPort}`); + websocketReloader.onmessage = (message) => { + var newData = JSON.parse(message.data).LAST_SUCCESS_BUILD_STAMP; + if (newData > LAST_SUCCESS_BUILD_STAMP) { + LAST_SUCCESS_BUILD_STAMP = newData; + localStorage.setItem('LAST_SUCCESS_BUILD_STAMP', LAST_SUCCESS_BUILD_STAMP); + // Refresh the page! This will naturally re-run everything, + // including our moduleserve which will re-resolve all the modules. + // No stable build! + location.reload(true); + } + + } + } catch (exn) { + console.error("The watcher tried to connect to web socket, but failed. Here's the message:"); + console.error(exn); + } + } +}; + +setUpWebSocket(); +setInterval(setUpWebSocket, 2000); diff --git a/drafts/bs-broadcast-channel/example/yarn.lock b/drafts/bs-broadcast-channel/example/yarn.lock new file mode 100644 index 0000000..805d666 --- /dev/null +++ b/drafts/bs-broadcast-channel/example/yarn.lock @@ -0,0 +1,354 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2": + version "7.7.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.7.tgz#194769ca8d6d7790ec23605af9ee3e42a0aa79cf" + integrity sha512-uCnC2JEVAu8AKB5do1WRIsvrdJ0flYx/A/9f/6chdacnEZ7LmavjdsDXr5ksYBegxtuTPR5Va9/+13QF/kFkCA== + dependencies: + regenerator-runtime "^0.13.2" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +big-integer@^1.6.16: + version "1.6.48" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" + integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +broadcast-channel@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/broadcast-channel/-/broadcast-channel-3.0.3.tgz#e6668693af410f7dda007fd6f80e21992d51f3cc" + integrity sha512-ogRIiGDL0bdeOzPO13YQKX12IvRBDOxej2CJaEwuEOF011C9JBABz+8MJ/WZ34eGbXGrfVBeeeaMTWjBzxVKkw== + dependencies: + "@babel/runtime" "^7.7.2" + detect-node "^2.0.4" + js-sha3 "0.8.0" + microseconds "0.1.0" + nano-time "1.0.0" + rimraf "3.0.0" + unload "2.2.0" + +"bs-broadcast-channel@link:..": + version "0.0.0" + uid "" + +bs-platform@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.0.1.tgz#1d7b0ef6088b998dceee5db74a7cd8f01c20a3bd" + integrity sha512-UjStdtHhbtC/l6vKJ1XRDqrPk7rFf5PLYHtRX3akDXEYVnTbN36z0g4DEr5mU8S0N945e33HYts9x+i7hKKpZQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-node@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" + integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +js-sha3@0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +microseconds@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/microseconds/-/microseconds-0.1.0.tgz#47dc7bcf62171b8030e2152fd82f12a6894a7119" + integrity sha1-R9x7z2IXG4Aw4hUv2C8SpolKcRk= + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +moduleserve@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/moduleserve/-/moduleserve-0.9.1.tgz#11bad4337ea248d7eaf10d2c7f8649a8c3b9c1f8" + integrity sha512-WF2BeGnM2Ko7bdICgJO+Ibu+ZD33ExJHzOzTDsCUzfZnvnFfheEIYBTWyIqSRU0tXh4UTQ1krDOCglFTJPBMow== + dependencies: + send "^0.17.1" + serve-static "^1.14.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +nano-time@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/nano-time/-/nano-time-1.0.0.tgz#b0554f69ad89e22d0907f7a12b0993a5d96137ef" + integrity sha1-sFVPaa2J4i0JB/ehKwmTpdlhN+8= + dependencies: + big-integer "^1.6.16" + +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +prop-types@^15.6.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +react-dom@>=16.8.1, react-dom@^16.8.1: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.12.0.tgz#0da4b714b8d13c2038c9396b54a92baea633fe11" + integrity sha512-LMxFfAGrcS3kETtQaCkTKjMiifahaMySFDn71fZUNpPHZQEzmk/GiAeIT8JSOrHB23fnuCOMruL2a8NYlw+8Gw== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.18.0" + +react-is@^16.8.1: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" + integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + +react@>=16.8.1, react@^16.8.1: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.12.0.tgz#0c0a9c6a142429e3614834d5a778e18aa78a0b83" + integrity sha512-fglqy3k5E+81pA8s+7K0/T3DBCF0ZDOher1elBFzF7O6arXJgzyu/FW+COxFvAWXJoJN9KIZbT2LXlukwphYTA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + +reason-react@>=0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/reason-react/-/reason-react-0.7.0.tgz#46a975c321e81cd51310d7b1a02418ca7667b0d6" + integrity sha512-czR/f0lY5iyLCki9gwftOFF5Zs40l7ZSFmpGK/Z6hx2jBVeFDmIiXB8bAQW/cO6IvtuEt97OmsYueiuOYG9XjQ== + dependencies: + react ">=16.8.1" + react-dom ">=16.8.1" + +regenerator-runtime@^0.13.2: + version "0.13.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" + integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== + +rimraf@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" + integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== + dependencies: + glob "^7.1.3" + +scheduler@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4" + integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +send@0.17.1, send@^0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +unload@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/unload/-/unload-2.2.0.tgz#ccc88fdcad345faa06a92039ec0f80b488880ef7" + integrity sha512-B60uB5TNBLtN6/LsgAf3udH9saB5p7gqJwcFfbOEZ8BcBHnGwCf6G/TGiEqkRAxX7zAFIUtzdrXQSdL3Q/wqNA== + dependencies: + "@babel/runtime" "^7.6.2" + detect-node "^2.0.4" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= diff --git a/drafts/bs-broadcast-channel/package.json b/drafts/bs-broadcast-channel/package.json new file mode 100644 index 0000000..956c4ed --- /dev/null +++ b/drafts/bs-broadcast-channel/package.json @@ -0,0 +1,26 @@ +{ + "name": "bs-broadcast-channel", + "version": "0.3.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript" + ], + "author": "Alexis Munsayac ", + "license": "MIT", + "devDependencies": { + "bs-platform": "^7.0.1" + }, + "dependencies": {}, + "description": "ReasonML bindings for the Broadcast Channel API", + "main": "index.js", + "repository": "https://github.com/LXSMNSYC/bs-broadcast-channel.git", + "homepage": "https://github.com/LXSMNSYC/bs-broadcast-channel", + "bugs": { + "url": "https://github.com/LXSMNSYC/bs-broadcast-channel/issues" + }, + "private": false +} diff --git a/drafts/bs-broadcast-channel/src/BroadcastChannel.re b/drafts/bs-broadcast-channel/src/BroadcastChannel.re new file mode 100644 index 0000000..a5b41d1 --- /dev/null +++ b/drafts/bs-broadcast-channel/src/BroadcastChannel.re @@ -0,0 +1,47 @@ +/** + * @license + * MIT License + * + * Copyright (c) 2020 Alexis Munsayac + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * + * @author Alexis Munsayac + * @copyright Alexis Munsayac 2020 + */ +type t; + +[@bs.module "./broadcast-channel.js"] +[@bs.new] +external make: string => t = "BroadcastChannel"; + +[@bs.get] +external name: t => string = "name"; + +[@bs.send] +external close: t => unit = "close"; + +[@bs.send] +external postMessage: (t, 'data) => unit = "postMessage"; + +[@bs.send] +external addEventListener: (t, string, MessageEvent.t => 'b) => unit = "addEventListener"; + +[@bs.send] +external removeEventListener: (t, string, MessageEvent.t => 'b) => unit = "removeEventListener"; diff --git a/drafts/bs-broadcast-channel/src/MessageEvent.re b/drafts/bs-broadcast-channel/src/MessageEvent.re new file mode 100644 index 0000000..142bae5 --- /dev/null +++ b/drafts/bs-broadcast-channel/src/MessageEvent.re @@ -0,0 +1,79 @@ +/** + * @license + * MIT License + * + * Copyright (c) 2020 Alexis Munsayac + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * + * @author Alexis Munsayac + * @copyright Alexis Munsayac 2020 + */ +type t; + +[@bs.get] +external bubbles: t => bool = "bubbles"; + +[@bs.get] +external cancelBubble: t => bool = "cancelBubble"; + +[@bs.get] +external cancelable: t => bool = "cancelable"; + +[@bs.get] +external composed: t => bool = "composed"; + +[@bs.get] +external data: t => 'a = "data"; + +[@bs.get] +external defaultPrevented: t => bool = "defaultPrevented"; + +[@bs.get] +external eventPhase: t => int = "eventPhase"; + +[@bs.get] +external explicitOriginalTarget: t => 'a = "explicitOriginalTarget"; + +[@bs.get] +external isTrusted: t => bool = "isTrusted"; + +[@bs.get] +external lastEventId: t => string = "lastEventId"; + +[@bs.get] +external origin: t => string = "origin"; + +[@bs.get] +external originalTarget: t => 'a = "originalTarget"; + +[@bs.get] +external returnValue: t => bool = "returnValue"; + +[@bs.get] +external source: t => 'a = "source"; + +[@bs.get] +external srcElement: t => 'a = "srcElement"; + +[@bs.get] +external target: t => 'a = "target"; + +[@bs.get] +external type_: t => string = "type"; diff --git a/drafts/bs-broadcast-channel/src/broadcast-channel.js b/drafts/bs-broadcast-channel/src/broadcast-channel.js new file mode 100644 index 0000000..ca967be --- /dev/null +++ b/drafts/bs-broadcast-channel/src/broadcast-channel.js @@ -0,0 +1,99 @@ +'use strict'; + +function getModule() { + const g = + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : + typeof g !== "undefined" ? global : + /* otherwise */ undefined + + if (g) { + if (typeof g.BroadcastChannel === "undefined") { + var channels = []; + function BroadcastChannel(channel) { + var $this = this; + channel = String(channel); + + var id = '$BroadcastChannel$' + channel + '$'; + + channels[id] = channels[id] || []; + channels[id].push(this); + + this._name = channel; + this._id = id; + this._closed = false; + this._mc = new MessageChannel(); + this._mc.port1.start(); + this._mc.port2.start(); + + g.addEventListener('storage', function(e) { + if (e.storageArea !== g.localStorage) return; + if (e.newValue === null) return; + if (e.key.substring(0, id.length) !== id) return; + var data = JSON.parse(e.newValue); + $this._mc.port2.postMessage(data); + }); + } + + BroadcastChannel.prototype = { + // BroadcastChannel API + get name() { + return this._name; + }, + postMessage: function(message) { + var $this = this; + if (this._closed) { + var e = new Error(); + e.name = 'InvalidStateError'; + throw e; + } + var value = JSON.stringify(message); + + // Broadcast to other contexts via storage events... + var key = this._id + String(Date.now()) + '$' + String(Math.random()); + g.localStorage.setItem(key, value); + setTimeout(function() { + g.localStorage.removeItem(key); + }, 500); + + // Broadcast to current context via ports + channels[this._id].forEach(function(bc) { + if (bc === $this) return; + bc._mc.port2.postMessage(JSON.parse(value)); + }); + }, + close: function() { + if (this._closed) return; + this._closed = true; + this._mc.port1.close(); + this._mc.port2.close(); + + var index = channels[this._id].indexOf(this); + channels[this._id].splice(index, 1); + }, + + // EventTarget API + get onmessage() { + return this._mc.port1.onmessage; + }, + set onmessage(value) { + this._mc.port1.onmessage = value; + }, + addEventListener: function(/*type, listener , useCapture*/) { + return this._mc.port1.addEventListener.apply(this._mc.port1, arguments); + }, + removeEventListener: function(/*type, listener , useCapture*/) { + return this._mc.port1.removeEventListener.apply(this._mc.port1, arguments); + }, + dispatchEvent: function(/*event*/) { + return this._mc.port1.dispatchEvent.apply(this._mc.port1, arguments); + }, + }; + + return BroadcastChannel; + } + } + return BroadcastChannel; +} + +exports.BroadcastChannel = getModule(); \ No newline at end of file diff --git a/drafts/bs-canvas/.gitignore b/drafts/bs-canvas/.gitignore new file mode 100644 index 0000000..2417f2a --- /dev/null +++ b/drafts/bs-canvas/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.merlin +.bsb.lock +*.bs.js +npm-debug.log +/lib/bs/ +/node_modules/ diff --git a/drafts/bs-canvas/LICENSE.md b/drafts/bs-canvas/LICENSE.md new file mode 100644 index 0000000..80dd20e --- /dev/null +++ b/drafts/bs-canvas/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Andrés Rodríguez + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-canvas/README.md b/drafts/bs-canvas/README.md new file mode 100644 index 0000000..8f01163 --- /dev/null +++ b/drafts/bs-canvas/README.md @@ -0,0 +1,35 @@ +# :art: bs-canvas + +BuckleScript bindings for [node-canvas](https://github.com/Automattic/node-canvas). + +Currently, only bindings for the latest 1.x version are available. + +:warning: _Not all bindings have been tested. If you find a problem please file an issue. PRs are also welcome!_ :warning: + +# :memo: To Do +- Add bindings for node-canvas 2.0.0. +- Add interface file to hide internal functions. +- Add bindings for all possible forms of `toBuffer` function. +- Add binding for async `toDataURL`. +- Add data modes to the `Image` module. +- Set correct data types in the `ImageData` module instead of using `int` and `int64`. +- Add methods for gradient type. +- Add methods for pattern type. +- Prepare for publishing to redex. +- Add usage examples. +- Add tests. + +# :hammer: Build +``` +npm run build +``` + +# :eyeglasses: Build + Watch + +``` +npm run start +``` + + +# :pencil2: Editor +If you use `vscode`, Press `Windows + Shift + B` it will build automatically diff --git a/drafts/bs-canvas/bsconfig.json b/drafts/bs-canvas/bsconfig.json new file mode 100644 index 0000000..68b51f3 --- /dev/null +++ b/drafts/bs-canvas/bsconfig.json @@ -0,0 +1,18 @@ +{ + "name": "bs-canvas", + "version": "0.1.0", + "sources": { + "dir": "src", + "subdirs": true + }, + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "suffix": ".bs.js", + "warnings": { + "error": "+101" + }, + "namespace": false, + "refmt": 3 +} diff --git a/drafts/bs-canvas/package-lock.json b/drafts/bs-canvas/package-lock.json new file mode 100644 index 0000000..4b2f908 --- /dev/null +++ b/drafts/bs-canvas/package-lock.json @@ -0,0 +1,27 @@ +{ + "name": "bs-canvas", + "version": "0.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "bs-platform": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-4.0.5.tgz", + "integrity": "sha512-wK+yUx/5ojlrxgk/EB3Hla7+9NEnE8PxtGb71e4IsKnWPXrRAaVtdTuoWWClv8z77xntOFg8qTgYfYyh9xLMWA==", + "dev": true + }, + "canvas": { + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/canvas/-/canvas-1.6.11.tgz", + "integrity": "sha512-ElVw5Uk8PReGpzXfDg6PDa+wntnZLGWWfdSHI0Pc8GyXiFbW13drSTzWU6C4E5QylHe+FnLqI7ngMRlp3eGZIQ==", + "requires": { + "nan": "^2.10.0" + } + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" + } + } +} diff --git a/drafts/bs-canvas/package.json b/drafts/bs-canvas/package.json new file mode 100644 index 0000000..005eba6 --- /dev/null +++ b/drafts/bs-canvas/package.json @@ -0,0 +1,22 @@ +{ + "name": "bs-canvas", + "version": "0.1.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "node-canvas", + "canvas" + ], + "author": "andresrgz", + "license": "MIT", + "devDependencies": { + "bs-platform": "^4.0.5" + }, + "dependencies": { + "canvas": "^1.6.11" + } +} diff --git a/drafts/bs-canvas/src/Canvas.re b/drafts/bs-canvas/src/Canvas.re new file mode 100644 index 0000000..cea13a2 --- /dev/null +++ b/drafts/bs-canvas/src/Canvas.re @@ -0,0 +1,451 @@ +type t; +type htmlCanvasElement; + +[@bs.deriving jsConverter] +type canvasFormat = [ | [@bs.as "svg"] `SVG | [@bs.as "pdf"] `PDF]; + +[@bs.new] [@bs.module] +external createCanvas': + (~width: float=?, ~height: float=?, ~type_: string=?, unit) => t = + "canvas"; +let createCanvas = (~width=?, ~height=?, ~type_=?, ()) => + switch (type_) { + | Some(type_) => + createCanvas'(~width?, ~height?, ~type_=type_ |> canvasFormatToJs, ()) + | None => createCanvas'(~width?, ~height?, ()) + }; + +type pngStream; +type jpegStream; +type pdfStream; + +[@bs.deriving abstract] +type jpegStreamOptions = { + [@bs.optional] + bufsize: int, + [@bs.optional] + quality: int, + [@bs.optional] + progressive: bool, +}; + +[@bs.send] external pngStream: t => pngStream = ""; +[@bs.send] +external jpegStream: (t, ~options: jpegStreamOptions=?, unit) => jpegStream = + ""; +[@bs.send] external pdfStream: t => pdfStream = ""; + +/* TODO: Add bindings for all possible forms of toBuffer function */ +[@bs.send] external toBuffer: t => Node.Buffer.t = ""; + +[@bs.deriving jsConverter] +type imageFormat = [ + | [@bs.as "image/png"] `PNG + | [@bs.as "image/jpeg"] `JPEG +]; + +[@bs.get] external widthGet: t => float = "width"; +[@bs.get] external heightGet: t => float = "height"; + +/* TODO: Add binding for async toDataURL */ +[@bs.send] +external toDataURL': + (t, ~type_: string=?, ~encoderOptions: float=?, unit) => string = + "toDataURL"; +let toDataURL = (canvas, ~type_=?, ~encoderOptions=?, ()) => + switch (type_) { + | Some(type_) => + canvas->toDataURL'(~type_=type_ |> imageFormatToJs, ~encoderOptions?, ()) + | None => canvas->toDataURL'(~encoderOptions?, ()) + }; + +[@bs.deriving jsConverter] +type renderingContext = [ | [@bs.as "2d"] `CanvasRenderingContext2D]; + +/* TODO: Add image data modes */ +module Image = { + type t; + + [@bs.get] external srcGet: t => string = "src"; + [@bs.set] external srcSet: (t, string) => unit = "src"; + + [@bs.new] [@bs.module "canvas"] + external createImage: (~width: float=?, ~height: float=?, unit) => t = + "Image"; +}; + +/* TODO: Set correct data types instead of using ints */ +module ImageData = { + type t; + [@bs.get] external dataGet': t => array(int) = "data"; + let dataGet = t => t->dataGet' |> Array.to_list; + [@bs.get] external height: t => int64 = ""; + [@bs.get] external width: t => int64 = ""; + + [@bs.new] [@bs.module "canvas"] + external createImageData: (int64, int64) => t = "ImageData"; + + [@bs.new] [@bs.module "canvas"] + external createImageDataFromData': (array(int), int64, int64) => t = + "ImageData"; + let createImageDataFromData = (data, width, height) => + createImageDataFromData'(data |> Array.of_list, width, height); +}; + +module CanvasRenderingContext2D = { + type t; + /* TODO: Add methods for gradient type */ + type gradient; + /* TODO: Add methods for pattern type */ + type pattern; + + module TextMetrics = { + [@bs.deriving abstract] + type t = + pri { + width: float, + actualBoundingBoxLeft: float, + actualBoundingRight: float, + fontBoundingBoxAscent: float, + fontBoundingBoxDescent: float, + actualBoundingBoxAscent: float, + actualBoundingBoxDescent: float, + emHeightAscent: float, + emHeightDescent: float, + alphabeticBaseline: float, + ideographicBaseline: float, + }; + }; + + [@bs.get] external fontGet: t => string = "font"; + [@bs.set] external fontSet: (t, string) => unit = "font"; + + [@bs.get] external shadowBlurGet: t => float = "shadowBlur"; + [@bs.set] external shadowBlurSet: (t, float) => unit = "shadowBlur"; + + [@bs.get] external shadowOffsetXGet: t => float = "shadowOffsetX"; + [@bs.set] external shadowOffsetXSet: (t, float) => unit = "shadowOffsetX"; + + [@bs.get] external shadowOffsetYGet: t => float = "shadowOffsetY"; + [@bs.set] external shadowOffsetYSet: (t, float) => unit = "shadowOffsetY"; + + [@bs.get] external shadowColorGet: t => string = "shadowColor"; + [@bs.set] external shadowColorSet: (t, string) => unit = "shadowColor"; + + [@bs.get] external lineWidthGet: t => float = "lineWidth"; + [@bs.set] external lineWidthSet: (t, float) => unit = "lineWidth"; + + [@bs.get] external lineDashOffsetGet: t => float = "lineDashOffset"; + [@bs.set] external lineDashOffsetSet: (t, float) => unit = "lineDashOffset"; + + [@bs.get] external globalAlphaGet: t => float = "globalAlpha"; + [@bs.set] external globalAlphaSet: (t, float) => unit = "globalAlpha"; + + [@bs.get] + external imageSmoothingEnabledGet: t => bool = "imageSmoothingEnabled"; + [@bs.set] + external imageSmoothingEnabledSet: (t, bool) => unit = + "imageSmoothingEnabled"; + + [@bs.deriving jsConverter] + type globalCompositeOperation = [ + | [@bs.as "source-over"] `sourceOver + | [@bs.as "source-in"] `sourceIn + | [@bs.as "source-out"] `sourceOut + | [@bs.as "source-atop"] `sourceAtop + | [@bs.as "destination-over"] `destinationOver + | [@bs.as "destination-in"] `destinationIn + | [@bs.as "destination-out"] `destinationOut + | [@bs.as "destination-atop"] `destinationAtop + | `lighter + | `copy + | `xor + | `multiply + | `screen + | `overlay + | `darken + | `lighten + | [@bs.as "color-dodge"] `colorDodge + | [@bs.as "color-burn"] `colorBurn + | [@bs.as "hard-light"] `hardLight + | [@bs.as "soft-light"] `softLight + | `difference + | `exclusion + | `hue + | `saturation + | `color + | `luminosity + | [@bs.as "hsl-hue"] `hslHue + | [@bs.as "hsl-saturation"] `hslSaturation + | [@bs.as "hsl-color"] `hslColor + | [@bs.as "hsl-luminosity"] `hslLuminosity + | `unknown + ]; + + [@bs.get] + external globalCompositeOperationGet': t => string = + "globalCompositeOperation"; + let globalCompositeOperationGet = t => + switch (t->globalCompositeOperationGet' |> globalCompositeOperationFromJs) { + | Some(globalCompositeOperation) => globalCompositeOperation + | None => `unknown + }; + [@bs.set] + external globalCompositeOperationSet': (t, string) => unit = + "globalCompositeOperation"; + let globalCompositeOperationSet = (t, globalCompositeOperation) => + t + ->globalCompositeOperationSet'( + globalCompositeOperation |> globalCompositeOperationToJs, + ); + + [@bs.send] external getLineDash': t => array(float) = ""; + let getLineDash = t => t->getLineDash' |> Array.to_list; + [@bs.send] external setLineDash': (t, array(float)) => unit = ""; + let setLineDash = (t, segments) => + t->setLineDash'(segments |> Array.of_list); + + [@bs.deriving jsConverter] + type lineCap = [ | `butt | `round | `square | `unknown]; + [@bs.get] external lineCapGet': t => string = "lineCap"; + let lineCapGet = t => + switch (t->lineCapGet' |> lineCapFromJs) { + | Some(lineCap) => lineCap + | None => `unknown + }; + [@bs.set] external lineCapSet': (t, string) => unit = "lineCap"; + let lineCapSet = (t, lineCap) => t->lineCapSet'(lineCap |> lineCapToJs); + + [@bs.deriving jsConverter] + type lineJoin = [ | `bevel | `round | `miter | `unknown]; + [@bs.get] external lineJoinGet': t => string = "lineJoin"; + let lineJoinGet = t => + switch (t->lineJoinGet' |> lineJoinFromJs) { + | Some(lineJoin) => lineJoin + | None => `unknown + }; + [@bs.set] external lineJoinSet': (t, string) => unit = "lineJoin"; + let lineJoinSet = (t, lineJoin) => + t->lineJoinSet'(lineJoin |> lineJoinToJs); + + [@bs.deriving jsConverter] + type textAlign = [ + | `left + | `right + | `center + | `start + | [@bs.as "end"] `end_ + | `unknown + ]; + [@bs.get] external textAlignGet': t => string = "textAlign"; + let textAlignGet = t => + switch (t->textAlignGet' |> textAlignFromJs) { + | Some(textAlign) => textAlign + | None => `unknown + }; + [@bs.set] external textAlignSet': (t, string) => unit = "textAlign"; + let textAlignSet = (t, textAlign) => + t->textAlignSet'(textAlign |> textAlignToJs); + + [@bs.deriving jsConverter] + type textBaseLine = [ | `top | `middle | `alphabetic | `bottom | `unknown]; + [@bs.get] external textBaseLineGet': t => string = "textBaseLine"; + let textBaseLineGet = t => + switch (t->textBaseLineGet' |> textBaseLineFromJs) { + | Some(textBaseLine) => textBaseLine + | None => `unknown + }; + [@bs.set] external textBaseLineSet': (t, string) => unit = "textBaseLine"; + let textBaseLineSet = (t, textBaseLine) => + t->textBaseLineSet'(textBaseLine |> textBaseLineToJs); + + [@bs.get] external fillStyleColorGet: t => string = "fillStyle"; + [@bs.set] external fillStyleColorSet: (t, string) => unit = "fillStyle"; + [@bs.get] external fillStyleGradientGet: t => gradient = "fillStyle"; + [@bs.set] external fillStyleGradientSet: (t, gradient) => unit = "fillStyle"; + [@bs.get] external fillStylePatternGet: t => pattern = "fillStyle"; + [@bs.set] external fillStylePatternSet: (t, pattern) => unit = "fillStyle"; + + [@bs.get] external strokeStyleColorGet: t => string = "strokeStyle"; + [@bs.set] external strokeStyleColorSet: (t, string) => unit = "strokeStyle"; + [@bs.get] external strokeStyleGradientGet: t => gradient = "strokeStyle"; + [@bs.set] + external strokeStyleGradientSet: (t, gradient) => unit = "strokeStyle"; + [@bs.get] external strokeStylePatternGet: t => pattern = "strokeStyle"; + [@bs.set] + external strokeStylePatternSet: (t, pattern) => unit = "strokeStyle"; + + [@bs.send] + external createLinearGradient: (t, float, float, float, float) => gradient = + ""; + [@bs.send] + external createRadialGradient: + (t, float, float, float, float, float, float) => gradient = + ""; + + [@bs.deriving jsConverter] + type repetition = [ + | `repeat + | [@bs.as "repeat-x"] `repeatX + | [@bs.as "repeat-y"] `repeatY + | [@bs.as "no-repeat"] `noRepeat + ]; + [@bs.send] + external createPatternFromImage': (t, Image.t, string) => pattern = + "createPattern"; + let createPatternFromImage = (t, image, repetion) => + t->createPatternFromImage'(image, repetion |> repetitionToJs); + + [@bs.deriving jsConverter] + type patternQuality = [ | `fast | `good | `best | `unknown]; + [@bs.get] external patternQualityGet': t => string = "patternQuality"; + let patternQualityGet = t => + switch (t->patternQualityGet' |> patternQualityFromJs) { + | Some(patternQuality) => patternQuality + | None => `unknown + }; + [@bs.set] + external patternQualitySet': (t, string) => unit = "patternQuality"; + let patternQualitySet = (t, patternQuality) => + t->patternQualitySet'(patternQuality |> patternQualityToJs); + + [@bs.deriving jsConverter] + type textDrawingMode = [ | `path | `glyph | `unknown]; + [@bs.get] external textDrawingModeGet': t => string = "textDrawingMode"; + let textDrawingModeGet = t => + switch (t->textDrawingModeGet' |> textDrawingModeFromJs) { + | Some(textDrawingMode) => textDrawingMode + | None => `unknown + }; + [@bs.set] + external textDrawingModeSet': (t, string) => unit = "textDrawingMode"; + let textDrawingModeSet = (t, textDrawingMode) => + t->textDrawingModeSet'(textDrawingMode |> textDrawingModeToJs); + + [@bs.deriving jsConverter] + type antialias = [ | `default | `none | `gray | `subpixel | `unknown]; + [@bs.get] external antialiasGet': t => string = "antialias"; + let antialiasGet = t => + switch (t->antialiasGet' |> antialiasFromJs) { + | Some(antialias) => antialias + | None => `unknown + }; + [@bs.set] external antialiasSet': (t, string) => unit = "antialias"; + let antialiasSet = (t, antialias) => + t->antialiasSet'(antialias |> antialiasToJs); + + [@bs.send] external clearRect: (t, float, float, float, float) => unit = ""; + [@bs.send] external fillRect: (t, float, float, float, float) => unit = ""; + [@bs.send] external strokeRect: (t, float, float, float, float) => unit = ""; + [@bs.send] + external fillText: + (t, string, float, float, ~maxWidth: float=?, unit) => unit = + ""; + [@bs.send] + external strokeText: + (t, string, float, float, ~maxWidth: float=?, unit) => unit = + ""; + [@bs.send] external measureText: (t, string) => TextMetrics.t = ""; + [@bs.send] external beginPath: t => unit = ""; + [@bs.send] external closePath: t => unit = ""; + [@bs.send] external moveTo: (t, float, float) => unit = ""; + [@bs.send] external lineTo: (t, float, float) => unit = ""; + [@bs.send] + external quadraticCurveTo: (t, float, float, float, float) => unit = ""; + [@bs.send] + external bezierCurveTo: (t, float, float, float, float, float, float) => unit = + ""; + [@bs.send] + external arc: + (t, float, float, float, float, float, ~anticlockwise: bool=?, unit) => + unit = + ""; + [@bs.send] + external arcTo: (t, float, float, float, float, float) => unit = ""; + [@bs.send] external rect: (t, float, float, float, float) => unit = ""; + [@bs.send] external fill: t => unit = ""; + [@bs.send] external stroke: t => unit = ""; + [@bs.send] external clip: t => unit = ""; + [@bs.send] external isPointInPath: (t, float, float) => bool = ""; + [@bs.send] external rotate: (t, float) => unit = ""; + [@bs.send] external scale: (t, float, float) => unit = ""; + [@bs.send] external translate: (t, float, float) => unit = ""; + [@bs.send] + external transform: (t, float, float, float, float, float, float) => unit = + ""; + [@bs.send] + external setTransform: (t, float, float, float, float, float, float) => unit = + ""; + [@bs.send] external resetTransform: t => unit = ""; + + [@bs.send] external drawImage: (t, Image.t, float, float) => unit = ""; + [@bs.send] + external drawImageDst: (t, Image.t, float, float, float, float) => unit = + "drawImage"; + [@bs.send] + external drawImageSrcDst: + (t, Image.t, float, float, float, float, float, float, float, float) => + unit = + "drawImage"; + + [@bs.send] external createImageData: (t, float, float) => ImageData.t = ""; + [@bs.send] + external createFromImageData: (t, ImageData.t) => ImageData.t = + "createImageData"; + [@bs.send] + external getImageData: (t, float, float, float, float) => ImageData.t = ""; + [@bs.send] + external putImageData: (t, ImageData.t, float, float) => unit = ""; + [@bs.send] + external putImageDataDirty: + (t, ImageData.t, float, float, float, float, float, float) => unit = + ""; + + [@bs.send] external save: t => unit = ""; + [@bs.send] external restore: t => unit = ""; + + [@bs.get] + external canvasGet': t => Js.Nullable.t(htmlCanvasElement) = "canvas"; + let canvasGet = t => t->canvasGet' |> Js.Nullable.toOption; +}; + +[@bs.send] +external createPatternFromCanvas': + (CanvasRenderingContext2D.t, t, string) => CanvasRenderingContext2D.pattern = + "createPattern"; +let createPatternFromCanvas = (t, canvas, repetion) => + t + ->createPatternFromCanvas'( + canvas, + repetion |> CanvasRenderingContext2D.repetitionToJs, + ); + +[@bs.send] +external drawCanvas: (CanvasRenderingContext2D.t, t, float, float) => unit = + "drawImage"; +[@bs.send] +external drawCanvasDst: + (CanvasRenderingContext2D.t, t, float, float, float, float) => unit = + "drawImage"; +[@bs.send] +external drawCanvasSrcDst: + ( + CanvasRenderingContext2D.t, + t, + float, + float, + float, + float, + float, + float, + float, + float + ) => + unit = + "drawImage"; + +[@bs.send] external getContext': (t, string) => 'a = "getContext"; +let getContext = (canvas, contextType) => + canvas->getContext'(contextType |> renderingContextToJs); +let getCanvasRenderingContext2D = canvas: CanvasRenderingContext2D.t => + canvas->getContext(`CanvasRenderingContext2D); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/README.md b/drafts/bs-chakra-ui/README.md new file mode 100644 index 0000000..c822527 --- /dev/null +++ b/drafts/bs-chakra-ui/README.md @@ -0,0 +1,103 @@ +# bs-chakra-ui 🚧 + +Bucklescript bindings for [chakra-ui](https://chakra-ui.com). + +**Important note**, chakra-ui use the styled system but in order to avoid props bindings overhead, I decided to mainly use `` when I need to create space, etc. + +## Install + +``` +yarn add @dck/bs-chakra-ui +``` + +Add it to `bs-dependencies` in your `bsconfig.json` : + +```json +{ + "bs-dependencies": ["@dck/bs-chakra-ui"] +} +``` + +## Example + +```reason +open BsChakra; + +module App = { + [@react.component] + let make = () => { + let (isChecked, setChecked) = React.useState(() => false); + + + + + "Hello responsive"->React.string + + + + + "Toggle"->React.string + + + setChecked(v => !v)} + /> + + + }; +}; +``` + +### Todo + +- [x] Accordion +- [x] Alert +- [ ] AspectRatioBox +- [x] Avatar +- [ ] Badge +- [x] Box 🚧 +- [ ] Breadcrumb +- [x] Button 🚧 +- [ ] Checkbox +- [x] CircularProgress +- [ ] CloseButton +- [ ] Code +- [ ] Collapse +- [ ] ControlBox +- [ ] Drawer +- [ ] Editable +- [x] Flex +- [x] FormControl +- [x] FormHelperText +- [x] FormErrorMessage +- [x] Heading +- [x] Icon +- [x] IconButton +- [x] Image +- [x] Input +- [x] Link +- [ ] List +- [x] Modal +- [x] Menu +- [x] NumberInput +- [ ] Popover +- [ ] Progress +- [ ] PseudoBox +- [ ] Radio +- [ ] Slider +- [x] Spinner +- [ ] Stat +- [x] Stack +- [x] Switch +- [ ] Tabs +- [ ] Tag +- [ ] Textarea +- [x] Text +- [ ] Toast +- [ ] Tooltip +- [x] useClipboard +- [x] useDisclosure +- [x] useTheme diff --git a/drafts/bs-chakra-ui/package.json b/drafts/bs-chakra-ui/package.json new file mode 100644 index 0000000..f47f612 --- /dev/null +++ b/drafts/bs-chakra-ui/package.json @@ -0,0 +1,25 @@ +{ + "name": "@dck/bs-chakra-ui", + "version": "0.8.3", + "description": "BuckleScript bindings for chakra-ui", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "chakra", + "chakra-ui", + "design", + "reasonml" + ], + "author": "Thomas Deconinck", + "license": "MIT", + "devDependencies": { + "bs-platform": "5.0.6" + }, + "dependencies": { + "reason-react": "0.7.0" + } +} diff --git a/drafts/bs-chakra-ui/src/BsChakra.re b/drafts/bs-chakra-ui/src/BsChakra.re new file mode 100644 index 0000000..712d904 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra.re @@ -0,0 +1,165 @@ +type theme; + +[@bs.module "@chakra-ui/core"] external theme: theme = "theme"; + +module ThemeProvider = { + [@bs.module "@chakra-ui/core"] [@react.component] + external make: (~theme: theme, ~children: React.element) => React.element = "ThemeProvider"; +}; + +module CSSReset = { + [@bs.module "@chakra-ui/core"] [@react.component] external make: unit => React.element = "CSSReset"; +}; + +module Hooks = { + [@bs.module "@chakra-ui/core"] + external useDisclosure: + unit => + { + . + "isOpen": bool, + [@bs.meth] "onClose": unit => unit, + [@bs.meth] "onOpen": unit => unit, + [@bs.meth] "onToggle": unit => unit, + } = + "useDisclosure"; + + [@bs.module "@chakra-ui/core"] + external useClipboard: + unit => + { + . + "value": string, + [@bs.meth] "onCopy": unit => unit, + "hasCopied": bool, + } = + "useClipboard"; + + [@bs.module "@chakra-ui/core"] external useTheme: unit => theme = "useTheme"; + + module Toast = { + [@bs.deriving abstract] + type config = { + [@bs.optional] + title: string, + [@bs.optional] + description: string, + [@bs.optional] + status: string, + [@bs.optional] + duration: int, + [@bs.optional] + isClosable: bool, + [@bs.optional] + position: string, + [@bs.optional] + render: unit => React.element, + [@bs.optional] + onClose: unit => unit, + }; + + [@bs.deriving jsConverter] + type position = [ + | `top + | [@bs.as "top-left"] `topLeft + | [@bs.as "top-right"] `topRight + | [@bs.as "bottom"] `bottom + | [@bs.as "bottom-left"] `bottomLeft + | [@bs.as "bottom-right"] `bottomRight + ]; + + [@bs.deriving jsConverter] + type status = [ | `danger | `warning | `success | `info]; + }; + + [@bs.module "@chakra-ui/core"] external _useToast: (Toast.config, unit) => unit = "useToast"; + + let useToast = + ( + ~title=?, + ~isClosable=?, + ~description=?, + ~duration=?, + ~render=?, + ~onClose=?, + ~status: option(Toast.status)=?, + ~position: option(Toast.position)=?, + (), + ) => + _useToast( + Toast.config( + ~title?, + ~description?, + ~isClosable?, + ~duration?, + ~render?, + ~onClose?, + ~status=?status->Belt.Option.map(v => v->Toast.statusToJs), + ~position=?position->Belt.Option.map(v => v->Toast.positionToJs), + (), + ), + ); +}; + +module Accordion = BsChakra__Accordion; +module AccordionHeader = BsChakra__AccordionHeader; +module AccordionItem = BsChakra__AccordionItem; +module AccordionPanel = BsChakra__AccordionPanel; +module AccordionIcon = BsChakra__AccordionIcon; +module Button = BsChakra__Button; +module ButtonGroup = BsChakra__ButtonGroup; +module Switch = BsChakra__Switch; +module Stack = BsChakra__Stack; +module FormLabel = BsChakra__FormLabel; +module Box = BsChakra__Box; +module CircularProgress = BsChakra__CircularProgress; +module CircularProgressLabel = BsChakra__CircularProgressLabel; +module Heading = BsChakra__Heading; +module Spinner = BsChakra__Spinner; +module Flex = BsChakra__Flex; +module Input = BsChakra__Input; +module InputGroup = BsChakra__InputGroup; +module InputLeftElement = BsChakra__InputLeftElement; +module InputRightElement = BsChakra__InputRightElement; +module Text = BsChakra__Text; +module FormControl = BsChakra__FormControl; +module FormHelperText = BsChakra__FormHelperText; +module FormErrorMessage = BsChakra__FormErrorMessage; +module Alert = BsChakra__Alert; +module AlertTitle = BsChakra__AlertTitle; +module AlertDescription = BsChakra__AlertDescription; +module AlertIcon = BsChakra__AlertIcon; +module Link = BsChakra__Link; +module Avatar = BsChakra__Avatar; +module AvatarBadge = BsChakra__AvatarBadge; +module AvatarGroup = BsChakra__AvatarGroup; +module NumberInput = BsChakra__NumberInput; +module Image = BsChakra__Image; +module Types = BsChakra__Types; +module Modal = BsChakra__Modal; +module ModalHeader = BsChakra__ModalHeader; +module ModalFooter = BsChakra__ModalFooter; +module ModalBody = BsChakra__ModalBody; +module ModalContent = BsChakra__ModalContent; +module ModalCloseButton = BsChakra__ModalCloseButton; +module ModalOverlay = BsChakra__ModalOverlay; +module Icon = BsChakra__Icon; +module IconButton = BsChakra__IconButton; +module Menu = BsChakra__Menu; +module MenuList = BsChakra__MenuList; +module MenuItem = BsChakra__MenuItem; +module MenuItemOption = BsChakra__MenuItemOption; +module MenuGroup = BsChakra__MenuGroup; +module MenuOptionGroup = BsChakra__MenuOptionGroup; +module MenuButton = BsChakra__MenuButton; +module Textarea = BsChakra__Textarea; +module Select = BsChakra__Select; +module CloseButton = BsChakra__CloseButton; +module AspectRatioBox = BsChakra__AspectRatioBox; +module PopoverArrow = BsChakra__PopoverArrow; +module PopoverBody = BsChakra__PopoverBody; +module PopoverHeader = BsChakra__PopoverHeader; +module PopoverCloseButton = BsChakra__PopoverCloseButton; +module PopoverContent = BsChakra__PopoverContent; +module PopoverTrigger = BsChakra__PopoverTrigger; +module Popover = BsChakra__Popover; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra.rei b/drafts/bs-chakra-ui/src/BsChakra.rei new file mode 100644 index 0000000..d636f0b --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra.rei @@ -0,0 +1,143 @@ +type theme; +[@bs.module "@chakra-ui/core"] external theme: theme = "theme"; + +module ThemeProvider: { + [@bs.module "@chakra-ui/core"] [@react.component] + external make: (~theme: theme, ~children: React.element) => React.element = "ThemeProvider"; +}; + +module CSSReset: {[@bs.module "@chakra-ui/core"] [@react.component] external make: unit => React.element = "CSSReset"; +}; + +module Hooks: { + [@bs.module "@chakra-ui/core"] + external useDisclosure: + unit => + { + . + "isOpen": bool, + [@bs.meth] "onClose": unit => unit, + [@bs.meth] "onOpen": unit => unit, + [@bs.meth] "onToggle": unit => unit, + } = + "useDisclosure"; + + [@bs.module "@chakra-ui/core"] + external useClipboard: + unit => + { + . + "value": string, + [@bs.meth] "onCopy": unit => unit, + "hasCopied": bool, + } = + "useClipboard"; + + [@bs.module "@chakra-ui/core"] external useTheme: unit => theme = "useTheme"; + + module Toast: { + [@bs.deriving abstract] + type config = { + [@bs.optional] + title: string, + [@bs.optional] + description: string, + [@bs.optional] + status: string, + [@bs.optional] + duration: int, + [@bs.optional] + isClosable: bool, + [@bs.optional] + position: string, + [@bs.optional] + render: unit => React.element, + [@bs.optional] + onClose: unit => unit, + }; + + [@bs.deriving jsConverter] + type position = [ | `top | `topLeft | `topRight | `bottom | `bottomLeft | `bottomRight]; + + [@bs.deriving jsConverter] + type status = [ | `danger | `warning | `success | `info]; + }; + + let useToast: + ( + ~title: string=?, + ~isClosable: bool=?, + ~description: string=?, + ~duration: int=?, + ~render: unit => React.element=?, + ~onClose: unit => unit=?, + ~status: Toast.status=?, + ~position: Toast.position=?, + unit, + unit + ) => + unit; +}; + +module Accordion = BsChakra__Accordion; +module AccordionHeader = BsChakra__AccordionHeader; +module AccordionItem = BsChakra__AccordionItem; +module AccordionPanel = BsChakra__AccordionPanel; +module AccordionIcon = BsChakra__AccordionIcon; +module Button = BsChakra__Button; +module ButtonGroup = BsChakra__ButtonGroup; +module Switch = BsChakra__Switch; +module Stack = BsChakra__Stack; +module FormLabel = BsChakra__FormLabel; +module Box = BsChakra__Box; +module CircularProgress = BsChakra__CircularProgress; +module CircularProgressLabel = BsChakra__CircularProgressLabel; +module Heading = BsChakra__Heading; +module Spinner = BsChakra__Spinner; +module Flex = BsChakra__Flex; +module Input = BsChakra__Input; +module InputGroup = BsChakra__InputGroup; +module InputLeftElement = BsChakra__InputLeftElement; +module InputRightElement = BsChakra__InputRightElement; +module Text = BsChakra__Text; +module FormControl = BsChakra__FormControl; +module FormHelperText = BsChakra__FormHelperText; +module FormErrorMessage = BsChakra__FormErrorMessage; +module Alert = BsChakra__Alert; +module AlertTitle = BsChakra__AlertTitle; +module AlertDescription = BsChakra__AlertDescription; +module AlertIcon = BsChakra__AlertIcon; +module Link = BsChakra__Link; +module Avatar = BsChakra__Avatar; +module AvatarBadge = BsChakra__AvatarBadge; +module AvatarGroup = BsChakra__AvatarGroup; +module NumberInput = BsChakra__NumberInput; +module Image = BsChakra__Image; +module Types = BsChakra__Types; +module Modal = BsChakra__Modal; +module ModalHeader = BsChakra__ModalHeader; +module ModalFooter = BsChakra__ModalFooter; +module ModalBody = BsChakra__ModalBody; +module ModalContent = BsChakra__ModalContent; +module ModalCloseButton = BsChakra__ModalCloseButton; +module ModalOverlay = BsChakra__ModalOverlay; +module Icon = BsChakra__Icon; +module IconButton = BsChakra__IconButton; +module Menu = BsChakra__Menu; +module MenuItem = BsChakra__MenuItem; +module MenuItemOption = BsChakra__MenuItemOption; +module MenuGroup = BsChakra__MenuGroup; +module MenuOptionGroup = BsChakra__MenuOptionGroup; +module MenuButton = BsChakra__MenuButton; +module MenuList = BsChakra__MenuList; +module Textarea = BsChakra__Textarea; +module Select = BsChakra__Select; +module CloseButton = BsChakra__CloseButton; +module AspectRatioBox = BsChakra__AspectRatioBox; +module PopoverArrow = BsChakra__PopoverArrow; +module PopoverBody = BsChakra__PopoverBody; +module PopoverHeader = BsChakra__PopoverHeader; +module PopoverCloseButton = BsChakra__PopoverCloseButton; +module PopoverContent = BsChakra__PopoverContent; +module PopoverTrigger = BsChakra__PopoverTrigger; +module Popover = BsChakra__Popover; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Accordion.re b/drafts/bs-chakra-ui/src/BsChakra__Accordion.re new file mode 100644 index 0000000..a969493 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Accordion.re @@ -0,0 +1,11 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~defaultIndex: array(int)=?, + ~allowMultiple: bool=?, + ~allowToggle: bool=?, + ~onChange: array(int) => unit=? + ) => + React.element = + "Accordion"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AccordionHeader.re b/drafts/bs-chakra-ui/src/BsChakra__AccordionHeader.re new file mode 100644 index 0000000..cba0124 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AccordionHeader.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "AccordionHeader"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AccordionIcon.re b/drafts/bs-chakra-ui/src/BsChakra__AccordionIcon.re new file mode 100644 index 0000000..96d30bd --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AccordionIcon.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: unit => React.element = "AccordionIcon"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AccordionItem.re b/drafts/bs-chakra-ui/src/BsChakra__AccordionItem.re new file mode 100644 index 0000000..ab07a95 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AccordionItem.re @@ -0,0 +1,12 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~isOpen: bool=?, + ~defaultIsOpen: bool=?, + ~isDisabled: bool=?, + ~id: string=?, + ~onChange: array(int) => unit=? + ) => + React.element = + "AccordionItem"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AccordionPanel.re b/drafts/bs-chakra-ui/src/BsChakra__AccordionPanel.re new file mode 100644 index 0000000..1384b06 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AccordionPanel.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "AccordionPanel"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Alert.re b/drafts/bs-chakra-ui/src/BsChakra__Alert.re new file mode 100644 index 0000000..b7e80da --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Alert.re @@ -0,0 +1,48 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~status: [@bs.string] [ | `error | `success | `warning | `info]=?, + ~variant: [@bs.string] [ + | `subtle + | [@bs.as "left-accent"] `leftAccent + | [@bs.as "top-accent"] `topAccent + ] + =?, + ~direction: [@bs.string] [ | `row | `column]=?, + ~justifyContent: [@bs.string] [ + | [@bs.as "flex-start"] `flexStart + | `center + | [@bs.as "flex-end"] `flexEnd + | [@bs.as "space-around"] `spaceAround + | [@bs.as "space-between"] `spaceBetween + ] + =?, + ~alignItems: [@bs.string] [ + | [@bs.as "flex-start"] `flexStart + | `center + | [@bs.as "flex-end"] `flexEnd + | [@bs.as "space-around"] `spaceAround + | [@bs.as "space-between"] `spaceBetween + ] + =?, + ~textAlign: 'text=?, + ~height: 'h=?, + ~width: 'w=? + ) => + React.element = + "Alert"; + +let makeProps = + ( + ~textAlign: option(responsiveValue(string))=?, + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ) => + makeProps( + ~textAlign=?textAlign->extractProps(v => v), + ~width=?width->extractProps(v => v), + ~height=?height->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AlertDescription.re b/drafts/bs-chakra-ui/src/BsChakra__AlertDescription.re new file mode 100644 index 0000000..b9debe6 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AlertDescription.re @@ -0,0 +1,8 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~fontSize: 'h=?, ~children: string=?) => React.element = + "AlertDescription"; + +let makeProps = (~fontSize: option(responsiveValue(fontSize))=?) => + makeProps(~fontSize=?fontSize->extractProps(fontSizeToJs)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AlertIcon.re b/drafts/bs-chakra-ui/src/BsChakra__AlertIcon.re new file mode 100644 index 0000000..657c724 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AlertIcon.re @@ -0,0 +1,14 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~height: 'h=?, ~width: 'w=?) => React.element = "AlertIcon"; + +let makeProps = + ( + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ) => + makeProps( + ~width=?width->extractProps(v => v), + ~height=?height->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AlertTitle.re b/drafts/bs-chakra-ui/src/BsChakra__AlertTitle.re new file mode 100644 index 0000000..77f727a --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AlertTitle.re @@ -0,0 +1,8 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~fontSize: 'h=?, ~children: React.element=?) => React.element = + "AlertTitle"; + +let makeProps = (~fontSize: option(responsiveValue(fontSize))=?) => + makeProps(~fontSize=?fontSize->extractProps(fontSizeToJs)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AspectRatioBox.re b/drafts/bs-chakra-ui/src/BsChakra__AspectRatioBox.re new file mode 100644 index 0000000..43abbef --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AspectRatioBox.re @@ -0,0 +1,10 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + (~children: React.element, ~ratio: int=?, ~maxWidth: 'maxW=?) => + React.element = + "AspectRatioBox"; + +let makeProps = (~maxWidth: option(responsiveValue(string))=?) => + makeProps(~maxWidth=?maxWidth->extractProps(v => v)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Avatar.re b/drafts/bs-chakra-ui/src/BsChakra__Avatar.re new file mode 100644 index 0000000..9e7058e --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Avatar.re @@ -0,0 +1,16 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~name: string=?, + ~showBorder: bool=?, + ~src: string=?, + ~size: 'size=?, + ~children: React.element=? + ) => + React.element = + "Avatar"; + +let makeProps = (~size: option(responsiveValue(avatarSize))=?) => + makeProps(~size=?size->extractProps(avatarSizeToJs)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AvatarBadge.re b/drafts/bs-chakra-ui/src/BsChakra__AvatarBadge.re new file mode 100644 index 0000000..895a4b1 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AvatarBadge.re @@ -0,0 +1,16 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + (~bg: 'bg=?, ~size: 'size=?, ~children: React.element=?) => React.element = + "AvatarBadge"; + +let makeProps = + ( + ~size: option(responsiveValue(string))=?, + ~bg: option(responsiveValue(color))=?, + ) => + makeProps( + ~size=?size->extractProps(v => v), + ~bg=?bg->extractProps(colorToJs), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__AvatarGroup.re b/drafts/bs-chakra-ui/src/BsChakra__AvatarGroup.re new file mode 100644 index 0000000..6dc0094 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__AvatarGroup.re @@ -0,0 +1,24 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~max: 'max=?, + ~size: 'size=?, + ~spacing: 'spacing=?, + ~children: React.element + ) => + React.element = + "AvatarGroup"; + +let makeProps = + ( + ~size: option(responsiveValue(avatarSize))=?, + ~max: option(responsiveValue(int))=?, + ~spacing: option(responsiveValue(int))=?, + ) => + makeProps( + ~size=?size->extractProps(avatarSizeToJs), + ~max=?max->extractProps(v => v), + ~spacing=?spacing->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Box.re b/drafts/bs-chakra-ui/src/BsChakra__Box.re new file mode 100644 index 0000000..07e8731 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Box.re @@ -0,0 +1,108 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~bg: 'bg=?, + ~color: 'color=?, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~padding: 'padding=?, + ~paddingTop: 'pTop=?, + ~paddingBottom: 'pBot=?, + ~paddingLeft: 'pLef=?, + ~paddingRight: 'pRig=?, + ~px: 'px=?, + ~py: 'py=?, + ~opacity: float=?, + ~boxShadow: 'box=?, + ~width: 'wid=?, + ~height: 'hei=?, + ~maxWidth: 'maxW=?, + ~maxHeight: 'maxH=?, + ~minWidth: 'minW=?, + ~minHeight: 'minH=?, + ~overflow: 'overflow=?, + ~overflowX: 'overflowX=?, + ~overflowY: 'overflowY=?, + ~position: [@bs.string] [ | `relative | `static | `absolute]=?, + ~_as: string=?, + ~rounded: 'rounded=?, + ~border: 'border=?, + ~top: 'top=?, + ~left: 'left=?, + ~right: 'right=?, + ~bottom: 'bottom=? + ) => + React.element = + "Box"; + +let makeProps = + ( + ~bg: option(color)=?, + ~color: option(color)=?, + ~overflow: option(responsiveValue(overflow))=?, + ~overflowX: option(responsiveValue(overflow))=?, + ~overflowY: option(responsiveValue(overflow))=?, + ~margin: option(responsiveValue(spaceProps))=?, + ~marginTop: option(responsiveValue(spaceProps))=?, + ~marginBottom: option(responsiveValue(spaceProps))=?, + ~marginLeft: option(responsiveValue(spaceProps))=?, + ~marginRight: option(responsiveValue(spaceProps))=?, + ~padding: option(responsiveValue(spaceProps))=?, + ~paddingTop: option(responsiveValue(spaceProps))=?, + ~paddingBottom: option(responsiveValue(spaceProps))=?, + ~paddingLeft: option(responsiveValue(spaceProps))=?, + ~paddingRight: option(responsiveValue(spaceProps))=?, + ~px: option(responsiveValue(spaceProps))=?, + ~py: option(responsiveValue(spaceProps))=?, + ~maxWidth: option(responsiveValue(string))=?, + ~maxHeight: option(responsiveValue(string))=?, + ~minWidth: option(responsiveValue(string))=?, + ~minHeight: option(responsiveValue(string))=?, + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ~boxShadow: option(responsiveValue(shadowProps))=?, + ~rounded: option(responsiveValue(radiiProps))=?, + ~border: option(responsiveValue(borderProps))=?, + ~top: option(responsiveValue(string))=?, + ~bottom: option(responsiveValue(string))=?, + ~left: option(responsiveValue(string))=?, + ~right: option(responsiveValue(string))=?, + ) => + makeProps( + ~bg=?bg->mapToColor, + ~color=?color->mapToColor, + ~boxShadow=?boxShadow->extractBoxShadowProps, + ~margin=?margin->extractSpaceProps, + ~marginTop=?marginTop->extractSpaceProps, + ~marginBottom=?marginBottom->extractSpaceProps, + ~marginLeft=?marginLeft->extractSpaceProps, + ~marginRight=?marginRight->extractSpaceProps, + ~padding=?padding->extractSpaceProps, + ~paddingTop=?paddingTop->extractSpaceProps, + ~paddingBottom=?paddingBottom->extractSpaceProps, + ~paddingLeft=?paddingLeft->extractSpaceProps, + ~paddingRight=?paddingRight->extractSpaceProps, + ~px=?px->extractSpaceProps, + ~py=?py->extractSpaceProps, + ~maxHeight=?maxHeight->extractProps(v => v), + ~maxWidth=?maxWidth->extractProps(v => v), + ~minHeight=?minHeight->extractProps(v => v), + ~minWidth=?minWidth->extractProps(v => v), + ~height=?height->extractProps(v => v), + ~width=?width->extractProps(v => v), + ~overflow=?overflow->extractProps(overflowToJs), + ~overflowX=?overflowX->extractProps(overflowToJs), + ~overflowY=?overflowY->extractProps(overflowToJs), + ~rounded=?rounded->extractProps(radiiPropsToJs), + ~border=?border->extractBorderProps, + ~top=?top->extractProps(v => v), + ~left=?left->extractProps(v => v), + ~right=?right->extractProps(v => v), + ~bottom=?bottom->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Button.re b/drafts/bs-chakra-ui/src/BsChakra__Button.re new file mode 100644 index 0000000..a560d17 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Button.re @@ -0,0 +1,36 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~variantColor: string=?, + ~size: 'size=?, + ~variant: [@bs.string] [ | `solid | `ghost | `outline | `link]=?, + ~_type: [@bs.string] [ | `submit | `button]=?, + ~leftIcon: string=?, + ~rightIcon: string=?, + ~isLoading: bool=?, + ~isDisabled: bool=?, + ~loadingText: string=?, + ~ariaLabel: string=?, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~width: 'w=?, + ~height: 'h=? + ) => + React.element = + "Button"; + +let makeProps = + ( + ~size: option(responsiveValue(buttonSize))=?, + ~variantColor: option(variantColor)=?, + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ) => + makeProps( + ~size=?size->extractProps(buttonSizeToJs), + ~variantColor=?variantColor->mapToVariantColor, + ~width=?width->extractProps(v => v), + ~height=?height->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ButtonGroup.re b/drafts/bs-chakra-ui/src/BsChakra__ButtonGroup.re new file mode 100644 index 0000000..4765840 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ButtonGroup.re @@ -0,0 +1,18 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~spacing: 's + ) => + React.element = + "ButtonGroup"; + +let makeProps = + ( + ~spacing: option(responsiveValue(spaceProps))=?, + ) => + makeProps( + ~spacing=?spacing->extractSpaceProps, + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__CircularProgress.re b/drafts/bs-chakra-ui/src/BsChakra__CircularProgress.re new file mode 100644 index 0000000..b47a7c7 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__CircularProgress.re @@ -0,0 +1,29 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~value: float=?, + ~min: float=?, + ~max: float=?, + ~children: React.element=?, + ~isIndeterminate: bool=?, + ~capIsRound: bool=?, + ~thickness: float=?, + ~color: 'a=?, + ~trackColor: 'b=? + ) => + React.element = + "CircularProgress"; + +let makeProps = (~color: option(color)=?, ~trackColor: option(color)=?) => + makeProps( + ~color=?color->Belt.Option.map(c => colorToJs(c)), + ~trackColor=?trackColor->Belt.Option.map(c => colorToJs(c)), + ); + +module CircularProgressLabel = { + [@bs.module "@chakra-ui/core"] [@react.component] + external make: (~children: React.element) => React.element = + "CircularProgressLabel"; +}; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__CircularProgressLabel.re b/drafts/bs-chakra-ui/src/BsChakra__CircularProgressLabel.re new file mode 100644 index 0000000..6bd54bd --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__CircularProgressLabel.re @@ -0,0 +1,3 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = + "CircularProgressLabel"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__CloseButton.re b/drafts/bs-chakra-ui/src/BsChakra__CloseButton.re new file mode 100644 index 0000000..ce544ec --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__CloseButton.re @@ -0,0 +1,14 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + ~isDisabled: bool=?, + ~color: 'color=? + ) => + React.element = + "CloseButton"; + +let makeProps = (~color: option(responsiveValue(color))=?) => + makeProps(~color=?color->extractProps(colorToJs)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Flex.re b/drafts/bs-chakra-ui/src/BsChakra__Flex.re new file mode 100644 index 0000000..da0a67a --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Flex.re @@ -0,0 +1,123 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~boxShadow: 'boxShadow=?, + ~bg: 'bg=?, + ~color: 'color=?, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~padding: 'padding=?, + ~paddingTop: 'pTop=?, + ~paddingBottom: 'pBot=?, + ~paddingLeft: 'pLef=?, + ~paddingRight: 'pRig=?, + ~px: 'px=?, + ~py: 'py=?, + ~opacity: float=?, + ~direction: 'direction=?, + ~width: 'wid=?, + ~height: 'hei=?, + ~maxWidth: 'maxW=?, + ~maxHeight: 'maxH=?, + ~flex: 'maxH=?, + ~wrap: 'wrap=?, + ~align: 'align=?, + ~justify: 'justify=?, + ~overflow: 'overflow=?, + ~overflowX: 'overflowX=?, + ~overflowY: 'overflowY=?, + ~rounded: 'rounded=?, + ~border: 'border=? + ) => + React.element = + "Flex"; + +let makeProps = + ( + ~bg: option(color)=?, + ~color: option(color)=?, + ~margin: option(responsiveValue(spaceProps))=?, + ~marginTop: option(responsiveValue(spaceProps))=?, + ~marginBottom: option(responsiveValue(spaceProps))=?, + ~marginLeft: option(responsiveValue(spaceProps))=?, + ~marginRight: option(responsiveValue(spaceProps))=?, + ~padding: option(responsiveValue(spaceProps))=?, + ~paddingTop: option(responsiveValue(spaceProps))=?, + ~paddingBottom: option(responsiveValue(spaceProps))=?, + ~paddingLeft: option(responsiveValue(spaceProps))=?, + ~paddingRight: option(responsiveValue(spaceProps))=?, + ~px: option(responsiveValue(spaceProps))=?, + ~py: option(responsiveValue(spaceProps))=?, + ~maxWidth: option(responsiveValue(string))=?, + ~maxHeight: option(responsiveValue(string))=?, + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ~flex: option(responsiveValue(string))=?, + ~align: option(responsiveValue(flexAlignment))=?, + ~justify: option(responsiveValue(flexAlignment))=?, + ~direction: option(responsiveValue(flexDirection))=?, + ~wrap: option(responsiveValue(flexWrap))=?, + ~boxShadow: option(responsiveValue(shadowProps))=?, + ~overflow: option(responsiveValue(overflow))=?, + ~overflowX: option(responsiveValue(overflow))=?, + ~overflowY: option(responsiveValue(overflow))=?, + ~rounded: option(responsiveValue(radiiProps))=?, + ~border: option(responsiveValue(borderProps))=?, + ) => + makeProps( + ~bg=?bg->mapToColor, + ~color=?color->mapToColor, + ~margin=?margin->extractSpaceProps, + ~marginTop=?marginTop->extractSpaceProps, + ~marginBottom=?marginBottom->extractSpaceProps, + ~marginLeft=?marginLeft->extractSpaceProps, + ~marginRight=?marginRight->extractSpaceProps, + ~padding=?padding->extractSpaceProps, + ~paddingTop=?paddingTop->extractSpaceProps, + ~paddingBottom=?paddingBottom->extractSpaceProps, + ~paddingLeft=?paddingLeft->extractSpaceProps, + ~paddingRight=?paddingRight->extractSpaceProps, + ~px=?px->extractSpaceProps, + ~py=?py->extractSpaceProps, + ~maxHeight=?maxHeight->extractProps(v => v), + ~maxWidth=?maxWidth->extractProps(v => v), + ~height=?height->extractProps(v => v), + ~width=?width->extractProps(v => v), + ~flex=?flex->extractProps(v => v), + ~align=?align->extractProps(flexAlignmentToJs), + ~justify=?justify->extractProps(flexAlignmentToJs), + ~direction=?direction->extractProps(flexDirectionToJs), + ~wrap=?wrap->extractProps(flexWrapToJs), + ~overflow=?overflow->extractProps(overflowToJs), + ~overflowX=?overflowX->extractProps(overflowToJs), + ~overflowY=?overflowY->extractProps(overflowToJs), + ~boxShadow=? + boxShadow->Belt.Option.map(p => + switch (p) { + | All(v) => + returnHack( + switch (v) { + | Theme(value) => shadowToJs(value) + | Custom(value) => value + }, + ) + | Responsive(v) => + returnHack( + v->Belt.Array.map(value => + switch (value) { + | Theme(value) => shadowToJs(value) + | Custom(value) => value + } + ), + ) + } + ), + ~rounded=?rounded->extractProps(radiiPropsToJs), + ~border=?border->extractBorderProps, + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__FormControl.re b/drafts/bs-chakra-ui/src/BsChakra__FormControl.re new file mode 100644 index 0000000..eb5e13c --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__FormControl.re @@ -0,0 +1,11 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~isRequired: bool=?, + ~isInvalid: bool=?, + ~isDisabled: bool=?, + ~isReadOnly: bool=? + ) => + React.element = + "FormControl"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__FormErrorMessage.re b/drafts/bs-chakra-ui/src/BsChakra__FormErrorMessage.re new file mode 100644 index 0000000..433517a --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__FormErrorMessage.re @@ -0,0 +1,3 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = + "FormErrorMessage"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__FormHelperText.re b/drafts/bs-chakra-ui/src/BsChakra__FormHelperText.re new file mode 100644 index 0000000..061247e --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__FormHelperText.re @@ -0,0 +1,3 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element, ~id: string=?) => React.element = + "FormHelperText"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__FormLabel.re b/drafts/bs-chakra-ui/src/BsChakra__FormLabel.re new file mode 100644 index 0000000..1570b91 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__FormLabel.re @@ -0,0 +1,3 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element, ~htmlFor: string) => React.element = + "FormLabel"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Heading.re b/drafts/bs-chakra-ui/src/BsChakra__Heading.re new file mode 100644 index 0000000..57f435b --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Heading.re @@ -0,0 +1,36 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~isTruncated: bool=?, + ~textAlign: 'textalign=?, + ~_as: [@bs.string] [ | `h1 | `h2 | `h3 | `h4 | `h5 | `h6]=?, + ~fontWeight: [@bs.string] [ | `normal | `bold | `medium]=?, + ~font: 'f=?, + ~letterSpacing: 'letter=?, + ~lineHeight: 'b=?, + ~fontSize: 'a=?, + ~color: 'color=? + ) => + React.element = + "Heading"; + +let makeProps = + ( + ~fontSize: option(responsiveValue(fontSize))=?, + ~lineHeight: option(responsiveValue(lineHeight))=?, + ~font: option(responsiveValue(font))=?, + ~letterSpacing: option(responsiveValue(letterSpacing))=?, + ~textAlign: option(responsiveValue(textAlign))=?, + ~color: option(color)=?, + ) => + makeProps( + ~fontSize=?fontSize->extractProps(fontSizeToJs), + ~lineHeight=?lineHeight->extractProps(lineHeightToJs), + ~font=?font->extractProps(fontToJs), + ~letterSpacing=?letterSpacing->extractProps(letterSpacingToJs), + ~textAlign=?textAlign->extractProps(textAlignToJs), + ~color=?color->mapToColor, + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Icon.re b/drafts/bs-chakra-ui/src/BsChakra__Icon.re new file mode 100644 index 0000000..e79eea8 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Icon.re @@ -0,0 +1,32 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~size: 'size=?, + ~name: 'icon=?, + ~color: 'color=?, + ~focusable: bool=?, + ~role: [@bs.string] [ | `presentation | `img]=? + ) => + React.element = + "Icon"; + +let makeProps = + ( + ~size: option(responsiveValue(string))=?, + ~color: option(responsiveValue(color))=?, + ~name: option(iconProps)=?, + ) => + makeProps( + ~size=?size->extractProps(v => v), + ~color=?color->extractProps(colorToJs), + ~name=? + name + ->Belt.Option.map(v => + switch (v) { + | Theme(v) => returnHack(v->iconToJs) + | CustomTheme(v) => returnHack(v) + } + ), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__IconButton.re b/drafts/bs-chakra-ui/src/BsChakra__IconButton.re new file mode 100644 index 0000000..61df012 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__IconButton.re @@ -0,0 +1,44 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~variantColor: string=?, + ~size: 'size=?, + ~variant: [@bs.string] [ | `solid | `ghost | `outline | `link]=?, + ~_type: [@bs.string] [ | `submit | `button]=?, + ~isLoading: bool=?, + ~isDisabled: bool=?, + ~ariaLabel: string=?, + ~isRound: bool=?, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~width: 'w=?, + ~height: 'h=?, + ~icon: 'h=? + ) => + React.element = + "IconButton"; + +let makeProps = + ( + ~size: option(responsiveValue(buttonSize))=?, + ~variantColor: option(variantColor)=?, + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ~icon: option(iconButtonProps)=?, + ) => + makeProps( + ~size=?size->extractProps(buttonSizeToJs), + ~variantColor=?variantColor->mapToVariantColor, + ~width=?width->extractProps(v => v), + ~height=?height->extractProps(v => v), + ~icon=? + icon + ->Belt.Option.map(v => + switch (v) { + | Theme(v) => returnHack(v->iconToJs) + | CustomTheme(v) => returnHack(v) + | Element(v) => returnHack(v) + } + ), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Image.re b/drafts/bs-chakra-ui/src/BsChakra__Image.re new file mode 100644 index 0000000..0e0e9a7 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Image.re @@ -0,0 +1,19 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~src: string, + ~fallbackSrc: string=?, + ~alt: string=?, + ~size: 'size=?, + ~onLoad: unit => unit=?, + ~onError: unit => unit=?, + ~rounded: string=?, + ~objectFit: string=? + ) => + React.element = + "Image"; + +let makeProps = (~size: option(responsiveValue(string))=?) => + makeProps(~size=?size->extractProps(v => v)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Input.re b/drafts/bs-chakra-ui/src/BsChakra__Input.re new file mode 100644 index 0000000..9657205 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Input.re @@ -0,0 +1,71 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~placeholder: string=?, + ~name: string=?, + ~id: string=?, + ~ref: React.Ref.t('ref)=?, + ~roundedLeft: string=?, + ~onChange: 'a => unit=?, + ~onBlur: 'a => unit=?, + ~onFocus: 'a => unit=?, + ~value: string=?, + ~rounded: string=?, + ~isRequired: bool=?, + ~isFullWidth: bool=?, + ~isReadOnly: bool=?, + ~isInvalid: bool=?, + ~isDisabled: bool=?, + ~variant: [@bs.string] [ | `outline | `unstyled | `flushed | `filled]=?, + ~focusBorderColor: 'focusBorderColor=?, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~padding: 'padding=?, + ~paddingTop: 'pTop=?, + ~paddingBottom: 'pBot=?, + ~paddingLeft: 'pLef=?, + ~paddingRight: 'pRig=?, + ~px: 'px=?, + ~py: 'py=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + ~_type: [@bs.string] [ | `text | `phone | `password | `number | `date | `checkbox | `radio | `email | `url] + ) => + React.element = + "Input"; + +let makeProps = + ( + ~focusBorderColor: option(color)=?, + ~margin: option(responsiveValue(spaceProps))=?, + ~marginTop: option(responsiveValue(spaceProps))=?, + ~marginBottom: option(responsiveValue(spaceProps))=?, + ~marginLeft: option(responsiveValue(spaceProps))=?, + ~marginRight: option(responsiveValue(spaceProps))=?, + ~padding: option(responsiveValue(int))=?, + ~paddingTop: option(responsiveValue(int))=?, + ~paddingBottom: option(responsiveValue(int))=?, + ~paddingLeft: option(responsiveValue(int))=?, + ~paddingRight: option(responsiveValue(int))=?, + ~px: option(responsiveValue(int))=?, + ~py: option(responsiveValue(int))=?, + ) => + makeProps( + ~focusBorderColor=?focusBorderColor->mapToColor, + ~margin=?margin->extractSpaceProps, + ~marginTop=?marginTop->extractSpaceProps, + ~marginBottom=?marginBottom->extractSpaceProps, + ~marginLeft=?marginLeft->extractSpaceProps, + ~marginRight=?marginRight->extractSpaceProps, + ~padding=?padding->extractProps(v => v), + ~paddingTop=?paddingTop->extractProps(v => v), + ~paddingBottom=?paddingBottom->extractProps(v => v), + ~paddingLeft=?paddingLeft->extractProps(v => v), + ~paddingRight=?paddingRight->extractProps(v => v), + ~px=?px->extractProps(v => v), + ~py=?py->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__InputGroup.re b/drafts/bs-chakra-ui/src/BsChakra__InputGroup.re new file mode 100644 index 0000000..b55d762 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__InputGroup.re @@ -0,0 +1,5 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + (~size: [@bs.string] [ | `sm | `md | `lg]=?, ~children: React.element) => + React.element = + "InputGroup"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__InputLeftElement.re b/drafts/bs-chakra-ui/src/BsChakra__InputLeftElement.re new file mode 100644 index 0000000..e6e7b94 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__InputLeftElement.re @@ -0,0 +1,15 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~width: string=?, + ~color: 'color=?, + ~fontSize: string=? + ) => + React.element = + "InputLeftElement"; + +let makeProps = (~color: option(color)=?) => + makeProps(~color=?color->mapToColor); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__InputRightElement.re b/drafts/bs-chakra-ui/src/BsChakra__InputRightElement.re new file mode 100644 index 0000000..b632720 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__InputRightElement.re @@ -0,0 +1,3 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element, ~width: string=?) => React.element = + "InputRightElement"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Link.re b/drafts/bs-chakra-ui/src/BsChakra__Link.re new file mode 100644 index 0000000..302786a --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Link.re @@ -0,0 +1,40 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~href: string, + ~isExternal: bool=?, + ~isDisabled: bool=?, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~children: React.element, + ~textAlign: 'textalign=?, + ~fontWeight: [@bs.string] [ | `normal | `bold | `medium]=?, + ~font: 'f=?, + ~letterSpacing: 'letter=?, + ~lineHeight: 'b=?, + ~fontSize: 'a=?, + ~color: 'a=?, + ~_as: React.element=?, + ~_to: 'a=? + ) => + React.element = + "Link"; + +let makeProps = + ( + ~fontSize: option(responsiveValue(fontSize))=?, + ~lineHeight: option(responsiveValue(lineHeight))=?, + ~font: option(responsiveValue(font))=?, + ~letterSpacing: option(responsiveValue(letterSpacing))=?, + ~textAlign: option(responsiveValue(textAlign))=?, + ~color: option(responsiveValue(color))=?, + ) => + makeProps( + ~fontSize=?fontSize->extractProps(fontSizeToJs), + ~lineHeight=?lineHeight->extractProps(lineHeightToJs), + ~font=?font->extractProps(fontToJs), + ~letterSpacing=?letterSpacing->extractProps(letterSpacingToJs), + ~textAlign=?textAlign->extractProps(textAlignToJs), + ~color=?color->extractProps(colorToJs), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Menu.re b/drafts/bs-chakra-ui/src/BsChakra__Menu.re new file mode 100644 index 0000000..9d65a0f --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Menu.re @@ -0,0 +1,11 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~isOpen: bool=?, + ~autoSelect: bool=?, + ~closeOnSelect: bool=?, + ~closeOnBlur: bool=?, + ~children: React.element + ) => + React.element = + "Menu"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__MenuButton.re b/drafts/bs-chakra-ui/src/BsChakra__MenuButton.re new file mode 100644 index 0000000..f7f9ff5 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__MenuButton.re @@ -0,0 +1,21 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~variantColor: string=?, + ~size: 'size=?, + ~variant: [@bs.string] [ | `solid | `ghost | `outline | `link]=?, + ~_type: [@bs.string] [ | `submit | `button]=?, + ~leftIcon: string=?, + ~rightIcon: string=?, + ~isLoading: bool=?, + ~isDisabled: bool=?, + ~loadingText: string=?, + ~ariaLabel: string=?, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~onKeyDown: ReactEvent.Keyboard.t => unit=?, + ~width: 'w=?, + ~height: 'h=? + ) => + React.element = + "MenuButton"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__MenuGroup.re b/drafts/bs-chakra-ui/src/BsChakra__MenuGroup.re new file mode 100644 index 0000000..51519bb --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__MenuGroup.re @@ -0,0 +1,3 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element=?, ~title: string) => React.element = + "MenuGroup"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__MenuItem.re b/drafts/bs-chakra-ui/src/BsChakra__MenuItem.re new file mode 100644 index 0000000..3359981 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__MenuItem.re @@ -0,0 +1,11 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~onKeyDown: ReactEvent.Keyboard.t => unit=?, + ~isDisabled: bool=?, + ~role: [@bs.string] [ | `menuitemcheckbox | `menuitemradio | `menuitem]=? + ) => + React.element = + "MenuItem"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__MenuItemOption.re b/drafts/bs-chakra-ui/src/BsChakra__MenuItemOption.re new file mode 100644 index 0000000..0ac5a71 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__MenuItemOption.re @@ -0,0 +1,30 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element=?, + ~isDisabled: bool=?, + ~_type: [@bs.string] [ | `radio | `checkbox]=?, + ~value: 'value=?, + ~onMouseLeave: ReactEvent.Mouse.t => unit=?, + ~onMouseEnter: ReactEvent.Mouse.t => unit=? + ) => + React.element = + "MenuItemOption"; + +type value = + | Int(int) + | String(string); + +let makeProps = (~value: option(value)=?) => + makeProps( + ~value=? + value + ->Belt.Option.map(v => + switch (v) { + | Int(v) => returnHack(v) + | String(v) => returnHack(v) + } + ), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__MenuList.re b/drafts/bs-chakra-ui/src/BsChakra__MenuList.re new file mode 100644 index 0000000..d813c6b --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__MenuList.re @@ -0,0 +1,10 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~onClick: ReactEvent.Mouse.t => unit=?, + ~onBlur: ReactEvent.Mouse.t => unit=?, + ~placement: string=? + ) => + React.element = + "MenuList"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__MenuOptionGroup.re b/drafts/bs-chakra-ui/src/BsChakra__MenuOptionGroup.re new file mode 100644 index 0000000..eb41421 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__MenuOptionGroup.re @@ -0,0 +1,29 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element=?, + ~title: string, + ~_type: [@bs.string] [ | `radio | `checkbox]=?, + ~defaultValue: 'defaultValue=?, + ~onChange: 'a => unit=? + ) => + React.element = + "MenuOptionGroup"; + +type defaultValue = + | Single(string) + | Array(array(string)); + +let makeProps = (~defaultValue: option(defaultValue)=?) => + makeProps( + ~defaultValue=? + defaultValue + ->Belt.Option.map(v => + switch (v) { + | Single(v) => returnHack(v) + | Array(v) => returnHack(v) + } + ), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Modal.re b/drafts/bs-chakra-ui/src/BsChakra__Modal.re new file mode 100644 index 0000000..353a042 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Modal.re @@ -0,0 +1,19 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~size: 'size=?, + ~isOpen: bool, + ~isCentered: bool=?, + ~initialFocusRef: ReactDOMRe.Ref.t=?, + ~onClose: unit => unit, + ~children: React.element, + ~blockScrollOnMount: bool=?, + ~useInert: bool=? + ) => + React.element = + "Modal"; + +let makeProps = (~size: option(responsiveValue(modalSize))=?) => + makeProps(~size=?size->extractProps(modalSizeToJs)); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ModalBody.re b/drafts/bs-chakra-ui/src/BsChakra__ModalBody.re new file mode 100644 index 0000000..1f3dfbb --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ModalBody.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "ModalBody"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ModalCloseButton.re b/drafts/bs-chakra-ui/src/BsChakra__ModalCloseButton.re new file mode 100644 index 0000000..e7d52a1 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ModalCloseButton.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: unit => React.element = "ModalCloseButton"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ModalContent.re b/drafts/bs-chakra-ui/src/BsChakra__ModalContent.re new file mode 100644 index 0000000..c1c72e6 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ModalContent.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "ModalContent"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ModalFooter.re b/drafts/bs-chakra-ui/src/BsChakra__ModalFooter.re new file mode 100644 index 0000000..5537d09 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ModalFooter.re @@ -0,0 +1,24 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~direction: 'direction=?, + ~align: 'align=?, + ~justify: 'justify=? + ) => + React.element = + "ModalFooter"; + +let makeProps = + ( + ~align: option(responsiveValue(flexAlignment))=?, + ~justify: option(responsiveValue(flexAlignment))=?, + ~direction: option(responsiveValue(flexDirection))=?, + ) => + makeProps( + ~align=?align->extractProps(flexAlignmentToJs), + ~justify=?justify->extractProps(flexAlignmentToJs), + ~direction=?direction->extractProps(flexDirectionToJs), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ModalHeader.re b/drafts/bs-chakra-ui/src/BsChakra__ModalHeader.re new file mode 100644 index 0000000..38e86b8 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ModalHeader.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "ModalHeader"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__ModalOverlay.re b/drafts/bs-chakra-ui/src/BsChakra__ModalOverlay.re new file mode 100644 index 0000000..a5d51af --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__ModalOverlay.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: unit => React.element = "ModalOverlay"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__NumberInput.re b/drafts/bs-chakra-ui/src/BsChakra__NumberInput.re new file mode 100644 index 0000000..34a5ec8 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__NumberInput.re @@ -0,0 +1,70 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~placeholder: string=?, + ~id: string=?, + ~roundedLeft: string=?, + ~onChange: float => unit=?, + ~onBlur: 'a => unit=?, + ~value: string=?, + ~rounded: string=?, + ~isRequired: bool=?, + ~isFullWidth: bool=?, + ~isReadOnly: bool=?, + ~isInvalid: bool=?, + ~isDisabled: bool=?, + ~variant: [@bs.string] [ | `outline | `unstyled | `flushed | `filled]=?, + ~focusBorderColor: 'focusBorderColor=?, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~padding: 'padding=?, + ~paddingTop: 'pTop=?, + ~paddingBottom: 'pBot=?, + ~paddingLeft: 'pLef=?, + ~paddingRight: 'pRig=?, + ~px: 'px=?, + ~py: 'py=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + ~min: float=?, + ~max: float=?, + ~step: float=? + ) => + React.element = + "NumberInput"; + +let makeProps = + ( + ~focusBorderColor: option(color)=?, + ~margin: option(responsiveValue(int))=?, + ~marginTop: option(responsiveValue(int))=?, + ~marginBottom: option(responsiveValue(int))=?, + ~marginLeft: option(responsiveValue(int))=?, + ~marginRight: option(responsiveValue(int))=?, + ~padding: option(responsiveValue(int))=?, + ~paddingTop: option(responsiveValue(int))=?, + ~paddingBottom: option(responsiveValue(int))=?, + ~paddingLeft: option(responsiveValue(int))=?, + ~paddingRight: option(responsiveValue(int))=?, + ~px: option(responsiveValue(int))=?, + ~py: option(responsiveValue(int))=?, + ) => + makeProps( + ~focusBorderColor=?focusBorderColor->mapToColor, + ~margin=?margin->extractProps(v => v), + ~marginTop=?marginTop->extractProps(v => v), + ~marginBottom=?marginBottom->extractProps(v => v), + ~marginLeft=?marginLeft->extractProps(v => v), + ~marginRight=?marginRight->extractProps(v => v), + ~padding=?padding->extractProps(v => v), + ~paddingTop=?paddingTop->extractProps(v => v), + ~paddingBottom=?paddingBottom->extractProps(v => v), + ~paddingLeft=?paddingLeft->extractProps(v => v), + ~paddingRight=?paddingRight->extractProps(v => v), + ~px=?px->extractProps(v => v), + ~py=?py->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Popover.re b/drafts/bs-chakra-ui/src/BsChakra__Popover.re new file mode 100644 index 0000000..136b367 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Popover.re @@ -0,0 +1,18 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~usePortal: bool=?, + ~isOpen: bool=?, + ~defaultIsOpen: bool=?, + ~returnFocusOnClose: bool=?, + ~closeOnBlur: bool=?, + ~closeOnEsc: bool=?, + ~gutter: int=?, + ~onOpen: unit => unit=?, + ~onClose: unit => unit=?, + ~trigger: [@bs.string] [ | `click | `hover]=?, + ~placement: [@bs.string] [ | `bottom | `top | `left | `right]=?, + ~children: React.element=? + ) => + React.element = + "Popover"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__PopoverArrow.re b/drafts/bs-chakra-ui/src/BsChakra__PopoverArrow.re new file mode 100644 index 0000000..7c88678 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__PopoverArrow.re @@ -0,0 +1 @@ +[@bs.module "@chakra-ui/core"] [@react.component] external make: unit => React.element = "PopoverArrow"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__PopoverBody.re b/drafts/bs-chakra-ui/src/BsChakra__PopoverBody.re new file mode 100644 index 0000000..378ca89 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__PopoverBody.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "PopoverBody"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__PopoverCloseButton.re b/drafts/bs-chakra-ui/src/BsChakra__PopoverCloseButton.re new file mode 100644 index 0000000..3531d64 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__PopoverCloseButton.re @@ -0,0 +1 @@ +[@bs.module "@chakra-ui/core"] [@react.component] external make: unit => React.element = "PopoverCloseButton"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__PopoverContent.re b/drafts/bs-chakra-ui/src/BsChakra__PopoverContent.re new file mode 100644 index 0000000..952dec4 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__PopoverContent.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "PopoverContent"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__PopoverHeader.re b/drafts/bs-chakra-ui/src/BsChakra__PopoverHeader.re new file mode 100644 index 0000000..3513e18 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__PopoverHeader.re @@ -0,0 +1 @@ +[@bs.module "@chakra-ui/core"] [@react.component] external make: unit => React.element = "PopoverHeader"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__PopoverTrigger.re b/drafts/bs-chakra-ui/src/BsChakra__PopoverTrigger.re new file mode 100644 index 0000000..8523513 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__PopoverTrigger.re @@ -0,0 +1,2 @@ +[@bs.module "@chakra-ui/core"] [@react.component] +external make: (~children: React.element) => React.element = "PopoverTrigger"; \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Select.re b/drafts/bs-chakra-ui/src/BsChakra__Select.re new file mode 100644 index 0000000..776f93a --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Select.re @@ -0,0 +1,69 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~placeholder: string=?, + ~id: string=?, + ~onChange: 'a => unit=?, + ~onBlur: 'a => unit=?, + ~onFocus: 'a => unit=?, + ~value: string=?, + ~rounded: string=?, + ~isRequired: bool=?, + ~isFullWidth: bool=?, + ~isReadOnly: bool=?, + ~isInvalid: bool=?, + ~isDisabled: bool=?, + ~variant: [@bs.string] [ | `outline | `unstyled | `flushed | `filled]=?, + ~resize: [@bs.string] [ | `vertical | `horizontal | `none]=?, + ~focusBorderColor: 'focusBorderColor=?, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~padding: 'padding=?, + ~paddingTop: 'pTop=?, + ~paddingBottom: 'pBot=?, + ~paddingLeft: 'pLef=?, + ~paddingRight: 'pRig=?, + ~px: 'px=?, + ~py: 'py=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + ~children: React.element + ) => + React.element = + "Select"; + +let makeProps = + ( + ~focusBorderColor: option(color)=?, + ~margin: option(responsiveValue(spaceProps))=?, + ~marginTop: option(responsiveValue(spaceProps))=?, + ~marginBottom: option(responsiveValue(spaceProps))=?, + ~marginLeft: option(responsiveValue(spaceProps))=?, + ~marginRight: option(responsiveValue(spaceProps))=?, + ~padding: option(responsiveValue(int))=?, + ~paddingTop: option(responsiveValue(int))=?, + ~paddingBottom: option(responsiveValue(int))=?, + ~paddingLeft: option(responsiveValue(int))=?, + ~paddingRight: option(responsiveValue(int))=?, + ~px: option(responsiveValue(int))=?, + ~py: option(responsiveValue(int))=?, + ) => + makeProps( + ~focusBorderColor=?focusBorderColor->mapToColor, + ~margin=?margin->extractSpaceProps, + ~marginTop=?marginTop->extractSpaceProps, + ~marginBottom=?marginBottom->extractSpaceProps, + ~marginLeft=?marginLeft->extractSpaceProps, + ~marginRight=?marginRight->extractSpaceProps, + ~padding=?padding->extractProps(v => v), + ~paddingTop=?paddingTop->extractProps(v => v), + ~paddingBottom=?paddingBottom->extractProps(v => v), + ~paddingLeft=?paddingLeft->extractProps(v => v), + ~paddingRight=?paddingRight->extractProps(v => v), + ~px=?px->extractProps(v => v), + ~py=?py->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Spinner.re b/drafts/bs-chakra-ui/src/BsChakra__Spinner.re new file mode 100644 index 0000000..5143fd9 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Spinner.re @@ -0,0 +1,17 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~color: 'a=?, + ~emptyColor: 'a=?, + ~thickness: string=?, + ~speed: string=?, + ~label: string=?, + ~size: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=? + ) => + React.element = + "Spinner"; + +let makeProps = (~color: option(color)=?, ~emptyColor: option(color)=?) => + makeProps(~color=?color->mapToColor, ~emptyColor=?emptyColor->mapToColor); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Stack.re b/drafts/bs-chakra-ui/src/BsChakra__Stack.re new file mode 100644 index 0000000..433d862 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Stack.re @@ -0,0 +1,60 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~isInline: bool=?, + ~align: 'align=?, + ~justify: 'justify=?, + ~spacing: int=?, + ~children: React.element, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~maxWidth: 'maxW=?, + ~maxHeight: 'maxH=?, + ~minWidth: 'minW=?, + ~minHeight: 'minH=?, + ~width: 'wid=?, + ~height: 'hei=?, + ~wrap: 'wrap=?, + ~position: [@bs.string] [ | `relative | `static | `absolute]=? + ) => + React.element = + "Stack"; + +let makeProps = + ( + ~align: option(responsiveValue(flexAlignment))=?, + ~justify: option(responsiveValue(flexAlignment))=?, + ~margin: option(responsiveValue(spaceProps))=?, + ~marginTop: option(responsiveValue(spaceProps))=?, + ~marginBottom: option(responsiveValue(spaceProps))=?, + ~marginLeft: option(responsiveValue(spaceProps))=?, + ~marginRight: option(responsiveValue(spaceProps))=?, + ~maxWidth: option(responsiveValue(string))=?, + ~maxHeight: option(responsiveValue(string))=?, + ~minWidth: option(responsiveValue(string))=?, + ~minHeight: option(responsiveValue(string))=?, + ~width: option(responsiveValue(string))=?, + ~height: option(responsiveValue(string))=?, + ~wrap: option(responsiveValue(flexWrap))=?, + ) => + makeProps( + ~align=?align->extractProps(flexAlignmentToJs), + ~justify=?justify->extractProps(flexAlignmentToJs), + ~margin=?margin->extractSpaceProps, + ~marginTop=?marginTop->extractSpaceProps, + ~marginBottom=?marginBottom->extractSpaceProps, + ~marginLeft=?marginLeft->extractSpaceProps, + ~marginRight=?marginRight->extractSpaceProps, + ~maxHeight=?maxHeight->extractProps(v => v), + ~maxWidth=?maxWidth->extractProps(v => v), + ~minHeight=?minHeight->extractProps(v => v), + ~minWidth=?minWidth->extractProps(v => v), + ~height=?height->extractProps(v => v), + ~width=?width->extractProps(v => v), + ~wrap=?wrap->extractProps(flexWrapToJs), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Switch.re b/drafts/bs-chakra-ui/src/BsChakra__Switch.re new file mode 100644 index 0000000..6f26cd8 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Switch.re @@ -0,0 +1,24 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~id: string, + ~value: bool=?, + ~isChecked: bool=?, + ~isDisabled: bool=?, + ~isInvalid: bool=?, + ~defaultIsChecked: bool=?, + ~onChange: unit => unit=?, + ~size: 'size=?, + ~color: string=? + ) => + React.element = + "Switch"; + +let makeProps = + (~size: option(responsiveValue(buttonSize))=?, ~color: option(color)=?) => + makeProps( + ~size=?size->extractProps(v => buttonSizeToJs(v)), + ~color=?color->Belt.Option.map(v => colorToJs(v)), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Text.re b/drafts/bs-chakra-ui/src/BsChakra__Text.re new file mode 100644 index 0000000..1ab674d --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Text.re @@ -0,0 +1,36 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~children: React.element, + ~textAlign: 'textalign=?, + ~_as: [@bs.string] [ | `p | `span]=?, + ~fontWeight: [@bs.string] [ | `normal | `bold | `medium]=?, + ~font: 'f=?, + ~letterSpacing: 'letter=?, + ~lineHeight: 'b=?, + ~fontSize: 'a=?, + ~color: 'color=?, + ~isTruncated: bool=?, + ) => + React.element = + "Text"; + +let makeProps = + ( + ~fontSize: option(responsiveValue(fontSize))=?, + ~lineHeight: option(responsiveValue(lineHeight))=?, + ~font: option(responsiveValue(font))=?, + ~letterSpacing: option(responsiveValue(letterSpacing))=?, + ~textAlign: option(responsiveValue(textAlign))=?, + ~color: option(color)=?, + ) => + makeProps( + ~fontSize=?fontSize->extractProps(fontSizeToJs), + ~lineHeight=?lineHeight->extractProps(lineHeightToJs), + ~font=?font->extractProps(fontToJs), + ~letterSpacing=?letterSpacing->extractProps(letterSpacingToJs), + ~textAlign=?textAlign->extractProps(textAlignToJs), + ~color=?color->mapToColor, + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Textarea.re b/drafts/bs-chakra-ui/src/BsChakra__Textarea.re new file mode 100644 index 0000000..2c2dbd0 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Textarea.re @@ -0,0 +1,68 @@ +open BsChakra__Types; + +[@bs.module "@chakra-ui/core"] [@react.component] +external make: + ( + ~placeholder: string=?, + ~id: string=?, + ~onChange: 'a => unit=?, + ~onBlur: 'a => unit=?, + ~onFocus: 'a => unit=?, + ~value: string=?, + ~rounded: string=?, + ~isRequired: bool=?, + ~isFullWidth: bool=?, + ~isReadOnly: bool=?, + ~isInvalid: bool=?, + ~isDisabled: bool=?, + ~variant: [@bs.string] [ | `outline | `unstyled | `flushed | `filled]=?, + ~resize: [@bs.string] [ | `vertical | `horizontal | `none]=?, + ~focusBorderColor: 'focusBorderColor=?, + ~margin: 'margin=?, + ~marginTop: 'marginTop=?, + ~marginBottom: 'marginBottom=?, + ~marginLeft: 'marginLeft=?, + ~marginRight: 'marginRight=?, + ~padding: 'padding=?, + ~paddingTop: 'pTop=?, + ~paddingBottom: 'pBot=?, + ~paddingLeft: 'pLef=?, + ~paddingRight: 'pRig=?, + ~px: 'px=?, + ~py: 'py=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=? + ) => + React.element = + "Textarea"; + +let makeProps = + ( + ~focusBorderColor: option(color)=?, + ~margin: option(responsiveValue(spaceProps))=?, + ~marginTop: option(responsiveValue(spaceProps))=?, + ~marginBottom: option(responsiveValue(spaceProps))=?, + ~marginLeft: option(responsiveValue(spaceProps))=?, + ~marginRight: option(responsiveValue(spaceProps))=?, + ~padding: option(responsiveValue(int))=?, + ~paddingTop: option(responsiveValue(int))=?, + ~paddingBottom: option(responsiveValue(int))=?, + ~paddingLeft: option(responsiveValue(int))=?, + ~paddingRight: option(responsiveValue(int))=?, + ~px: option(responsiveValue(int))=?, + ~py: option(responsiveValue(int))=?, + ) => + makeProps( + ~focusBorderColor=?focusBorderColor->mapToColor, + ~margin=?margin->extractSpaceProps, + ~marginTop=?marginTop->extractSpaceProps, + ~marginBottom=?marginBottom->extractSpaceProps, + ~marginLeft=?marginLeft->extractSpaceProps, + ~marginRight=?marginRight->extractSpaceProps, + ~padding=?padding->extractProps(v => v), + ~paddingTop=?paddingTop->extractProps(v => v), + ~paddingBottom=?paddingBottom->extractProps(v => v), + ~paddingLeft=?paddingLeft->extractProps(v => v), + ~paddingRight=?paddingRight->extractProps(v => v), + ~px=?px->extractProps(v => v), + ~py=?py->extractProps(v => v), + ); \ No newline at end of file diff --git a/drafts/bs-chakra-ui/src/BsChakra__Types.re b/drafts/bs-chakra-ui/src/BsChakra__Types.re new file mode 100644 index 0000000..8bccfe0 --- /dev/null +++ b/drafts/bs-chakra-ui/src/BsChakra__Types.re @@ -0,0 +1,421 @@ +open Belt; + +[@bs.deriving jsConverter] +type variantColor = [ + | `black + | `transparent + | `white + | `gray + | `green + | `teal + | `pink + | `blue + | `red + | `purple + | `cyan + | `yellow + | `orange +]; + +[@bs.deriving jsConverter] +type color = [ + | `black + | `white + | `transparent + | `current + | [@bs.as "whiteAlpha.50"] `whiteAlpha50 + | [@bs.as "whiteAlpha.100"] `whiteAlpha100 + | [@bs.as "whiteAlpha.200"] `whiteAlpha200 + | [@bs.as "whiteAlpha.300"] `whiteAlpha300 + | [@bs.as "whiteAlpha.400"] `whiteAlpha400 + | [@bs.as "whiteAlpha.500"] `whiteAlpha500 + | [@bs.as "whiteAlpha.600"] `whiteAlpha600 + | [@bs.as "whiteAlpha.700"] `whiteAlpha700 + | [@bs.as "whiteAlpha.800"] `whiteAlpha800 + | [@bs.as "whiteAlpha.900"] `whiteAlpha900 + | [@bs.as "blackAlpha.50"] `blackAlpha50 + | [@bs.as "blackAlpha.100"] `blackAlpha100 + | [@bs.as "blackAlpha.200"] `blackAlpha200 + | [@bs.as "blackAlpha.300"] `blackAlpha300 + | [@bs.as "blackAlpha.400"] `blackAlpha400 + | [@bs.as "blackAlpha.500"] `blackAlpha500 + | [@bs.as "blackAlpha.600"] `blackAlpha600 + | [@bs.as "blackAlpha.700"] `blackAlpha700 + | [@bs.as "blackAlpha.800"] `blackAlpha800 + | [@bs.as "blackAlpha.900"] `blackAlpha900 + | [@bs.as "gray.50"] `gray50 + | [@bs.as "gray.100"] `gray100 + | [@bs.as "gray.200"] `gray200 + | [@bs.as "gray.300"] `gray300 + | [@bs.as "gray.400"] `gray400 + | [@bs.as "gray.500"] `gray500 + | [@bs.as "gray.600"] `gray600 + | [@bs.as "gray.700"] `gray700 + | [@bs.as "gray.800"] `gray800 + | [@bs.as "gray.900"] `gray900 + | [@bs.as "green.50"] `green50 + | [@bs.as "green.100"] `green100 + | [@bs.as "green.200"] `green200 + | [@bs.as "green.300"] `green300 + | [@bs.as "green.400"] `green400 + | [@bs.as "green.500"] `green500 + | [@bs.as "green.600"] `green600 + | [@bs.as "green.700"] `green700 + | [@bs.as "green.800"] `green800 + | [@bs.as "green.900"] `green900 + | [@bs.as "teal.50"] `teal50 + | [@bs.as "teal.100"] `teal100 + | [@bs.as "teal.200"] `teal200 + | [@bs.as "teal.300"] `teal300 + | [@bs.as "teal.400"] `teal400 + | [@bs.as "teal.500"] `teal500 + | [@bs.as "teal.600"] `teal600 + | [@bs.as "teal.700"] `teal700 + | [@bs.as "teal.800"] `teal800 + | [@bs.as "teal.900"] `teal900 + | [@bs.as "pink.50"] `pink50 + | [@bs.as "pink.100"] `pink100 + | [@bs.as "pink.200"] `pink200 + | [@bs.as "pink.300"] `pink300 + | [@bs.as "pink.400"] `pink400 + | [@bs.as "pink.500"] `pink500 + | [@bs.as "pink.600"] `pink600 + | [@bs.as "pink.700"] `pink700 + | [@bs.as "pink.800"] `pink800 + | [@bs.as "pink.900"] `pink900 + | [@bs.as "blue.50"] `blue50 + | [@bs.as "blue.100"] `blue100 + | [@bs.as "blue.200"] `blue200 + | [@bs.as "blue.300"] `blue300 + | [@bs.as "blue.400"] `blue400 + | [@bs.as "blue.500"] `blue500 + | [@bs.as "blue.600"] `blue600 + | [@bs.as "blue.700"] `blue700 + | [@bs.as "blue.800"] `blue800 + | [@bs.as "blue.900"] `blue900 + | [@bs.as "red.50"] `red50 + | [@bs.as "red.100"] `red100 + | [@bs.as "red.200"] `red200 + | [@bs.as "red.300"] `red300 + | [@bs.as "red.400"] `red400 + | [@bs.as "red.500"] `red500 + | [@bs.as "red.600"] `red600 + | [@bs.as "red.700"] `red700 + | [@bs.as "red.800"] `red800 + | [@bs.as "red.900"] `red900 + | [@bs.as "purple.50"] `purple50 + | [@bs.as "purple.100"] `purple100 + | [@bs.as "purple.200"] `purple200 + | [@bs.as "purple.300"] `purple300 + | [@bs.as "purple.400"] `purple400 + | [@bs.as "purple.500"] `purple500 + | [@bs.as "purple.600"] `purple600 + | [@bs.as "purple.700"] `purple700 + | [@bs.as "purple.800"] `purple800 + | [@bs.as "purple.900"] `purple900 + | [@bs.as "cyan.50"] `cyan50 + | [@bs.as "cyan.100"] `cyan100 + | [@bs.as "cyan.200"] `cyan200 + | [@bs.as "cyan.300"] `cyan300 + | [@bs.as "cyan.400"] `cyan400 + | [@bs.as "cyan.500"] `cyan500 + | [@bs.as "cyan.600"] `cyan600 + | [@bs.as "cyan.700"] `cyan700 + | [@bs.as "cyan.800"] `cyan800 + | [@bs.as "cyan.900"] `cyan900 + | [@bs.as "yellow.50"] `yellow50 + | [@bs.as "yellow.100"] `yellow100 + | [@bs.as "yellow.200"] `yellow200 + | [@bs.as "yellow.300"] `yellow300 + | [@bs.as "yellow.400"] `yellow400 + | [@bs.as "yellow.500"] `yellow500 + | [@bs.as "yellow.600"] `yellow600 + | [@bs.as "yellow.700"] `yellow700 + | [@bs.as "yellow.800"] `yellow800 + | [@bs.as "yellow.900"] `yellow900 + | [@bs.as "orange.50"] `orange50 + | [@bs.as "orange.100"] `orange100 + | [@bs.as "orange.200"] `orange200 + | [@bs.as "orange.300"] `orange300 + | [@bs.as "orange.400"] `orange400 + | [@bs.as "orange.500"] `orange500 + | [@bs.as "orange.600"] `orange600 + | [@bs.as "orange.700"] `orange700 + | [@bs.as "orange.800"] `orange800 + | [@bs.as "orange.900"] `orange900 +]; + +[@bs.deriving jsConverter] +type buttonSize = [ | `xs | `sm | `md | `lg]; + +[@bs.deriving jsConverter] +type flexAlignment = [ + | [@bs.as "flex-start"] `flexStart + | [@bs.as "flex-end"] `flexEnd + | [@bs.as "space-around"] `spaceAround + | [@bs.as "space-between"] `spaceBetween + | `center +]; + +[@bs.deriving jsConverter] +type flexDirection = [ + | `row + | `column + | [@bs.as "row-reverse"] `rowReverse + | [@bs.as "column-reverse"] `columnReverse +]; + +[@bs.deriving jsConverter] +type overflow = [ + | `overflow + | `visible + | `scroll + | `auto + | `initial + | `hidden + | `unset +]; + +[@bs.deriving jsConverter] +type flexWrap = [ + | `wrap + | `nowrap + | `unset + | [@bs.as "wrap-reverse"] `wrapReverse +]; + +type responsiveValue('a) = + | All('a) + | Responsive(array('a)); + +let getValue = value => value->Belt.Option.map(((_, v)) => v); +let mapToColor = value => value->Belt.Option.map(v => colorToJs(v)); + +let mapToVariantColor = value => + value->Belt.Option.map(v => variantColorToJs(v)); + +[@bs.deriving jsConverter] +type shadow = [ + | `sm + | `md + | `lg + | `xl + | [@bs.as "2xl"] `xxl + | `outline + | `inner + | `none +]; + +type shadowProps = + | Theme(shadow) + | Custom(string); + +[@bs.deriving jsConverter] +type lineHeight = [ | `normal | `base | `shorter | `short | `tall | `taller]; + +[@bs.deriving jsConverter] +type fontSize = [ + | [@bs.as "6xl"] `xxxxxxl + | [@bs.as "5xl"] `xxxxxl + | [@bs.as "4xl"] `xxxxl + | [@bs.as "3xl"] `xxxl + | [@bs.as "2xl"] `xxl + | `xl + | `lg + | `md + | `sm + | `xs +]; + +[@bs.deriving jsConverter] +type avatarSize = [ + | [@bs.as "2xl"] `xxl + | `xl + | `lg + | `md + | `sm + | `xs + | [@bs.as "2xs"] `xxs +]; + +[@bs.deriving jsConverter] +type modalSize = [ | `full | `xl | `lg | `md | `sm | `xs]; + +[@bs.deriving jsConverter] +type letterSpacing = [ + | `tighter + | `tight + | `normal + | `wide + | `wider + | `widest +]; + +[@bs.deriving jsConverter] +type textAlign = [ | `left | `center | `right | `justify]; + +[@bs.deriving jsConverter] +type font = [ | `body | `heading | `mono]; + +[@bs.deriving jsConverter] +type icon = [ + | `copy + | `search + | `moon + | `sun + | `add + | `settings + | `settings + | `lock + | `unlock + | `view + | `download + | `delete + | `repeat + | `edit + | `link + | `chat + | `calendar + | `time + | `attachment + | `star + | `email + | `phone + | `spinner + | `close + | `bell + | `info + | `question + | `warning + | `check + | `minus + | [@bs.as "drag-handle"] `dragHandle + | [@bs.as "warning-2"] `warning2 + | [@bs.as "info-outline"] `infoOutline + | [@bs.as "arrow-up-down"] `arrowUpDown + | [@bs.as "question-outline"] `questionOutline + | [@bs.as "small-close"] `smallClose + | [@bs.as "not-allowed"] `notAllowed + | [@bs.as "triangle-down"] `triangleDown + | [@bs.as "triangle-up"] `triangleUp + | [@bs.as "up-down"] `upDown + | [@bs.as "at-sign"] `atSign + | [@bs.as "plus-square"] `plusSquare + | [@bs.as "chevron-right"] `chevronRight + | [@bs.as "external-link"] `externalLink + | [@bs.as "chevron-left"] `chevronLeft + | [@bs.as "chevron-down"] `chevronDown + | [@bs.as "chevron-up"] `chevronUp + | [@bs.as "arrow-up"] `arrowUp + | [@bs.as "arrow-left"] `arrowLeft + | [@bs.as "arrow-right"] `arrowRight + | [@bs.as "arrow-down"] `arrowDown + | [@bs.as "arrow-back"] `arrowBack + | [@bs.as "arrow-forward"] `arrowForward + | [@bs.as "search-2"] `search2 + | [@bs.as "repeat-clock"] `repeatClock + | [@bs.as "small-add"] `smallAdd + | [@bs.as "check-circle"] `checkCircle + | [@bs.as "view-off"] `viewOff +]; + +type iconProps = + | Theme(icon) + | CustomTheme(string); + +type iconButtonProps = + | Theme(icon) + | CustomTheme(string) + | Element(React.element); + +type spaceProps = + | Theme(int) + | Custom(string); + +[@bs.deriving jsConverter] +type radiiProps = [ | `none | `sm | `md | `lg | `full]; + +[@bs.deriving jsConverter] +type border = [ + | `none + | [@bs.as "1px"] `xs + | [@bs.as "2px"] `sm + | [@bs.as "4px"] `md +]; + +type borderProps = + | Theme(border) + | Custom(string); + +external returnHack: 'a => 'b = "%identity"; + +let extractProps = (props, toJs) => + props->Belt.Option.map(p => + switch (p) { + | All(v) => returnHack(toJs(v)) + | Responsive(v) => returnHack(v->Array.map(value => value->toJs)) + } + ); + +let extractSpaceProps = (props: option(responsiveValue(spaceProps))) => { + props->Option.map(m => + switch (m) { + | All(v) => returnHack(v) + | Responsive(v) => + returnHack( + v->Array.map(value => + switch (value) { + | Theme(value) => returnHack(value) + | Custom(value) => returnHack(value) + } + ), + ) + } + ); +}; + +let extractBoxShadowProps = (props: option(responsiveValue(shadowProps))) => { + props->Option.map(p => + switch (p) { + | All(v) => + returnHack( + switch (v) { + | Theme(value) => shadowToJs(value) + | Custom(value) => value + }, + ) + | Responsive(v) => + returnHack( + v->Array.map(value => + switch (value) { + | Theme(value) => shadowToJs(value) + | Custom(value) => value + } + ), + ) + } + ); +}; + +let extractBorderProps = (props: option(responsiveValue(borderProps))) => { + props->Option.map(p => + switch (p) { + | All(v) => + returnHack( + switch (v) { + | Theme(value) => borderToJs(value) + | Custom(value) => value + }, + ) + | Responsive(v) => + returnHack( + v->Array.map(value => + switch (value) { + | Theme(value) => borderToJs(value) + | Custom(value) => value + } + ), + ) + } + ); +}; \ No newline at end of file diff --git a/drafts/bs-chess/README.md b/drafts/bs-chess/README.md new file mode 100644 index 0000000..b9c3449 --- /dev/null +++ b/drafts/bs-chess/README.md @@ -0,0 +1,59 @@ +# [Chess.js](https://github.com/jhlywa/chess.js) bindings for Bucklescript in Reason + +Disclaimer: Work in progress + +# Documentation +My hope is that the interface file +[Chess.rei](https://github.com/russelldmatt/bs-chess.js/blob/master/src/Chess.rei) +is sufficiently clear to serve as documentation. Let me know if +that's not the case. + +# Examples/Tests (needs more) +For right now, you can look at +[Test.re](https://github.com/russelldmatt/bs-chess.js/blob/master/src/Test.re) +for some examples/tests. I'll try to make this better in the future. + +# Quickstart + +## To use this repo in your project: +``` +# create your reason project. Here is one way (but not the only way): +bsb -init my-chess-app -theme basic-reason && cd my-chess-app + +# install this package +npm install --save russelldmatt/bs-chess.js + +# Add this library to the bsconfig.json `bs-dependencies` section. +# It should look something like this: "bs-dependencies": [ "bs-chess.js"], +# (you have to do this manually) + +# all the normal npm stuff +npm install && npm build && npm start + +# edit src/Demo.re +# All the useful stuff exported from this library will be in the +# module BsChessjs.Chess. +``` + +## To get this repo working: +### Clone +``` +git clone https://github.com/russelldmatt/bs-chess.js.git bs-chess.js +``` + +### Build +``` +yarn install +yarn build +``` + +### Run with Node: +``` +node src/Chess.bs.js +``` + +### Run in Browser (Works now thanks to @chenglou!): +``` +yarn run webpack +open index.html +``` diff --git a/drafts/bs-chess/package.json b/drafts/bs-chess/package.json new file mode 100644 index 0000000..96b46b3 --- /dev/null +++ b/drafts/bs-chess/package.json @@ -0,0 +1,27 @@ +{ + "name": "bs-chess.js", + "version": "0.1.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "webpack": "webpack", + "webpack-w": "webpack -w" + }, + "keywords": [ + "BuckleScript", + "chess.js", + "chess" + ], + "author": "russelldmatt", + "license": "MIT", + "devDependencies": { + "bs-platform": "^3.0.0", + "webpack-cli": "^2.0.12" + }, + "dependencies": { + "bs-json": "^1.0.1", + "chess.js": "^0.10.2", + "webpack": "^4.2.0" + } +} diff --git a/drafts/bs-chess/src/Chess.re b/drafts/bs-chess/src/Chess.re new file mode 100644 index 0000000..96acd9e --- /dev/null +++ b/drafts/bs-chess/src/Chess.re @@ -0,0 +1,580 @@ +/* Useful for stubbing out things while implementing */ +/* let unimplemented = x => { */ +/* Js.log(x); */ +/* Js.Exn.raiseError("Unimplemented"); */ +/* }; */ +/* forward compose */ +/* let (>>) = (f, g, x) => g(f(x)); */ +module Raw = { + /* Raw is a literal translation of the chess.js API */ + type chess; + type fen = string; + type pgn = string; + type color = string; + type piece = { + . + "_type": string, + "color": string, + }; + type square = string; + type san = string; + type from_to = { + . + "from": string, + "to": string, + }; + type full_move = { + . + "color": color, + "from": square, + "_to": square, + "flags": string, + "piece": string, /* Not the same as piece type */ + "san": san, + }; + type header = Js.Dict.t(string); + type validation = { + . + "valid": bool, + "error_number": int, + "error": string, + }; + [@bs.new] [@bs.module] + external createForBrowser : (~fen: fen=?, unit) => chess = "chess.js"; + [@bs.new] [@bs.module "chess.js"] + external createForNode : (~fen: fen=?, unit) => chess = "Chess"; + [@bs.send] external ascii : chess => string = ""; + [@bs.send] external clear : chess => unit = ""; + [@bs.send] external fen : chess => fen = ""; + [@bs.send] external game_over : chess => bool = ""; + [@bs.send] external get : (chess, square) => Js.nullable(piece) = ""; + type verbose = {. "verbose": bool}; + [@bs.send] external history : chess => array(san) = ""; + [@bs.send] + external history_verbose : (chess, verbose) => array(full_move) = "history"; + [@bs.send] external in_check : chess => bool = ""; + [@bs.send] external in_checkmate : chess => bool = ""; + [@bs.send] external in_draw : chess => bool = ""; + [@bs.send] external in_stalemate : chess => bool = ""; + [@bs.send] external in_threefold_repetition : chess => bool = ""; + [@bs.send] external addToHeader : (chess, string, string) => unit = "header"; + [@bs.send] external header : chess => header = ""; + [@bs.send] external insufficient_material : chess => bool = ""; + [@bs.send] external load : (chess, fen) => bool = ""; + type sloppy = {. "sloppy": bool}; + [@bs.send] + external load_pgn : (chess, pgn, Js.nullable(sloppy), unit) => bool = ""; + [@bs.send] + external move_san : (chess, san) => Js.nullable(full_move) = "move"; + [@bs.send] + external move_from_to : (chess, from_to) => Js.nullable(full_move) = "move"; + /* The options you can pass to "moves" are too flexible to represent + nicely so I'm just going to represent it as a few different + functions. */ + [@bs.send] external moves : chess => array(san) = "moves"; + [@bs.send] + external moves_verbose : (chess, verbose) => array(full_move) = "moves"; + type for_square = {. "square": square}; + type for_square_verbose = { + . + "square": square, + "verbose": bool, + }; + [@bs.send] + external moves_for_square : (chess, for_square) => array(san) = "moves"; + [@bs.send] + external moves_for_square_verbose : + (chess, for_square_verbose) => array(full_move) = + "moves"; + [@bs.send] external pgn : chess => pgn = ""; + [@bs.send] external put : (chess, piece, square) => bool = ""; + [@bs.send] external remove : (chess, square) => Js.nullable(piece) = ""; + [@bs.send] external reset : chess => unit = ""; + [@bs.send] external square_color : (chess, square) => color = ""; + [@bs.send] external turn : chess => color = ""; + [@bs.send] external undo : chess => Js.nullable(full_move) = ""; + [@bs.send] external validate_fen : (chess, fen) => validation = ""; +}; + +module type Jsonable = { + type t; + let toJson: t => Js.Json.t; + let ofJson: Js.Json.t => t; +}; + +module List = { + include List; + let init = (n, f) => Array.init(n, f) |> Array.to_list; +}; + +module String = { + include String; + let ofChar = c => String.make(1, c); +}; + +/* chess.js, ocamlified. */ +module Api = { + type t = Raw.chess; + module SuccessOrFail = { + type t = [ | `success | `fail]; + let ofBool = b : t => b ? `success : `fail; + }; + type successOrFail = SuccessOrFail.t; + let pgn = Raw.pgn; + module Pgn = { + type t = Raw.pgn; + module Header = { + type t = Js.Dict.t(string); + type kv = { + key: string, + value: string, + }; + }; + }; + let header = Raw.header; + let addToHeader = (t, key_value: Pgn.Header.kv) => + Raw.addToHeader(t, key_value.key, key_value.value); + module Color = { + type t = + | Black + | White; + let ofRaw: Raw.color => t = + raw => + switch (raw) { + | "b" => Black + | "w" => White + | raw => + Js.Exn.raiseError( + "Cannot convert color from raw (raw: " ++ raw ++ ")", + ) + }; + let toRaw = t => + switch (t) { + | White => "w" + | Black => "b" + }; + let toString = t => + switch (t) { + | Black => "black" + | White => "white" + }; + let ofString = str => + switch (str) { + | "black" => Black + | "white" => White + | str => Js.Exn.raiseError("Cannot convert Color.t from str: " ++ str) + }; + let toJson = t : Js.Json.t => Json.Encode.(t |> toString |> string); + let ofJson = json : t => Json.Decode.(json |> string |> ofString); + }; + module File = { + type t = [ | `a | `b | `c | `d | `e | `f | `g | `h]; + let toChar = t => + switch (t) { + | `a => 'a' + | `b => 'b' + | `c => 'c' + | `d => 'd' + | `e => 'e' + | `f => 'f' + | `g => 'g' + | `h => 'h' + }; + let ofChar = c => + switch (c) { + | 'a' => `a + | 'b' => `b + | 'c' => `c + | 'd' => `d + | 'e' => `e + | 'f' => `f + | 'g' => `g + | 'h' => `h + | c => + Js.Exn.raiseError( + "Cannot convert File.t from char (char: " ++ String.ofChar(c) ++ ")", + ) + }; + let ofString = s => ofChar(s.[0]); + let toString = t => t |> toChar |> String.ofChar; + let all: list(t) = [`a, `b, `c, `d, `e, `f, `g, `h]; + let toJson = t : Js.Json.t => Json.Encode.(t |> toString |> string); + let ofJson = json : t => Json.Decode.(json |> string |> ofString); + }; + module Rank = { + type t = int; + let all = List.init(8, x => x + 1); + let toJson = t : Js.Json.t => Json.Encode.(t |> int); + let ofJson = json : t => Json.Decode.(json |> int); + }; + module Square = { + type t = { + file: File.t, + rank: Rank.t, + }; + let toString = t => { + let {file, rank} = t; + File.toString(file) ++ string_of_int(rank); + }; + let ofString = s => { + file: s.[0] |> File.ofChar, + rank: s.[1] |> String.ofChar |> int_of_string, + }; + let toJson = t : Js.Json.t => Json.Encode.(t |> toString |> string); + let ofJson = json : t => Json.Decode.(json |> string |> ofString); + }; + module Piece = { + module Type = { + type t = [ | `king | `queen | `bishop | `knight | `rook | `pawn]; + let ofRaw = raw => + switch (String.lowercase(raw)) { + | "k" => `king + | "q" => `queen + | "b" => `bishop + | "n" => `knight + | "r" => `rook + | "p" => `pawn + | raw => + Js.Exn.raiseError( + "Cannot convert piece from raw (raw: " ++ raw ++ ")", + ) + }; + let toRaw = t => + switch (t) { + | `king => "k" + | `queen => "q" + | `bishop => "b" + | `knight => "n" + | `rook => "r" + | `pawn => "p" + }; + let toString = t => + switch (t) { + | `king => "king" + | `queen => "queen" + | `bishop => "bishop" + | `knight => "knight" + | `rook => "rook" + | `pawn => "pawn" + }; + let ofString = str => + switch (str) { + | "king" => `king + | "queen" => `queen + | "bishop" => `bishop + | "knight" => `knight + | "rook" => `rook + | "pawn" => `pawn + | str => + Js.Exn.raiseError("Cannot convert Piece.Type.t from str: " ++ str) + }; + let toJson = t : Js.Json.t => Json.Encode.(t |> toString |> string); + let ofJson = json : t => Json.Decode.(json |> string |> ofString); + }; + type t = { + type_: Type.t, + color: Color.t, + }; + let ofRaw: Raw.piece => t = + raw => { + type_: raw##_type |> Type.ofRaw, + color: Color.ofRaw(raw##color), + }; + let toRaw = t : Raw.piece => { + "_type": t.type_ |> Type.toRaw, + "color": t.color |> Color.toRaw, + }; + let toString = t => + Color.toString(t.color) ++ " " ++ Type.toString(t.type_); + let toJson = t : Js.Json.t => { + open Json.Encode; + let {type_, color} = t; + [("type_", Type.toJson(type_)), ("color", Color.toJson(color))] + |> object_; + }; + let ofJson = json : t => + Json.Decode.{ + type_: json |> field("type_", Type.ofJson), + color: json |> field("color", Color.ofJson), + }; + }; + let create = (~fen=?, ()) => + switch ([%external window]) { + | None => Raw.createForNode(~fen?, ()) + | Some(_) => Raw.createForBrowser(~fen?, ()) + }; + module Fen = { + type t = string; + type error = { + error_number: int, + error: string, + }; + let error_of_validation = validation => { + error_number: validation##error_number, + error: validation##error, + }; + let ofString = s : Js.Result.t(t, error) => { + let t = create(); + let validation = Raw.validate_fen(t, s); + Js.log(validation); + let valid: bool = validation##valid; + valid ? + Js.Result.Ok(s) : Js.Result.Error(validation |> error_of_validation); + }; + let ofStringExn = s => + switch (ofString(s)) { + | Ok(t) => + Js.log("ok fen: " ++ s); + t; + | Error(error) => + Printf.sprintf( + "{ error_number: %d, error: %s }", + error.error_number, + error.error, + ) + |> Js.Exn.raiseError + }; + let toJson = t : Js.Json.t => Json.Encode.(t |> string); + let ofJson = json : t => Json.Decode.(json |> string |> ofStringExn); + }; + let ascii = Raw.ascii; + let fen = Raw.fen; + let get: (t, Square.t) => option(Piece.t) = + (t, square) => { + let rawSquare = square |> Square.toString; + let raw = Raw.get(t, rawSquare) |> Js.Nullable.toOption; + Belt.Option.map(raw, Piece.ofRaw); + }; + module Move = { + module San = { + type t = string; + let toJson = t : Js.Json.t => Json.Encode.(t |> string); + let ofJson = json : t => Json.Decode.(json |> string); + }; + module FromTo = { + type t = { + from: string, + to_: string, + }; + let toRaw: t => Raw.from_to = t => {"from": t.from, "to": t.to_}; + let toJson = t : Js.Json.t => { + open Json.Encode; + let {from, to_} = t; + [("from", string(from)), ("to_", string(to_))] |> object_; + }; + let ofJson = json : t => + Json.Decode.{ + from: json |> field("from", string), + to_: json |> field("to_", string), + }; + }; + module Full = { + /* CR mrussell: Want to expose the tToJs function without exposing another full type. */ + [@bs.deriving jsConverter] + type t = { + color: Color.t, + from: Square.t, + to_: Square.t, + flags: string, + piece: Piece.Type.t, + san: San.t, + }; + let toJson = t : Js.Json.t => { + open Json.Encode; + let {color, from, to_, flags, piece, san} = t; + [ + ("color", Color.toJson(color)), + ("from", Square.toJson(from)), + ("to_", Square.toJson(to_)), + ("flags", Js.Json.string(flags)), + ("piece", Piece.Type.toJson(piece)), + ("san", Js.Json.string(san)), + ] + |> object_; + }; + let ofJson = json : t => + Json.Decode.{ + color: json |> field("color", Color.ofJson), + from: json |> field("from", Square.ofJson), + to_: json |> field("to_", Square.ofJson), + flags: json |> field("flags", string), + piece: json |> field("piece", Piece.Type.ofJson), + san: json |> field("san", string), + }; + let ofRaw: Raw.full_move => t = + raw => { + color: Color.ofRaw(raw##color), + from: Square.ofString(raw##from), + to_: Square.ofString(raw##_to), + flags: raw##flags, + piece: Piece.Type.ofRaw(raw##piece), + san: raw##san, + }; + /* let toRaw: t => Raw.full_move = */ + /* t => { */ + /* "color": Color.toRaw(t.color), */ + /* "from": Square.toString(t.from), */ + /* "_to": Square.toString(t.to_), */ + /* "flags": t.flags, */ + /* "piece": Piece.Type.toRaw(t.piece), */ + /* "san": t.san, */ + /* }; */ + }; + [@bs.deriving accessors] + type t = + | SAN(San.t) + | FromTo(FromTo.t) + | Full(Full.t); + let toJson = t : Js.Json.t => + Json.Encode.( + ( + switch (t) { + | SAN(san) => [ + ("type", string("SAN")), + ("value", San.toJson(san)), + ] + | FromTo(fromTo) => [ + ("type", string("FromTo")), + ("value", FromTo.toJson(fromTo)), + ] + | Full(full) => [ + ("type", string("Full")), + ("value", Full.toJson(full)), + ] + } + ) + |> object_ + ); + let ofJson = json : t => { + open Json.Decode; + let decodeValue = (constructor, ofJson, json) => + constructor(json |> field("value", ofJson)); + let decoder = + field("type", string) + |> andThen(type_ => + switch (type_) { + | "SAN" => decodeValue(sAN, San.ofJson) + | "FromTo" => decodeValue(fromTo, FromTo.ofJson) + | "Full" => decodeValue(full, Full.ofJson) + | _ => Js.Exn.raiseError("unknown move type") + } + ); + json |> decoder; + }; + module Options = { + type t = {square: option(Square.t)}; + }; + }; + let legalMoves = (~move_options=?, t) => { + let square = Belt.Option.flatMap(move_options, x => x.Move.Options.square); + let raw_full_moves = + switch (square) { + | None => Raw.moves_verbose(t, {"verbose": true}) + | Some(square) => + Raw.moves_for_square_verbose( + t, + {"square": Square.toString(square), "verbose": true}, + ) + }; + Array.map(Move.Full.ofRaw, raw_full_moves); + }; + let move: (t, Move.t) => option(Move.Full.t) = + (t, req) => { + let parseResponse = r => + r |> Js.Nullable.toOption |. Belt.Option.map(Move.Full.ofRaw); + switch (req) { + | Move.SAN(san) => Raw.move_san(t, san) |> parseResponse + | FromTo(from_to) => + Move.FromTo.toRaw(from_to) |> Raw.move_from_to(t) |> parseResponse + | Full(full) => Raw.move_san(t, full.san) |> parseResponse + }; + }; + let loadPgn = (~sloppy=?, t, pgn) => { + let sloppy = + Belt.Option.map(sloppy, s => {"sloppy": s}) |> Js.Nullable.fromOption; + Raw.load_pgn(t, pgn, sloppy, ()) |> SuccessOrFail.ofBool; + }; + module EndState = { + module T = { + type t = + | Checkmate + | Stalemate + | ThreefoldRepetition + | InsufficientMaterial + | FiftyMoveRule; + let hash = t : int => Hashtbl.hash(t); + let eq = (t1, t2) => t1 == t2; + }; + include T; + include (Belt_Id.MakeHashable(T): Belt_Id.Hashable with type t := t); + let toString = t : string => + switch (t) { + | Checkmate => "Checkmate" + | Stalemate => "Stalemate" + | ThreefoldRepetition => "ThreefoldRepetition" + | InsufficientMaterial => "InsufficientMaterial" + | FiftyMoveRule => "FiftyMoveRule" + }; + let ofString = str : t => + switch (str) { + | "Checkmate" => Checkmate + | "Stalemate" => Stalemate + | "ThreefoldRepetition" => ThreefoldRepetition + | "InsufficientMaterial" => InsufficientMaterial + | "FiftyMoveRule" => FiftyMoveRule + | str => + Js.Exn.raiseError("Cannot convert EndState.t from str: " ++ str) + }; + let toJson = t : Js.Json.t => Json.Encode.(t |> toString |> string); + let ofJson = json : t => Json.Decode.(json |> string |> ofString); + }; + let inCheck = Raw.in_check; + let gameOver = Raw.game_over; + let inDraw = Raw.in_draw; + let endState: t => option(EndState.t) = + t => + if (Raw.game_over(t)) { + Some( + Raw.in_checkmate(t) ? + Checkmate : + Raw.in_stalemate(t) ? + Stalemate : + Raw.in_threefold_repetition(t) ? + ThreefoldRepetition : + Raw.insufficient_material(t) ? + InsufficientMaterial : + inDraw(t) ? + FiftyMoveRule : + Js.Exn.raiseError( + "LIBRARY BUG: game is over but can't detect the end state", + ), + ); + } else { + None; + }; + let undo = t => + t |> Raw.undo |> Js.Nullable.toOption |. Belt.Option.map(Move.Full.ofRaw); + let turn = t => t |> Raw.turn |> Color.ofRaw; + let remove = (t, square) => + Raw.remove(t, Square.toString(square)) + |> Js.Nullable.toOption + |. Belt.Option.map(Piece.ofRaw); + let put = (t, piece, square) => + Raw.put(t, Piece.toRaw(piece), Square.toString(square)) + |> SuccessOrFail.ofBool; + let loadFen = (t, fen) : unit => + Raw.load(t, fen) ? + () : Js.Exn.raiseError("BUG: load didn't work on a valid fen"); + let historySan = t => Raw.history(t); + let historyFull = t => + Raw.history_verbose(t, {"verbose": true}) + |> Array.map(raw_full_move => Move.Full.ofRaw(raw_full_move)); + let reset = Raw.reset; + /* Explicitly ignore a few raw things that don't seem that useful */ + let _ = Raw.square_color; /* When would you need that? */ + let _ = Raw.moves_for_square; /* Just always use verbose */ + let _ = Raw.moves; /* Just always use verbose */ + let _ = Raw.clear; /* Just create a new one? */ +}; + +include Api; diff --git a/drafts/bs-chess/src/Chess.rei b/drafts/bs-chess/src/Chess.rei new file mode 100644 index 0000000..1c50d6f --- /dev/null +++ b/drafts/bs-chess/src/Chess.rei @@ -0,0 +1,164 @@ +type t; + +type successOrFail = [ | `success | `fail]; + +module type Jsonable = { + type t; + let toJson: t => Js.Json.t; + let ofJson: Js.Json.t => t; +}; + +module Fen: { + type t; + include Jsonable with type t := t; + type error = { + error_number: int, + error: string, + }; + let ofString: string => Js.Result.t(t, error); + let ofStringExn: string => t; +}; + +module Pgn: { + type t = string; + module Header: { + type t = Js.Dict.t(string); + type kv = { + key: string, + value: string, + }; + }; +}; + +let create: (~fen: Fen.t=?, unit) => t; + +let loadFen: (t, Fen.t) => unit; + +let fen: t => Fen.t; + +let loadPgn: (~sloppy: bool=?, t, Pgn.t) => successOrFail; + +let pgn: t => Pgn.t; + +let header: t => Pgn.Header.t; + +let addToHeader: (t, Pgn.Header.kv) => unit; + +let ascii: t => string; + +module Color: { + type t = + | Black + | White; + include Jsonable with type t := t; + let toString: t => string; +}; + +module File: { + type t = [ | `a | `b | `c | `d | `e | `f | `g | `h]; + include Jsonable with type t := t; + let toChar: t => char; + let ofChar: char => t; + let ofString: string => t; + let toString: t => string; + let all: list(t); +}; + +module Rank: { + type t = int; + include Jsonable with type t := t; + let all: list(t); +}; + +module Square: { + type t = { + file: File.t, + rank: Rank.t, + }; + include Jsonable with type t := t; + let toString: t => string; + let ofString: string => t; +}; + +module Piece: { + module Type: { + type t = [ | `king | `queen | `bishop | `knight | `rook | `pawn]; + include Jsonable with type t := t; + let toString: t => string; + }; + type t = { + type_: Type.t, + color: Color.t, + }; + include Jsonable with type t := t; + let toString: t => string; +}; + +module EndState: { + type t = + | Checkmate + | Stalemate + | ThreefoldRepetition + | InsufficientMaterial + | FiftyMoveRule; + include Jsonable with type t := t; + include Belt_Id.Hashable with type t := t; + let toString: t => string; +}; + +let endState: t => option(EndState.t); + +let inCheck: t => bool; + +let gameOver: t => bool; + +let inDraw: t => bool; + +let get: (t, Square.t) => option(Piece.t); + +module Move: { + module San: {type t = string; include Jsonable with type t := t;}; + module FromTo: { + type t = { + from: string, + to_: string, + }; + include Jsonable with type t := t; + }; + module Full: { + type t = { + color: Color.t, + from: Square.t, + to_: Square.t, + flags: string, + piece: Piece.Type.t, + san: San.t, + }; + include Jsonable with type t := t; + }; + [@bs.deriving accessors] + type t = + | SAN(San.t) + | FromTo(FromTo.t) + | Full(Full.t); + include Jsonable with type t := t; + module Options: {type t = {square: option(Square.t)};}; +}; + +let legalMoves: (~move_options: Move.Options.t=?, t) => array(Move.Full.t); + +let move: (t, Move.t) => option(Move.Full.t); + +let undo: t => option(Move.Full.t); + +let remove: (t, Square.t) => option(Piece.t); + +let put: (t, Piece.t, Square.t) => successOrFail; + +let turn: t => Color.t; + +let historySan: t => array(Move.San.t); + +let historyFull: t => array(Move.Full.t); + +let reset: t => unit; diff --git a/drafts/bs-chess/src/Test.re b/drafts/bs-chess/src/Test.re new file mode 100644 index 0000000..f99e338 --- /dev/null +++ b/drafts/bs-chess/src/Test.re @@ -0,0 +1,146 @@ +open Chess; + +module List = { + include List; + let bind = (f, l) => l |> List.map(f) |> List.concat; + let filter_map = Belt.List.keepMap; +}; + +let chess = create(); + +Js.log(ascii(chess)); + +Js.log(fen(chess)); + +let chess = { + let fen = + Fen.ofStringExn( + "6nr/3p2pp/5Q2/3b2B1/1nk1PPBP/p4Np1/p5R1/1R1K1N2 b - - 2 40", + ); + create(~fen, ()); +}; + +let full_move = { + Move.Full.color: Color.Black, + from: { + Square.file: `a, + rank: 2, + }, + to_: { + Square.file: `a, + rank: 1, + }, + flags: "np", + piece: `pawn, + san: "a1=B", +}; + +/* Move.Full.ofRaw( */ +/* [%raw {|{ color: 'b', from: 'f2', to: 'f1', flags: 'np', piece: 'p' }|}], */ +/* ); */ +Js.log(ascii(chess)); + +Js.log(Move.Full.toJson(full_move)); + +Js.log( + move(chess, Move.Full(full_move)) |. Belt.Option.map(Move.Full.toJson), +); + +Js.log(ascii(chess)); + +Js.log(ascii(chess)); + +Js.log("hey"); + +Js.log(ascii(chess)); + +Js.log(gameOver(chess)); + +Js.log(get(chess, {Square.file: `e, rank: 8})); + +Js.log(get(chess, {Square.file: `e, rank: 1})); + +Js.log( + get(chess, {Square.file: `g, rank: 2}) |. Belt.Option.map(Piece.toString), +); + +let allSquares: list(Square.t) = + File.all + |> List.bind(file => Rank.all |> List.map(rank => {Square.file, rank})); + +Js.log("gettin all squares"); + +let allPieces: list((Square.t, Piece.t)) = + allSquares + |. List.filter_map(square => + Belt.Option.map(get(chess, square), piece => (square, piece)) + ); + +Js.log(ascii(chess)); + +allPieces +|> List.iter(((square, piece)) => + Js.log3(Square.toString(square), ":", Piece.toString(piece)) + ); + +let play_random_game = (~print=false, t: t) => { + Js.log("about to play random game"); + Random.self_init(); + /* random game */ + let rec loop = t => { + print ? Js.log(fen(t)) : (); + print ? Js.log(ascii(t)) : (); + if (gameOver(t)) { + Js.log("Game over"); + } else { + let moves = legalMoves(t); + /* Js.log("legal moves:"); */ + /* Array.iter(Js.log, Array.map(Move.Full.toJson, moves)); */ + let selected_move = moves[Random.int(Array.length(moves))]; + print ? Js.log("selecting move:") : (); + print ? Js.log(Move.Full.toJson(selected_move)) : (); + switch (move(t, Move.Full(selected_move))) { + | Some(_) => loop(t) + | None => Js.log("error") + }; + }; + }; + loop(t); +}; + +play_random_game(create(), ~print=true); + +let endStates = Belt.HashMap.make(~hintSize=5, ~id=(module EndState)); + +let total = endStates => + Belt.HashMap.reduce(endStates, 0, (count, _, v) => count + v); + +let rec check_for_game_over_but_no_end_state = n => + if (n <= 0) { + (); + } else { + Js.log2(n, " rounds left"); + let chess = create(); + play_random_game(chess, ~print=false); + switch (endState(chess)) { + | None => + Js.log(ascii(chess)); + Js.Exn.raiseError("game over but not sure why"); + | Some(x) => + Js.log(EndState.toString(x)); + let count = + Belt.Option.getWithDefault(Belt.HashMap.get(endStates, x), 0); + Belt.HashMap.set(endStates, x, count + 1); + let total = total(endStates); + Belt.HashMap.forEach(endStates, (endState, count) => + Js.log3( + "--", + EndState.toString(endState), + float(count) /. float(total), + ) + ); + check_for_game_over_but_no_end_state(n - 1); + }; + }; + +check_for_game_over_but_no_end_state(2); diff --git a/drafts/bs-chess/webpack.config.js b/drafts/bs-chess/webpack.config.js new file mode 100644 index 0000000..34cf3c2 --- /dev/null +++ b/drafts/bs-chess/webpack.config.js @@ -0,0 +1,12 @@ +const path = require('path'); +const outputDir = path.join(__dirname, "build/"); + +module.exports = { + entry: './src/Test.bs.js', + mode: 'development', + output: { + path: outputDir, + publicPath: outputDir, + filename: 'Index.js', + }, +}; diff --git a/drafts/bs-compression/.gitignore b/drafts/bs-compression/.gitignore new file mode 100644 index 0000000..54feaec --- /dev/null +++ b/drafts/bs-compression/.gitignore @@ -0,0 +1,5 @@ +/lib +/node_modules +.merlin +npm-debug.log +public/*.js diff --git a/drafts/bs-compression/README.md b/drafts/bs-compression/README.md new file mode 100644 index 0000000..8e99468 --- /dev/null +++ b/drafts/bs-compression/README.md @@ -0,0 +1,45 @@ +# bs-compression +Bucklescript Bindings for [compression](https://github.com/expressjs/compression) express middleware. +`compression` is a Node.js compression middleware. + +# Prerequisites + +``` +npm install --global bs-platform +yarn install +``` + +# How to compile + +``` +yarn build +``` + +# Usage + +This package can be used only with `bs-express`. Make sure you already have `bs-express` as a dependency in your project. + +``` +yarn add bs-compression +``` +And add `bs-compression` to `dependencies` node of your `bsconfig.json`. + +# Code snippets + +For instance, here is the code to serve static files from `public` folder and compress them. +Remark: The compression middleware must be passed first in the array of middlewares. + +```reason +let app = express(); +App.useOnPathWithMany( + app, + ~path="/public", + [| + Compression.compression(), + { + let options = Static.defaultOptions(); + Static.make("public", options) |> Static.asMiddleware + } + |] +); +``` diff --git a/drafts/bs-compression/bsconfig.json b/drafts/bs-compression/bsconfig.json new file mode 100644 index 0000000..fec9a8f --- /dev/null +++ b/drafts/bs-compression/bsconfig.json @@ -0,0 +1,7 @@ +{ + "name": "bs-compression", + "refmt": 3, + "bs-dependencies": ["bs-express"], + "bsc-flags": ["-bs-super-errors"], + "sources": [{ "dir": "src" }] +} diff --git a/drafts/bs-compression/package.json b/drafts/bs-compression/package.json new file mode 100644 index 0000000..97016a1 --- /dev/null +++ b/drafts/bs-compression/package.json @@ -0,0 +1,37 @@ +{ + "name": "bs-compression", + "version": "0.0.3", + "description": "Bucklescript bindings for Compression middlewaare", + "scripts": { + "test": "jest --watch", + "build": "bsb -make-world", + "watch": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/viebel/bs-compression.git" + }, + "keywords": [ + "bucklescript", + "compression", + "nodejs", + "middleware" + ], + "author": "Yehonathan Sharvir", + "license": "MIT", + "bugs": { + "url": "https://github.com/viebel/bs-compression/issues" + }, + "homepage": "https://github.com/viebel/bs-compression#readme", + "devDependencies": { + "bs-platform": "^2.2.2", + "bs-express": "^0.0.4" + }, + "dependencies": { + "compression": "^1.7.2" + }, + "peerDependencies": { + "bs-express": "^0.0.4" + } +} diff --git a/drafts/bs-compression/src/Compression.re b/drafts/bs-compression/src/Compression.re new file mode 100644 index 0000000..ce2afb5 --- /dev/null +++ b/drafts/bs-compression/src/Compression.re @@ -0,0 +1 @@ +[@bs.module] external compression: unit => Express.Middleware.t = "compression"; diff --git a/drafts/bs-compression/yarn.lock b/drafts/bs-compression/yarn.lock new file mode 100644 index 0000000..184ec86 --- /dev/null +++ b/drafts/bs-compression/yarn.lock @@ -0,0 +1,329 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +accepts@~1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +body-parser@1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454" + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.1" + http-errors "~1.6.2" + iconv-lite "0.4.19" + on-finished "~2.3.0" + qs "6.5.1" + raw-body "2.3.2" + type-is "~1.6.15" + +bs-express@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/bs-express/-/bs-express-0.0.4.tgz#29af21f03dc4ace2ffdf8d610b4d2edd37ca32e8" + dependencies: + express "^4.14.0" + +bs-platform@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-2.2.2.tgz#95ff37719771bbf310e8376fedd1148865c0da19" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +compressible@~2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" + dependencies: + mime-db ">= 1.33.0 < 2" + +compression@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.13" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +depd@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +depd@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +encodeurl@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +express@^4.14.0: + version "4.16.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" + dependencies: + accepts "~1.3.4" + array-flatten "1.1.1" + body-parser "1.18.2" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.0" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.2" + qs "6.5.1" + range-parser "~1.2.0" + safe-buffer "5.1.1" + send "0.16.1" + serve-static "1.13.1" + setprototypeof "1.1.0" + statuses "~1.3.1" + type-is "~1.6.15" + utils-merge "1.0.1" + vary "~1.1.2" + +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + dependencies: + debug "2.6.9" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" + unpipe "~1.0.0" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +http-errors@1.6.2, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +iconv-lite@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ipaddr.js@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@~2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +proxy-addr@~2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.6.0" + +qs@6.5.1: + version "6.5.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" + dependencies: + bytes "3.0.0" + http-errors "1.6.2" + iconv-lite "0.4.19" + unpipe "1.0.0" + +safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +send@0.16.1: + version "0.16.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.1.tgz#a70e1ca21d1382c11d0d9f6231deb281080d7ab3" + dependencies: + debug "2.6.9" + depd "~1.1.1" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serve-static@1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.1.tgz#4c57d53404a761d8f2e7c1e8a18a47dbf278a719" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.1" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +"statuses@>= 1.3.1 < 2": + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +type-is@~1.6.15: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" diff --git a/drafts/bs-cookie-parser/.gitignore b/drafts/bs-cookie-parser/.gitignore new file mode 100644 index 0000000..5501740 --- /dev/null +++ b/drafts/bs-cookie-parser/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.merlin +npm-debug.log +/lib/* +/node_modules/ + +tests/test.data diff --git a/drafts/bs-cookie-parser/README.md b/drafts/bs-cookie-parser/README.md new file mode 100644 index 0000000..bf0adcb --- /dev/null +++ b/drafts/bs-cookie-parser/README.md @@ -0,0 +1,40 @@ +# bs-cookie-parser +[cookie-parser](https://github.com/expressjs/cookie-parser) binding in ReasonML + +# Example + +```reason +let app = Express.express(); + +App.use(app, CookieParser.make()); + +App.listen(app, ~port=3000); +``` + +# Installation + +``npm install --save bs-cookie-parser bs-express`` +Add bs-cookier-parser and bs-express to bsconfig.json. For example: +``` +{ + ... + "bs-dependencies": [ + "bs-express", + "bs-cookie-parser" + ] +} +``` + +# Testing in development + +In one terminal: +``` +npm run start +``` + +In second terminal: +``` +cd tests && ./test.sh +``` + +> Testing relies on querying a the `example/Index.re` server and making sure the output matches the `tests/reference.data`. diff --git a/drafts/bs-cookie-parser/bsconfig.json b/drafts/bs-cookie-parser/bsconfig.json new file mode 100644 index 0000000..87e7eab --- /dev/null +++ b/drafts/bs-cookie-parser/bsconfig.json @@ -0,0 +1,17 @@ +{ + "name": "bs-cookie-parser", + "bsc-flags": [ + "-bs-super-errors" + ], + "refmt": 3, + "sources": [ + "src", + { + "dir": "example", + "type": "dev" + } + ], + "bs-dependencies": [ + "bs-express" + ] +} diff --git a/drafts/bs-cookie-parser/example/Index.re b/drafts/bs-cookie-parser/example/Index.re new file mode 100644 index 0000000..ec659c0 --- /dev/null +++ b/drafts/bs-cookie-parser/example/Index.re @@ -0,0 +1,98 @@ +open Express; + +/* The tests below relies upon the ability to store in the Request + objects abritrary JSON properties. + + Each middleware will both check that previous middleware + have been called by making properties exists in the Request object and + upon success will themselves adds anothe property to the Request. + + */ +/* [checkProperty req next property k] makes sure [property] is + present in [req]. If success then [k()] is invoked, otherwise + [Next.route] is called with next */ +let checkProperty = (req, next, property, k) => { + let reqData = Request.asJsonObject(req); + switch (Js.Dict.get(reqData, property)) { + | None => next(Next.route) + | Some(x) => + switch (Js.Json.decodeBoolean(x)) { + | Some(b) when b => k() + | _ => next(Next.route) + } + } +}; + +/* same as [checkProperty] but with a list of properties */ +let checkProperties = (req, next, properties, k) => { + let rec aux = (properties) => + switch properties { + | [] => k() + | [p, ...tl] => checkProperty(req, next, p, () => aux(tl)) + }; + aux(properties) +}; + +/* [setProperty req property] sets the [property] in the [req] Request + value */ +let setProperty = (req, property) => { + let reqData = Request.asJsonObject(req); + Js.Dict.set(reqData, property, Js.Json.boolean(true)) +}; + +/* return the string value for [key], None if the key is not in [dict] + TODO once BOption.map is released */ +let getDictString = (dict, key) => + switch (Js.Dict.get(dict, key)) { + | Some(json) => Js.Json.decodeString(json) + | _ => None + }; + +/* make a common JSON object representing success */ +let makeSuccessJson = () => { + let json = Js.Dict.empty(); + Js.Dict.set(json, "success", Js.Json.boolean(true)); + Js.Json.object_(json) +}; + +let app = express(); + +App.get(app, ~path="/nullCookies") @@ +Middleware.from( + (next, req) => + switch (Request.cookies(req)) { + | None => Response.sendJson(makeSuccessJson()) + | Some(_) => next(Next.route) + } +); + +App.get(app, ~path="/nullSignedCookies") @@ +Middleware.from( + (next, req) => + switch (Request.signedCookies(req)) { + | None => Response.sendJson(makeSuccessJson()) + | Some(_) => next(Next.route) + } +); + +App.getWithMany(app, ~path="/cookies") @@ +[| + CookieParser.make(), + /* This will enable cookie parsing on that path */ + Middleware.from( + (next, req) => + switch (Request.cookies(req)) { + | Some(kv) => + switch (getDictString(kv, "key")) { + | Some("value") => Response.sendJson(makeSuccessJson()) + | _ => next(Next.route) + } + | None => next(Next.route) + } + ) +|]; + +App.listen(app, ~port=3000, ()); +/* -- Test the server -- + npm run start && cd tests && ./test.sh + */ diff --git a/drafts/bs-cookie-parser/package.json b/drafts/bs-cookie-parser/package.json new file mode 100644 index 0000000..55216ef --- /dev/null +++ b/drafts/bs-cookie-parser/package.json @@ -0,0 +1,34 @@ +{ + "name": "bs-cookie-parser", + "version": "0.1.0", + "description": "cookie-parser binding in ReasonML", + "dependencies": { + "cookie-parser": "^1.x.x" + }, + "peerDependencies": { + "bs-express": "^0.4.0" + }, + "devDependencies": { + "bs-express": "^0.8.0", + "bs-platform": "^3.1.5" + }, + "scripts": { + "build": "bsb -make-world", + "start": "npm run build && node lib/js/example/", + "clean": "bsb -clean-world", + "watch": "bsb -make-world -w", + "test": "cd tests && ./test.sh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/BuckleTypes/bs-cookie-parser.git" + }, + "keywords": [], + "author": "Maxime Ransan", + "license": "MIT", + "bugs": { + "url": "https://github.com/BuckleTypes/bs-cookie-parser/issues" + }, + "homepage": "https://github.com/BuckleTypes/bs-cookie-parser#readme", + "rebel": {} +} diff --git a/drafts/bs-cookie-parser/src/CookieParser.re b/drafts/bs-cookie-parser/src/CookieParser.re new file mode 100644 index 0000000..0137af7 --- /dev/null +++ b/drafts/bs-cookie-parser/src/CookieParser.re @@ -0,0 +1,9 @@ +[@bs.module] external make_no_arg : unit => Express.Middleware.t = "cookie-parser"; + +[@bs.module] external make_with_secret : string => Express.Middleware.t = "cookie-parser"; + +let make = (~secret=?, ()) => + switch secret { + | None => make_no_arg() + | Some(secret) => make_with_secret(secret) + }; \ No newline at end of file diff --git a/drafts/bs-cookie-parser/src/CookieParser.rei b/drafts/bs-cookie-parser/src/CookieParser.rei new file mode 100644 index 0000000..4b4380f --- /dev/null +++ b/drafts/bs-cookie-parser/src/CookieParser.rei @@ -0,0 +1,5 @@ +/** Binding for the cookie-parser library */ +let make: (~secret: string=?, unit) => Express.Middleware.t; + +/** [make ::secret ()] returns a middleware value to be used with + [Express.App] functions. */; \ No newline at end of file diff --git a/drafts/bs-cookie-parser/tests/reference.data b/drafts/bs-cookie-parser/tests/reference.data new file mode 100644 index 0000000..bfa3f06 --- /dev/null +++ b/drafts/bs-cookie-parser/tests/reference.data @@ -0,0 +1,7 @@ + +-- NullCookies-- +{"success":true} +-- Cookies-- +{"success":true} +-- NullSignedCookies-- +{"success":true} \ No newline at end of file diff --git a/drafts/bs-cookie-parser/tests/test.sh b/drafts/bs-cookie-parser/tests/test.sh new file mode 100755 index 0000000..2ea6e12 --- /dev/null +++ b/drafts/bs-cookie-parser/tests/test.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Unit test to run again an Express server defined in examples/Index.re +# +# This test uses 'curl' to query the web server and output the +# HTTP response in 'test.data'. +# +# It then makes a diff with the expected data stored in 'reference.data' + +TEST_DATA=test.data + +clean_previous_test() { + rm -f $TEST_DATA +} + +function print_test_title() { + echo >> $TEST_DATA + echo "-- $1--" >> $TEST_DATA +} + +clean_previous_test; + +run_cookie_test() { + print_test_title "$1" + curl -X "$2" --cookie "$3" http://localhost:3000$4 2>&1 >> $TEST_DATA +} + +run_cookie_test 'NullCookies' 'GET' 'key=value' '/nullCookies' +run_cookie_test 'Cookies' 'GET' 'key=value' '/cookies' +run_cookie_test 'NullSignedCookies' 'GET' 'key=value' '/nullSignedCookies' + +# compare test output to reference data + +REFERENCE_DATA=reference.data +diff $TEST_DATA $REFERENCE_DATA diff --git a/drafts/bs-d3/.gitignore b/drafts/bs-d3/.gitignore new file mode 100644 index 0000000..38bea34 --- /dev/null +++ b/drafts/bs-d3/.gitignore @@ -0,0 +1,29 @@ +*.exe +*.obj +*.out +*.compile +*.native +*.byte +*.cmo +*.annot +*.cmi +*.cmx +*.cmt +*.cmti +*.cma +*.a +*.cmxa +*.obj +*~ +*.annot +*.cmj +*.bak +lib/bs +*.mlast +*.mliast +.vscode +.merlin +node_modules +examples/dist +lib +.bsb.lock diff --git a/drafts/bs-d3/.travis.yml b/drafts/bs-d3/.travis.yml new file mode 100644 index 0000000..59b92bb --- /dev/null +++ b/drafts/bs-d3/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - 10 +cache: yarn + +script: + - yarn test-ci diff --git a/drafts/bs-d3/LICENSE b/drafts/bs-d3/LICENSE new file mode 100644 index 0000000..ac1cd2f --- /dev/null +++ b/drafts/bs-d3/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Aaron Franks + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-d3/README.md b/drafts/bs-d3/README.md new file mode 100644 index 0000000..f22a458 --- /dev/null +++ b/drafts/bs-d3/README.md @@ -0,0 +1,56 @@ +[![Build Status](https://travis-ci.org/af/bs-d3.svg?branch=master)](https://travis-ci.org/af/bs-d3) + +# bs-d3 + +WIP [d3](https://github.com/d3/d3) 5.x bindings for [Bucklescript](https://github.com/bucklescript/bucklescript/). + +Extremely incomplete and experimental; contributions welcome! + + +## Setting up a dev environment + +``` +# Install dependencies +yarn + +# Start bucklescript in watch mode +yarn start + +# In a separate terminal window, run webpack +yarn webpack + +# Then open `./examples/index.html` and you should the line chart from `./examples/lineChart.re` +``` + +## Current status + +d3 has a large [API surface](https://github.com/d3/d3/blob/master/API.md#paths-d3-path), so there's still a lot to do! However, the pieces are already in place to [draw line and area charts](https://github.com/af/bs-d3/blob/master/examples/lineChart.re) + +Currently some of the typings are still quite loose/permissive, if you have any suggestions to tighten them up in an idiomatic OCaml way, please file an issue or PR. + +- [x] Axes +- [x] Arrays (about 50%) +- [ ] Brushes +- [ ] Chords +- [ ] Brushes +- [ ] Collections +- [ ] Colors +- [ ] Dispatches +- [ ] Dragging +- [ ] Easings +- [ ] Forces +- [ ] Number formatting +- [ ] Geo +- [ ] Hierarchies +- [ ] Interpolators +- [ ] Paths +- [ ] Polygons +- [ ] Quadtrees +- [x] Scales (partially) +- [x] Selections (mostly) +- [x] Shapes (lines & areas only at the moment) +- [ ] Time Intervals +- [ ] Timers +- [ ] Transitions +- [ ] Voronoi +- [ ] Zooming diff --git a/drafts/bs-d3/__tests__/Selection_test.re b/drafts/bs-d3/__tests__/Selection_test.re new file mode 100644 index 0000000..1a2f7b3 --- /dev/null +++ b/drafts/bs-d3/__tests__/Selection_test.re @@ -0,0 +1,31 @@ +open Jest; +module S = D3.Selection; + +describe("D3", () => { + open Expect; + + test("should be attached to the JsDom body", () => { + let d3 = JsDom.make("

Hello!!

") |. JsDom.attachD3; + expect(d3 |. S.select("p") |. S.text) |> toBe("Hello!!") + }); + + test("should select all nodes", () => { + let d3 = JsDom.make("

1

2

3

4

") |. JsDom.attachD3; + expect(d3 |. S.selectAll("p") |. S.size) |> toBe(3) + }); + + test("should filter by function (with this)", () => { + let d3 = JsDom.make("

foo

bar

") |. JsDom.attachD3; + expect(d3 |. S.selectAll("p") |. S.filterFn([@bs.this] this => this##id == "ok") |. S.text) |> toBe("bar") + }); + + test("should filter by function and index (with this)", () => { + let d3 = JsDom.make("

foo

bar

") |. JsDom.attachD3; + expect(d3 |. S.selectAll("p") |. S.filterFnWithIndex([@bs.this] (_this, _d, index) => index == 1) |. S.text) |> toBe("bar") + }); + + test("should detect empty nodes", () => { + let d3 = JsDom.make("") |. JsDom.attachD3; + expect(d3 |. S.selectAll("p") |. S.empty()) |> toBe(true) + }) +}); diff --git a/drafts/bs-d3/bsconfig.json b/drafts/bs-d3/bsconfig.json new file mode 100644 index 0000000..1136916 --- /dev/null +++ b/drafts/bs-d3/bsconfig.json @@ -0,0 +1,19 @@ +// This is the configuration file used by BuckleScript's build system bsb. Its documentation lives here: http://bucklescript.github.io/bucklescript/docson/#build-schema.json +// BuckleScript comes with its own parser for bsconfig.json, which is normal JSON, with the extra support of comments and trailing commas. +{ + "name": "D3", + "version": "0.1.0", + "package-specs": ["commonjs", "es6"], + "sources": [ + {"dir":"src"}, + {"dir":"examples"}, + {"dir":"__tests__", "type": "dev"} + ], + "namespace": false, + "bsc-flags": ["-bs-super-errors"], + "bs-dependencies" : [ + // add your dependencies here. You'd usually install them normally through `npm install my-dependency`. If my-dependency has a bsconfig.json too, then everything will work seamlessly. + ], + "bs-dev-dependencies": ["@glennsl/bs-jest"], + "refmt": 3 +} diff --git a/drafts/bs-d3/examples/barChart.re b/drafts/bs-d3/examples/barChart.re new file mode 100644 index 0000000..4c4272b --- /dev/null +++ b/drafts/bs-d3/examples/barChart.re @@ -0,0 +1,53 @@ +module S = D3.Selection; +let fmtFloat = D3.Helpers.fmtFloat; + +let data = Players.data; +let width = 900.; +let height = 500.; +let margin = D3.Helpers.{t: 20., r: 20., b: 20., l: 30.}; + + +module X = D3.Scale.MakeLinearFloat(); +module Y = D3.Scale.MakeLinearFloat(); + +let _ = X.( + instance + |. domain([|0., float_of_int(Array.length(data) - 1)|]) + |. range([|0., width|]) +); + +let maxPoints = D3.Array.max_(data, ~accessor=((player: Players.t) => player.total), ()); +let _ = Y.( + instance + |. domain([|0., float_of_int(maxPoints)|]) + |. range([|height, 0.|]) +); + +let svg = D3.Helpers.makeContainer(".barchart", {width, height, margin}); + +/* Draw x and y axes on the svg */ +svg +|. S.append("g") +|. S.attr("class", "axis xAxis") +|. S.attr("transform", "translate(0," ++ (fmtFloat(height -. margin.t) ++ ")")) +|. S.callAxis(D3.Axis.makeBottom(X.instance)); + +svg +|. S.append("g") +|. S.attr("class", "axis yAxis") +|. S.callAxis(D3.Axis.makeLeft(Y.instance)); + +let barWidth = ((width -. margin.l -. margin.r) /. (Array.length(data) |> float_of_int)) + |> fmtFloat; + +/* Draw bars for each data point */ +svg +|. S.selectAll(".bar") +|. S.data(data) +|. S.enter +|. S.append("rect") +|. S.classed("bar", true) +|. S.attr("width", barWidth) +|. S.attrFn("y", (d: Players.t, _, _) => Y.call(d.total |> float_of_int)) +|. S.attrFn("x", (_, idx, _) => X.call(idx |> float_of_int)) +|. S.attrFn("height", (d: Players.t, _, _) => (height -. margin.b -. Y.call(d.total |> float_of_int))); diff --git a/drafts/bs-d3/examples/bubblechart.re b/drafts/bs-d3/examples/bubblechart.re new file mode 100644 index 0000000..c3ae949 --- /dev/null +++ b/drafts/bs-d3/examples/bubblechart.re @@ -0,0 +1,77 @@ +module S = D3.Selection; +let fmtFloat = D3.Helpers.fmtFloat; + +let data = Players.data; +let width = 900.; +let height = 500.; +let margin = D3.Helpers.{t: 30., r: 120., b: 30., l: 30.}; + +module X = D3.Scale.MakeLinearFloat(); +module Y = D3.Scale.MakeLinearFloat(); + +let maxPoints = D3.Array.max_(data, ~accessor=((player: Players.t) => player.total), ()); +let minPoints = D3.Array.min_(data, ~accessor=((player: Players.t) => player.total), ()); +let _ = X.( + instance + |. domain([|float_of_int(minPoints), float_of_int(maxPoints)|]) + |. range([|0., width|]) +); + +let maxGoals = D3.Array.max_(data, ~accessor=((player: Players.t) => player.g), ()); +let _ = Y.( + instance + |. domain([|0., float_of_int(maxGoals)|]) + |. range([|height, 0.|]) +); + +let svg = D3.Helpers.makeContainer(".bubblechart", {width, height, margin}); + +svg +|. S.append("g") +|. S.attr("class", "axis xAxis") +|. S.attr("transform", "translate(0," ++ (fmtFloat(height) ++ ")")) +|. S.callAxis(D3.Axis.makeBottom(X.instance)); + +svg +|. S.append("g") +|. S.attr("class", "axis yAxis") +|. S.callAxis(D3.Axis.makeLeft(Y.instance)); + +/* Add wrappers for each bubble to the chart */ +let cell = svg +|. S.selectAll(".bubbleCell") +|. S.data(data) +|. S.enter +|. S.append("g") +|. S.classed("bubbleCell", true) +|. S.attrFn("transform", (d: Players.t, _, _) => { + let x = X.call(float_of_int(d.total)); + let y = Y.call(float_of_int(d.g)); + "translate(" ++ fmtFloat(x) ++ "," ++ fmtFloat(y) ++ ")"; +}); + +/* add the actual bubble */ +cell +|. S.append("circle") +|. S.attrFn("class", (d: Players.t, _, _) => "bubble " ++ d.pos) +|. S.attrFn("title", (d: Players.t, _, _) => d.name) +|. S.attr("cx", 0) +|. S.attr("cy", 0) +|. S.attrFn("r", (d: Players.t, _, _) => sqrt(d.salary) *. 8.); + +/* each "cell" has a that contains text elements: */ +let textBox = cell +|. S.append("g") +|. S.classed("textBox", true) +|. S.attr("transform", "translate(20, 0)"); + +textBox +|. S.append("text") +|. S.classed("name", true) +|. S.textFn((d: Players.t, _, _) => d.name); + +textBox +|. S.append("text") +|. S.classed("position", true) +|. S.attr("y", 12) +|. S.textFn((d: Players.t, _, _) => d.pos); diff --git a/drafts/bs-d3/examples/index.html b/drafts/bs-d3/examples/index.html new file mode 100644 index 0000000..4200fdf --- /dev/null +++ b/drafts/bs-d3/examples/index.html @@ -0,0 +1,110 @@ + + + + + + bs-d3 examples + + + +

bs-d3 examples

+
+ Bubble chart +
+
+ + +
+ Bar chart +
+
+ + +
+ Pie chart +
+
+ + +
+ Line chart +
+
+ + + diff --git a/drafts/bs-d3/examples/lineChart.re b/drafts/bs-d3/examples/lineChart.re new file mode 100644 index 0000000..2899226 --- /dev/null +++ b/drafts/bs-d3/examples/lineChart.re @@ -0,0 +1,78 @@ +/* ported (and simplified) Reason version of a basic d3 line chart + * via https://bl.ocks.org/d3noob/402dd382a51a4f6eea487f9a35566de0 */ +module S = D3.Selection; +let fmtFloat = D3.Helpers.fmtFloat; + +let sampleData = [|1, 5, 6, 9, 10, 1, 3, 7, 6, 4, 5|]; +let width = 900.; +let height = 500.; +let margin = D3.Helpers.{t: 20., r: 20., b: 20., l: 20.}; +let curve = D3.Curve.catmullRom; + + +module X = D3.Scale.MakeLinearFloat(); +module Y = D3.Scale.MakeLinearFloat(); + +let _ = X.( + instance + |. domain([|0., float_of_int(Array.length(sampleData) - 1)|]) + |. range([|0., width|]) +); + +let _ = Y.( + instance + |. domain([|0., float_of_int(D3.Array.max_(sampleData, ()))|]) + |. range([|height, 0.|]) +); + +let valueLine = + D3.Line.make() + |. D3.Line.x((_, idx, _) => X.call(float_of_int(idx))) + |. D3.Line.curve(curve) + |. D3.Line.y((value, _, _) => Y.call(value)); + +let area = + D3.Area.make() + |. D3.Area.x((_, idx, _) => X.call(float_of_int(idx))) + |. D3.Area.curve(curve) + |. D3.Area.y1((value, _, _) => Y.call(value)) + |. D3.Area.y0((_, _, _) => height -. margin.t); + +let svg = D3.Helpers.makeContainer(".linechart", {width, height, margin}); + +/* Draw x and y axes on the svg */ +svg +|. S.append("g") +|. S.attr("class", "axis xAxis") +|. S.attr("transform", "translate(0," ++ (fmtFloat(height -. margin.t) ++ ")")) +|. S.callAxis(D3.Axis.makeBottom(X.instance)); + +svg +|. S.append("g") +|. S.attr("class", "axis yAxis") +|. S.callAxis(D3.Axis.makeLeft(Y.instance)); + +/* Draw a line with the data */ +svg +|. S.append("path") +|. S.attr("class", "linePath") +|. S.datum(sampleData) +|. S.attr("d", valueLine); + +/* Draw an area fill with the data */ +svg +|. S.append("path") +|. S.attr("class", "lineArea") +|. S.datum(sampleData) +|. S.attr("d", area); + +/* Draw circles for each data point */ +svg +|. S.selectAll("circle") +|. S.data(sampleData) +|. S.enter +|. S.append("circle") +|. S.attr("class", "linePoint") +|. S.attrFn("cx", (_, idx, _) => X.call(idx |> float_of_int)) +|. S.attrFn("cy", (value, _, _) => Y.call(value)) +|. S.attr("r", 3); diff --git a/drafts/bs-d3/examples/pieChart.re b/drafts/bs-d3/examples/pieChart.re new file mode 100644 index 0000000..8c0c279 --- /dev/null +++ b/drafts/bs-d3/examples/pieChart.re @@ -0,0 +1,67 @@ +module S = D3.Selection; +let fmtFloat = D3.Helpers.fmtFloat; + +/* Generate a map of "team code" => "players from that team in the top 100 scorers" */ +module M = Belt.Map.String; +let teamMap = Belt.Array.reduce(Players.data, M.empty, (acc, p) => { + let prevCount = M.getWithDefault(acc, p.team, 0); + acc |. M.set(p.team, prevCount + 1); +}); + +/* For the chart, the data will be tuples of team codes and the # of top scorers on that team */ +type teamTuple = (M.key, int); +let data = (teamMap |. M.toArray); + +let width = 900.; +let height = 500.; +let margin = D3.Helpers.{t: 20., r: 20., b: 20., l: 30.}; +let radius = min(width, height) *. 0.4; + +let pie = D3.Pie.make() +|. D3.Pie.sort(None) +|. D3.Pie.value(((_, playerCount)) => float_of_int(playerCount)); + +let color = D3.Scale.( + makeSequential(D3.ScaleChromatic.interpolateBrBG) + |. sequentialDomain([|0., data |. Array.length |. float_of_int|]) +); + +let svg = D3.Helpers.makeContainer(".piechart", {width, height, margin}) +|. S.attr("transform", "translate(" ++ fmtFloat(width /. 2.) ++ "," ++ fmtFloat(height /. 2.) ++ ")"); + +let path = D3.Arc.(make() +|. innerRadius(0.) +|. outerRadius(radius) +); + +let label = D3.Arc.(make() +|. innerRadius(radius +. 25.) +|. outerRadius(radius +. 25.) +); + +let group = svg +|. S.selectAll(".piearc") +|. S.data(pie(data)) +|. S.enter +|. S.append("g") +|. S.classed("piearc", true); + +group +|. S.append("path") +|. S.attr("d", path) +|. S.attrFn("fill", (_, idx, _) => { + color |. D3.Scale.sequentialCall(float_of_int(idx)) +}); + +group +|. S.append("text") +|. S.classed("teamText", true) +|. S.attr("dx", -15) +|. S.attrFn("transform", (d, _, _) => { + let (x, y) = D3.Arc.centroid(label, d); + "translate(" ++ fmtFloat(x) ++ "," ++ fmtFloat(y) ++ ")"; +}) +|. S.textFn((d: D3.Pie.wrapped(teamTuple), _, _) => { + let (teamName, playerCount) = d##data; + teamName ++ " (" ++ string_of_int(playerCount) ++ ")"; +}); diff --git a/drafts/bs-d3/examples/players.re b/drafts/bs-d3/examples/players.re new file mode 100644 index 0000000..f790f15 --- /dev/null +++ b/drafts/bs-d3/examples/players.re @@ -0,0 +1,1205 @@ +/* List of top 99 scoring forwards from the 17/18 NHL season */ + +type t = { + rnk: int, + salary: float, + name: string, + team: string, + pos: string, + gp: int, + g: int, + a: int, + total: int, + ppg: float, +}; + +let data = [| + { + rnk: 1, + salary: 0.93, + name: "McDavid, Connor", + team: "EDM", + pos: "C", + gp: 82, + g: 41, + a: 67, + total: 108, + ppg: 1.32 + }, + { + rnk: 2, + salary: 9., + name: "Giroux, Claude", + team: "PHI", + pos: "C", + gp: 82, + g: 34, + a: 68, + total: 102, + ppg: 1.24 + }, + { + rnk: 3, + salary: 4.5, + name: "Kucherov, Nikita", + team: "TB", + pos: "RW", + gp: 80, + g: 39, + a: 61, + total: 100, + ppg: 1.25 + }, + { + rnk: 4, + salary: 9.5, + name: "Malkin, Evgeni", + team: "PIT", + pos: "C", + gp: 78, + g: 42, + a: 56, + total: 98, + ppg: 1.26 + }, + { + rnk: 5, + salary: 5.75, + name: "MacKinnon, Nathan", + team: "COL", + pos: "C", + gp: 74, + g: 39, + a: 58, + total: 97, + ppg: 1.31 + }, + { + rnk: 6, + salary: 6., + name: "Hall, Taylor", + team: "NJ", + pos: "LW", + gp: 76, + g: 39, + a: 54, + total: 93, + ppg: 1.22 + }, + { + rnk: 8, + salary: 9., + name: "Kessel, Phil", + team: "PIT", + pos: "RW", + gp: 82, + g: 34, + a: 58, + total: 92, + ppg: 1.12 + }, + { + rnk: 7, + salary: 13., + name: "Kopitar, Anze", + team: "LA", + pos: "C", + gp: 82, + g: 35, + a: 57, + total: 92, + ppg: 1.12 + }, + { + rnk: 9, + salary: 5.8, + name: "Wheeler, Blake", + team: "WPG", + pos: "RW", + gp: 81, + g: 23, + a: 68, + total: 91, + ppg: 1.12 + }, + { + rnk: 10, + salary: 10.9, + name: "Crosby, Sidney", + team: "PIT", + pos: "C", + gp: 82, + g: 29, + a: 60, + total: 89, + ppg: 1.09 + }, + { + rnk: 11, + salary: 10., + name: "Ovechkin, Alex", + team: "WAS", + pos: "LW", + gp: 82, + g: 49, + a: 38, + total: 87, + ppg: 1.06 + }, + { + rnk: 12, + salary: 9.5, + name: "Stamkos, Steven", + team: "TB", + pos: "C", + gp: 78, + g: 27, + a: 59, + total: 86, + ppg: 1.1 + }, + { + rnk: 14, + salary: 0.93, + name: "Barzal, Mathew", + team: "NYI", + pos: "C", + gp: 82, + g: 22, + a: 63, + total: 85, + ppg: 1.04 + }, + { + rnk: 13, + salary: 8., + name: "Marchand, Brad", + team: "BOS", + pos: "LW", + gp: 68, + g: 34, + a: 51, + total: 85, + ppg: 1.25 + }, + { + rnk: 15, + salary: 10., + name: "Voracek, Jakub", + team: "PHI", + pos: "RW", + gp: 82, + g: 20, + a: 65, + total: 85, + ppg: 1.04 + }, + { + rnk: 17, + salary: 0.93, + name: "Rantanen, Mikko", + team: "COL", + pos: "RW", + gp: 81, + g: 29, + a: 55, + total: 84, + ppg: 1.04 + }, + { + rnk: 18, + salary: 6., + name: "Tavares, John", + team: "NYI", + pos: "C", + gp: 82, + g: 37, + a: 47, + total: 84, + ppg: 1.02 + }, + { + rnk: 16, + salary: 6.75, + name: "Gaudreau, Johnny", + team: "CGY", + pos: "LW", + gp: 80, + g: 24, + a: 60, + total: 84, + ppg: 1.05 + }, + { + rnk: 19, + salary: 10., + name: "Kuznetsov, Evgeny", + team: "WAS", + pos: "C", + gp: 79, + g: 27, + a: 56, + total: 83, + ppg: 1.05 + }, + { + rnk: 20, + salary: 6., + name: "Panarin, Artemi", + team: "CBJ", + pos: "LW", + gp: 81, + g: 27, + a: 55, + total: 82, + ppg: 1.01 + }, + { + rnk: 21, + salary: 8., + name: "Pastrnak, David", + team: "BOS", + pos: "RW", + gp: 82, + g: 35, + a: 45, + total: 80, + ppg: 0.98 + }, + { + rnk: 22, + salary: 13., + name: "Benn, Jamie", + team: "DAL", + pos: "LW", + gp: 82, + g: 36, + a: 43, + total: 79, + ppg: 0.96 + }, + { + rnk: 25, + salary: 1., + name: "Karlsson, William", + team: "VGK", + pos: "C", + gp: 82, + g: 43, + a: 35, + total: 78, + ppg: 0.95 + }, + { + rnk: 23, + salary: 5.25, + name: "Barkov, Aleksander", + team: "FLA", + pos: "C", + gp: 79, + g: 27, + a: 51, + total: 78, + ppg: 0.99 + }, + { + rnk: 24, + salary: 6., + name: "Seguin, Tyler", + team: "DAL", + pos: "C", + gp: 82, + g: 40, + a: 38, + total: 78, + ppg: 0.95 + }, + { + rnk: 26, + salary: 3.5, + name: "Staal, Eric", + team: "MIN", + pos: "C", + gp: 82, + g: 42, + a: 34, + total: 76, + ppg: 0.93 + }, + { + rnk: 28, + salary: 4., + name: "Couturier, Sean", + team: "PHI", + pos: "C", + gp: 82, + g: 31, + a: 45, + total: 76, + ppg: 0.93 + }, + { + rnk: 27, + salary: 13.8, + name: "Kane, Patrick", + team: "CHI", + pos: "RW", + gp: 82, + g: 27, + a: 49, + total: 76, + ppg: 0.93 + }, + { + rnk: 29, + salary: 0.75, + name: "Marchessault, Jonathan", + team: "VGK", + pos: "C", + gp: 77, + g: 27, + a: 48, + total: 75, + ppg: 0.97 + }, + { + rnk: 30, + salary: 4.5, + name: "Trocheck, Vincent", + team: "FLA", + pos: "C", + gp: 82, + g: 31, + a: 44, + total: 75, + ppg: 0.91 + }, + { + rnk: 31, + salary: 8., + name: "Radulov, Alexander", + team: "DAL", + pos: "RW", + gp: 82, + g: 27, + a: 45, + total: 72, + ppg: 0.88 + }, + { + rnk: 32, + salary: 4., + name: "Bailey, Josh", + team: "NYI", + pos: "RW", + gp: 76, + g: 18, + a: 53, + total: 71, + ppg: 0.93 + }, + { + rnk: 33, + salary: 7.5, + name: "Backstrom, Nicklas", + team: "WAS", + pos: "C", + gp: 81, + g: 21, + a: 50, + total: 71, + ppg: 0.88 + }, + { + rnk: 36, + salary: 0.93, + name: "Laine, Patrik", + team: "WPG", + pos: "RW", + gp: 82, + g: 44, + a: 26, + total: 70, + ppg: 0.85 + }, + { + rnk: 35, + salary: 5., + name: "Schenn, Brayden", + team: "STL", + pos: "C", + gp: 82, + g: 28, + a: 42, + total: 70, + ppg: 0.85 + }, + { + rnk: 34, + salary: 9., + name: "Draisaitl, Leon", + team: "EDM", + pos: "C", + gp: 78, + g: 25, + a: 45, + total: 70, + ppg: 0.9 + }, + { + rnk: 38, + salary: 0.93, + name: "Marner, Mitchell", + team: "TOR", + pos: "RW", + gp: 82, + g: 22, + a: 47, + total: 69, + ppg: 0.84 + }, + { + rnk: 37, + salary: 3.8, + name: "Rakell, Rickard", + team: "ANA", + pos: "LW", + gp: 77, + g: 34, + a: 35, + total: 69, + ppg: 0.9 + }, + { + rnk: 39, + salary: 6.2, + name: "Huberdeau, Jonathan", + team: "FLA", + pos: "LW", + gp: 82, + g: 27, + a: 42, + total: 69, + ppg: 0.84 + }, + { + rnk: 40, + salary: 5.25, + name: "Granlund, Mikael", + team: "MIN", + pos: "RW", + gp: 77, + g: 21, + a: 46, + total: 67, + ppg: 0.87 + }, + { + rnk: 44, + salary: 0.74, + name: "Point, Brayden", + team: "TB", + pos: "C", + gp: 82, + g: 32, + a: 34, + total: 66, + ppg: 0.8 + }, + { + rnk: 41, + salary: 3.75, + name: "Perron, David", + team: "VGK", + pos: "LW", + gp: 70, + g: 16, + a: 50, + total: 66, + ppg: 0.94 + }, + { + rnk: 43, + salary: 6., + name: "Pavelski, Joe", + team: "SJ", + pos: "RW", + gp: 82, + g: 22, + a: 44, + total: 66, + ppg: 0.8 + }, + { + rnk: 42, + salary: 7., + name: "Tarasenko, Vladimir", + team: "STL", + pos: "RW", + gp: 80, + g: 33, + a: 33, + total: 66, + ppg: 0.82 + }, + { + rnk: 46, + salary: 0.93, + name: "Aho, Sebastian", + team: "CAR", + pos: "LW", + gp: 78, + g: 29, + a: 36, + total: 65, + ppg: 0.83 + }, + { + rnk: 47, + salary: 0.9, + name: "Keller, Clayton", + team: "ARI", + pos: "RW", + gp: 82, + g: 23, + a: 42, + total: 65, + ppg: 0.79 + }, + { + rnk: 45, + salary: 4.65, + name: "Dadonov, Evgenii", + team: "FLA", + pos: "RW", + gp: 74, + g: 28, + a: 37, + total: 65, + ppg: 0.88 + }, + { + rnk: 49, + salary: 0.93, + name: "Eichel, Jack", + team: "BUF", + pos: "C", + gp: 67, + g: 25, + a: 39, + total: 64, + ppg: 0.96 + }, + { + rnk: 53, + salary: 1., + name: "Gourde, Yanni", + team: "TB", + pos: "RW", + gp: 82, + g: 25, + a: 39, + total: 64, + ppg: 0.78 + }, + { + rnk: 52, + salary: 2., + name: "Zucker, Jason", + team: "MIN", + pos: "LW", + gp: 82, + g: 33, + a: 31, + total: 64, + ppg: 0.78 + }, + { + rnk: 51, + salary: 2.86, + name: "Teravainen, Teuvo", + team: "CAR", + pos: "RW", + gp: 82, + g: 23, + a: 41, + total: 64, + ppg: 0.78 + }, + { + rnk: 48, + salary: 6., + name: "Forsberg, Filip", + team: "NAS", + pos: "LW", + gp: 67, + g: 26, + a: 38, + total: 64, + ppg: 0.96 + }, + { + rnk: 50, + salary: 6.5, + name: "Monahan, Sean", + team: "CGY", + pos: "C", + gp: 74, + g: 31, + a: 33, + total: 64, + ppg: 0.86 + }, + { + rnk: 54, + salary: 0.93, + name: "Matthews, Auston", + team: "TOR", + pos: "C", + gp: 62, + g: 34, + a: 29, + total: 63, + ppg: 1.02 + }, + { + rnk: 56, + salary: 0.93, + name: "Larkin, Dylan", + team: "DET", + pos: "C", + gp: 82, + g: 16, + a: 47, + total: 63, + ppg: 0.77 + }, + { + rnk: 55, + salary: 8.75, + name: "Bergeron, Patrice", + team: "BOS", + pos: "C", + gp: 64, + g: 30, + a: 33, + total: 63, + ppg: 0.98 + }, + { + rnk: 57, + salary: 4.5, + name: "Stone, Mark", + team: "OTT", + pos: "RW", + gp: 58, + g: 20, + a: 42, + total: 62, + ppg: 1.07 + }, + { + rnk: 59, + salary: 4.5, + name: "Lee, Anders", + team: "NYI", + pos: "LW", + gp: 82, + g: 40, + a: 22, + total: 62, + ppg: 0.76 + }, + { + rnk: 58, + salary: 6., + name: "Landeskog, Gabriel", + team: "COL", + pos: "LW", + gp: 78, + g: 25, + a: 37, + total: 62, + ppg: 0.79 + }, + { + rnk: 65, + salary: 0.83, + name: "Nylander, William", + team: "TOR", + pos: "C", + gp: 82, + g: 20, + a: 41, + total: 61, + ppg: 0.74 + }, + { + rnk: 62, + salary: 4.25, + name: "Arvidsson, Viktor", + team: "NAS", + pos: "RW", + gp: 78, + g: 29, + a: 32, + total: 61, + ppg: 0.78 + }, + { + rnk: 61, + salary: 6., + name: "Couture, Logan", + team: "SJ", + pos: "LW", + gp: 78, + g: 34, + a: 27, + total: 61, + ppg: 0.78 + }, + { + rnk: 64, + salary: 6.5, + name: "Brown, Dustin", + team: "LA", + pos: "RW", + gp: 81, + g: 28, + a: 33, + total: 61, + ppg: 0.75 + }, + { + rnk: 60, + salary: 9.03, + name: "Getzlaf, Ryan", + team: "ANA", + pos: "C", + gp: 56, + g: 11, + a: 50, + total: 61, + ppg: 1.09 + }, + { + rnk: 63, + salary: 9., + name: "O'Reilly, Ryan", + team: "BUF", + pos: "C", + gp: 81, + g: 24, + a: 37, + total: 61, + ppg: 0.75 + }, + { + rnk: 68, + salary: 0.83, + name: "Ehlers, Nikolaj", + team: "WPG", + pos: "LW", + gp: 82, + g: 29, + a: 31, + total: 60, + ppg: 0.73 + }, + { + rnk: 67, + salary: 6., + name: "Smith, Reilly", + team: "VGK", + pos: "RW", + gp: 67, + g: 22, + a: 38, + total: 60, + ppg: 0.9 + }, + { + rnk: 66, + salary: 6.75, + name: "Scheifele, Mark", + team: "WPG", + pos: "C", + gp: 60, + g: 23, + a: 37, + total: 60, + ppg: 1. + }, + { + rnk: 69, + salary: 5.5, + name: "Schwartz, Jaden", + team: "STL", + pos: "LW", + gp: 62, + g: 24, + a: 35, + total: 59, + ppg: 0.95 + }, + { + rnk: 70, + salary: 6., + name: "Eberle, Jordan", + team: "NYI", + pos: "RW", + gp: 81, + g: 25, + a: 34, + total: 59, + ppg: 0.73 + }, + { + rnk: 71, + salary: 6., + name: "Duchene, Matt", + team: "OTT", + pos: "C", + gp: 82, + g: 27, + a: 32, + total: 59, + ppg: 0.72 + }, + { + rnk: 72, + salary: 2.75, + name: "Miller, J.T.", + team: "TB", + pos: "RW", + gp: 82, + g: 23, + a: 35, + total: 58, + ppg: 0.71 + }, + { + rnk: 73, + salary: 0.93, + name: "Connor, Kyle", + team: "WPG", + pos: "LW", + gp: 76, + g: 31, + a: 26, + total: 57, + ppg: 0.75 + }, + { + rnk: 74, + salary: 2., + name: "Vanek, Thomas", + team: "CBJ", + pos: "RW", + gp: 80, + g: 24, + a: 32, + total: 56, + ppg: 0.7 + }, + { + rnk: 75, + salary: 7., + name: "Zetterberg, Henrik", + team: "DET", + pos: "C", + gp: 82, + g: 11, + a: 45, + total: 56, + ppg: 0.68 + }, + { + rnk: 76, + salary: 7., + name: "Stepan, Derek", + team: "ARI", + pos: "C", + gp: 82, + g: 14, + a: 42, + total: 56, + ppg: 0.68 + }, + { + rnk: 77, + salary: 5.65, + name: "Hoffman, Mike", + team: "OTT", + pos: "LW", + gp: 82, + g: 22, + a: 34, + total: 56, + ppg: 0.68 + }, + { + rnk: 78, + salary: 0.93, + name: "Boeser, Brock", + team: "VAN", + pos: "RW", + gp: 62, + g: 29, + a: 26, + total: 55, + ppg: 0.89 + }, + { + rnk: 79, + salary: 2.75, + name: "Haula, Erik", + team: "VGK", + pos: "C", + gp: 76, + g: 29, + a: 26, + total: 55, + ppg: 0.72 + }, + { + rnk: 80, + salary: 5., + name: "Kadri, Nazem", + team: "TOR", + pos: "C", + gp: 80, + g: 32, + a: 23, + total: 55, + ppg: 0.69 + }, + { + rnk: 81, + salary: 7., + name: "Sedin, Daniel", + team: "VAN", + pos: "LW", + gp: 81, + g: 23, + a: 32, + total: 55, + ppg: 0.68 + }, + { + rnk: 85, + salary: 2.75, + name: "Gallagher, Brendan", + team: "MTL", + pos: "RW", + gp: 82, + g: 31, + a: 23, + total: 54, + ppg: 0.66 + }, + { + rnk: 82, + salary: 6., + name: "Kane, Evander", + team: "SJ", + pos: "LW", + gp: 78, + g: 29, + a: 25, + total: 54, + ppg: 0.69 + }, + { + rnk: 84, + salary: 5., + name: "van Riemsdyk, James", + team: "TOR", + pos: "LW", + gp: 81, + g: 36, + a: 18, + total: 54, + ppg: 0.67 + }, + { + rnk: 83, + salary: 8., + name: "Johansen, Ryan", + team: "NAS", + pos: "C", + gp: 79, + g: 15, + a: 39, + total: 54, + ppg: 0.68 + }, + { + rnk: 86, + salary: 4.5, + name: "Zuccarello, Mats", + team: "NYR", + pos: "RW", + gp: 80, + g: 16, + a: 37, + total: 53, + ppg: 0.66 + }, + { + rnk: 87, + salary: 7.5, + name: "Stastny, Paul", + team: "WPG", + pos: "C", + gp: 82, + g: 16, + a: 37, + total: 53, + ppg: 0.65 + }, + { + rnk: 91, + salary: 0.74, + name: "DeBrincat, Alex", + team: "CHI", + pos: "RW", + gp: 82, + g: 28, + a: 24, + total: 52, + ppg: 0.63 + }, + { + rnk: 89, + salary: 0.93, + name: "Schmaltz, Nick", + team: "CHI", + pos: "C", + gp: 78, + g: 21, + a: 31, + total: 52, + ppg: 0.67 + }, + { + rnk: 90, + salary: 0.93, + name: "Hischier, Nico", + team: "NJ", + pos: "C", + gp: 82, + g: 20, + a: 32, + total: 52, + ppg: 0.63 + }, + { + rnk: 88, + salary: 13.8, + name: "Toews, Jonathan", + team: "CHI", + pos: "C", + gp: 74, + g: 20, + a: 32, + total: 52, + ppg: 0.7 + }, + { + rnk: 92, + salary: 4., + name: "Turris, Kyle", + team: "NAS", + pos: "C", + gp: 76, + g: 16, + a: 35, + total: 51, + ppg: 0.67 + }, + { + rnk: 93, + salary: 4.25, + name: "Smith, Craig", + team: "NAS", + pos: "RW", + gp: 79, + g: 25, + a: 26, + total: 51, + ppg: 0.65 + }, + { + rnk: 94, + salary: 5., + name: "Williams, Justin", + team: "CAR", + pos: "RW", + gp: 82, + g: 16, + a: 35, + total: 51, + ppg: 0.62 + }, + { + rnk: 95, + salary: 4.9, + name: "Galchenyuk, Alex", + team: "ARI", + pos: "LW", + gp: 82, + g: 19, + a: 32, + total: 51, + ppg: 0.62 + }, + { + rnk: 98, + salary: 0.83, + name: "Reinhart, Sam", + team: "BUF", + pos: "RW", + gp: 82, + g: 25, + a: 25, + total: 50, + ppg: 0.61 + }, + { + rnk: 96, + salary: 5., + name: "Henrique, Adam", + team: "ANA", + pos: "C", + gp: 81, + g: 24, + a: 26, + total: 50, + ppg: 0.62 + }, + { + rnk: 97, + salary: 5., + name: "Johnson, Tyler", + team: "TB", + pos: "C", + gp: 81, + g: 21, + a: 29, + total: 50, + ppg: 0.62 + }, + { + rnk: 99, + salary: 7., + name: "Sedin, Henrik", + team: "VAN", + pos: "C", + gp: 82, + g: 3, + a: 47, + total: 50, + ppg: 0.61 + } +|]; diff --git a/drafts/bs-d3/examples/webpack.config.js b/drafts/bs-d3/examples/webpack.config.js new file mode 100644 index 0000000..9db37a1 --- /dev/null +++ b/drafts/bs-d3/examples/webpack.config.js @@ -0,0 +1,26 @@ +const fs = require('fs') +const path = require('path') +const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer') +const {ANALYZE_BUNDLE} = process.env + + +// Generate a separate entry script for each example source file: +const sourceDir = path.join(__dirname, '..', 'lib', 'es6', 'examples') +const exampleSources = fs.readdirSync(sourceDir) +const entry = exampleSources.reduce((acc, src) => { + const entryName = src.split('.')[0] + const fullPath = path.join(sourceDir, src) + return {...acc, [entryName]: fullPath} +}, {}) +// console.log(entry) + +module.exports = { + entry, + + output: { + path: path.join(__dirname, 'dist'), + filename: '[name].js', + }, + + plugins: ANALYZE_BUNDLE ? [new BundleAnalyzerPlugin()] : [], +} diff --git a/drafts/bs-d3/package.json b/drafts/bs-d3/package.json new file mode 100644 index 0000000..dda7c53 --- /dev/null +++ b/drafts/bs-d3/package.json @@ -0,0 +1,43 @@ +{ + "name": "bs-d3", + "description": "Experimental d3 5.x bindings for BuckleScript", + "version": "0.1.0", + "scripts": { + "bundle-analyze": "ANALYZE_BUNDLE=1 npm run build", + "clean": "bsb -clean-world", + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "pretest": "bsb -make-world", + "test": "jest --watchAll", + "test-ci": "npm run pretest && jest", + "webpack": "webpack -w --mode development --context examples --config examples/webpack.config.js", + "build:prod": "webpack --mode production --context examples --config examples/webpack.config.js" + }, + "homepage": "https://github.com/af/bs-d3", + "repository": "https://github.com/af/bs-d3", + "bugs": "https://github.com/af/bs-d3/issues", + "keywords": [ + "bucklescript", + "d3", + "d3js", + "dataviz", + "reason", + "reasonml" + ], + "license": "MIT", + "devDependencies": { + "@glennsl/bs-jest": "0.4.9", + "bs-platform": "7.1.1", + "jest": "25.1.0", + "jsdom": "16.1.0", + "webpack": "4.41.6", + "webpack-bundle-analyzer": "3.6.0", + "webpack-cli": "3.3.11" + }, + "dependencies": { + "d3": "5.15.0" + }, + "jest": { + "testRegex": "/js/__tests__/.*_test\\.js$" + } +} diff --git a/drafts/bs-d3/src/D3.re b/drafts/bs-d3/src/D3.re new file mode 100644 index 0000000..32d0e72 --- /dev/null +++ b/drafts/bs-d3/src/D3.re @@ -0,0 +1,22 @@ +/* + * Manually namespace sub-modules + * Bucklescript has its own namespacing support, but with it turned on, we were getting strange build + * failures on the first few builds. So we namespace manually for now. + * + * See https://blog.janestreet.com/better-namespaces-through-module-aliases/ + */ +include D3_RootSelection; + +module Area = D3_Area; +module Arc = D3_Arc; +module Array = D3_Array; +module Axis = D3_Axis; +module Curve = D3_Curve; +module Line = D3_Line; +module Pie = D3_Pie; +module Scale = D3_Scale; +module ScaleChromatic = D3_ScaleChromatic; +module Selection = D3_Selection; + +/* Assorted utils that come from this bindings library */ +module Helpers = D3_Helpers; diff --git a/drafts/bs-d3/src/D3_Arc.re b/drafts/bs-d3/src/D3_Arc.re new file mode 100644 index 0000000..64967dc --- /dev/null +++ b/drafts/bs-d3/src/D3_Arc.re @@ -0,0 +1,15 @@ +/* + * arc-related functions from d3-shape + * https://github.com/d3/d3-shape#arcs + */ +type t; + +[@bs.module "d3-shape"] external make : unit => t = "arc"; + +[@bs.send] external innerRadius : t => float => t = "innerRadius"; +[@bs.send] external outerRadius : t => float => t = "outerRadius"; +[@bs.send] external cornerRadius : t => float => t = "cornerRadius"; +[@bs.send] external startAngle : t => float => t = "startAngle"; +[@bs.send] external endAngle : t => float => t = "endAngle"; +[@bs.send] external padAngle : t => float => t = "padAngle"; +[@bs.send] external centroid : t => 'a => (float, float) = "centroid"; diff --git a/drafts/bs-d3/src/D3_Area.re b/drafts/bs-d3/src/D3_Area.re new file mode 100644 index 0000000..379f495 --- /dev/null +++ b/drafts/bs-d3/src/D3_Area.re @@ -0,0 +1,25 @@ +/* + * area-related functions from d3-shape + * https://github.com/d3/d3-shape#areas + */ +type t; + +type accessor('a) = ('a, int, array('a)) => float; + +[@bs.module "d3-shape"] external make : unit => t = "area"; + +[@bs.send] external x : t => accessor('a) => t = "x"; +[@bs.send] external x0 : t => accessor('a) => t = "x0"; +[@bs.send] external x1 : t => accessor('a) => t = "x1"; +[@bs.send] external y : t => accessor('a) => t = "y"; +[@bs.send] external y0 : t => accessor('a) => t = "y0"; +[@bs.send] external y1 : t => accessor('a) => t = "y1"; + +[@bs.send] external defined : t => (('a, int, array('a)) => bool) => t = "defined"; +[@bs.send] external curve : t => D3_Curve.t => t = "curve"; +[@bs.send] external context : t => 'a => t = "context"; +[@bs.send] external getContext : t => unit => 'a = "context"; +[@bs.send] external lineX0 : t => unit => 'a = "lineX0"; +[@bs.send] external lineX1 : t => unit => 'a = "lineX1"; +[@bs.send] external lineY0 : t => unit => 'a = "lineY0"; +[@bs.send] external lineY1 : t => unit => 'a = "lineY1"; diff --git a/drafts/bs-d3/src/D3_Array.re b/drafts/bs-d3/src/D3_Array.re new file mode 100644 index 0000000..9b9dbe6 --- /dev/null +++ b/drafts/bs-d3/src/D3_Array.re @@ -0,0 +1,33 @@ +/* + * d3-array + * https://github.com/d3/d3-array/blob/master/README.md + */ + +/* Statistics */ +/* Note: some of these only take floats for now, where only numeric types appear to make sense */ +[@bs.module "d3-array"] external min_ : (array('a), ~accessor: 'a => 'b=?, unit) => 'b = "min"; +[@bs.module "d3-array"] external max_ : (array('a), ~accessor: 'a => 'b=?, unit) => 'b = "max"; +[@bs.module "d3-array"] external extent : (array('a), ~accessor: 'a => 'b=?, unit) => array('b) = "extent"; +[@bs.module "d3-array"] +external extentTuple : (array('a), ~accessor: 'a => 'b=?, unit) => ('b, 'b) = + "extent"; +[@bs.module "d3-array"] external sum : (array('a), ~accessor: 'a => float=?, unit) => float = "sum"; +[@bs.module "d3-array"] external mean : (array('a), ~accessor: 'a => float=?, unit) => float = "mean"; +[@bs.module "d3-array"] external median : (array('a), ~accessor: 'a => 'b=?, unit) => 'a = "median"; +[@bs.module "d3-array"] external quantile : (array('a), float, ~accessor: 'a => float=?, unit) => float = + "quantile"; +[@bs.module "d3-array"] external variance : (array('a), ~accessor: 'a => float=?, unit) => float = "variance"; +[@bs.module "d3-array"] external deviation : (array('a), ~accessor: 'a => float=?, unit) => float = "deviation"; + + +/* Search */ +[@bs.module "d3-array"] external scan : (array('a), ~comp: ('a, 'a) => 'b=?, unit) => int = "scan"; +[@bs.module "d3-array"] +external bisectLeft : (array('a), 'a, ~lo: int=?, ~hi: int=?, unit) => int = "bisectLeft"; +[@bs.module "d3-array"] external bisect : (array('a), 'a, ~lo: int=?, ~hi: int=?, unit) => int = "bisect"; +[@bs.module "d3-array"] +external bisectRight : (array('a), 'a, ~lo: int=?, ~hi: int=?, unit) => int = "bisectRight"; + +/* TODO: bisector, see https://github.com/d3/d3-array/blob/master/README.md#bisector */ +[@bs.module "d3-array"] external ascending : ('a, 'a) => int = "ascending"; /* TODO: this can also return NaN */ +[@bs.module "d3-array"] external descending : ('a, 'a) => int = "descending"; /* TODO: this can also return NaN */ diff --git a/drafts/bs-d3/src/D3_Axis.re b/drafts/bs-d3/src/D3_Axis.re new file mode 100644 index 0000000..900a090 --- /dev/null +++ b/drafts/bs-d3/src/D3_Axis.re @@ -0,0 +1,10 @@ +/* + * d3-axis + * https://github.com/d3/d3-axis#api-reference + */ +type t; + +[@bs.module "d3-axis"] external makeTop : D3_Scale.t => t = "axisTop"; +[@bs.module "d3-axis"] external makeBottom : D3_Scale.t => t = "axisBottom"; +[@bs.module "d3-axis"] external makeLeft : D3_Scale.t => t = "axisLeft"; +[@bs.module "d3-axis"] external makeRight : D3_Scale.t => t = "axisRight"; diff --git a/drafts/bs-d3/src/D3_Curve.re b/drafts/bs-d3/src/D3_Curve.re new file mode 100644 index 0000000..a4f343d --- /dev/null +++ b/drafts/bs-d3/src/D3_Curve.re @@ -0,0 +1,25 @@ +/* + * curve-related functions from d3-shape + * https://github.com/d3/d3-shape#curves + */ +type t; + +[@bs.module "d3-shape"] external basis : t = "curveBasis"; +[@bs.module "d3-shape"] external basisClosed : t = "curveBasisClosed"; +[@bs.module "d3-shape"] external basisOpen : t = "curveBasisOpen"; +[@bs.module "d3-shape"] external bundle : t = "curveBundle"; +[@bs.module "d3-shape"] external cardinal : t = "curveCardinal"; +[@bs.module "d3-shape"] external cardinalClosed : t = "curveCardinalClosed"; +[@bs.module "d3-shape"] external cardinalOpen : t = "curveCardinalOpen"; +[@bs.module "d3-shape"] external catmullRom : t = "curveCatmullRom"; +[@bs.module "d3-shape"] external catmullRomClosed : t = "curveCatmullRomClosed"; +[@bs.module "d3-shape"] external catmullRomOpen : t = "curveCatmullRomOpen"; +[@bs.module "d3-shape"] external linear : t = "curveLinear"; +[@bs.module "d3-shape"] external linearClosed : t = "curveLinearClosed"; +[@bs.module "d3-shape"] external monotoneX : t = "curveMonotoneX"; +[@bs.module "d3-shape"] external monotoneY : t = "curveMonotoneY"; +[@bs.module "d3-shape"] external natural : t = "curveNatural"; +[@bs.module "d3-shape"] external step : t = "curveStep"; +[@bs.module "d3-shape"] external stepAfter : t = "curveStepAfter"; +[@bs.module "d3-shape"] external stepBefore : t = "curveStepBefore"; +/* TODO: custom curve API */ diff --git a/drafts/bs-d3/src/D3_Helpers.re b/drafts/bs-d3/src/D3_Helpers.re new file mode 100644 index 0000000..1e18844 --- /dev/null +++ b/drafts/bs-d3/src/D3_Helpers.re @@ -0,0 +1,39 @@ +module S = D3_Selection; + +type margin = { + t: float, + b: float, + l: float, + r: float, +} + +type dimensions = { + width: float, + height: float, + margin, +}; + + +/* When formatting floats for html/svg attributes, ensure whole numbers have + * a trailing "0". eg "5.0" instead of the "5." we get from Js.Float.toString() */ +let fmtFloat = x => { + let str = Js.Float.toString(x); + let lastChar = String.get(str, String.length(str) - 1); + (lastChar == '.') ? (str ++ "0") : str; +}; + + +let makeContainer = (rootSelector, chartDims) => { + let {margin} = chartDims; + + D3_RootSelection.select(rootSelector) + |. S.append("svg") + |. S.attr("width", chartDims.width +. margin.l +. margin.r) + |. S.attr("height", chartDims.height +. margin.t +. margin.b) + |. S.append("g") + |. S.attr( + "transform", + "translate(" ++ fmtFloat(margin.l) ++ "," ++ fmtFloat(margin.t) ++ ")" + ); +}; + diff --git a/drafts/bs-d3/src/D3_Line.re b/drafts/bs-d3/src/D3_Line.re new file mode 100644 index 0000000..b0912cd --- /dev/null +++ b/drafts/bs-d3/src/D3_Line.re @@ -0,0 +1,14 @@ +/* + * line-related functions from d3-shape + * https://github.com/d3/d3-shape#lines + */ +type t; + +[@bs.module "d3-shape"] external make : unit => t = "line"; + +[@bs.send] external x : t => (('a, int, array('a)) => float) => t = "x"; +[@bs.send] external y : t => (('a, int, array('a)) => float) => t = "y"; +[@bs.send] external defined : t => (('a, int, array('a)) => bool) => t = "defined"; +[@bs.send] external curve : t => D3_Curve.t => t = "curve"; +[@bs.send] external context : t => 'a => t = "context"; +[@bs.send] external getContext : t => unit => 'a = "context"; diff --git a/drafts/bs-d3/src/D3_Pie.re b/drafts/bs-d3/src/D3_Pie.re new file mode 100644 index 0000000..9fea805 --- /dev/null +++ b/drafts/bs-d3/src/D3_Pie.re @@ -0,0 +1,24 @@ +/* + * pie-related functions from d3-shape + * https://github.com/d3/d3-shape#pies + */ +type wrapped('a) = Js.t({ + . + data: 'a, + value: float, + index: int, + startAngle: float, + endAngle: float, + padAngle: float, +}); + +type inner('a) = array('a) => array(wrapped('a)); + +[@bs.module "d3-shape"] external make : unit => inner('a) = "pie"; + +[@bs.send] external value : inner('a) => ('a => float) => inner('a) = "value"; +[@bs.send] external sort : inner('a) => option('a => 'a => int) => inner('a) = "sort"; + +/* TODO: make this work (bucklescript seems to have trouble allowing a higher-order fn) */ +/*[@bs.module "d3-shape"] external make : unit => array('a) => array(wrapped(')a)) = "pie";*/ + diff --git a/drafts/bs-d3/src/D3_RootSelection.re b/drafts/bs-d3/src/D3_RootSelection.re new file mode 100644 index 0000000..5fa535b --- /dev/null +++ b/drafts/bs-d3/src/D3_RootSelection.re @@ -0,0 +1,17 @@ +/* + * d3-selection bindings, for use from the root (without an existing selection) + * See D3_Selection.re for operations on existing selections + * + * https://github.com/d3/d3-selection#api-reference + */ +[@bs.module "d3-selection"] +external selection: unit => D3_Selection.t = "selection"; + +[@bs.module "d3-selection"] +external selectNode: Dom.node => D3_Selection.t = "select"; + +[@bs.module "d3-selection"] +external select: string => D3_Selection.t = "select"; + +[@bs.module "d3-selection"] +external selectAll: string => D3_Selection.t = "selectAll"; \ No newline at end of file diff --git a/drafts/bs-d3/src/D3_Scale.re b/drafts/bs-d3/src/D3_Scale.re new file mode 100644 index 0000000..c961863 --- /dev/null +++ b/drafts/bs-d3/src/D3_Scale.re @@ -0,0 +1,77 @@ +/* + * d3-scale + * https://github.com/d3/d3-scale#api-reference + */ +type t; + +type scaleT = + | Linear + | Log + | Pow + | Sqrt + | Time; + +module type ScaleType = { + type domainT; + type rangeT; + + let scale: scaleT; +}; + +/* TODO: Make these inaccessible (.rei file?) */ +[@bs.module "d3-scale"] external _makeLinear: unit => t = "scaleLinear"; +[@bs.module "d3-scale"] external _makeLog: unit => t = "scaleLog"; +[@bs.module "d3-scale"] external _makePow: unit => t = "scalePow"; +[@bs.module "d3-scale"] external _makeSqrt: unit => t = "scaleSqrt"; +[@bs.module "d3-scale"] external _makeTime: unit => t = "scaleTime"; + +module MakeContinuous = (S: ScaleType) => { + /* Store D3's mutable scale object in the module as `instance` */ + let instance = + switch (S.scale) { + | Linear => _makeLinear() + | Log => _makeLog() + | Pow => _makePow() + | Sqrt => _makeSqrt() + | Time => _makeTime() + }; + + let call = (value: S.domainT): S.rangeT => { + /* TODO: there is almost certainly a better way to invoke the scale here */ + let inner: (t, S.domainT) => S.rangeT = [%raw + (scale, x) => "{return scale(x)}" + ]; + inner(instance, value); + }; + [@bs.send] external invert: (t, S.rangeT) => S.domainT = "invert"; + + [@bs.send] external domain: (t, array(S.domainT)) => t = "domain"; + [@bs.send] external range: (t, array(S.rangeT)) => t = "range"; + [@bs.send] external rangeRound: (t, array(S.rangeT)) => t = "rangeRound"; + [@bs.send] external clamp: (t, bool) => t = "clamp"; + [@bs.send] external ticks: (t, int) => array(S.domainT) = "ticks"; +}; + +/* alias for the most common type of scale */ +module MakeLinearFloat = (()) => { + include MakeContinuous({ + type domainT = float; + type rangeT = float; + let scale = Linear; + }); +}; + +/* Rough WIP for sequential scales */ +/* TODO: would be nice to paramaterize D3.Scale.t instead of having a completely separate type here */ +type sequential; +type interpolator('a) = float => 'a; + +[@bs.module "d3-scale"] +external makeSequential: interpolator('a) => sequential = "scaleSequential"; + +/* FIXME: these are pretty ugly */ +[@bs.send] +external sequentialDomain: (sequential, array('a)) => sequential = "domain"; +let sequentialCall: (sequential, float) => float = [%raw + (scale, x) => "{return scale(x)}" +]; \ No newline at end of file diff --git a/drafts/bs-d3/src/D3_ScaleChromatic.re b/drafts/bs-d3/src/D3_ScaleChromatic.re new file mode 100644 index 0000000..487d788 --- /dev/null +++ b/drafts/bs-d3/src/D3_ScaleChromatic.re @@ -0,0 +1,45 @@ +/* Interpolators for sequential color scales + * See https://github.com/d3/d3-scale-chromatic#diverging + */ + +type interpolator('a) = D3_Scale.interpolator('a); + +[@bs.module "d3-scale-chromatic"] external interpolateBrBG : interpolator(string) = "interpolateBrBG"; +[@bs.module "d3-scale-chromatic"] external interpolatePRGn : interpolator(string) = "interpolatePRGn"; +[@bs.module "d3-scale-chromatic"] external interpolatePiYG : interpolator(string) = "interpolatePiYG"; +[@bs.module "d3-scale-chromatic"] external interpolatePuOr : interpolator(string) = "interpolatePuOr"; +[@bs.module "d3-scale-chromatic"] external interpolateRdBu : interpolator(string) = "interpolateRdBu"; +[@bs.module "d3-scale-chromatic"] external interpolateRdGy : interpolator(string) = "interpolateRdGy"; +[@bs.module "d3-scale-chromatic"] external interpolateRdYlBu : interpolator(string) = "interpolateRdYlBu"; +[@bs.module "d3-scale-chromatic"] external interpolateRdYlGn : interpolator(string) = "interpolateRdYlGn"; +[@bs.module "d3-scale-chromatic"] external interpolateSpectral : interpolator(string) = "interpolateSpectral"; + +[@bs.module "d3-scale-chromatic"] external interpolateBlues : interpolator(string) = "interpolateBlues"; +[@bs.module "d3-scale-chromatic"] external interpolateGreens : interpolator(string) = "interpolateGreens"; +[@bs.module "d3-scale-chromatic"] external interpolateGreys : interpolator(string) = "interpolateGreys"; +[@bs.module "d3-scale-chromatic"] external interpolateOranges : interpolator(string) = "interpolateOranges"; +[@bs.module "d3-scale-chromatic"] external interpolatePurples : interpolator(string) = "interpolatePurples"; +[@bs.module "d3-scale-chromatic"] external interpolateReds : interpolator(string) = "interpolateReds"; + +[@bs.module "d3-scale-chromatic"] external interpolateViridis : interpolator(string) = "interpolateViridis"; +[@bs.module "d3-scale-chromatic"] external interpolateInferno : interpolator(string) = "interpolateInferno"; +[@bs.module "d3-scale-chromatic"] external interpolateMagma : interpolator(string) = "interpolateMagma"; +[@bs.module "d3-scale-chromatic"] external interpolatePlasma : interpolator(string) = "interpolatePlasma"; +[@bs.module "d3-scale-chromatic"] external interpolateWarm : interpolator(string) = "interpolateWarm"; +[@bs.module "d3-scale-chromatic"] external interpolateCool : interpolator(string) = "interpolateCool"; +[@bs.module "d3-scale-chromatic"] external interpolateCubehelixDefault : interpolator(string) = "interpolateCubehelixDefault"; +[@bs.module "d3-scale-chromatic"] external interpolateBuGn : interpolator(string) = "interpolateBuGn"; +[@bs.module "d3-scale-chromatic"] external interpolateBuPu : interpolator(string) = "interpolateBuPu"; +[@bs.module "d3-scale-chromatic"] external interpolateGnBu : interpolator(string) = "interpolateGnBu"; +[@bs.module "d3-scale-chromatic"] external interpolateOrRd : interpolator(string) = "interpolateOrRd"; +[@bs.module "d3-scale-chromatic"] external interpolatePuBuGn : interpolator(string) = "interpolatePuBuGn"; +[@bs.module "d3-scale-chromatic"] external interpolatePuBu : interpolator(string) = "interpolatePuBu"; +[@bs.module "d3-scale-chromatic"] external interpolatePuRd : interpolator(string) = "interpolatePuRd"; +[@bs.module "d3-scale-chromatic"] external interpolateRdPu : interpolator(string) = "interpolateRdPu"; +[@bs.module "d3-scale-chromatic"] external interpolateYlGnBu : interpolator(string) = "interpolateYlGnBu"; +[@bs.module "d3-scale-chromatic"] external interpolateYlGn : interpolator(string) = "interpolateYlGn"; +[@bs.module "d3-scale-chromatic"] external interpolateYlOrBr : interpolator(string) = "interpolateYlOrBr"; +[@bs.module "d3-scale-chromatic"] external interpolateYlOrRd : interpolator(string) = "interpolateYlOrRd"; + +[@bs.module "d3-scale-chromatic"] external interpolateSinebow : interpolator(string) = "interpolateSinebow"; +[@bs.module "d3-scale-chromatic"] external interpolateRainbow : interpolator(string) = "interpolateRainbow"; diff --git a/drafts/bs-d3/src/D3_Selection.re b/drafts/bs-d3/src/D3_Selection.re new file mode 100644 index 0000000..915c630 --- /dev/null +++ b/drafts/bs-d3/src/D3_Selection.re @@ -0,0 +1,38 @@ +/* + * d3-selection + * https://github.com/d3/d3-selection#api-reference + */ +type t; +type group; /* TODO: this isn't usable yet, grep for "current group" in the d3 docs above */ + +[@bs.send] external select : t => string => t = "select"; +[@bs.send] external selectAll : t => string => t = "selectAll"; +[@bs.send] external append : t => string => t = "append"; +[@bs.send] external insert : t => string => t = "insert"; +[@bs.send] external remove : t => t = "remove"; +[@bs.send] external attr : t => (string, 'a) => t = "attr"; +[@bs.send] external attrFn : t => string => (('a, int, group) => 'c) => t = "attr"; +[@bs.send] external classed : t => (string, bool) => t = "classed"; +[@bs.send] external classedFn : t => (string, ('a, int, group) => bool) => t = "classed"; + +[@bs.send] external style : t => (string, string) => t = "style"; +[@bs.send] external styleFn : t => (string, ('a, int, group) => string) => t = "style"; +[@bs.send] external textFn : t => (('a, int, group) => string) => t = "text"; +[@bs.send] external filter : t => string => t = "filter"; +[@bs.send] external filterFn : (t, [@bs.this] ('a => bool)) => t = "filter"; +[@bs.send] external filterFnWithIndex : (t, [@bs.this] (('a, 'b, int) => bool)) => t = "filter"; +[@bs.send] external sort : t => (('a, 'a) => float) => t = "sort"; +[@bs.send] external order : t => unit => t = "order"; +[@bs.send] external raise : t => unit => t = "raise"; +[@bs.send] external lower : t => unit => t = "lower"; +[@bs.send] external merge : t => t => t = "merge"; +[@bs.send] external data : t => array('a) => t = "data"; +[@bs.send] external datum : t => array('a) => t = "datum"; +[@bs.send] external empty : t => unit => bool = "empty"; +[@bs.send] external size : t => int = "size"; + +[@bs.send] external enter : t => t = "enter"; +[@bs.send] external exit : t => t = "exit"; +[@bs.send] external text : t => string = "text"; + +[@bs.send] external callAxis : t => D3_Axis.t => t = "call"; diff --git a/drafts/bs-d3/src/JsDom.re b/drafts/bs-d3/src/JsDom.re new file mode 100644 index 0000000..a223fef --- /dev/null +++ b/drafts/bs-d3/src/JsDom.re @@ -0,0 +1,6 @@ +/* Quick'n dirty bindings to JsDom, for tests only */ + +[@bs.module "jsdom"] [@bs.new] external make : string => 'a = "JSDOM"; +[@bs.module "d3-selection"] external selectAny : 'a => D3.Selection.t = "select"; + +let attachD3 = dom => selectAny(dom##window##document##body); diff --git a/drafts/bs-d3/tasks.json b/drafts/bs-d3/tasks.json new file mode 100644 index 0000000..6e049a1 --- /dev/null +++ b/drafts/bs-d3/tasks.json @@ -0,0 +1,38 @@ +{ + "version": "0.1.0", + "command": "npm", + "options": { + "cwd": "${workspaceRoot}" + }, + "isShellCommand": true, + "args": [ + "run", + "watch" + ], + "showOutput": "always", + "isBackground": true, + "problemMatcher": { + "fileLocation": "absolute", + "owner": "ocaml", + "watching": { + "activeOnStart": false, + "beginsPattern": ">>>> Start compiling", + "endsPattern": ">>>> Finish compiling" + }, + "pattern": [ + { + "regexp": "^File \"(.*)\", line (\\d+)(?:, characters (\\d+)-(\\d+))?:$", + "file": 1, + "line": 2, + "column": 3, + "endColumn": 4 + }, + { + "regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\d+)?:)?\\s+(.*)$", + "severity": 1, + "message": 2, + "loop": true + } + ] + } +} \ No newline at end of file diff --git a/drafts/bs-d3/yarn.lock b/drafts/bs-d3/yarn.lock new file mode 100644 index 0000000..e9f424b --- /dev/null +++ b/drafts/bs-d3/yarn.lock @@ -0,0 +1,6669 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/core@^7.1.0", "@babel/core@^7.7.5": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" + integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.4" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.0" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.4.0", "@babel/generator@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" + integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== + dependencies: + "@babel/types" "^7.8.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== + +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.4" + "@babel/types" "^7.8.3" + +"@babel/highlight@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" + integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" + integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== + +"@babel/plugin-syntax-bigint@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" + integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-object-rest-spread@^7.0.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" + integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" + integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.8.4" + "@babel/types" "^7.8.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" + integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@cnakazawa/watch@^1.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" + integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== + dependencies: + exec-sh "^0.3.2" + minimist "^1.2.0" + +"@glennsl/bs-jest@0.4.9": + version "0.4.9" + resolved "https://registry.yarnpkg.com/@glennsl/bs-jest/-/bs-jest-0.4.9.tgz#a23af2668dda05947ce9c043fd5a7b295e91cef7" + integrity sha512-WAqXMcI6WL7JVvGdakBr1tcw8BYWXHrOZfuA1myMkFggzAv24H/OEwyqaU7x+yXd4cJaBUY8v3SjQ3Pnk/zqsg== + dependencies: + jest "^24.3.1" + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" + integrity sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" + integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== + +"@jest/console@^24.7.1", "@jest/console@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" + integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== + dependencies: + "@jest/source-map" "^24.9.0" + chalk "^2.0.1" + slash "^2.0.0" + +"@jest/console@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.1.0.tgz#1fc765d44a1e11aec5029c08e798246bd37075ab" + integrity sha512-3P1DpqAMK/L07ag/Y9/Jup5iDEG9P4pRAuZiMQnU0JB3UOvCyYCjCoxr7sIA80SeyUCUKrr24fKAxVpmBgQonA== + dependencies: + "@jest/source-map" "^25.1.0" + chalk "^3.0.0" + jest-util "^25.1.0" + slash "^3.0.0" + +"@jest/core@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.9.0.tgz#2ceccd0b93181f9c4850e74f2a9ad43d351369c4" + integrity sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A== + dependencies: + "@jest/console" "^24.7.1" + "@jest/reporters" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-changed-files "^24.9.0" + jest-config "^24.9.0" + jest-haste-map "^24.9.0" + jest-message-util "^24.9.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.9.0" + jest-resolve-dependencies "^24.9.0" + jest-runner "^24.9.0" + jest-runtime "^24.9.0" + jest-snapshot "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + jest-watcher "^24.9.0" + micromatch "^3.1.10" + p-each-series "^1.0.0" + realpath-native "^1.1.0" + rimraf "^2.5.4" + slash "^2.0.0" + strip-ansi "^5.0.0" + +"@jest/core@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.1.0.tgz#3d4634fc3348bb2d7532915d67781cdac0869e47" + integrity sha512-iz05+NmwCmZRzMXvMo6KFipW7nzhbpEawrKrkkdJzgytavPse0biEnCNr2wRlyCsp3SmKaEY+SGv7YWYQnIdig== + dependencies: + "@jest/console" "^25.1.0" + "@jest/reporters" "^25.1.0" + "@jest/test-result" "^25.1.0" + "@jest/transform" "^25.1.0" + "@jest/types" "^25.1.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + exit "^0.1.2" + graceful-fs "^4.2.3" + jest-changed-files "^25.1.0" + jest-config "^25.1.0" + jest-haste-map "^25.1.0" + jest-message-util "^25.1.0" + jest-regex-util "^25.1.0" + jest-resolve "^25.1.0" + jest-resolve-dependencies "^25.1.0" + jest-runner "^25.1.0" + jest-runtime "^25.1.0" + jest-snapshot "^25.1.0" + jest-util "^25.1.0" + jest-validate "^25.1.0" + jest-watcher "^25.1.0" + micromatch "^4.0.2" + p-each-series "^2.1.0" + realpath-native "^1.1.0" + rimraf "^3.0.0" + slash "^3.0.0" + strip-ansi "^6.0.0" + +"@jest/environment@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.9.0.tgz#21e3afa2d65c0586cbd6cbefe208bafade44ab18" + integrity sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ== + dependencies: + "@jest/fake-timers" "^24.9.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + jest-mock "^24.9.0" + +"@jest/environment@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.1.0.tgz#4a97f64770c9d075f5d2b662b5169207f0a3f787" + integrity sha512-cTpUtsjU4cum53VqBDlcW0E4KbQF03Cn0jckGPW/5rrE9tb+porD3+hhLtHAwhthsqfyF+bizyodTlsRA++sHg== + dependencies: + "@jest/fake-timers" "^25.1.0" + "@jest/types" "^25.1.0" + jest-mock "^25.1.0" + +"@jest/fake-timers@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" + integrity sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A== + dependencies: + "@jest/types" "^24.9.0" + jest-message-util "^24.9.0" + jest-mock "^24.9.0" + +"@jest/fake-timers@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.1.0.tgz#a1e0eff51ffdbb13ee81f35b52e0c1c11a350ce8" + integrity sha512-Eu3dysBzSAO1lD7cylZd/CVKdZZ1/43SF35iYBNV1Lvvn2Undp3Grwsv8PrzvbLhqwRzDd4zxrY4gsiHc+wygQ== + dependencies: + "@jest/types" "^25.1.0" + jest-message-util "^25.1.0" + jest-mock "^25.1.0" + jest-util "^25.1.0" + lolex "^5.0.0" + +"@jest/reporters@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.9.0.tgz#86660eff8e2b9661d042a8e98a028b8d631a5b43" + integrity sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw== + dependencies: + "@jest/environment" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.2" + istanbul-lib-coverage "^2.0.2" + istanbul-lib-instrument "^3.0.1" + istanbul-lib-report "^2.0.4" + istanbul-lib-source-maps "^3.0.1" + istanbul-reports "^2.2.6" + jest-haste-map "^24.9.0" + jest-resolve "^24.9.0" + jest-runtime "^24.9.0" + jest-util "^24.9.0" + jest-worker "^24.6.0" + node-notifier "^5.4.2" + slash "^2.0.0" + source-map "^0.6.0" + string-length "^2.0.0" + +"@jest/reporters@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.1.0.tgz#9178ecf136c48f125674ac328f82ddea46e482b0" + integrity sha512-ORLT7hq2acJQa8N+NKfs68ZtHFnJPxsGqmofxW7v7urVhzJvpKZG9M7FAcgh9Ee1ZbCteMrirHA3m5JfBtAaDg== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@jest/console" "^25.1.0" + "@jest/environment" "^25.1.0" + "@jest/test-result" "^25.1.0" + "@jest/transform" "^25.1.0" + "@jest/types" "^25.1.0" + chalk "^3.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.2" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-instrument "^4.0.0" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.0" + jest-haste-map "^25.1.0" + jest-resolve "^25.1.0" + jest-runtime "^25.1.0" + jest-util "^25.1.0" + jest-worker "^25.1.0" + slash "^3.0.0" + source-map "^0.6.0" + string-length "^3.1.0" + terminal-link "^2.0.0" + v8-to-istanbul "^4.0.1" + optionalDependencies: + node-notifier "^6.0.0" + +"@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" + integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.1.15" + source-map "^0.6.0" + +"@jest/source-map@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.1.0.tgz#b012e6c469ccdbc379413f5c1b1ffb7ba7034fb0" + integrity sha512-ohf2iKT0xnLWcIUhL6U6QN+CwFWf9XnrM2a6ybL9NXxJjgYijjLSitkYHIdzkd8wFliH73qj/+epIpTiWjRtAA== + dependencies: + callsites "^3.0.0" + graceful-fs "^4.2.3" + source-map "^0.6.0" + +"@jest/test-result@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" + integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== + dependencies: + "@jest/console" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/istanbul-lib-coverage" "^2.0.0" + +"@jest/test-result@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.1.0.tgz#847af2972c1df9822a8200457e64be4ff62821f7" + integrity sha512-FZzSo36h++U93vNWZ0KgvlNuZ9pnDnztvaM7P/UcTx87aPDotG18bXifkf1Ji44B7k/eIatmMzkBapnAzjkJkg== + dependencies: + "@jest/console" "^25.1.0" + "@jest/transform" "^25.1.0" + "@jest/types" "^25.1.0" + "@types/istanbul-lib-coverage" "^2.0.0" + collect-v8-coverage "^1.0.0" + +"@jest/test-sequencer@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz#f8f334f35b625a4f2f355f2fe7e6036dad2e6b31" + integrity sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A== + dependencies: + "@jest/test-result" "^24.9.0" + jest-haste-map "^24.9.0" + jest-runner "^24.9.0" + jest-runtime "^24.9.0" + +"@jest/test-sequencer@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.1.0.tgz#4df47208542f0065f356fcdb80026e3c042851ab" + integrity sha512-WgZLRgVr2b4l/7ED1J1RJQBOharxS11EFhmwDqknpknE0Pm87HLZVS2Asuuw+HQdfQvm2aXL2FvvBLxOD1D0iw== + dependencies: + "@jest/test-result" "^25.1.0" + jest-haste-map "^25.1.0" + jest-runner "^25.1.0" + jest-runtime "^25.1.0" + +"@jest/transform@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.9.0.tgz#4ae2768b296553fadab09e9ec119543c90b16c56" + integrity sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^24.9.0" + babel-plugin-istanbul "^5.1.0" + chalk "^2.0.1" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.1.15" + jest-haste-map "^24.9.0" + jest-regex-util "^24.9.0" + jest-util "^24.9.0" + micromatch "^3.1.10" + pirates "^4.0.1" + realpath-native "^1.1.0" + slash "^2.0.0" + source-map "^0.6.1" + write-file-atomic "2.4.1" + +"@jest/transform@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.1.0.tgz#221f354f512b4628d88ce776d5b9e601028ea9da" + integrity sha512-4ktrQ2TPREVeM+KxB4zskAT84SnmG1vaz4S+51aTefyqn3zocZUnliLLm5Fsl85I3p/kFPN4CRp1RElIfXGegQ== + dependencies: + "@babel/core" "^7.1.0" + "@jest/types" "^25.1.0" + babel-plugin-istanbul "^6.0.0" + chalk "^3.0.0" + convert-source-map "^1.4.0" + fast-json-stable-stringify "^2.0.0" + graceful-fs "^4.2.3" + jest-haste-map "^25.1.0" + jest-regex-util "^25.1.0" + jest-util "^25.1.0" + micromatch "^4.0.2" + pirates "^4.0.1" + realpath-native "^1.1.0" + slash "^3.0.0" + source-map "^0.6.1" + write-file-atomic "^3.0.0" + +"@jest/types@^24.9.0": + version "24.9.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" + integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^13.0.0" + +"@jest/types@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.1.0.tgz#b26831916f0d7c381e11dbb5e103a72aed1b4395" + integrity sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + +"@sinonjs/commons@^1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.1.tgz#da5fd19a5f71177a53778073978873964f49acf1" + integrity sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ== + dependencies: + type-detect "4.0.8" + +"@types/babel__core@^7.1.0": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.5.tgz#e4d84704b4df868b3ad538365a13da2fa6dbc023" + integrity sha512-+ckxwNj892FWgvwrUWLOghQ2JDgOgeqTPwrcl+0t1pG59CP8qMJ6S/efmEd999vCFSJKOpyMakvU+w380rduUQ== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.1" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" + integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" + integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.9.tgz#be82fab304b141c3eee81a4ce3b034d0eba1590a" + integrity sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw== + dependencies: + "@babel/types" "^7.3.0" + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" + integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== + +"@types/istanbul-lib-report@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" + integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== + dependencies: + "@types/istanbul-lib-coverage" "*" + "@types/istanbul-lib-report" "*" + +"@types/stack-utils@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" + integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== + +"@types/yargs-parser@*": + version "15.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" + integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== + +"@types/yargs@^13.0.0": + version "13.0.8" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.8.tgz#a38c22def2f1c2068f8971acb3ea734eb3c64a99" + integrity sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA== + dependencies: + "@types/yargs-parser" "*" + +"@types/yargs@^15.0.0": + version "15.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.3.tgz#41453a0bc7ab393e995d1f5451455638edbd2baf" + integrity sha512-XCMQRK6kfpNBixHLyHUsGmXrpEmFFxzMrcnSXFMziHd8CoNJo8l16FkHyQq4x+xbM7E2XL83/O78OD8u+iZTdQ== + dependencies: + "@types/yargs-parser" "*" + +"@webassemblyjs/ast@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" + integrity sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ== + dependencies: + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/wast-parser" "1.8.5" + +"@webassemblyjs/floating-point-hex-parser@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz#1ba926a2923613edce496fd5b02e8ce8a5f49721" + integrity sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ== + +"@webassemblyjs/helper-api-error@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz#c49dad22f645227c5edb610bdb9697f1aab721f7" + integrity sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA== + +"@webassemblyjs/helper-buffer@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz#fea93e429863dd5e4338555f42292385a653f204" + integrity sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q== + +"@webassemblyjs/helper-code-frame@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz#9a740ff48e3faa3022b1dff54423df9aa293c25e" + integrity sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ== + dependencies: + "@webassemblyjs/wast-printer" "1.8.5" + +"@webassemblyjs/helper-fsm@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz#ba0b7d3b3f7e4733da6059c9332275d860702452" + integrity sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow== + +"@webassemblyjs/helper-module-context@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz#def4b9927b0101dc8cbbd8d1edb5b7b9c82eb245" + integrity sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g== + dependencies: + "@webassemblyjs/ast" "1.8.5" + mamacro "^0.0.3" + +"@webassemblyjs/helper-wasm-bytecode@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz#537a750eddf5c1e932f3744206551c91c1b93e61" + integrity sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ== + +"@webassemblyjs/helper-wasm-section@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz#74ca6a6bcbe19e50a3b6b462847e69503e6bfcbf" + integrity sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-buffer" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/wasm-gen" "1.8.5" + +"@webassemblyjs/ieee754@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz#712329dbef240f36bf57bd2f7b8fb9bf4154421e" + integrity sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.8.5.tgz#044edeb34ea679f3e04cd4fd9824d5e35767ae10" + integrity sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.8.5.tgz#a8bf3b5d8ffe986c7c1e373ccbdc2a0915f0cedc" + integrity sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw== + +"@webassemblyjs/wasm-edit@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz#962da12aa5acc1c131c81c4232991c82ce56e01a" + integrity sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-buffer" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/helper-wasm-section" "1.8.5" + "@webassemblyjs/wasm-gen" "1.8.5" + "@webassemblyjs/wasm-opt" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + "@webassemblyjs/wast-printer" "1.8.5" + +"@webassemblyjs/wasm-gen@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz#54840766c2c1002eb64ed1abe720aded714f98bc" + integrity sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/ieee754" "1.8.5" + "@webassemblyjs/leb128" "1.8.5" + "@webassemblyjs/utf8" "1.8.5" + +"@webassemblyjs/wasm-opt@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz#b24d9f6ba50394af1349f510afa8ffcb8a63d264" + integrity sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-buffer" "1.8.5" + "@webassemblyjs/wasm-gen" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + +"@webassemblyjs/wasm-parser@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz#21576f0ec88b91427357b8536383668ef7c66b8d" + integrity sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-api-error" "1.8.5" + "@webassemblyjs/helper-wasm-bytecode" "1.8.5" + "@webassemblyjs/ieee754" "1.8.5" + "@webassemblyjs/leb128" "1.8.5" + "@webassemblyjs/utf8" "1.8.5" + +"@webassemblyjs/wast-parser@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz#e10eecd542d0e7bd394f6827c49f3df6d4eefb8c" + integrity sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/floating-point-hex-parser" "1.8.5" + "@webassemblyjs/helper-api-error" "1.8.5" + "@webassemblyjs/helper-code-frame" "1.8.5" + "@webassemblyjs/helper-fsm" "1.8.5" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.8.5": + version "1.8.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz#114bbc481fd10ca0e23b3560fa812748b0bae5bc" + integrity sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/wast-parser" "1.8.5" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abab@^2.0.0, abab@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" + integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== + +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-globals@^4.1.0, acorn-globals@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" + integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== + dependencies: + acorn "^6.0.1" + acorn-walk "^6.0.1" + +acorn-walk@^6.0.1, acorn-walk@^6.1.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" + integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== + +acorn@^5.5.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.1: + version "6.4.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" + integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw== + +acorn@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" + integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== + +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" + integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== + +ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: + version "6.11.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" + integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.2.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d" + integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg== + dependencies: + type-fest "^0.8.1" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.0.0, ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" + integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== + +babel-jest@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54" + integrity sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw== + dependencies: + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/babel__core" "^7.1.0" + babel-plugin-istanbul "^5.1.0" + babel-preset-jest "^24.9.0" + chalk "^2.4.2" + slash "^2.0.0" + +babel-jest@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.1.0.tgz#206093ac380a4b78c4404a05b3277391278f80fb" + integrity sha512-tz0VxUhhOE2y+g8R2oFrO/2VtVjA1lkJeavlhExuRBg3LdNJY9gwQ+Vcvqt9+cqy71MCTJhewvTB7Qtnnr9SWg== + dependencies: + "@jest/transform" "^25.1.0" + "@jest/types" "^25.1.0" + "@types/babel__core" "^7.1.0" + babel-plugin-istanbul "^6.0.0" + babel-preset-jest "^25.1.0" + chalk "^3.0.0" + slash "^3.0.0" + +babel-plugin-istanbul@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" + integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + find-up "^3.0.0" + istanbul-lib-instrument "^3.3.0" + test-exclude "^5.2.3" + +babel-plugin-istanbul@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" + integrity sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-instrument "^4.0.0" + test-exclude "^6.0.0" + +babel-plugin-jest-hoist@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz#4f837091eb407e01447c8843cbec546d0002d756" + integrity sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw== + dependencies: + "@types/babel__traverse" "^7.0.6" + +babel-plugin-jest-hoist@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.1.0.tgz#fb62d7b3b53eb36c97d1bc7fec2072f9bd115981" + integrity sha512-oIsopO41vW4YFZ9yNYoLQATnnN46lp+MZ6H4VvPKFkcc2/fkl3CfE/NZZSmnEIEsJRmJAgkVEK0R7Zbl50CpTw== + dependencies: + "@types/babel__traverse" "^7.0.6" + +babel-preset-jest@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc" + integrity sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg== + dependencies: + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + babel-plugin-jest-hoist "^24.9.0" + +babel-preset-jest@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.1.0.tgz#d0aebfebb2177a21cde710996fce8486d34f1d33" + integrity sha512-eCGn64olaqwUMaugXsTtGAM2I0QTahjEtnRu0ql8Ie+gDWAc1N6wqN0k2NilnyTunM69Pad7gJY7LOtwLimoFQ== + dependencies: + "@babel/plugin-syntax-bigint" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + babel-plugin-jest-hoist "^25.1.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bfj@^6.1.1: + version "6.1.2" + resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f" + integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw== + dependencies: + bluebird "^3.5.5" + check-types "^8.0.3" + hoopy "^0.1.4" + tryer "^1.0.1" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-process-hrtime@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" + integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== + +browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== + dependencies: + resolve "1.1.7" + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +bs-platform@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.1.1.tgz#ed4032de7ab15158c61d8994680a05393e3ddd74" + integrity sha512-ckZHR3J+yxyEKXOBHX8+hfzWG2XX5BxhQ4Iw9lulHFGYdAm9Ep9LgKkIah7G6RYADLmVfTxFE48igvY3kkkl+g== + +bser@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" + integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== + dependencies: + node-int64 "^0.4.0" + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cacache@^12.0.2: + version "12.0.3" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" + integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +capture-exit@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" + integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== + dependencies: + rsvp "^4.8.4" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-types@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552" + integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ== + +chokidar@^2.0.2: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chrome-trace-event@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== + dependencies: + tslib "^1.9.0" + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +collect-v8-coverage@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.0.tgz#150ee634ac3650b71d9c985eb7f608942334feb1" + integrity sha512-VKIhJgvk8E1W28m5avZ2Gv2Ruv5YiF56ug2oclvaG9md69BuZImMG2sk9g7QNKLUbtYAKQjXjYxbYZVUlMMKmQ== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@2, commander@^2.18.0, commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@6.0.5, cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" + integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0", cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssom@^0.4.1, cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" + integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + +cssstyle@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" + integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== + dependencies: + cssom "0.3.x" + +cssstyle@^2.0.0, cssstyle@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.2.0.tgz#e4c44debccd6b7911ed617a4395e5754bba59992" + integrity sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA== + dependencies: + cssom "~0.3.6" + +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + +d3-array@1, d3-array@^1.1.1, d3-array@^1.2.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.4.tgz#635ce4d5eea759f6f605863dbcfc30edc737f71f" + integrity sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw== + +d3-axis@1: + version "1.0.12" + resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-1.0.12.tgz#cdf20ba210cfbb43795af33756886fb3638daac9" + integrity sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ== + +d3-brush@1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-1.1.5.tgz#066b8e84d17b192986030446c97c0fba7e1bacdc" + integrity sha512-rEaJ5gHlgLxXugWjIkolTA0OyMvw8UWU1imYXy1v642XyyswmI1ybKOv05Ft+ewq+TFmdliD3VuK0pRp1VT/5A== + dependencies: + d3-dispatch "1" + d3-drag "1" + d3-interpolate "1" + d3-selection "1" + d3-transition "1" + +d3-chord@1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-1.0.6.tgz#309157e3f2db2c752f0280fedd35f2067ccbb15f" + integrity sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA== + dependencies: + d3-array "1" + d3-path "1" + +d3-collection@1: + version "1.0.7" + resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.7.tgz#349bd2aa9977db071091c13144d5e4f16b5b310e" + integrity sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A== + +d3-color@1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.4.0.tgz#89c45a995ed773b13314f06460df26d60ba0ecaf" + integrity sha512-TzNPeJy2+iEepfiL92LAAB7fvnp/dV2YwANPVHdDWmYMm23qIJBYww3qT8I8C1wXrmrg4UWs7BKc2tKIgyjzHg== + +d3-contour@1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.3.2.tgz#652aacd500d2264cb3423cee10db69f6f59bead3" + integrity sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg== + dependencies: + d3-array "^1.1.1" + +d3-dispatch@1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.6.tgz#00d37bcee4dd8cd97729dd893a0ac29caaba5d58" + integrity sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA== + +d3-drag@1: + version "1.2.5" + resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-1.2.5.tgz#2537f451acd39d31406677b7dc77c82f7d988f70" + integrity sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w== + dependencies: + d3-dispatch "1" + d3-selection "1" + +d3-dsv@1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-1.2.0.tgz#9d5f75c3a5f8abd611f74d3f5847b0d4338b885c" + integrity sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g== + dependencies: + commander "2" + iconv-lite "0.4" + rw "1" + +d3-ease@1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.6.tgz#ebdb6da22dfac0a22222f2d4da06f66c416a0ec0" + integrity sha512-SZ/lVU7LRXafqp7XtIcBdxnWl8yyLpgOmzAk0mWBI9gXNzLDx5ybZgnRbH9dN/yY5tzVBqCQ9avltSnqVwessQ== + +d3-fetch@1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-1.1.2.tgz#957c8fbc6d4480599ba191b1b2518bf86b3e1be2" + integrity sha512-S2loaQCV/ZeyTyIF2oP8D1K9Z4QizUzW7cWeAOAS4U88qOt3Ucf6GsmgthuYSdyB2HyEm4CeGvkQxWsmInsIVA== + dependencies: + d3-dsv "1" + +d3-force@1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.2.1.tgz#fd29a5d1ff181c9e7f0669e4bd72bdb0e914ec0b" + integrity sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg== + dependencies: + d3-collection "1" + d3-dispatch "1" + d3-quadtree "1" + d3-timer "1" + +d3-format@1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.4.3.tgz#4e8eb4dff3fdcb891a8489ec6e698601c41b96f1" + integrity sha512-mm/nE2Y9HgGyjP+rKIekeITVgBtX97o1nrvHCWX8F/yBYyevUTvu9vb5pUnKwrcSw7o7GuwMOWjS9gFDs4O+uQ== + +d3-geo@1: + version "1.11.9" + resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.11.9.tgz#77eaed14ba62fc2c0aef55cd2943849c866f7ae6" + integrity sha512-9edcH6J3s/Aa3KJITWqFJbyB/8q3mMlA9Fi7z6yy+FAYMnRaxmC7jBhUnsINxVWD14GmqX3DK8uk7nV6/Ekt4A== + dependencies: + d3-array "1" + +d3-hierarchy@1: + version "1.1.9" + resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz#2f6bee24caaea43f8dc37545fa01628559647a83" + integrity sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ== + +d3-interpolate@1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.4.0.tgz#526e79e2d80daa383f9e0c1c1c7dcc0f0583e987" + integrity sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA== + dependencies: + d3-color "1" + +d3-path@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" + integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== + +d3-polygon@1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-1.0.6.tgz#0bf8cb8180a6dc107f518ddf7975e12abbfbd38e" + integrity sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ== + +d3-quadtree@1: + version "1.0.7" + resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-1.0.7.tgz#ca8b84df7bb53763fe3c2f24bd435137f4e53135" + integrity sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA== + +d3-random@1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-1.1.2.tgz#2833be7c124360bf9e2d3fd4f33847cfe6cab291" + integrity sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ== + +d3-scale-chromatic@1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.5.0.tgz#54e333fc78212f439b14641fb55801dd81135a98" + integrity sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg== + dependencies: + d3-color "1" + d3-interpolate "1" + +d3-scale@2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-2.2.2.tgz#4e880e0b2745acaaddd3ede26a9e908a9e17b81f" + integrity sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw== + dependencies: + d3-array "^1.2.0" + d3-collection "1" + d3-format "1" + d3-interpolate "1" + d3-time "1" + d3-time-format "2" + +d3-selection@1, d3-selection@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.4.1.tgz#98eedbbe085fbda5bafa2f9e3f3a2f4d7d622a98" + integrity sha512-BTIbRjv/m5rcVTfBs4AMBLKs4x8XaaLkwm28KWu9S2vKNqXkXt2AH2Qf0sdPZHjFxcWg/YL53zcqAz+3g4/7PA== + +d3-shape@1: + version "1.3.7" + resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" + integrity sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw== + dependencies: + d3-path "1" + +d3-time-format@2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-2.2.3.tgz#0c9a12ee28342b2037e5ea1cf0b9eb4dd75f29cb" + integrity sha512-RAHNnD8+XvC4Zc4d2A56Uw0yJoM7bsvOlJR33bclxq399Rak/b9bhvu/InjxdWhPtkgU53JJcleJTGkNRnN6IA== + dependencies: + d3-time "1" + +d3-time@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.1.0.tgz#b1e19d307dae9c900b7e5b25ffc5dcc249a8a0f1" + integrity sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA== + +d3-timer@1: + version "1.0.10" + resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-1.0.10.tgz#dfe76b8a91748831b13b6d9c793ffbd508dd9de5" + integrity sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw== + +d3-transition@1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-1.3.2.tgz#a98ef2151be8d8600543434c1ca80140ae23b398" + integrity sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA== + dependencies: + d3-color "1" + d3-dispatch "1" + d3-ease "1" + d3-interpolate "1" + d3-selection "^1.1.0" + d3-timer "1" + +d3-voronoi@1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.4.tgz#dd3c78d7653d2bb359284ae478645d95944c8297" + integrity sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg== + +d3-zoom@1: + version "1.8.3" + resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-1.8.3.tgz#b6a3dbe738c7763121cd05b8a7795ffe17f4fc0a" + integrity sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ== + dependencies: + d3-dispatch "1" + d3-drag "1" + d3-interpolate "1" + d3-selection "1" + d3-transition "1" + +d3@5.15.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/d3/-/d3-5.15.0.tgz#ffd44958e6a3cb8a59a84429c45429b8bca5677a" + integrity sha512-C+E80SL2nLLtmykZ6klwYj5rPqB5nlfN5LdWEAVdWPppqTD8taoJi2PxLZjPeYT8FFRR2yucXq+kBlOnnvZeLg== + dependencies: + d3-array "1" + d3-axis "1" + d3-brush "1" + d3-chord "1" + d3-collection "1" + d3-color "1" + d3-contour "1" + d3-dispatch "1" + d3-drag "1" + d3-dsv "1" + d3-ease "1" + d3-fetch "1" + d3-force "1" + d3-format "1" + d3-geo "1" + d3-hierarchy "1" + d3-interpolate "1" + d3-path "1" + d3-polygon "1" + d3-quadtree "1" + d3-random "1" + d3-scale "2" + d3-scale-chromatic "1" + d3-selection "1" + d3-shape "1" + d3-time "1" + d3-time-format "2" + d3-timer "1" + d3-transition "1" + d3-voronoi "1" + d3-zoom "1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +data-urls@^1.0.0, data-urls@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== + dependencies: + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" + +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decimal.js@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.0.tgz#39466113a9e036111d02f82489b5fd6b0b5ed231" + integrity sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw== + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + +detect-newline@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= + +detect-newline@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" + integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== + +diff-sequences@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" + integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== + +diff-sequences@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.1.0.tgz#fd29a46f1c913fd66c22645dc75bffbe43051f32" + integrity sha512-nFIfVk5B/NStCsJ+zaPO4vYuLjlzQ6uFvPxzYyHlejNZ/UGa7G/n7peOXVrVNvRuyfstt+mZQYGpjxg9Z6N8Kw== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + +domexception@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== + dependencies: + webidl-conversions "^4.0.2" + +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +ejs@^2.6.1: + version "2.7.4" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" + integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== + +elliptic@^6.0.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + +enhanced-resolve@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" + integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + dependencies: + prr "~1.0.1" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.17.0-next.1, es-abstract@^1.17.2: + version "1.17.4" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.4.tgz#e3aedf19706b20e7c2594c35fc0d57605a79e184" + integrity sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.11.1, escodegen@^1.12.1, escodegen@^1.9.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" + integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +events@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" + integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +exec-sh@^0.3.2: + version "0.3.4" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" + integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^3.2.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-3.4.0.tgz#c08ed4550ef65d858fac269ffc8572446f37eb89" + integrity sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + p-finally "^2.0.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +exit@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= + dependencies: + homedir-polyfill "^1.0.1" + +expect@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca" + integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q== + dependencies: + "@jest/types" "^24.9.0" + ansi-styles "^3.2.0" + jest-get-type "^24.9.0" + jest-matcher-utils "^24.9.0" + jest-message-util "^24.9.0" + jest-regex-util "^24.9.0" + +expect@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-25.1.0.tgz#7e8d7b06a53f7d66ec927278db3304254ee683ee" + integrity sha512-wqHzuoapQkhc3OKPlrpetsfueuEiMf3iWh0R8+duCu9PIjXoP7HgD5aeypwTnXUAjC8aMsiVDaWwlbJ1RlQ38g== + dependencies: + "@jest/types" "^25.1.0" + ansi-styles "^4.0.0" + jest-get-type "^25.1.0" + jest-matcher-utils "^25.1.0" + jest-message-util "^25.1.0" + jest-regex-util "^25.1.0" + +express@^4.16.3: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fb-watchman@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" + integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== + dependencies: + bser "2.1.1" + +figgy-pudding@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" + integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +filesize@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +findup-sync@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.11" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.11.tgz#67bf57f4758f02ede88fb2a1712fef4d15358be3" + integrity sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= + +gzip-size@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== + dependencies: + duplexer "^0.1.1" + pify "^4.0.1" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +hoopy@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" + integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== + +hosted-git-info@^2.1.4: + version "2.8.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" + integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + +html-encoding-sniffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== + dependencies: + whatwg-encoding "^1.0.1" + +html-encoding-sniffer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.0.tgz#70b3b69bb5999f35d0d4495d79079f35630e71ae" + integrity sha512-Y9prnPKkM7FXxQevZ5UH8Z6aVTY0ede1tHquck5UxGmKWDshxXh95gSa2xXYjS8AsGO5iOvrCI5+GttRKnLdNA== + dependencies: + whatwg-encoding "^1.0.5" + +html-escaper@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.0.tgz#71e87f931de3fe09e56661ab9a29aadec707b491" + integrity sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + +iconv-lite@0.4, iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +import-local@2.0.0, import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + +import-local@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" + integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +infer-owner@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@^1.3.4, ini@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +interpret@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== + +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + +ipaddr.js@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" + integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-generator-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" + integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.1, is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +is-wsl@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" + integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" + integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== + +istanbul-lib-coverage@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" + integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== + +istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" + integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== + dependencies: + "@babel/generator" "^7.4.0" + "@babel/parser" "^7.4.3" + "@babel/template" "^7.4.0" + "@babel/traverse" "^7.4.3" + "@babel/types" "^7.4.0" + istanbul-lib-coverage "^2.0.5" + semver "^6.0.0" + +istanbul-lib-instrument@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" + integrity sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg== + dependencies: + "@babel/core" "^7.7.5" + "@babel/parser" "^7.7.5" + "@babel/template" "^7.7.4" + "@babel/traverse" "^7.7.4" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + +istanbul-lib-report@^2.0.4: + version "2.0.8" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" + integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== + dependencies: + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + supports-color "^6.1.0" + +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^3.0.1: + version "3.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" + integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^2.0.5" + make-dir "^2.1.0" + rimraf "^2.6.3" + source-map "^0.6.1" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" + integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^2.2.6: + version "2.2.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.7.tgz#5d939f6237d7b48393cc0959eab40cd4fd056931" + integrity sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg== + dependencies: + html-escaper "^2.0.0" + +istanbul-reports@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.0.tgz#d4d16d035db99581b6194e119bbf36c963c5eb70" + integrity sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +jest-changed-files@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.9.0.tgz#08d8c15eb79a7fa3fc98269bc14b451ee82f8039" + integrity sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg== + dependencies: + "@jest/types" "^24.9.0" + execa "^1.0.0" + throat "^4.0.0" + +jest-changed-files@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.1.0.tgz#73dae9a7d9949fdfa5c278438ce8f2ff3ec78131" + integrity sha512-bdL1aHjIVy3HaBO3eEQeemGttsq1BDlHgWcOjEOIAcga7OOEGWHD2WSu8HhL7I1F0mFFyci8VKU4tRNk+qtwDA== + dependencies: + "@jest/types" "^25.1.0" + execa "^3.2.0" + throat "^5.0.0" + +jest-cli@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.9.0.tgz#ad2de62d07472d419c6abc301fc432b98b10d2af" + integrity sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg== + dependencies: + "@jest/core" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + exit "^0.1.2" + import-local "^2.0.0" + is-ci "^2.0.0" + jest-config "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + prompts "^2.0.1" + realpath-native "^1.1.0" + yargs "^13.3.0" + +jest-cli@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.1.0.tgz#75f0b09cf6c4f39360906bf78d580be1048e4372" + integrity sha512-p+aOfczzzKdo3AsLJlhs8J5EW6ffVidfSZZxXedJ0mHPBOln1DccqFmGCoO8JWd4xRycfmwy1eoQkMsF8oekPg== + dependencies: + "@jest/core" "^25.1.0" + "@jest/test-result" "^25.1.0" + "@jest/types" "^25.1.0" + chalk "^3.0.0" + exit "^0.1.2" + import-local "^3.0.2" + is-ci "^2.0.0" + jest-config "^25.1.0" + jest-util "^25.1.0" + jest-validate "^25.1.0" + prompts "^2.0.1" + realpath-native "^1.1.0" + yargs "^15.0.0" + +jest-config@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.9.0.tgz#fb1bbc60c73a46af03590719efa4825e6e4dd1b5" + integrity sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^24.9.0" + "@jest/types" "^24.9.0" + babel-jest "^24.9.0" + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^24.9.0" + jest-environment-node "^24.9.0" + jest-get-type "^24.9.0" + jest-jasmine2 "^24.9.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + micromatch "^3.1.10" + pretty-format "^24.9.0" + realpath-native "^1.1.0" + +jest-config@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.1.0.tgz#d114e4778c045d3ef239452213b7ad3ec1cbea90" + integrity sha512-tLmsg4SZ5H7tuhBC5bOja0HEblM0coS3Wy5LTCb2C8ZV6eWLewHyK+3qSq9Bi29zmWQ7ojdCd3pxpx4l4d2uGw== + dependencies: + "@babel/core" "^7.1.0" + "@jest/test-sequencer" "^25.1.0" + "@jest/types" "^25.1.0" + babel-jest "^25.1.0" + chalk "^3.0.0" + glob "^7.1.1" + jest-environment-jsdom "^25.1.0" + jest-environment-node "^25.1.0" + jest-get-type "^25.1.0" + jest-jasmine2 "^25.1.0" + jest-regex-util "^25.1.0" + jest-resolve "^25.1.0" + jest-util "^25.1.0" + jest-validate "^25.1.0" + micromatch "^4.0.2" + pretty-format "^25.1.0" + realpath-native "^1.1.0" + +jest-diff@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" + integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== + dependencies: + chalk "^2.0.1" + diff-sequences "^24.9.0" + jest-get-type "^24.9.0" + pretty-format "^24.9.0" + +jest-diff@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.1.0.tgz#58b827e63edea1bc80c1de952b80cec9ac50e1ad" + integrity sha512-nepXgajT+h017APJTreSieh4zCqnSHEJ1iT8HDlewu630lSJ4Kjjr9KNzm+kzGwwcpsDE6Snx1GJGzzsefaEHw== + dependencies: + chalk "^3.0.0" + diff-sequences "^25.1.0" + jest-get-type "^25.1.0" + pretty-format "^25.1.0" + +jest-docblock@^24.3.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.9.0.tgz#7970201802ba560e1c4092cc25cbedf5af5a8ce2" + integrity sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA== + dependencies: + detect-newline "^2.1.0" + +jest-docblock@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.1.0.tgz#0f44bea3d6ca6dfc38373d465b347c8818eccb64" + integrity sha512-370P/mh1wzoef6hUKiaMcsPtIapY25suP6JqM70V9RJvdKLrV4GaGbfUseUVk4FZJw4oTZ1qSCJNdrClKt5JQA== + dependencies: + detect-newline "^3.0.0" + +jest-each@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.9.0.tgz#eb2da602e2a610898dbc5f1f6df3ba86b55f8b05" + integrity sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog== + dependencies: + "@jest/types" "^24.9.0" + chalk "^2.0.1" + jest-get-type "^24.9.0" + jest-util "^24.9.0" + pretty-format "^24.9.0" + +jest-each@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.1.0.tgz#a6b260992bdf451c2d64a0ccbb3ac25e9b44c26a" + integrity sha512-R9EL8xWzoPySJ5wa0DXFTj7NrzKpRD40Jy+zQDp3Qr/2QmevJgkN9GqioCGtAJ2bW9P/MQRznQHQQhoeAyra7A== + dependencies: + "@jest/types" "^25.1.0" + chalk "^3.0.0" + jest-get-type "^25.1.0" + jest-util "^25.1.0" + pretty-format "^25.1.0" + +jest-environment-jsdom@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz#4b0806c7fc94f95edb369a69cc2778eec2b7375b" + integrity sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA== + dependencies: + "@jest/environment" "^24.9.0" + "@jest/fake-timers" "^24.9.0" + "@jest/types" "^24.9.0" + jest-mock "^24.9.0" + jest-util "^24.9.0" + jsdom "^11.5.1" + +jest-environment-jsdom@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.1.0.tgz#6777ab8b3e90fd076801efd3bff8e98694ab43c3" + integrity sha512-ILb4wdrwPAOHX6W82GGDUiaXSSOE274ciuov0lztOIymTChKFtC02ddyicRRCdZlB5YSrv3vzr1Z5xjpEe1OHQ== + dependencies: + "@jest/environment" "^25.1.0" + "@jest/fake-timers" "^25.1.0" + "@jest/types" "^25.1.0" + jest-mock "^25.1.0" + jest-util "^25.1.0" + jsdom "^15.1.1" + +jest-environment-node@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.9.0.tgz#333d2d2796f9687f2aeebf0742b519f33c1cbfd3" + integrity sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA== + dependencies: + "@jest/environment" "^24.9.0" + "@jest/fake-timers" "^24.9.0" + "@jest/types" "^24.9.0" + jest-mock "^24.9.0" + jest-util "^24.9.0" + +jest-environment-node@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.1.0.tgz#797bd89b378cf0bd794dc8e3dca6ef21126776db" + integrity sha512-U9kFWTtAPvhgYY5upnH9rq8qZkj6mYLup5l1caAjjx9uNnkLHN2xgZy5mo4SyLdmrh/EtB9UPpKFShvfQHD0Iw== + dependencies: + "@jest/environment" "^25.1.0" + "@jest/fake-timers" "^25.1.0" + "@jest/types" "^25.1.0" + jest-mock "^25.1.0" + jest-util "^25.1.0" + +jest-get-type@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" + integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== + +jest-get-type@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.1.0.tgz#1cfe5fc34f148dc3a8a3b7275f6b9ce9e2e8a876" + integrity sha512-yWkBnT+5tMr8ANB6V+OjmrIJufHtCAqI5ic2H40v+tRqxDmE0PGnIiTyvRWFOMtmVHYpwRqyazDbTnhpjsGvLw== + +jest-haste-map@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" + integrity sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ== + dependencies: + "@jest/types" "^24.9.0" + anymatch "^2.0.0" + fb-watchman "^2.0.0" + graceful-fs "^4.1.15" + invariant "^2.2.4" + jest-serializer "^24.9.0" + jest-util "^24.9.0" + jest-worker "^24.9.0" + micromatch "^3.1.10" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^1.2.7" + +jest-haste-map@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.1.0.tgz#ae12163d284f19906260aa51fd405b5b2e5a4ad3" + integrity sha512-/2oYINIdnQZAqyWSn1GTku571aAfs8NxzSErGek65Iu5o8JYb+113bZysRMcC/pjE5v9w0Yz+ldbj9NxrFyPyw== + dependencies: + "@jest/types" "^25.1.0" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.3" + jest-serializer "^25.1.0" + jest-util "^25.1.0" + jest-worker "^25.1.0" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.1.2" + +jest-jasmine2@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz#1f7b1bd3242c1774e62acabb3646d96afc3be6a0" + integrity sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + co "^4.6.0" + expect "^24.9.0" + is-generator-fn "^2.0.0" + jest-each "^24.9.0" + jest-matcher-utils "^24.9.0" + jest-message-util "^24.9.0" + jest-runtime "^24.9.0" + jest-snapshot "^24.9.0" + jest-util "^24.9.0" + pretty-format "^24.9.0" + throat "^4.0.0" + +jest-jasmine2@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.1.0.tgz#681b59158a430f08d5d0c1cce4f01353e4b48137" + integrity sha512-GdncRq7jJ7sNIQ+dnXvpKO2MyP6j3naNK41DTTjEAhLEdpImaDA9zSAZwDhijjSF/D7cf4O5fdyUApGBZleaEg== + dependencies: + "@babel/traverse" "^7.1.0" + "@jest/environment" "^25.1.0" + "@jest/source-map" "^25.1.0" + "@jest/test-result" "^25.1.0" + "@jest/types" "^25.1.0" + chalk "^3.0.0" + co "^4.6.0" + expect "^25.1.0" + is-generator-fn "^2.0.0" + jest-each "^25.1.0" + jest-matcher-utils "^25.1.0" + jest-message-util "^25.1.0" + jest-runtime "^25.1.0" + jest-snapshot "^25.1.0" + jest-util "^25.1.0" + pretty-format "^25.1.0" + throat "^5.0.0" + +jest-leak-detector@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz#b665dea7c77100c5c4f7dfcb153b65cf07dcf96a" + integrity sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA== + dependencies: + jest-get-type "^24.9.0" + pretty-format "^24.9.0" + +jest-leak-detector@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.1.0.tgz#ed6872d15aa1c72c0732d01bd073dacc7c38b5c6" + integrity sha512-3xRI264dnhGaMHRvkFyEKpDeaRzcEBhyNrOG5oT8xPxOyUAblIAQnpiR3QXu4wDor47MDTiHbiFcbypdLcLW5w== + dependencies: + jest-get-type "^25.1.0" + pretty-format "^25.1.0" + +jest-matcher-utils@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073" + integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== + dependencies: + chalk "^2.0.1" + jest-diff "^24.9.0" + jest-get-type "^24.9.0" + pretty-format "^24.9.0" + +jest-matcher-utils@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.1.0.tgz#fa5996c45c7193a3c24e73066fc14acdee020220" + integrity sha512-KGOAFcSFbclXIFE7bS4C53iYobKI20ZWleAdAFun4W1Wz1Kkej8Ng6RRbhL8leaEvIOjGXhGf/a1JjO8bkxIWQ== + dependencies: + chalk "^3.0.0" + jest-diff "^25.1.0" + jest-get-type "^25.1.0" + pretty-format "^25.1.0" + +jest-message-util@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" + integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/stack-utils" "^1.0.1" + chalk "^2.0.1" + micromatch "^3.1.10" + slash "^2.0.0" + stack-utils "^1.0.1" + +jest-message-util@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.1.0.tgz#702a9a5cb05c144b9aa73f06e17faa219389845e" + integrity sha512-Nr/Iwar2COfN22aCqX0kCVbXgn8IBm9nWf4xwGr5Olv/KZh0CZ32RKgZWMVDXGdOahicM10/fgjdimGNX/ttCQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@jest/test-result" "^25.1.0" + "@jest/types" "^25.1.0" + "@types/stack-utils" "^1.0.1" + chalk "^3.0.0" + micromatch "^4.0.2" + slash "^3.0.0" + stack-utils "^1.0.1" + +jest-mock@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" + integrity sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w== + dependencies: + "@jest/types" "^24.9.0" + +jest-mock@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.1.0.tgz#411d549e1b326b7350b2e97303a64715c28615fd" + integrity sha512-28/u0sqS+42vIfcd1mlcg4ZVDmSUYuNvImP4X2lX5hRMLW+CN0BeiKVD4p+ujKKbSPKd3rg/zuhCF+QBLJ4vag== + dependencies: + "@jest/types" "^25.1.0" + +jest-pnp-resolver@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" + integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== + +jest-regex-util@^24.3.0, jest-regex-util@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636" + integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== + +jest-regex-util@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.1.0.tgz#efaf75914267741838e01de24da07b2192d16d87" + integrity sha512-9lShaDmDpqwg+xAd73zHydKrBbbrIi08Kk9YryBEBybQFg/lBWR/2BDjjiSE7KIppM9C5+c03XiDaZ+m4Pgs1w== + +jest-resolve-dependencies@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz#ad055198959c4cfba8a4f066c673a3f0786507ab" + integrity sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g== + dependencies: + "@jest/types" "^24.9.0" + jest-regex-util "^24.3.0" + jest-snapshot "^24.9.0" + +jest-resolve-dependencies@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.1.0.tgz#8a1789ec64eb6aaa77fd579a1066a783437e70d2" + integrity sha512-Cu/Je38GSsccNy4I2vL12ZnBlD170x2Oh1devzuM9TLH5rrnLW1x51lN8kpZLYTvzx9j+77Y5pqBaTqfdzVzrw== + dependencies: + "@jest/types" "^25.1.0" + jest-regex-util "^25.1.0" + jest-snapshot "^25.1.0" + +jest-resolve@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.9.0.tgz#dff04c7687af34c4dd7e524892d9cf77e5d17321" + integrity sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ== + dependencies: + "@jest/types" "^24.9.0" + browser-resolve "^1.11.3" + chalk "^2.0.1" + jest-pnp-resolver "^1.2.1" + realpath-native "^1.1.0" + +jest-resolve@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.1.0.tgz#23d8b6a4892362baf2662877c66aa241fa2eaea3" + integrity sha512-XkBQaU1SRCHj2Evz2Lu4Czs+uIgJXWypfO57L7JYccmAXv4slXA6hzNblmcRmf7P3cQ1mE7fL3ABV6jAwk4foQ== + dependencies: + "@jest/types" "^25.1.0" + browser-resolve "^1.11.3" + chalk "^3.0.0" + jest-pnp-resolver "^1.2.1" + realpath-native "^1.1.0" + +jest-runner@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.9.0.tgz#574fafdbd54455c2b34b4bdf4365a23857fcdf42" + integrity sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + chalk "^2.4.2" + exit "^0.1.2" + graceful-fs "^4.1.15" + jest-config "^24.9.0" + jest-docblock "^24.3.0" + jest-haste-map "^24.9.0" + jest-jasmine2 "^24.9.0" + jest-leak-detector "^24.9.0" + jest-message-util "^24.9.0" + jest-resolve "^24.9.0" + jest-runtime "^24.9.0" + jest-util "^24.9.0" + jest-worker "^24.6.0" + source-map-support "^0.5.6" + throat "^4.0.0" + +jest-runner@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.1.0.tgz#fef433a4d42c89ab0a6b6b268e4a4fbe6b26e812" + integrity sha512-su3O5fy0ehwgt+e8Wy7A8CaxxAOCMzL4gUBftSs0Ip32S0epxyZPDov9Znvkl1nhVOJNf4UwAsnqfc3plfQH9w== + dependencies: + "@jest/console" "^25.1.0" + "@jest/environment" "^25.1.0" + "@jest/test-result" "^25.1.0" + "@jest/types" "^25.1.0" + chalk "^3.0.0" + exit "^0.1.2" + graceful-fs "^4.2.3" + jest-config "^25.1.0" + jest-docblock "^25.1.0" + jest-haste-map "^25.1.0" + jest-jasmine2 "^25.1.0" + jest-leak-detector "^25.1.0" + jest-message-util "^25.1.0" + jest-resolve "^25.1.0" + jest-runtime "^25.1.0" + jest-util "^25.1.0" + jest-worker "^25.1.0" + source-map-support "^0.5.6" + throat "^5.0.0" + +jest-runtime@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.9.0.tgz#9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac" + integrity sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw== + dependencies: + "@jest/console" "^24.7.1" + "@jest/environment" "^24.9.0" + "@jest/source-map" "^24.3.0" + "@jest/transform" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/yargs" "^13.0.0" + chalk "^2.0.1" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.1.15" + jest-config "^24.9.0" + jest-haste-map "^24.9.0" + jest-message-util "^24.9.0" + jest-mock "^24.9.0" + jest-regex-util "^24.3.0" + jest-resolve "^24.9.0" + jest-snapshot "^24.9.0" + jest-util "^24.9.0" + jest-validate "^24.9.0" + realpath-native "^1.1.0" + slash "^2.0.0" + strip-bom "^3.0.0" + yargs "^13.3.0" + +jest-runtime@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.1.0.tgz#02683218f2f95aad0f2ec1c9cdb28c1dc0ec0314" + integrity sha512-mpPYYEdbExKBIBB16ryF6FLZTc1Rbk9Nx0ryIpIMiDDkOeGa0jQOKVI/QeGvVGlunKKm62ywcioeFVzIbK03bA== + dependencies: + "@jest/console" "^25.1.0" + "@jest/environment" "^25.1.0" + "@jest/source-map" "^25.1.0" + "@jest/test-result" "^25.1.0" + "@jest/transform" "^25.1.0" + "@jest/types" "^25.1.0" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + collect-v8-coverage "^1.0.0" + exit "^0.1.2" + glob "^7.1.3" + graceful-fs "^4.2.3" + jest-config "^25.1.0" + jest-haste-map "^25.1.0" + jest-message-util "^25.1.0" + jest-mock "^25.1.0" + jest-regex-util "^25.1.0" + jest-resolve "^25.1.0" + jest-snapshot "^25.1.0" + jest-util "^25.1.0" + jest-validate "^25.1.0" + realpath-native "^1.1.0" + slash "^3.0.0" + strip-bom "^4.0.0" + yargs "^15.0.0" + +jest-serializer@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" + integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== + +jest-serializer@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.1.0.tgz#73096ba90e07d19dec4a0c1dd89c355e2f129e5d" + integrity sha512-20Wkq5j7o84kssBwvyuJ7Xhn7hdPeTXndnwIblKDR2/sy1SUm6rWWiG9kSCgJPIfkDScJCIsTtOKdlzfIHOfKA== + +jest-snapshot@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.9.0.tgz#ec8e9ca4f2ec0c5c87ae8f925cf97497b0e951ba" + integrity sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew== + dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^24.9.0" + chalk "^2.0.1" + expect "^24.9.0" + jest-diff "^24.9.0" + jest-get-type "^24.9.0" + jest-matcher-utils "^24.9.0" + jest-message-util "^24.9.0" + jest-resolve "^24.9.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^24.9.0" + semver "^6.2.0" + +jest-snapshot@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.1.0.tgz#d5880bd4b31faea100454608e15f8d77b9d221d9" + integrity sha512-xZ73dFYN8b/+X2hKLXz4VpBZGIAn7muD/DAg+pXtDzDGw3iIV10jM7WiHqhCcpDZfGiKEj7/2HXAEPtHTj0P2A== + dependencies: + "@babel/types" "^7.0.0" + "@jest/types" "^25.1.0" + chalk "^3.0.0" + expect "^25.1.0" + jest-diff "^25.1.0" + jest-get-type "^25.1.0" + jest-matcher-utils "^25.1.0" + jest-message-util "^25.1.0" + jest-resolve "^25.1.0" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^25.1.0" + semver "^7.1.1" + +jest-util@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" + integrity sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg== + dependencies: + "@jest/console" "^24.9.0" + "@jest/fake-timers" "^24.9.0" + "@jest/source-map" "^24.9.0" + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + callsites "^3.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.15" + is-ci "^2.0.0" + mkdirp "^0.5.1" + slash "^2.0.0" + source-map "^0.6.0" + +jest-util@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.1.0.tgz#7bc56f7b2abd534910e9fa252692f50624c897d9" + integrity sha512-7did6pLQ++87Qsj26Fs/TIwZMUFBXQ+4XXSodRNy3luch2DnRXsSnmpVtxxQ0Yd6WTipGpbhh2IFP1mq6/fQGw== + dependencies: + "@jest/types" "^25.1.0" + chalk "^3.0.0" + is-ci "^2.0.0" + mkdirp "^0.5.1" + +jest-validate@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab" + integrity sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ== + dependencies: + "@jest/types" "^24.9.0" + camelcase "^5.3.1" + chalk "^2.0.1" + jest-get-type "^24.9.0" + leven "^3.1.0" + pretty-format "^24.9.0" + +jest-validate@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.1.0.tgz#1469fa19f627bb0a9a98e289f3e9ab6a668c732a" + integrity sha512-kGbZq1f02/zVO2+t1KQGSVoCTERc5XeObLwITqC6BTRH3Adv7NZdYqCpKIZLUgpLXf2yISzQ465qOZpul8abXA== + dependencies: + "@jest/types" "^25.1.0" + camelcase "^5.3.1" + chalk "^3.0.0" + jest-get-type "^25.1.0" + leven "^3.1.0" + pretty-format "^25.1.0" + +jest-watcher@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.9.0.tgz#4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b" + integrity sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw== + dependencies: + "@jest/test-result" "^24.9.0" + "@jest/types" "^24.9.0" + "@types/yargs" "^13.0.0" + ansi-escapes "^3.0.0" + chalk "^2.0.1" + jest-util "^24.9.0" + string-length "^2.0.0" + +jest-watcher@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.1.0.tgz#97cb4a937f676f64c9fad2d07b824c56808e9806" + integrity sha512-Q9eZ7pyaIr6xfU24OeTg4z1fUqBF/4MP6J801lyQfg7CsnZ/TCzAPvCfckKdL5dlBBEKBeHV0AdyjFZ5eWj4ig== + dependencies: + "@jest/test-result" "^25.1.0" + "@jest/types" "^25.1.0" + ansi-escapes "^4.2.1" + chalk "^3.0.0" + jest-util "^25.1.0" + string-length "^3.1.0" + +jest-worker@^24.6.0, jest-worker@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" + integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== + dependencies: + merge-stream "^2.0.0" + supports-color "^6.1.0" + +jest-worker@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.1.0.tgz#75d038bad6fdf58eba0d2ec1835856c497e3907a" + integrity sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg== + dependencies: + merge-stream "^2.0.0" + supports-color "^7.0.0" + +jest@25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-25.1.0.tgz#b85ef1ddba2fdb00d295deebbd13567106d35be9" + integrity sha512-FV6jEruneBhokkt9MQk0WUFoNTwnF76CLXtwNMfsc0um0TlB/LG2yxUd0KqaFjEJ9laQmVWQWS0sG/t2GsuI0w== + dependencies: + "@jest/core" "^25.1.0" + import-local "^3.0.2" + jest-cli "^25.1.0" + +jest@^24.3.1: + version "24.9.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-24.9.0.tgz#987d290c05a08b52c56188c1002e368edb007171" + integrity sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw== + dependencies: + import-local "^2.0.0" + jest-cli "^24.9.0" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom@16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.1.0.tgz#7e245db708ee00302947be7beb88a2ffa587ad2b" + integrity sha512-kpIcNAuZYc/L17WADOOHslz/q5+3SipP/iRb3j6zd1zQ6pFJubLi/VCdD3NqBpj/IKKK4YXny1vv44rbEUSGFg== + dependencies: + abab "^2.0.3" + acorn "^7.1.0" + acorn-globals "^4.3.2" + cssom "^0.4.4" + cssstyle "^2.1.0" + data-urls "^2.0.0" + decimal.js "^10.2.0" + domexception "^2.0.1" + escodegen "^1.12.1" + html-encoding-sniffer "^2.0.0" + nwsapi "^2.2.0" + parse5 "5.1.1" + request "^2.88.0" + request-promise-native "^1.0.8" + saxes "^4.0.2" + symbol-tree "^3.2.2" + tough-cookie "^3.0.1" + w3c-hr-time "^1.0.1" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^5.0.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + ws "^7.2.1" + xml-name-validator "^3.0.0" + +jsdom@^11.5.1: + version "11.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" + integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== + dependencies: + abab "^2.0.0" + acorn "^5.5.3" + acorn-globals "^4.1.0" + array-equal "^1.0.0" + cssom ">= 0.3.2 < 0.4.0" + cssstyle "^1.0.0" + data-urls "^1.0.0" + domexception "^1.0.1" + escodegen "^1.9.1" + html-encoding-sniffer "^1.0.2" + left-pad "^1.3.0" + nwsapi "^2.0.7" + parse5 "4.0.0" + pn "^1.1.0" + request "^2.87.0" + request-promise-native "^1.0.5" + sax "^1.2.4" + symbol-tree "^3.2.2" + tough-cookie "^2.3.4" + w3c-hr-time "^1.0.1" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.3" + whatwg-mimetype "^2.1.0" + whatwg-url "^6.4.1" + ws "^5.2.0" + xml-name-validator "^3.0.0" + +jsdom@^15.1.1: + version "15.2.1" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" + integrity sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g== + dependencies: + abab "^2.0.0" + acorn "^7.1.0" + acorn-globals "^4.3.2" + array-equal "^1.0.0" + cssom "^0.4.1" + cssstyle "^2.0.0" + data-urls "^1.1.0" + domexception "^1.0.1" + escodegen "^1.11.1" + html-encoding-sniffer "^1.0.2" + nwsapi "^2.2.0" + parse5 "5.1.0" + pn "^1.1.0" + request "^2.88.0" + request-promise-native "^1.0.7" + saxes "^3.1.9" + symbol-tree "^3.2.2" + tough-cookie "^3.0.1" + w3c-hr-time "^1.0.1" + w3c-xmlserializer "^1.1.2" + webidl-conversions "^4.0.2" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^7.0.0" + ws "^7.0.0" + xml-name-validator "^3.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" + integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== + dependencies: + minimist "^1.2.0" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +kleur@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" + integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +left-pad@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + +loader-utils@^1.2.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= + +lodash@^4.17.13, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +lolex@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/lolex/-/lolex-5.1.2.tgz#953694d098ce7c07bc5ed6d0e42bc6c0c6d5a367" + integrity sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A== + dependencies: + "@sinonjs/commons" "^1.7.0" + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-dir@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" + integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + dependencies: + semver "^6.0.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= + dependencies: + tmpl "1.0.x" + +mamacro@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" + integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memory-fs@^0.4.0, memory-fs@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.43.0: + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.0.0, mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.1.1, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.5.0, neo-async@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + +node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + +node-notifier@^5.4.2: + version "5.4.3" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" + integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q== + dependencies: + growly "^1.3.0" + is-wsl "^1.1.0" + semver "^5.5.0" + shellwords "^0.1.1" + which "^1.3.0" + +node-notifier@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-6.0.0.tgz#cea319e06baa16deec8ce5cd7f133c4a46b68e12" + integrity sha512-SVfQ/wMw+DesunOm5cKqr6yDcvUTDl/yc97ybGHMrteNEY6oekXpNpS3lZwgLlwz0FLgHoiW28ZpmBHUDg37cw== + dependencies: + growly "^1.3.0" + is-wsl "^2.1.1" + semver "^6.3.0" + shellwords "^0.1.1" + which "^1.3.1" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +nwsapi@^2.0.7, nwsapi@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" + integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.getownpropertydescriptors@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + +opener@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" + integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-each-series@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" + integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E= + dependencies: + p-reduce "^1.0.0" + +p-each-series@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" + integrity sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ== + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-finally@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" + integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-reduce@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +parse-asn1@^5.0.0: + version "5.1.5" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + +parse5@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== + +parse5@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" + integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== + +parse5@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +pbkdf2@^3.0.3: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +picomatch@^2.0.4, picomatch@^2.0.5: + version "2.2.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" + integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pirates@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +pretty-format@^24.9.0: + version "24.9.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" + integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== + dependencies: + "@jest/types" "^24.9.0" + ansi-regex "^4.0.0" + ansi-styles "^3.2.0" + react-is "^16.8.4" + +pretty-format@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.1.0.tgz#ed869bdaec1356fc5ae45de045e2c8ec7b07b0c8" + integrity sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ== + dependencies: + "@jest/types" "^25.1.0" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^16.12.0" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +prompts@^2.0.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.1.tgz#b63a9ce2809f106fa9ae1277c275b167af46ea05" + integrity sha512-qIP2lQyCwYbdzcqHIUi2HAxiWixhoM9OdLCWf8txXsapC/X9YdsCoeyRIXE/GP+Q0J37Q7+XN/MFqbUa7IzXNA== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.4" + +proxy-addr@~2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" + integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.0" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.28: + version "1.7.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" + integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +react-is@^16.12.0, react-is@^16.8.4: + version "16.12.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" + integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + +read-pkg-up@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== + dependencies: + find-up "^3.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +realpath-native@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" + integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== + dependencies: + util.promisify "^1.0.0" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +request-promise-core@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" + integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ== + dependencies: + lodash "^4.17.15" + +request-promise-native@^1.0.5, request-promise-native@^1.0.7, request-promise-native@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" + integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== + dependencies: + request-promise-core "1.1.3" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.87.0, request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= + +resolve@^1.10.0, resolve@^1.3.2: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + dependencies: + path-parse "^1.0.6" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@^2.5.4, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rsvp@^4.8.4: + version "4.8.5" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" + integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + +rw@1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" + integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sane@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" + integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== + dependencies: + "@cnakazawa/watch" "^1.0.3" + anymatch "^2.0.0" + capture-exit "^2.0.0" + exec-sh "^0.3.2" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +saxes@^3.1.9: + version "3.1.11" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.11.tgz#d59d1fd332ec92ad98a2e0b2ee644702384b1c5b" + integrity sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g== + dependencies: + xmlchars "^2.1.1" + +saxes@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-4.0.2.tgz#76f8e762efc96ec4af5f885d8151c50426103165" + integrity sha512-EZOTeQ4bgkOaGCDaTKux+LaRNcLNbdbvMH7R3/yjEEULPEmqvkFbFub6DJhJTub2iGMT93CfpZ5LTdKZmAbVeQ== + dependencies: + xmlchars "^2.2.0" + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.1.1: + version "7.1.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" + integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" + integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shellwords@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +sisteransi@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" + integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.6, source-map-support@~0.5.12: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" + integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + dependencies: + figgy-pudding "^3.5.1" + +stack-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" + integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +string-length@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= + dependencies: + astral-regex "^1.0.0" + strip-ansi "^4.0.0" + +string-length@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-3.1.0.tgz#107ef8c23456e187a8abd4a61162ff4ac6e25837" + integrity sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA== + dependencies: + astral-regex "^1.0.0" + strip-ansi "^5.2.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimleft@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" + integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string.prototype.trimright@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" + integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== + dependencies: + define-properties "^1.1.3" + function-bind "^1.1.1" + +string_decoder@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@6.1.0, supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +supports-hyperlinks@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz#f663df252af5f37c5d49bbd7eeefa9e0b9e59e47" + integrity sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA== + dependencies: + has-flag "^4.0.0" + supports-color "^7.0.0" + +symbol-tree@^3.2.2: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + +terminal-link@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" + integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== + dependencies: + ansi-escapes "^4.2.1" + supports-hyperlinks "^2.0.0" + +terser-webpack-plugin@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" + integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^2.1.2" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser@^4.1.2: + version "4.6.3" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.3.tgz#e33aa42461ced5238d352d2df2a67f21921f8d87" + integrity sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +test-exclude@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" + integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + read-pkg-up "^4.0.0" + require-main-filename "^2.0.0" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +throat@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= + +throat@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" + integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== + +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +timers-browserify@^2.0.4: + version "2.0.11" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== + dependencies: + setimmediate "^1.0.4" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2" + integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== + dependencies: + ip-regex "^2.1.0" + psl "^1.1.28" + punycode "^2.1.1" + +tr46@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= + dependencies: + punycode "^2.1.0" + +tr46@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" + integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== + dependencies: + punycode "^2.1.1" + +tryer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" + integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== + +tslib@^1.9.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.0.tgz#f1f3528301621a53220d58373ae510ff747a66bc" + integrity sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg== + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" + integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.2" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.0" + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-compile-cache@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== + +v8-to-istanbul@^4.0.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.2.tgz#387d173be5383dbec209d21af033dcb892e3ac82" + integrity sha512-G9R+Hpw0ITAmPSr47lSlc5A1uekSYzXxTMlFxso2xoffwo4jQnzbv1p9yXIinO8UMZKfAFewaCHwWvnH4Jb4Ug== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^1.6.0" + source-map "^0.7.3" + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + +w3c-hr-time@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= + dependencies: + browser-process-hrtime "^0.1.2" + +w3c-xmlserializer@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-1.1.2.tgz#30485ca7d70a6fd052420a3d12fd90e6339ce794" + integrity sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg== + dependencies: + domexception "^1.0.1" + webidl-conversions "^4.0.2" + xml-name-validator "^3.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + +walker@^1.0.7, walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= + dependencies: + makeerror "1.0.x" + +watchpack@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" + integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== + dependencies: + chokidar "^2.0.2" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + +webidl-conversions@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== + +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webpack-bundle-analyzer@3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.0.tgz#39b3a8f829ca044682bc6f9e011c95deb554aefd" + integrity sha512-orUfvVYEfBMDXgEKAKVvab5iQ2wXneIEorGNsyuOyVYpjYrI7CUOhhXNDd3huMwQ3vNNWWlGP+hzflMFYNzi2g== + dependencies: + acorn "^6.0.7" + acorn-walk "^6.1.1" + bfj "^6.1.1" + chalk "^2.4.1" + commander "^2.18.0" + ejs "^2.6.1" + express "^4.16.3" + filesize "^3.6.1" + gzip-size "^5.0.0" + lodash "^4.17.15" + mkdirp "^0.5.1" + opener "^1.5.1" + ws "^6.0.0" + +webpack-cli@3.3.11: + version "3.3.11" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.11.tgz#3bf21889bf597b5d82c38f215135a411edfdc631" + integrity sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g== + dependencies: + chalk "2.4.2" + cross-spawn "6.0.5" + enhanced-resolve "4.1.0" + findup-sync "3.0.0" + global-modules "2.0.0" + import-local "2.0.0" + interpret "1.2.0" + loader-utils "1.2.3" + supports-color "6.1.0" + v8-compile-cache "2.0.3" + yargs "13.2.4" + +webpack-sources@^1.4.0, webpack-sources@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@4.41.6: + version "4.41.6" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.6.tgz#12f2f804bf6542ef166755050d4afbc8f66ba7e1" + integrity sha512-yxXfV0Zv9WMGRD+QexkZzmGIh54bsvEs+9aRWxnN8erLWEOehAKUTeNBoUbA6HPEZPlRo7KDi2ZcNveoZgK9MA== + dependencies: + "@webassemblyjs/ast" "1.8.5" + "@webassemblyjs/helper-module-context" "1.8.5" + "@webassemblyjs/wasm-edit" "1.8.5" + "@webassemblyjs/wasm-parser" "1.8.5" + acorn "^6.2.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.1" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.6.0" + webpack-sources "^1.4.1" + +whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0, whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" + integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.0.0.tgz#37f256cb746398e19b107bd6ef820b4ae2d15871" + integrity sha512-41ou2Dugpij8/LPO5Pq64K5q++MnRCBpEHvQr26/mArEKTkCV5aoXIqyhuYtE0pkqScXwhf2JP57rkRTYM29lQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^2.0.0" + webidl-conversions "^5.0.0" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== + dependencies: + errno "~0.1.7" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" + integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-file-atomic@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.1.tgz#558328352e673b5bb192cf86500d60b230667d4b" + integrity sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +ws@^5.2.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== + dependencies: + async-limiter "~1.0.0" + +ws@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + +ws@^7.0.0, ws@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.1.tgz#03ed52423cd744084b2cf42ed197c8b65a936b8e" + integrity sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A== + +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + +xmlchars@^2.1.1, xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@^13.1.0, yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-16.1.0.tgz#73747d53ae187e7b8dbe333f95714c76ea00ecf1" + integrity sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@^13.3.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1" + +yargs@^15.0.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.1.0.tgz#e111381f5830e863a89550bd4b136bb6a5f37219" + integrity sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^16.1.0" diff --git a/drafts/bs-dagre/LICENSE b/drafts/bs-dagre/LICENSE new file mode 100644 index 0000000..b871f50 --- /dev/null +++ b/drafts/bs-dagre/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2019 Arnau Siches + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/drafts/bs-dagre/README.md b/drafts/bs-dagre/README.md new file mode 100644 index 0000000..0aaa08f --- /dev/null +++ b/drafts/bs-dagre/README.md @@ -0,0 +1,65 @@ +# bs-dagre + +[BuckleScript](https://bucklescript.github.io) bindings for [dagre](https://github.com/dagrejs/dagre). + + +## Status + +* [x] Bindings for [graphlib](https://github.com/dagrejs/graphlib) public interface. +* [x] Bindings for [dagre](https://github.com/dagrejs/dagre) public interface. + + +## Naming and organisation + +Although most names come straight from the original library, there are a few +changes to adapt to Reason and a few aliases for my own benefit. + +* Bindings for `graphlib` ara under the [`Dagre.Graph`](src/Graph.rei) + module. +* Bindings for `dagre` are under the [`Dagre.Layout`](src/Layout.re) module. +* `graphlib` uses "label" to refer to data associated with graph, nodes and + edges. `bs-dagre` uses "attributes" instead. For example, instead of + `setDefaultNodeLabel` you have `setDefaultNodeAttrs`. + + +## Usage + +The steps to compute a graph layout are: create a graph, add nodes and edges +and finally create a layout. + +### Crate a graph + +```reason +open Dagre; + +let graph = Graph.make(); +Graph.setDefaultEdgeAttrs(graph, () => {"minlen": 2}); +``` + +The snippet above creates a graph with default attributes, +if you need to tweak them, use [`Graph.Attrs.make`](src/Graph.re#L16). + +### Add nodes and edges + +```reason +Graph.setNodeWith(graph, "a", Node.attrs(~label="first", ~width=20, ~height=20), ()); +Graph.setNodeWith(graph, "b", Node.attrs(~label="second", ~width=20, ~height=20), ()); + +Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); +``` + +### Create a layout + +```reason +let layout = Layout.make(graph); + +// Use the layout to render the graph. +``` + +Check the [`examples`](examples) for more. + + +## License + +bs-dagre is licensed under the terms of the MIT License. See the LICENSE file +for details. diff --git a/drafts/bs-dagre/__tests__/Acyclicer_test.re b/drafts/bs-dagre/__tests__/Acyclicer_test.re new file mode 100644 index 0000000..bc6fb03 --- /dev/null +++ b/drafts/bs-dagre/__tests__/Acyclicer_test.re @@ -0,0 +1,19 @@ +open Jest; +open Expect; +open Acyclicer; + +describe("Acyclicer", () => { + test("greedy", () => + expect(fromStringExn(toString(Greedy))) |> toEqual(Greedy) + ); + + test("lazy", () => + expect(fromStringExn(toString(Lazy))) |> toEqual(Lazy) + ); + + test("other", () => + expect(() => + fromStringExn(Some("foo")) + ) |> toThrow + ); +}); diff --git a/drafts/bs-dagre/__tests__/Algorithm_test.re b/drafts/bs-dagre/__tests__/Algorithm_test.re new file mode 100644 index 0000000..156e5b8 --- /dev/null +++ b/drafts/bs-dagre/__tests__/Algorithm_test.re @@ -0,0 +1,96 @@ +open Jest; +open Expect; + +describe("Algorithm", () => { + test("shortest path with dijkstra", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="A", ~w="C", ())); + Graph.setEdge(graph, Edge.t(~v="A", ~w="D", ())); + Graph.setEdge(graph, Edge.t(~v="C", ~w="B", ())); + Graph.setEdge(graph, Edge.t(~v="D", ~w="F", ())); + Graph.setEdge(graph, Edge.t(~v="F", ~w="E", ())); + + let actual = Algorithm.dijkstra(graph, "A"); + let expected = [%raw + {| + { + "A": { "distance": 0 }, + "C": { "distance": 1, "predecessor": 'A' }, + "D": { "distance": 1, "predecessor": 'A' }, + "B": { "distance": 2, "predecessor": 'C' }, + "F": { "distance": 2, "predecessor": 'D' }, + "E": { "distance": 3, "predecessor": 'F' }, + } + |} + ]; + + expect(actual) |> toEqual(expected); + }); + + test("shortest path with dijkstraAll", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="A", ~w="C", ())); + Graph.setEdge(graph, Edge.t(~v="A", ~w="D", ())); + Graph.setEdge(graph, Edge.t(~v="C", ~w="B", ())); + Graph.setEdge(graph, Edge.t(~v="D", ~w="F", ())); + Graph.setEdge(graph, Edge.t(~v="F", ~w="E", ())); + + let actual = Algorithm.dijkstraAll(graph); + let expected = [%raw + {| + { + "A": { + "A": { "distance": 0 }, + "C": { "distance": 1, "predecessor": 'A' }, + "D": { "distance": 1, "predecessor": 'A' }, + "B": { "distance": 2, "predecessor": 'C' }, + "F": { "distance": 2, "predecessor": 'D' }, + "E": { "distance": 3, "predecessor": 'F' }, + }, + "C": { + "A": { "distance": Infinity }, + "C": { "distance": 0 }, + "D": { "distance": Infinity }, + "B": { "distance": 1, "predecessor": 'C' }, + "F": { "distance": Infinity }, + "E": { "distance": Infinity }, + }, + "D": { + "A": { "distance": Infinity }, + "C": { "distance": Infinity }, + "D": { "distance": 0 }, + "B": { "distance": Infinity }, + "F": { "distance": 1, "predecessor": 'D' }, + "E": { "distance": 2, "predecessor": 'F' }, + }, + "B": { + "A": { "distance": Infinity }, + "C": { "distance": Infinity }, + "D": { "distance": Infinity }, + "B": { "distance": 0 }, + "F": { "distance": Infinity }, + "E": { "distance": Infinity }, + }, + "F": { + "A": { "distance": Infinity }, + "C": { "distance": Infinity }, + "D": { "distance": Infinity }, + "B": { "distance": Infinity }, + "F": { "distance": 0 }, + "E": { "distance": 1, "predecessor": 'F' }, + }, + "E": { + "A": { "distance": Infinity }, + "C": { "distance": Infinity }, + "D": { "distance": Infinity }, + "B": { "distance": Infinity }, + "F": { "distance": Infinity }, + "E": { "distance": 0 }, + }, + } + |} + ]; + + expect(actual) |> toEqual(expected); + }); +}); diff --git a/drafts/bs-dagre/__tests__/Graph_test.re b/drafts/bs-dagre/__tests__/Graph_test.re new file mode 100644 index 0000000..078e0e2 --- /dev/null +++ b/drafts/bs-dagre/__tests__/Graph_test.re @@ -0,0 +1,483 @@ +open Jest; +open Expect; + +describe("Graph", () => { + test("configure graph with default attributes", () => { + let attrs = Graph.Attrs.make(); + let graph = Graph.make(~attrs, ()); + + expect(Graph.attrs(graph)) |> toEqual(attrs); + }); + + test("make a directed graph", () => { + let graph = Graph.make(); + + expect(Graph.isDirected(graph)) |> toEqual(true); + }); + + test("make an undirected graph", () => { + let graph = Graph.make(~directed=false, ()); + + expect(Graph.isDirected(graph)) |> toEqual(false); + }); + + test("make a directed compound multigraph", () => { + let graph = Graph.make(~compound=true, ~multigraph=true, ()); + + expect((Graph.isCompound(graph), Graph.isMultigraph(graph))) + |> toEqual((true, true)); + }); + + test("A graph with a node", () => { + let graph = Graph.make(); + let attrs = Node.attrs(~width=20, ~height=20, ~label="a", ()); + Graph.setNodeWith(graph, "a", attrs); + + expect(Graph.node(graph, "a")) |> toEqual(Some(attrs)); + }); + + test("A graph without a node", () => { + let graph = Graph.make(); + + expect(Graph.node(graph, "a")) |> toEqual(None); + }); + + test("A graph with an edge", () => { + let graph = Graph.make(); + let edge = Edge.t(~v="a", ~w="b", ()); + + Graph.setEdge(graph, edge); + + expect(Graph.hasEdge(graph, edge)) |> toEqual(true); + }); + + test("A graph without an edge", () => { + let graph = Graph.make(); + + expect(Graph.hasEdge(graph, Edge.t(~v="a", ~w="b", ()))) + |> toEqual(false); + }); + + test("An edge with custom attributes", () => { + let graph = Graph.make(); + let edge = Edge.t(~v="a", ~w="b", ()); + let attrs = Edge.attrs(~minlen=3, ()); + + Graph.setEdgeWith(graph, edge, attrs); + + expect(Graph.edge(graph, edge)) |> toEqual(Some(attrs)); + }); + + test("A graph with two nodes", () => { + let graph = Graph.make(); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="first", ()), + ); + Graph.setNodeWith( + graph, + "b", + Node.attrs(~width=20, ~height=20, ~label="second", ()), + ); + + expect(Graph.nodeCount(graph)) |> toEqual(2); + }); + + test("A graph with two edges", () => { + let graph = Graph.make(); + Graph.setEdgeWith( + graph, + Edge.t(~v="a", ~w="b", ()), + Edge.attrs(~minlen=2, ()), + ); + Graph.setEdge(graph, Edge.t(~v="b", ~w="a", ())); + + expect(Graph.edgeCount(graph)) |> toEqual(2); + }); + + test("Returns the list of node ids", () => { + let graph = Graph.make(); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="first", ()), + ); + Graph.setNodeWith( + graph, + "b", + Node.attrs(~width=20, ~height=20, ~label="second", ()), + ); + + let expected = [|"a", "b"|]; + + expect(Graph.nodes(graph)) |> toEqual(expected); + }); + + test("Returns the list of edge values", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + + let expected = [| + Edge.t(~v="a", ~w="b", ()), + Edge.t(~v="b", ~w="c", ()), + |]; + + expect(Graph.edges(graph)) |> toEqual(expected); + }); + + test("Returns the list of edge values for a multigraph", () => { + let graph = Graph.make(~multigraph=true, ()); + let e1 = Edge.t(~name="first", ~v="a", ~w="b", ()); + let e2 = Edge.t(~name="last", ~v="b", ~w="c", ()); + + Graph.setEdge(graph, e1); + Graph.setEdge(graph, e2); + + expect(Graph.edges(graph)) |> toEqual([|e1, e2|]); + }); + + test("Returns the list of source nodes", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="e", ())); + + expect(Graph.sources(graph)) |> toEqual([|"a", "d"|]); + }); + + test("Returns the list of sink nodes", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="e", ())); + + expect(Graph.sinks(graph)) |> toEqual([|"c", "e"|]); + }); + + test("Checks if a node exists", () => { + let graph = Graph.make(); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="x", ()), + ); + expect((Graph.hasNode(graph, "a"), Graph.hasNode(graph, "b"))) + |> toEqual((true, false)); + }); + + test("Removes a node", () => { + let graph = Graph.make(); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="second", ()), + ); + let before = Graph.hasNode(graph, "a"); + Graph.removeNode(graph, "a"); + let after = Graph.hasNode(graph, "a"); + expect((before, after)) |> toEqual((true, false)); + }); + + test("Returns the node predecessors", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="e", ())); + Graph.setEdge(graph, Edge.t(~v="a", ~w="e", ())); + expect(Graph.predecessors(graph, "e")) |> toEqual(Some([|"d", "a"|])); + }); + + test("Returns the node successors", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="e", ())); + Graph.setEdge(graph, Edge.t(~v="a", ~w="e", ())); + + expect(Graph.successors(graph, "a")) |> toEqual(Some([|"b", "e"|])); + }); + + test("Returns the node neighbors", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="e", ())); + Graph.setEdge(graph, Edge.t(~v="a", ~w="e", ())); + + expect(Graph.neighbors(graph, "b")) |> toEqual(Some([|"a", "c"|])); + }); + + test("Returns the node in-edges", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="e", ())); + Graph.setEdge(graph, Edge.t(~v="a", ~w="e", ())); + + expect(Graph.inEdges(graph, "b", ())) + |> toEqual(Some([|Edge.t(~v="a", ~w="b", ())|])); + }); + + test("Returns the node in-edges filtered", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="c", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="b", ())); + + expect(Graph.inEdges(graph, "b", ~filter="c", ())) + |> toEqual(Some([|Edge.t(~v="c", ~w="b", ())|])); + }); + + test("Returns the node out-edges", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="c", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="d", ())); + + expect(Graph.outEdges(graph, "b", ())) + |> toEqual( + Some([|Edge.t(~v="b", ~w="c", ()), Edge.t(~v="b", ~w="d", ())|]), + ); + }); + + test("Returns the node out-edges filtered", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="c", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="b", ())); + + expect(Graph.outEdges(graph, "b", ~filter="c", ())) + |> toEqual(Some([|Edge.t(~v="b", ~w="c", ())|])); + }); + + test("Returns the node edges", () => { + let graph = Graph.make(); + + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="c", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="d", ())); + + expect(Graph.nodeEdges(graph, "b", ())) + |> toEqual( + Some([| + Edge.t(~v="a", ~w="b", ()), + Edge.t(~v="c", ~w="b", ()), + Edge.t(~v="b", ~w="c", ()), + Edge.t(~v="b", ~w="d", ()), + |]), + ); + }); + + test("Returns the node out-edges filtered", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + Graph.setEdge(graph, Edge.t(~v="c", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="d", ~w="b", ())); + expect(Graph.nodeEdges(graph, "b", ~filter="c", ())) + |> toEqual( + Some([|Edge.t(~v="c", ~w="b", ()), Edge.t(~v="b", ~w="c", ())|]), + ); + }); + + test("Returns nothing for non-compound graphs", () => { + let graph = Graph.make(); + Graph.setEdge(graph, Edge.t(~v="a", ~w="b", ())); + Graph.setEdge(graph, Edge.t(~v="b", ~w="c", ())); + + expect(Graph.parent(graph, "b")) |> toEqual(None); + }); + + test("Returns the parent of a node", () => { + let graph = Graph.make(~compound=true, ()); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="first", ()), + ); + Graph.setNodeWith( + graph, + "b", + Node.attrs(~width=20, ~height=20, ~label="second", ()), + ); + Graph.setParent(graph, "b", "a"); + + expect(Graph.parent(graph, "b")) |> toEqual(Some("a")); + }); + + test("Returns an empty list for non-compound graphs", () => { + let graph = Graph.make(); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="first", ()), + ); + Graph.setNodeWith( + graph, + "b", + Node.attrs(~width=20, ~height=20, ~label="second", ()), + ); + + expect(Graph.children(graph, "a")) |> toEqual(None); + }); + + test("Returns the children of a node", () => { + let graph = Graph.make(~compound=true, ()); + Graph.setNodeWith( + graph, + "a", + Node.attrs(~width=20, ~height=20, ~label="first", ()), + ); + Graph.setNodeWith( + graph, + "b", + Node.attrs(~width=20, ~height=20, ~label="second", ()), + ); + Graph.setParent(graph, "b", "a"); + + expect(Graph.children(graph, "a")) |> toEqual(Some([|"b"|])); + }); + + test("Checks if an edge exists", () => { + let graph = Graph.make(~multigraph=true, ()); + let edge = Edge.t(~v="a", ~w="b", ~name="foo", ()); + Graph.setEdge(graph, edge); + + expect(Graph.hasEdge(graph, edge)) |> toEqual(true); + }); + + test("Removes an edge", () => { + let graph = Graph.make(); + let edge = Edge.t(~v="a", ~w="b", ()); + Graph.setEdge(graph, edge); + Graph.removeEdge(graph, edge); + + expect(Graph.hasEdge(graph, edge)) |> toEqual(false); + }); + + test("Copies a graph", () => { + let g = Graph.make(); + Graph.setEdge(g, Edge.t(~v="a", ~w="b", ())); + + let h = Graph.copy(g); + + expect(Graph.attrs(h)) |> toEqual(Graph.attrs(g)); + }); + + test("Serializes a graph", () => { + let g = Graph.make(); + + Graph.setNodeWith( + g, + "a", + Node.attrs(~label="node a", ~width=10, ~height=10, ()), + ); + Graph.setNodeWith( + g, + "b", + Node.attrs(~label="node b", ~width=10, ~height=10, ()), + ); + Graph.setEdgeWith( + g, + Edge.t(~v="a", ~w="b", ()), + Edge.attrs(~weight=2, ()), + ); + + let actual = Graph.serialize(g); + let expected = [%raw + {| + { + "options": { + "directed": true, + "multigraph": false, + "compound": false + }, + "value": { + "acyclicer": undefined, + "align": "UL", + "edgesep": 10, + "marginx": 0, + "marginy": 0, + "nodesep": 50, + "rankdir": "TB", + "ranker": "network-simplex", + "ranksep": 50, + }, + "nodes": [ + { "v": "a", "value": { "label": "node a", "height": 10, "width": 10 } }, + { "v": "b", "value": { "label": "node b", "height": 10, "width": 10 } } + ], + "edges": [ + { "v": "a", "w": "b", "value": { "weight": 2 } } + ] + } + |} + ]; + + expect(actual) |> toEqual(expected); + }); + + test("Deserialize a graph", () => { + let g = Graph.make(); + + Graph.setNodeWith( + g, + "a", + Node.attrs(~label="node a", ~width=10, ~height=10, ()), + ); + Graph.setNodeWith( + g, + "b", + Node.attrs(~label="node b", ~width=10, ~height=10, ()), + ); + Graph.setEdgeWith( + g, + Edge.t(~v="a", ~w="b", ()), + Edge.attrs(~weight=2, ()), + ); + + let raw = [%raw + {| { + "options": { + "directed": true, + "multigraph": false, + "compound": false + }, + "value": { + "acyclicer": undefined, + "align": "UL", + "edgesep": 10, + "marginx": 0, + "marginy": 0, + "nodesep": 50, + "rankdir": "TB", + "ranker": "network-simplex", + "ranksep": 50, + }, + "nodes": [ + { "v": "a", "value": { "label": "node a", "height": 10, "width": 10 } }, + { "v": "b", "value": { "label": "node b", "height": 10, "width": 10 } } + ], + "edges": [ + { "v": "a", "w": "b", "value": { "weight": 2 } } + ] + } |} + ]; + let actual = Graph.deserialize(raw)->Graph.serialize; + + expect(actual) |> toEqual(raw); + }); +}); diff --git a/drafts/bs-dagre/__tests__/Layout_test.re b/drafts/bs-dagre/__tests__/Layout_test.re new file mode 100644 index 0000000..a53d4c2 --- /dev/null +++ b/drafts/bs-dagre/__tests__/Layout_test.re @@ -0,0 +1,66 @@ +open Jest; +open Expect; + +describe("Layout", () => { + test("empty graph has no size", () => { + let graph = Graph.make(); + let layout = Layout.make(graph); + + expect(Layout.size(layout)) |> toEqual((0, 0)); + }); + + describe("actors graph", () => { + let attrs = Graph.Attrs.make(~rankdir=Rank.Dir.LeftRight, ()); + let g = Graph.make(~attrs, ()); + + Graph.setDefaultEdgeLabel(g, () => {"minlen": 3}); + + Graph.setNodeWith( + g, + "kspacey", + Node.attrs(~label="Kevin Spacey", ~width=144, ~height=100, ()), + ); + Graph.setNodeWith( + g, + "swilliams", + Node.attrs(~label="Saul Williams", ~width=160, ~height=100, ()), + ); + Graph.setNodeWith( + g, + "bpitt", + Node.attrs(~label="Brad Pitt", ~width=108, ~height=100, ()), + ); + Graph.setNodeWith( + g, + "hford", + Node.attrs(~label="Harrison Ford", ~width=168, ~height=100, ()), + ); + Graph.setNodeWith( + g, + "lwilson", + Node.attrs(~label="Luke Wilson", ~width=144, ~height=100, ()), + ); + Graph.setNodeWith( + g, + "kbacon", + Node.attrs(~label="Kevin Bacon", ~width=121, ~height=100, ()), + ); + + Graph.setEdge(g, Edge.t(~v="kspacey", ~w="swilliams", ())); + Graph.setEdge(g, Edge.t(~v="swilliams", ~w="kbacon", ())); + Graph.setEdge(g, Edge.t(~v="bpitt", ~w="kbacon", ())); + Graph.setEdge(g, Edge.t(~v="hford", ~w="lwilson", ())); + Graph.setEdge(g, Edge.t(~v="lwilson", ~w="kbacon", ())); + + let layout = Layout.make(g); + + test("layout size", () => + expect(Layout.size(layout)) |> toEqual((749, 400)) + ); + + test("hford position", () => + expect(Layout.nodeCoords(layout, "hford")) + |> toEqual(Some((84, 350))) + ); + }); +}); diff --git a/drafts/bs-dagre/__tests__/Rank_test.re b/drafts/bs-dagre/__tests__/Rank_test.re new file mode 100644 index 0000000..934c4f7 --- /dev/null +++ b/drafts/bs-dagre/__tests__/Rank_test.re @@ -0,0 +1,67 @@ +open Jest; +open Expect; +open Rank; + +describe("Rank", () => { + describe("Dir", () => { + test("Known", () => + expect(( + Dir.fromStringExn(Dir.toString(Dir.TopBottom)), + Dir.fromStringExn(Dir.toString(Dir.BottomTop)), + Dir.fromStringExn(Dir.toString(Dir.LeftRight)), + Dir.fromStringExn(Dir.toString(Dir.RightLeft)), + )) + |> toEqual((Dir.TopBottom, Dir.BottomTop, Dir.LeftRight, Dir.RightLeft)) + ); + + test("unknown", () => + expect(() => + Dir.fromStringExn("TT") + ) |> toThrow + ); + }); + + describe("Align", () => { + test("Known", () => + expect(( + Align.fromStringExn(Align.toString(Align.UpLeft)), + Align.fromStringExn(Align.toString(Align.UpRight)), + Align.fromStringExn(Align.toString(Align.DownLeft)), + Align.fromStringExn(Align.toString(Align.DownRight)), + )) + |> toEqual(( + Align.UpLeft, + Align.UpRight, + Align.DownLeft, + Align.DownRight, + )) + ); + + test("unknown", () => + expect(() => + Align.fromStringExn("TT") + ) |> toThrow + ); + }); + + describe("Strategy", () => { + test("Known", () => + expect(( + Strategy.fromStringExn(Strategy.toString(Strategy.NetworkSimplex)), + Strategy.fromStringExn(Strategy.toString(Strategy.TightTree)), + Strategy.fromStringExn(Strategy.toString(Strategy.LongestPath)), + )) + |> toEqual(( + Strategy.NetworkSimplex, + Strategy.TightTree, + Strategy.LongestPath, + )) + ); + + test("unknown", () => + expect(() => + Strategy.fromStringExn("TT") + ) |> toThrow + ); + }); +}); diff --git a/drafts/bs-dagre/package.json b/drafts/bs-dagre/package.json new file mode 100644 index 0000000..2f0ada2 --- /dev/null +++ b/drafts/bs-dagre/package.json @@ -0,0 +1,36 @@ +{ + "name": "@arnau/bs-dagre", + "version": "0.4.3", + "author": "Arnau Siches ", + "license": "MIT", + "private": false, + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "$npm_execpath build && jest --coverage", + "format": "bsrefmt" + }, + "files": [ + "src/", + "bsconfig.json" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/arnau/bs-dagre.git" + }, + "keywords": [ + "reason", + "bucklescript", + "dagre", + "graph", + "layout" + ], + "devDependencies": { + "@glennsl/bs-jest": "^0.7.0", + "bs-platform": "9.0.2" + }, + "dependencies": { + "dagre": "^0.8.5" + } +} diff --git a/drafts/bs-dagre/src/Acyclicer.re b/drafts/bs-dagre/src/Acyclicer.re new file mode 100644 index 0000000..c4a8eea --- /dev/null +++ b/drafts/bs-dagre/src/Acyclicer.re @@ -0,0 +1,18 @@ +exception UnexpectedAcyclicer(string); + +type t = + | Greedy + | Lazy; + +let toString = (acyclicer: t): option(string) => + switch (acyclicer) { + | Greedy => Some("greedy") + | Lazy => None + }; + +let fromStringExn = (str: option(string)): t => + switch (str) { + | Some("greedy") => Greedy + | None => Lazy + | Some(str) => raise(UnexpectedAcyclicer(str)) + }; diff --git a/drafts/bs-dagre/src/Algorithm.re b/drafts/bs-dagre/src/Algorithm.re new file mode 100644 index 0000000..be6efba --- /dev/null +++ b/drafts/bs-dagre/src/Algorithm.re @@ -0,0 +1,54 @@ +[@bs.deriving abstract] +type path = { + distance: int, + [@bs.optional] + predecessor: Node.t, +}; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external components: Graph.t => array(array(Node.t)) = "components"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstra: (Graph.t, Node.t) => Js.Dict.t(path) = "dijkstra"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstraWith: (Graph.t, Node.t, Edge.t => int) => Js.Dict.t(path) = + "dijkstra"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstraAll: Graph.t => Js.Dict.t(Js.Dict.t(path)) = "dijkstraAll"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstraAllWith: + (Graph.t, Edge.t => int) => Js.Dict.t(Js.Dict.t(path)) = + "dijkstraAll"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external findCycles: Graph.t => array(array(Node.t)) = "findCycles"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external floydWarshall: Graph.t => Js.Dict.t(Js.Dict.t(path)) = + "floydWarshall"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external floydWarshallWith: + (Graph.t, Edge.t => int) => Js.Dict.t(Js.Dict.t(path)) = + "floydWarshall"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external isAcyclic: Graph.t => bool = "isAcyclic"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external postorder: (Graph.t, array(Node.t)) => array(Node.t) = "postorder"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external preorder: (Graph.t, array(Node.t)) => array(Node.t) = "preorder"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external prim: (Graph.t, Edge.t => int) => Graph.t = "prim"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external tarjan: Graph.t => array(array(Node.t)) = "tarjan"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external toopsort: Graph.t => array(array(Node.t)) = "topsort"; diff --git a/drafts/bs-dagre/src/Algorithm.rei b/drafts/bs-dagre/src/Algorithm.rei new file mode 100644 index 0000000..aaa522a --- /dev/null +++ b/drafts/bs-dagre/src/Algorithm.rei @@ -0,0 +1,200 @@ +/** + Represents the expected value from a shortest path algorithm. + + The [distance] holds the sum of the weights for the shortest path from the + source node to the target node. If there is there is no path between source + and target it returns [Number.POSITIVE_INFINITY]. + + The [predecessor] has the node that precedes the target node. It can be used + to walk backwards the shortest path. + */ +[@bs.deriving abstract] +type path = { + distance: int, + [@bs.optional] + predecessor: Node.t, +}; + +/** + Finds the connected components in a graph and returns an array of these + components. + + {[ + Graph.components(graph); + // [| + // [| "A", "B", "C", "D" |], + // [| "E", "F", "G" |], + // [| "H", "I" |] + // |] + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-components + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external components: Graph.t => array(array(Node.t)) = "components"; + +/** + Finds the shortest path from the given node (source) to all other nodes in + the given graph. + + This is an implementation of Dijkstra's algorithm. + + + Use [dijkstraWith] to provide a custom weight function. + + {[ + Algorithm.dijkstra(graph, "A"); + // { . + // "A": { "distance": 0 }, + // "C": { "distance": 1, "predecessor": 'A' }, + // "D": { "distance": 1, "predecessor": 'A' }, + // "B": { "distance": 2, "predecessor": 'C' }, + // "F": { "distance": 2, "predecessor": 'D' }, + // "E": { "distance": 3, "predecessor": 'F' }, + // } + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-dijkstra + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstra: (Graph.t, Node.t) => Js.Dict.t(path) = "dijkstra"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstraWith: (Graph.t, Node.t, Edge.t => int) => Js.Dict.t(path) = + "dijkstra"; + +/** + Finds the shortest path between every reachable node. + + Use [dijkstraAllWith] to provide a custom weight function. + + {[ + Algorithm.dijkstraAll(graph); + // { . + // "A": { + // "A": { "distance": 0 }, + // "C": { "distance": 1, "predecessor": 'A' }, + // "D": { "distance": 2, "predecessor": 'A' }, + // "B": { "distance": 1, "predecessor": 'C' }, + // "F": { "distance": 2, "predecessor": 'D' } + // "E": { "distance": 3, "predecessor": 'F' }, + // }, + // "B": { + // "A": { "distance": Infinity }, + // "C": { "distance": Infinity }, + // "D": { "distance": Infinity }, + // "B": { "distance": 0 }, + // "F": { "distance": Infinity } + // "E": { "distance": Infinity }, + // }, + // "C": { ... }, + // "D": { ... }, + // "E": { ... }, + // "F": { ... } + // } + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-dijkstraAll + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstraAll: Graph.t => Js.Dict.t(Js.Dict.t(path)) = "dijkstraAll"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external dijkstraAllWith: + (Graph.t, Edge.t => int) => Js.Dict.t(Js.Dict.t(path)) = + "dijkstraAll"; + +/** + Returns all nodes for the given graph that are part of a cycle. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-findCycles + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external findCycles: Graph.t => array(array(Node.t)) = "findCycles"; + +/** + Finds the shortest path between every reachable node. + + This is an implementation of the Floyd-Warshall algorithm. + + Use [floydWarshallWith] to provide a custom weight function. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-floydWarshall + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external floydWarshall: Graph.t => Js.Dict.t(Js.Dict.t(path)) = + "floydWarshall"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external floydWarshallWith: + (Graph.t, Edge.t => int) => Js.Dict.t(Js.Dict.t(path)) = + "floydWarshall"; + +/** + Checks if the given graph has no cycles. Use the slower [Algorithm.findCycles] + to get the actual list of cycles. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-isAcyclic + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external isAcyclic: Graph.t => bool = "isAcyclic"; + +/** + Returns the post-order traversal starting at the given nodes. + + {[ + Algorithm.postorder(graph, [|"A"|]); + // [| "B", "D", "E", C", "A" |] + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-postorder + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external postorder: (Graph.t, array(Node.t)) => array(Node.t) = "postorder"; + +/** + Returns the pre-order traversal starting at the given nodes. + + {[ + Algorithm.preorder(graph, [|"A"|]); + // [| "A", "C", "E", D", "B" |] + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-preorder + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external preorder: (Graph.t, array(Node.t)) => array(Node.t) = "preorder"; + +/** + Returns the minimum spanning tree (as an undirected graph) for the given + connected graph. Throws an error if the given graph is not connected. + + This is an implementation of the Prim algorithm. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-prim + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external prim: (Graph.t, Edge.t => int) => Graph.t = "prim"; + +/** + Finds all strongly connected components for the given directed graph. + + This is an implementation of the Tarjan algorithm. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-tarjan + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external tarjan: Graph.t => array(array(Node.t)) = "tarjan"; + +/** + Returns an array of nodes for the given graph such that for each edge [(u, v)] + [u] appears before [v] in the array. + + Throws an error if the given graph has cycles. + + This is an implementation of topological sorting. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#alg-topsort + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "alg")] +external toopsort: Graph.t => array(array(Node.t)) = "topsort"; diff --git a/drafts/bs-dagre/src/Edge.re b/drafts/bs-dagre/src/Edge.re new file mode 100644 index 0000000..16ec5d2 --- /dev/null +++ b/drafts/bs-dagre/src/Edge.re @@ -0,0 +1,40 @@ +[@bs.deriving abstract] +type t = { + [@bs.optional] + name: string, + v: string, + w: string, +}; + +[@bs.deriving abstract] +type point = { + x: int, + y: int, +}; + +let pointToString = + (p: point, ~correction: option((int, int))=?, ()): string => { + let (cx, cy) = Belt.Option.getWithDefault(correction, (0, 0)); + let x = xGet(p) + cx; + let y = yGet(p) + cy; + + string_of_int(x) ++ ", " ++ string_of_int(y); +}; + +[@bs.deriving abstract] +type attrs = { + [@bs.optional] + minlen: int, + [@bs.optional] + weight: int, + [@bs.optional] + width: int, + [@bs.optional] + height: int, + [@bs.optional] + labelpos: string, + [@bs.optional] + labeloffset: int, + [@bs.optional] + points: array(point), +}; diff --git a/drafts/bs-dagre/src/Graph.re b/drafts/bs-dagre/src/Graph.re new file mode 100644 index 0000000..3d80e91 --- /dev/null +++ b/drafts/bs-dagre/src/Graph.re @@ -0,0 +1,193 @@ +type t; + +module Attrs = { + type t = { + rankdir: Rank.Dir.t, + align: Rank.Align.t, + nodesep: int, + edgesep: int, + ranksep: int, + marginx: int, + marginy: int, + acyclicer: Acyclicer.t, + ranker: Rank.Strategy.t, + }; + + let make = + ( + ~rankdir: Rank.Dir.t=TopBottom, + ~align: Rank.Align.t=UpLeft, + ~nodesep: int=50, + ~edgesep: int=10, + ~ranksep: int=50, + ~marginx: int=0, + ~marginy: int=0, + ~acyclicer: Acyclicer.t=Lazy, + ~ranker: Rank.Strategy.t=NetworkSimplex, + (), + ) + : t => { + rankdir, + align, + nodesep, + edgesep, + ranksep, + marginx, + marginy, + acyclicer, + ranker, + }; + + let toDict = (attrs: t): Js.t('a) => { + "rankdir": Rank.Dir.toString(attrs.rankdir), + "align": Rank.Align.toString(attrs.align), + "nodesep": attrs.nodesep, + "edgesep": attrs.edgesep, + "ranksep": attrs.ranksep, + "marginx": attrs.marginx, + "marginy": attrs.marginy, + "acyclicer": Acyclicer.toString(attrs.acyclicer), + "ranker": Rank.Strategy.toString(attrs.ranker), + }; +}; + +[@bs.deriving abstract] +type config = { + directed: bool, + compound: bool, + multigraph: bool, +}; + +[@bs.new] [@bs.module "dagre"] [@bs.scope "graphlib"] +external makeWith: config => t = "Graph"; + +[@bs.send] external setGraph: (t, Js.t('a)) => unit = "setGraph"; + +[@bs.send] external graph: t => Js.t('a) = "graph"; + +[@bs.send] external setNodeWith: (t, Node.t, Node.attrs) => unit = "setNode"; +[@bs.send] external setNode: (t, Node.t) => unit = "setNode"; + +[@bs.send] [@bs.return nullable] +external node: (t, Node.t) => option(Node.attrs) = "node"; + +[@bs.send] external isDirected: t => bool = "isDirected"; +[@bs.send] external isMultigraph: t => bool = "isMultigraph"; +[@bs.send] external isLabelled: t => bool = "isMultigraph"; +[@bs.send] external isCompound: t => bool = "isCompound"; + +[@bs.send] external nodeCount: t => int = "nodeCount"; +[@bs.send] external edgeCount: t => int = "edgeCount"; + +[@bs.send] +external setDefaultNodeLabel: (t, unit => Js.t('a)) => unit = + "setDefaultNodeLabel"; +[@bs.send] +external setDefaultNodeAttrs: (t, unit => Js.t('a)) => unit = + "setDefaultNodeLabel"; + +[@bs.send] +external setDefaultEdgeLabel: (t, unit => Js.t('a)) => unit = + "setDefaultEdgeLabel"; +[@bs.send] +external setDefaultEdgeAttrs: (t, unit => Js.t('a)) => unit = + "setDefaultEdgeLabel"; + +[@bs.send] external nodes: t => array(Node.t) = "nodes"; +[@bs.send] external edges: t => array(Edge.t) = "edges"; +[@bs.send] external sources: t => array(Node.t) = "sources"; +[@bs.send] external sinks: t => array(Node.t) = "sinks"; + +[@bs.send] external hasNode: (t, Node.t) => bool = "hasNode"; +[@bs.send] external removeNode: (t, Node.t) => unit = "removeNode"; + +[@bs.send] [@bs.return nullable] +external predecessors: (t, Node.t) => option(array(Node.t)) = "predecessors"; + +[@bs.send] [@bs.return nullable] +external successors: (t, Node.t) => option(array(Node.t)) = "successors"; + +[@bs.send] [@bs.return nullable] +external neighbors: (t, Node.t) => option(array(Node.t)) = "neighbors"; + +[@bs.send] [@bs.return nullable] +external inEdges: + (t, Node.t, ~filter: Node.t=?, unit) => option(array(Edge.t)) = + "inEdges"; + +[@bs.send] [@bs.return nullable] +external outEdges: + (t, Node.t, ~filter: Node.t=?, unit) => option(array(Edge.t)) = + "outEdges"; + +[@bs.send] [@bs.return nullable] +external nodeEdges: + (t, Node.t, ~filter: Node.t=?, unit) => option(array(Edge.t)) = + "nodeEdges"; + +[@bs.send] [@bs.return nullable] +external parent: (t, Node.t) => option(Node.t) = "parent"; +[@bs.send] external setParent: (t, Node.t, Node.t) => unit = "setParent"; +[@bs.send] external removeParent: (t, Node.t) => unit = "setParent"; +[@bs.send] [@bs.return nullable] +external childrenRaw: (t, Node.t) => option(array(Node.t)) = "children"; + +[@bs.send] external hasEdge: (t, Edge.t) => bool = "hasEdge"; + +[@bs.send] external setEdgeWith: (t, Edge.t, Edge.attrs) => unit = "setEdge"; + +[@bs.send] external setEdge: (t, Edge.t) => unit = "setEdge"; + +[@bs.send] [@bs.return nullable] +external edge: (t, Edge.t) => option(Edge.attrs) = "edge"; + +[@bs.send] external removeEdge: (t, Edge.t) => unit = "removeEdge"; + +[@bs.send] external filterNodes: (t, Js.t('a) => bool) => t = "filterNodes"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "json")] +external serialize: t => Js.t('a) = "write"; + +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "json")] +external deserialize: Js.t('a) => t = "read"; + +let attrs = (g: t): Attrs.t => { + let obj = graph(g); + + Attrs.make( + ~rankdir=Rank.Dir.fromStringExn(obj##rankdir), + ~align=Rank.Align.fromStringExn(obj##align), + ~nodesep=obj##nodesep, + ~edgesep=obj##edgesep, + ~ranksep=obj##ranksep, + ~marginx=obj##marginx, + ~marginy=obj##marginy, + ~acyclicer=Acyclicer.fromStringExn(obj##acyclicer), + ~ranker=Rank.Strategy.fromStringExn(obj##ranker), + (), + ); +}; + +let setAttrs = (graph: t, attrs: Attrs.t): unit => + setGraph(graph, Attrs.toDict(attrs)); + +let make = + ( + ~directed: bool=true, + ~compound: bool=false, + ~multigraph: bool=false, + ~attrs: Attrs.t=Attrs.make(), + (), + ) + : t => { + let g = makeWith(config(~directed, ~compound, ~multigraph)); + + setAttrs(g, attrs); + + g; +}; + +let children = (graph: t, v: Node.t): option(array(Node.t)) => + isCompound(graph) ? childrenRaw(graph, v) : None; + +let copy = (g: t): t => filterNodes(g, _ => true); diff --git a/drafts/bs-dagre/src/Graph.rei b/drafts/bs-dagre/src/Graph.rei new file mode 100644 index 0000000..9ad5c2c --- /dev/null +++ b/drafts/bs-dagre/src/Graph.rei @@ -0,0 +1,476 @@ +/** + Opaque type to represent the graph object in JS land + */ +type t; + +module Attrs: { + type t = { + rankdir: Rank.Dir.t, + align: Rank.Align.t, + nodesep: int, + edgesep: int, + ranksep: int, + marginx: int, + marginy: int, + acyclicer: Acyclicer.t, + ranker: Rank.Strategy.t, + }; + + /** + See https://github.com/dagrejs/dagre/wiki#configuring-the-layout + + Note that [align] defaults to [UpLeft] instead of [undefined]. + */ + let make: + ( + ~rankdir: Rank.Dir.t=?, + ~align: Rank.Align.t=?, + ~nodesep: int=?, + ~edgesep: int=?, + ~ranksep: int=?, + ~marginx: int=?, + ~marginy: int=?, + ~acyclicer: Acyclicer.t=?, + ~ranker: Rank.Strategy.t=?, + unit + ) => + t; + + let toDict: + t => + { + . + "acyclicer": option(string), + "align": string, + "edgesep": int, + "marginx": int, + "marginy": int, + "nodesep": int, + "rankdir": string, + "ranker": string, + "ranksep": int, + }; +}; + +[@bs.deriving abstract] +type config = { + directed: bool, + compound: bool, + multigraph: bool, +}; + +/** + Creates a graph with the given config. It's recommended that you use the + [Graph.make] function instead. + */ +[@bs.new] [@bs.module "dagre"] [@bs.scope "graphlib"] +external makeWith: config => t = "Graph"; + +/** + Sets the graph attributes to the given graph. Use [Graph.setAttrs] + instead. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setGraph + */ +[@bs.send] +external setGraph: (t, Js.t('a)) => unit = "setGraph"; + +/** + Returns the graph attributes from the given graph. Use [Graph.attrs] + instead. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#graph + */ +[@bs.send] +external graph: t => Js.t('a) = "graph"; + +/** + Adds a node with its layout attributes to the graph. + + Note that the JavaScript version makes the attributes (i.e. [label] in dagre + parlance) optional. This interface uses two functions: [setNode] and + [setNodeWith]. If you use the former, make sure the graph has a default set + of attributes for new nodes with [setDefaultNodeAttrs]. + + {[ + let g = Graph.make(); + + Graph.setNodeWith( + g, + "furelise", + Node.attrs(~label="Für Elise", ~width=100, ~height=80, ()) + ); + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setNode + */ +[@bs.send] +external setNodeWith: (t, Node.t, Node.attrs) => unit = "setNode"; +[@bs.send] external setNode: (t, Node.t) => unit = "setNode"; + +/** + Returns the attributes for the given node. Returns [None] when the node + does not exist. + + {[ + let g = Graph.make(); + let nodeAttrs = Node.attrs(~label="Für Elise", ~width=100, ~height=80, ()); + Graph.setNodeWith(g, "furelise", nodeAttrs); + + Graph.node(g, "furelise") == Some(nodeAttrs); + ]} + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#node + */ +[@bs.send] [@bs.return nullable] +external node: (t, Node.t) => option(Node.attrs) = "node"; + +/** + Checks if the graph is directed. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#isDirected + */ +[@bs.send] +external isDirected: t => bool = "isDirected"; + +/** + Checks if the graph allows edges to be labelled. + + Note that dagre uses "label" to refer to data associated with graph, nodes + and edges and "name" for an edge label. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#isMultigraph + */ +[@bs.send] +external isMultigraph: t => bool = "isMultigraph"; +[@bs.send] external isLabelled: t => bool = "isMultigraph"; + +/** + Checks if the graph allows for subgraphs. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#isCompound + */ +[@bs.send] +external isCompound: t => bool = "isCompound"; + +/** + Returns the number of nodes in the graph. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#nodeCount + */ +[@bs.send] +external nodeCount: t => int = "nodeCount"; + +/** + Returns the number of edges in the graph. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#edgeCount + */ +[@bs.send] +external edgeCount: t => int = "edgeCount"; + +/** + Sets the default attributes for new nodes. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setDefaultNodeLabel + */ +[@bs.send] +external setDefaultNodeLabel: (t, unit => Js.t('a)) => unit = + "setDefaultNodeLabel"; +[@bs.send] +external setDefaultNodeAttrs: (t, unit => Js.t('a)) => unit = + "setDefaultNodeLabel"; + +/** + Sets the default attributes for new nodes. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setDefaultNodeLabel + */ +[@bs.send] +external setDefaultEdgeLabel: (t, unit => Js.t('a)) => unit = + "setDefaultEdgeLabel"; +[@bs.send] +external setDefaultEdgeAttrs: (t, unit => Js.t('a)) => unit = + "setDefaultEdgeLabel"; + +/** + Returns the nodes in the graph. Use [Graph.node] to get the node + attributes. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#nodes + */ +[@bs.send] +external nodes: t => array(Node.t) = "nodes"; + +/** + Returns the edges in the graph. Use [Graph.edge] to get the edge + attributes. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#edges + */ +[@bs.send] +external edges: t => array(Edge.t) = "edges"; + +/** + Returns the source nodes in the graph (i.e. nodes with no incoming edges). + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#sources + */ +[@bs.send] +external sources: t => array(Node.t) = "sources"; + +/** + Returns the sink nodes in the graph (i.e. nodes with no outgoing edges). + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#sinks + */ +[@bs.send] +external sinks: t => array(Node.t) = "sinks"; + +/** + Checks if the node exists in the graph. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#hasNode + */ +[@bs.send] +external hasNode: (t, Node.t) => bool = "hasNode"; + +/** + Removes the given node, its attributes, and incident edges. Does nothing + if the nodes does not exist. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#removeNode + */ +[@bs.send] +external removeNode: (t, Node.t) => unit = "removeNode"; + +/** + Returns the predecessor nodes for the given node. Returns [None] if the + node does not exist. + + Note that undirected graphs have undefined behaviour. Use [Graph.neighbors] + instead. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#predecessors + */ +[@bs.send] [@bs.return nullable] +external predecessors: (t, Node.t) => option(array(Node.t)) = "predecessors"; + +/** + Returns the successor nodes for the given node. Returns [None] if the + node does not exist. + + Note that undirected graphs have undefined behaviour. Use [Graph.neighbors] + instead. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#successors + */ +[@bs.send] [@bs.return nullable] +external successors: (t, Node.t) => option(array(Node.t)) = "successors"; + +/** + Returns the nodes connected to the given node. Returns [None] if the + node does not exist. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#successors + */ +[@bs.send] [@bs.return nullable] +external neighbors: (t, Node.t) => option(array(Node.t)) = "neighbors"; + +/** + Returns the incoming edges for the given node. When [filter] is provided, + it returns the subset of incoming edges matching the filter node. Returns + [None] if the node does not exist. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#inEdges + */ +[@bs.send] [@bs.return nullable] +external inEdges: + (t, Node.t, ~filter: Node.t=?, unit) => option(array(Edge.t)) = + "inEdges"; + +/** + Returns the outgoing edges for the given node. When [filter] is provided, + it returns the subset of outgoing edges matching the filter node. Returns + [None] if the node does not exist. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#outEdges + */ +[@bs.send] [@bs.return nullable] +external outEdges: + (t, Node.t, ~filter: Node.t=?, unit) => option(array(Edge.t)) = + "outEdges"; + +/** + Returns the edges for the given node. When [filter] is provided, it + returns the subset of edges matching the filter node. Returns [None] if + the node does not exist. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#nodeEdges + */ +[@bs.send] [@bs.return nullable] +external nodeEdges: + (t, Node.t, ~filter: Node.t=?, unit) => option(array(Edge.t)) = + "nodeEdges"; + +/** + Returns the parent node for the given node. Returns [None] if the node + does not exist or if it has no parent. + + Note that this function is for compound graphs, otherwise no node will + have a parent. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#parent + */ +[@bs.send] [@bs.return nullable] +external parent: (t, Node.t) => option(Node.t) = "parent"; + +/** + Sets the parent for the given node. + + Note that it throws an exception if the graph is not compound. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setParent + */ +[@bs.send] +external setParent: (t, Node.t, Node.t) => unit = "setParent"; + +/** + Removes the parent for the given node. + + Note that this is equivalent to use the [g.setParent] method with a single + argument in JavaScript. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setParent + */ +[@bs.send] +external removeParent: (t, Node.t) => unit = "setParent"; + +/** + Returns the children nodes for the given node. Returns [None] if the node + does not exist. + + Note that this function is for compound graphs, otherwise no node will + have children. + + Prefer [Graph.children] to get [None] instead of an empty array when the + graph is not compound. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#children + */ +[@bs.send] [@bs.return nullable] +external childrenRaw: (t, Node.t) => option(array(Node.t)) = "children"; + +/** + Returns the children for the given node. When the graph is not compound, + returns [None]. This is aligns with the [Graph.parent] behaviour. + + Use [Graph.childrenRaw] if you need the original behaviour. + */ +let children: (t, Node.t) => option(array(Node.t)); + +/** + Checks if the given edge exists. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#hasEdge + */ +[@bs.send] +external hasEdge: (t, Edge.t) => bool = "hasEdge"; + +/** + Adds an edge with its layout attributes to the graph. + + Note that the JavaScript version makes the attributes (i.e. [label] in dagre + parlance) optional. This interface uses two functions: [setEdge] and + [setEdgeWith]. If you use the former, make sure the graph has a default set + of attributes for new nodes with [setDefaultNodeAttrs]. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#setEdge + */ +[@bs.send] +external setEdgeWith: (t, Edge.t, Edge.attrs) => unit = "setEdge"; +[@bs.send] external setEdge: (t, Edge.t) => unit = "setEdge"; + +/** + Returns the layout attributes for the given edge. Returns [None] if the + edge does not exist. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#edge + */ +[@bs.send] [@bs.return nullable] +external edge: (t, Edge.t) => option(Edge.attrs) = "edge"; + +/** + Removes the given edge from the graph. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#removeEdge + */ +[@bs.send] +external removeEdge: (t, Edge.t) => unit = "removeEdge"; + +/** + Returns a filtered copy of the graph. The filter is based on the node + layout attributes. + + See: https://github.com/dagrejs/graphlib/issues/107 + */ +[@bs.send] +external filterNodes: (t, Js.t('a) => bool) => t = "filterNodes"; + +/** + Serializes the given graph to a dictionary-like data structure. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#json-write + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "json")] +external serialize: t => Js.t('a) = "write"; + +/** + Deserializes the given dictionary-like data structure into a [Graph.t]. + + See: https://github.com/dagrejs/graphlib/wiki/API-Reference#json-read + */ +[@bs.val] [@bs.module "dagre"] [@bs.scope ("graphlib", "json")] +external deserialize: Js.t('a) => t = "read"; + +/** + Returns the graph attributes. This is a less confusing name than the + original [Graph.graph]. + */ +let attrs: t => Attrs.t; + +/** + Sets the graph layout attributes. This is a less confusing name than the + original [Graph.setGraph]. + */ +let setAttrs: (t, Attrs.t) => unit; + +/** + Creates a new graph with the given attributes. It defaults to a directed + non-compound non-labelled graph. + + {[ + let attrs = Graph.Attrs.make(~rankdir=Rank.Dir.LeftRight, ()); + let graph = Graph.make(~attrs, ()); + + Graph.isDirected(graph) == true; + Graph.isCompound(graph) == false; + Graph.isLabelled(graph) == false; + Graph.attrs(graph) == attrs; + ]} + + */ +let make: + ( + ~directed: bool=?, + ~compound: bool=?, + ~multigraph: bool=?, + ~attrs: Attrs.t=?, + unit + ) => + t; + +/** + Makes a deep copy of the given graph. + */ +let copy: t => t; diff --git a/drafts/bs-dagre/src/Layout.re b/drafts/bs-dagre/src/Layout.re new file mode 100644 index 0000000..2d0936e --- /dev/null +++ b/drafts/bs-dagre/src/Layout.re @@ -0,0 +1,38 @@ +type t = { + graph: Graph.t, + width: int, + height: int, +}; + +[@bs.deriving abstract] +type point = { + x: int, + y: int, +}; + +[@bs.val] [@bs.module "dagre"] external makeRaw: Graph.t => unit = "layout"; + +let make = (g: Graph.t): t => { + let g' = Graph.copy(g); + + makeRaw(g'); + + let attrs = Graph.graph(g'); + let width = attrs##width > 0 ? attrs##width : 0; + let height = attrs##height > 0 ? attrs##height : 0; + + {graph: g', width, height}; +}; + +let size = (layout: t): (int, int) => (layout.width, layout.height); + +let nodeCoords = (layout: t, v: Node.t): option((int, int)) => { + switch (Graph.node(layout.graph, v)) { + | None => None + | Some(attrs) => Node.coords(attrs) + }; +}; + +/* let edge = (layout: t, e: Edge.t): option(Edge.attrs) => { */ +/* Graph.edge(layout.graph, e); */ +/* }; */ diff --git a/drafts/bs-dagre/src/Layout.rei b/drafts/bs-dagre/src/Layout.rei new file mode 100644 index 0000000..4038f6d --- /dev/null +++ b/drafts/bs-dagre/src/Layout.rei @@ -0,0 +1,19 @@ +type t = { + graph: Graph.t, + width: int, + height: int, +}; + +[@bs.deriving abstract] +type point = { + x: int, + y: int, +}; + +[@bs.val] [@bs.module "dagre"] external makeRaw: Graph.t => unit = "layout"; + +let make: Graph.t => t; + +let size: t => (int, int); + +let nodeCoords: (t, Node.t) => option((int, int)); diff --git a/drafts/bs-dagre/src/Node.re b/drafts/bs-dagre/src/Node.re new file mode 100644 index 0000000..2da1ed0 --- /dev/null +++ b/drafts/bs-dagre/src/Node.re @@ -0,0 +1,19 @@ +type t = string; + +[@bs.deriving abstract] +type attrs = { + [@bs.optional] + x: int, + [@bs.optional] + y: int, + label: string, + width: int, + height: int, +}; + +let coords = (attrs): option((int, int)) => { + switch (xGet(attrs), yGet(attrs)) { + | (Some(x), Some(y)) => Some((x, y)) + | _ => None + }; +}; diff --git a/drafts/bs-dagre/src/Rank.re b/drafts/bs-dagre/src/Rank.re new file mode 100644 index 0000000..74449d8 --- /dev/null +++ b/drafts/bs-dagre/src/Rank.re @@ -0,0 +1,78 @@ +module Dir = { + exception UnexpectedDir(string); + + /** The direction for rank nodes. */ + type t = + | TopBottom + | BottomTop + | LeftRight + | RightLeft; + + let toString = (dir: t): string => + switch (dir) { + | TopBottom => "TB" + | BottomTop => "BT" + | LeftRight => "LR" + | RightLeft => "RL" + }; + + let fromStringExn = (str: string): t => + switch (str) { + | "TB" => TopBottom + | "BT" => BottomTop + | "LR" => LeftRight + | "RL" => RightLeft + | _ => raise(UnexpectedDir(str)) + }; +}; + +module Align = { + exception UnexpectedAlign(string); + /** The alignment for the rank nodes. */ + type t = + | UpLeft + | UpRight + | DownLeft + | DownRight; + + let toString = (align: t): string => + switch (align) { + | UpLeft => "UL" + | UpRight => "UR" + | DownLeft => "DL" + | DownRight => "DR" + }; + + let fromStringExn = (str: string): t => + switch (str) { + | "UL" => UpLeft + | "UR" => UpRight + | "DL" => DownLeft + | "DR" => DownRight + | _ => raise(UnexpectedAlign(str)) + }; +}; + +module Strategy = { + exception UnexpectedStrategy(string); + + type t = + | NetworkSimplex + | TightTree + | LongestPath; + + let toString = (strategy: t): string => + switch (strategy) { + | NetworkSimplex => "network-simplex" + | TightTree => "tight-tree" + | LongestPath => "longest-path" + }; + + let fromStringExn = (str: string): t => + switch (str) { + | "network-simplex" => NetworkSimplex + | "tight-tree" => TightTree + | "longest-path" => LongestPath + | _ => raise(UnexpectedStrategy(str)) + }; +}; diff --git a/drafts/bs-director/.gitignore b/drafts/bs-director/.gitignore new file mode 100644 index 0000000..d260506 --- /dev/null +++ b/drafts/bs-director/.gitignore @@ -0,0 +1,4 @@ +.merlin +.DS_Store +/lib/ +/node_modules/ diff --git a/drafts/bs-director/README.md b/drafts/bs-director/README.md new file mode 100644 index 0000000..6704b87 --- /dev/null +++ b/drafts/bs-director/README.md @@ -0,0 +1,26 @@ +# [UNMAINTAINED] bs-director + +[BuckleScript](https://github.com/bloomberg/bucklescript) bindings to the [Director](https://github.com/flatiron/director) router. + +**NOTE: This repository is unmaintained.** If you'd like to maintain it, please either make an issue in the [meta repository](https://github.com/reasonml-community/meta/issues/new), or bring it up in Discord. + +``` +npm i bs-director +``` + +## Usage + +```reason +let router = + DirectorRe.makeRouter({ + "/": () => Js.log("Navigated to tasks list"), + "/active": () => Js.log("Navigated active tasks list"), + "/profile/:userid": (userid: string) => Js.log("Navigated to profile for: " ++ userid), + "/completed": () => Js.log("Completed a task") + }); + +/* Optional configuration */ +DirectorRe.configure(router, {"foo": "bar"}); + +DirectorRe.init(router, "/"); +``` diff --git a/drafts/bs-director/bsconfig.json b/drafts/bs-director/bsconfig.json new file mode 100644 index 0000000..f1d8ef2 --- /dev/null +++ b/drafts/bs-director/bsconfig.json @@ -0,0 +1,6 @@ +{ + "name": "bs-director", + "bsc-flags": ["-bs-super-errors"], + "sources": ["src"], + "refmt": 3 +} diff --git a/drafts/bs-director/package.json b/drafts/bs-director/package.json new file mode 100644 index 0000000..48e8a83 --- /dev/null +++ b/drafts/bs-director/package.json @@ -0,0 +1,31 @@ +{ + "name": "bs-director", + "version": "0.0.6", + "description": "BuckleScript bindings to the Director router", + "main": "index.js", + "devDependencies": { + "bs-platform": "^2.0.0" + }, + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "exit 0" + }, + "keywords": [ + "bucklescript", + "reason", + "ocaml" + ], + "homepage": "https://github.com/reasonml-community/bs-director#readme", + "bugs": "https://github.com/reasonml-community/bs-director/issues", + "repository": { + "type": "git", + "url": "https://github.com/reasonml-community/bs-director.git" + }, + "author": "", + "license": "MIT", + "dependencies": { + "director": "^1.2.8" + } +} diff --git a/drafts/bs-director/src/directorRe.re b/drafts/bs-director/src/directorRe.re new file mode 100644 index 0000000..20c3769 --- /dev/null +++ b/drafts/bs-director/src/directorRe.re @@ -0,0 +1,9 @@ +type t; + +[@bs.module "director/build/director"] [@bs.new] external makeRouter : Js.t({..}) => t = "Router"; + +[@bs.send] external configure : (t, Js.t({..})) => unit = "configure"; + +[@bs.send] external init : (t, string) => unit = "init"; + +[@bs.send] external setRoute : (t, string) => unit = "setRoute"; diff --git a/drafts/bs-discord/LICENSE b/drafts/bs-discord/LICENSE new file mode 100644 index 0000000..09d493b --- /dev/null +++ b/drafts/bs-discord/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2017, +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drafts/bs-discord/README.md b/drafts/bs-discord/README.md new file mode 100644 index 0000000..31052d2 --- /dev/null +++ b/drafts/bs-discord/README.md @@ -0,0 +1,5 @@ +# bs-discord.js + +> Archived due to the BuckleScript/Reason rebrand to [ReScript](https://rescript-lang.org). Please consider creating a new `rescript-discord.js` binding instead. + +BuckleScript bindings for [discord.js](https://www.npmjs.com/package/discord.js) diff --git a/drafts/bs-discord/package.json b/drafts/bs-discord/package.json new file mode 100644 index 0000000..c71fc0e --- /dev/null +++ b/drafts/bs-discord/package.json @@ -0,0 +1,33 @@ +{ + "name": "bs-discord.js", + "version": "0.1.0", + "description": "BuckleScript bindings for discord.js", + "main": "index.js", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "exit 0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/BuckleTypes/bs-discord.js.git" + }, + "keywords": [ + "discord", + "discord.js", + "bucklescript" + ], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/BuckleTypes/bs-discord.js/issues" + }, + "homepage": "https://github.com/BuckleTypes/bs-discord.js#readme", + "dependencies": { + "discord.js": "^11.0.0" + }, + "devDependencies": { + "bs-platform": "^1.9.0" + } +} diff --git a/drafts/bs-discord/src/discord.re b/drafts/bs-discord/src/discord.re new file mode 100644 index 0000000..c5740f8 --- /dev/null +++ b/drafts/bs-discord/src/discord.re @@ -0,0 +1,25 @@ +module Channel = { + type t; + external channelType : t => string = "type" [@@bs.get]; +}; + +module User = { + type t; + external bot : t => bool = "bot" [@@bs.get]; +}; + +module Message = { + type t; + external content : t => string = "" [@@bs.get]; + external channel : t => Channel.t = "" [@@bs.get]; + external reply : t => string => unit = "" [@@bs.send]; + external author : t => User.t = "" [@@bs.get]; +}; + +module Client = { + type t; + external createClient : unit => t = "Client" [@@bs.module "discord.js"] [@@bs.new]; + external login : t => string => unit = "" [@@bs.send]; + external onReady : t => _ [@bs.as "ready"] => (unit => unit) => unit = "on" [@@bs.send]; + external onMessage : t => _ [@bs.as "message"] => (Message.t => unit) => unit = "on" [@@bs.send]; +}; \ No newline at end of file diff --git a/drafts/bs-discord/src/examples/bot.re b/drafts/bs-discord/src/examples/bot.re new file mode 100644 index 0000000..4714a47 --- /dev/null +++ b/drafts/bs-discord/src/examples/bot.re @@ -0,0 +1,19 @@ +open Discord; + +let client = Client.createClient (); + +Client.onReady client (fun _ => Js.log "Bot is ready"); + +let handleMessage msg => + switch (Message.author msg |> User.bot) { + | false => + switch (Message.content msg) { + | "ping" => Message.reply msg "pong" + | _ => () + } + | true => () + }; + +Client.onMessage client handleMessage; + +Client.login client "TOKEN_HERE"; \ No newline at end of file diff --git a/drafts/bs-downshift/.gitignore b/drafts/bs-downshift/.gitignore new file mode 100644 index 0000000..fa86455 --- /dev/null +++ b/drafts/bs-downshift/.gitignore @@ -0,0 +1,23 @@ +# Logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Yarn Integrity file +.yarn-integrity + +# BuckleScript +.merlin +.bsb.lock +lib +*.bs.js \ No newline at end of file diff --git a/drafts/bs-downshift/CHANGELOG.md b/drafts/bs-downshift/CHANGELOG.md new file mode 100644 index 0000000..0ad336f --- /dev/null +++ b/drafts/bs-downshift/CHANGELOG.md @@ -0,0 +1,32 @@ +# v1.0.1 + +### Bug fixes + +* fix: external `extGetItemProps` should bind to `getItemProps` ([#9] by @kgoggin) + +[#9]: https://github.com/reasonml-community/bs-downshift/pull/9 + +# v1.0.0 + +### Maintenance + +* upgrade to `bs-platform` version `3` +* upgrade to `reason-react` version `0.4` + +# v0.2.0 + +Compatible with `downshift` [v1.25.0](https://github.com/paypal/downshift/releases/tag/v1.25.0). + +# v0.1.1 + +### Bug fixes + +* correctly bind `index` in `getItemProps` ([#5] by @kgoggin) + +[#5]: https://github.com/reasonml-community/bs-downshift/pull/5 + +# v0.1.0 + +Compatible with `downshift` [v1.22.5](https://github.com/paypal/downshift/releases/tag/v1.22.5). + +* initial release and bindings diff --git a/drafts/bs-downshift/LICENSE b/drafts/bs-downshift/LICENSE new file mode 100644 index 0000000..86589de --- /dev/null +++ b/drafts/bs-downshift/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018, Nicola Molinari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/drafts/bs-downshift/README.md b/drafts/bs-downshift/README.md new file mode 100644 index 0000000..aa69d1f --- /dev/null +++ b/drafts/bs-downshift/README.md @@ -0,0 +1,61 @@ +# `bs-downshift` + +[BuckleScript](https://github.com/bucklescript/bucklescript) bindings for [Downshift](https://github.com/paypal/downshift) + +[![npm](https://img.shields.io/npm/v/bs-downshift.svg)](https://npmjs.org/bs-downshift) +[![Issues](https://img.shields.io/github/issues/reasonml-community/bs-downshift.svg)](https://github.com/reasonml-community/bs-downshift/issues) +[![Dependencies](https://img.shields.io/david/peer/reasonml-community/bs-downshift.svg)](https://github.com/reasonml-community/bs-downshift/blob/master/package.json) +[![Issues](https://img.shields.io/github/issues/reasonml-community/bs-downshift.svg)](https://github.com/reasonml-community/bs-downshift/issues) +[![Last Commit](https://img.shields.io/github/last-commit/reasonml-community/bs-downshift.svg)]() + +## Demo + +_Coming soon_ + +## Compatibility with original `downshift` library + +Compatible with `downshift` [v1.25.0](https://github.com/paypal/downshift/releases/tag/v1.25.0). + +> Using newer versions of `downshift` might break the bindings as the API might have changed. Use at your own risk. + +## Install and setup + +#### yarn + +```bash +$ yarn add bs-downshift +``` + +#### bsconfig + +Add `bs-downshift` to your `bs-dependencies`: **bsconfig.json** + +```json +"bs-dependencies": [ + "bs-downshift", + "reason-react" +] +``` + +## Usage + +See [examples](./examples) folder. + +### Usage of `render` function + +The `render` prop is a function that passes an object which contains _methods_ and _values_. + +In ReasonML, this object is represented as a module called `ControllerStateAndHelpers`. + +To make use of the _methods_ and _values_ within that module, you need to call it by passing the argument type (which is of type `ControllerStateAndHelpers.t` and does effectively the binding to the JS object method) like: + +```js +render=( + t => { + ControllerStateAndHelpers.toggleMenu(t, ()); + /* ... */ + } +) +``` + +You can see that in the [examples](./examples) folder. diff --git a/drafts/bs-downshift/bsconfig.json b/drafts/bs-downshift/bsconfig.json new file mode 100644 index 0000000..922707a --- /dev/null +++ b/drafts/bs-downshift/bsconfig.json @@ -0,0 +1,26 @@ +{ + "name": "bs-downshift", + "sources": [ + { + "dir": "src", + "public": "all" + }, + { + "dir": "examples", + "type": "dev" + } + ], + "bs-dependencies": ["reason-react"], + "bsc-flags": ["-bs-super-errors"], + "reason": { + "react-jsx": 2 + }, + "refmt": 3, + "package-specs": [ + { + "module": "es6", + "in-source": true + } + ], + "suffix": ".bs.js" +} diff --git a/drafts/bs-downshift/examples/reason_downshift.re b/drafts/bs-downshift/examples/reason_downshift.re new file mode 100644 index 0000000..7e936ce --- /dev/null +++ b/drafts/bs-downshift/examples/reason_downshift.re @@ -0,0 +1,141 @@ +type arrayOfItems = array(string); + +module BasicAutocomplete = { + let component = ReasonReact.statelessComponent("BasicAutocomplete"); + let make = (~items: arrayOfItems, ~onChange, _children) => { + ...component, + render: _self => + +
+ ( + /* + NOTE: spreading props is discouraged in ReasonReact! + https://reasonml.github.io/reason-react/docs/en/props-spread.html + */ + ReasonReact.cloneElement( + , + /* The method `getInputProps` returns a type `any`, we simply + cast it to a `{..}` type. */ + ~props= + Downshift.toJsObj( + Downshift.ControllerStateAndHelpers.getInputProps( + t, + ~options= + ReactDOMRe.props( + ~placeholder="Favorite color ?", + (), + ), + (), + ), + ), + [||], + ) + ) + ( + if (Downshift.ControllerStateAndHelpers.isOpen(t)) { +
+ ( + ReasonReact.array( + { + let index = ref(0); + /* NOTE: I'm using `Array.fold_left` because + `Array.filter` is not supported yet. + However we need to track the `index` ourselves. */ + Array.fold_left( + (filteredArray, item) => { + index := index^ + 1; + let inputValue = + Js.Nullable.toOption( + Downshift.ControllerStateAndHelpers.inputValue( + t, + ), + ); + let shouldFilterItem = + switch (inputValue) { + | None => true + | Some(v) => + Js.String.includes( + String.lowercase(v), + String.lowercase(item), + ) + }; + shouldFilterItem ? + filteredArray : + { + let backgroundColor = + if (Downshift.ControllerStateAndHelpers.highlightedIndex( + t, + ) + == Js.Nullable.return(index^)) { + "gray"; + } else { + "white"; + }; + let fontWeight = + if (Downshift.ControllerStateAndHelpers.selectedItem( + t, + ) + == Downshift.toAny(item)) { + "bold"; + } else { + "normal"; + }; + let elem = + ReasonReact.cloneElement( +
, + ~props= + Downshift.toJsObj( + Downshift.ControllerStateAndHelpers.getItemProps( + t, + ~item=Downshift.toAny(item), + (), + ), + ), + [|ReasonReact.string(item)|], + ); + Array.append(filteredArray, [|elem|]); + }; + }, + [||], + items, + ); + }, + ) + ) +
; + } else { + ReasonReact.null; + } + ) +
+ ) + />, + }; +}; + +module App = { + let component = ReasonReact.statelessComponent("App"); + let make = _children => { + ...component, + render: _self => + Js.log(selectedItem)) + />, + }; +}; \ No newline at end of file diff --git a/drafts/bs-downshift/package.json b/drafts/bs-downshift/package.json new file mode 100644 index 0000000..c94c311 --- /dev/null +++ b/drafts/bs-downshift/package.json @@ -0,0 +1,38 @@ +{ + "name": "bs-downshift", + "version": "1.0.1", + "description": "BuckleScript bindings for Downshift", + "license": "MIT", + "author": "Nicola Molinari (http://emmenko.org)", + "repository": { + "type": "git", + "url": "https://github.com/reasonml-community/bs-downshift.git" + }, + "homepage": "https://github.com/reasonml-community/bs-downshift#readme", + "bugs": "https://github.com/reasonml-community/bs-downshift/issues", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "downshift": "1.25.0" + }, + "peerDependencies": { + "bs-platform": "^3.0.0" + }, + "devDependencies": { + "bs-platform": "^3.0.0", + "downshift": "1.25.0", + "prop-types": "^15.6.1", + "react": "^16.3.2", + "reason-react": "^0.4.1" + }, + "keywords": [ + "BuckleScript", + "Downshift", + "React", + "Reason" + ] +} diff --git a/drafts/bs-downshift/src/Downshift.re b/drafts/bs-downshift/src/Downshift.re new file mode 100644 index 0000000..4964f68 --- /dev/null +++ b/drafts/bs-downshift/src/Downshift.re @@ -0,0 +1,187 @@ +/* Common types */ +type any; + +/* Helpers */ +external toAny : 'a => any = "%identity"; + +external toJsObj : any => Js.t({..}) = "%identity"; + +/* Types for Downshift API */ +type item = any; + +type otherStateToSet = Js.Dict.t(string); + +type cb = unit => unit; + +type itemToString = item => string; + +type selectedItemChanged = (item, item) => bool; + +type a11yStatusMessageOptions = { + . + "highlightedIndex": option(int), + "highlightedValue": any, + "inputValue": string, + "isOpen": bool, + "itemToString": itemToString, + "previousResultCount": int, + "resultCount": int, + "selectedItem": item, +}; + +type getA11yStatusMessage = a11yStatusMessageOptions => string; + +type rootPropsOptions = {. "refKey": string}; + +type itemPropsOptions = { + . + "index": Js.Nullable.t(int), + "item": any, +}; + +module ControllerStateAndHelpers = { + type t; + /* Getters */ + [@bs.send] external getRootProps : (t, rootPropsOptions) => any = ""; + [@bs.send] + external getButtonProps : + (t, ~options: ReactDOMRe.reactDOMProps=?, unit) => any = + ""; + [@bs.send] + external getLabelProps : + (t, ~options: ReactDOMRe.reactDOMProps=?, unit) => any = + ""; + [@bs.send] + external getInputProps : + (t, ~options: ReactDOMRe.reactDOMProps=?, unit) => any = + ""; + [@bs.send] external extGetItemProps : (t, itemPropsOptions) => any = "getItemProps"; + [@bs.send] + external itemPropsOptions : (t, ~options: itemPropsOptions) => any = ""; + /* Actions */ + [@bs.send] external openMenu : (t, ~cb: cb=?, unit) => unit = ""; + [@bs.send] external closeMenu : (t, ~cb: cb=?, unit) => unit = ""; + [@bs.send] + external toggleMenu : + (t, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => unit = + ""; + [@bs.send] + external reset : + (t, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => unit = + ""; + [@bs.send] + external selectItem : + (t, ~item: item, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => + unit = + ""; + [@bs.send] + external selectItemAtIndex : + (t, ~index: int, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => + unit = + ""; + [@bs.send] + external selectHighlightedItem : + (t, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => unit = + ""; + [@bs.send] + external setHighlightedIndex : + (t, ~index: int, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => + unit = + ""; + [@bs.send] external clearSelection : (t, ~cb: cb=?, unit) => unit = ""; + [@bs.send] external clearItems : (t, unit) => unit = ""; + [@bs.send] external itemToString : (t, item) => unit = ""; + /* State */ + [@bs.get] external highlightedIndex : t => Js.Nullable.t(int) = ""; + [@bs.get] external inputValue : t => Js.Nullable.t(string) = ""; + [@bs.get] external isOpen : t => bool = ""; + [@bs.get] external selectedItem : t => item = ""; + let getItemProps = (t, ~item: any, ~index=?, ()) : any => { + let itemPropsOpt = { + "item": item, + "index": Js.Nullable.fromOption(index), + }; + extGetItemProps(t, itemPropsOpt); + }; +}; + +type stateChangeOptions = { + . + "type": string, + "highlightedIndex": int, + "inputValue": string, + "isOpen": bool, + "selectedItem": item, +}; + +type onChange = (any, ControllerStateAndHelpers.t) => unit; + +type onSelect = (any, ControllerStateAndHelpers.t) => unit; + +type onStateChange = (stateChangeOptions, ControllerStateAndHelpers.t) => unit; + +type onInputValueChange = (string, ControllerStateAndHelpers.t) => unit; + +type renderFunc = ControllerStateAndHelpers.t => ReasonReact.reactElement; + +/* Expose the React component with the mapped props */ +[@bs.module "downshift"] +external reactClass : ReasonReact.reactClass = "default"; + +let make = + ( + ~defaultSelectedItem: option(any)=?, + ~defaultHighlightedIndex: option(int)=?, + ~defaultInputValue: option(string)=?, + ~defaultIsOpen: option(bool)=?, + ~itemToString: option(itemToString)=?, + ~selectedItemChanged: option(selectedItemChanged)=?, + ~getA11yStatusMessage: option(getA11yStatusMessage)=?, + ~onChange: option(onChange)=?, + ~onSelect: option(onSelect)=?, + ~onStateChange: option(onStateChange)=?, + ~onInputValueChange: option(onInputValueChange)=?, + ~itemCount: option(int)=?, + ~highlightedIndex: option(int)=?, + ~inputValue: option(string)=?, + ~isOpen: option(bool)=?, + ~selectedItem: option(any)=?, + ~render: renderFunc, + ~id: option(string)=?, + ~environment: option(Dom.window)=?, + ~onOuterClick: option(unit => unit)=?, + _children, + ) => + ReasonReact.wrapJsForReason( + ~reactClass, + ~props={ + "defaultSelectedItem": + Js.Null_undefined.fromOption(defaultSelectedItem), + "defaultHighlightedIndex": + Js.Null_undefined.fromOption(defaultHighlightedIndex), + "defaultInputValue": Js.Null_undefined.fromOption(defaultInputValue), + "defaultIsOpen": Js.Null_undefined.fromOption(defaultIsOpen), + "itemToString": Js.Null_undefined.fromOption(itemToString), + "selectedItemChanged": + Js.Null_undefined.fromOption(selectedItemChanged), + "getA11yStatusMessage": + Js.Null_undefined.fromOption(getA11yStatusMessage), + "onChange": Js.Null_undefined.fromOption(onChange), + "onSelect": Js.Null_undefined.fromOption(onSelect), + "onStateChange": Js.Null_undefined.fromOption(onStateChange), + "onInputValueChange": Js.Null_undefined.fromOption(onInputValueChange), + "itemCount": Js.Null_undefined.fromOption(itemCount), + "highlightedIndex": Js.Null_undefined.fromOption(highlightedIndex), + "inputValue": Js.Null_undefined.fromOption(inputValue), + "isOpen": Js.Null_undefined.fromOption(isOpen), + "selectedItem": Js.Null_undefined.fromOption(selectedItem), + "render": render, + "id": Js.Null_undefined.fromOption(id), + "environment": Js.Null_undefined.fromOption(environment), + "onOuterClick": Js.Null_undefined.fromOption(onOuterClick), + }, + [||], + ); + +[@bs.module "downshift"] +external resetIdCounter : unit => unit = "resetIdCounter"; \ No newline at end of file diff --git a/drafts/bs-downshift/src/Downshift.rei b/drafts/bs-downshift/src/Downshift.rei new file mode 100644 index 0000000..6951ee0 --- /dev/null +++ b/drafts/bs-downshift/src/Downshift.rei @@ -0,0 +1,146 @@ +type any; + +external toAny : 'a => any = "%identity"; + +external toJsObj : any => Js.t({..}) = "%identity"; + +type item = any; + +type otherStateToSet = Js.Dict.t(string); + +type cb = unit => unit; + +type itemToString = item => string; + +type selectedItemChanged = (item, item) => bool; + +type a11yStatusMessageOptions = { + . + "highlightedIndex": option(int), + "highlightedValue": any, + "inputValue": string, + "isOpen": bool, + "itemToString": itemToString, + "previousResultCount": int, + "resultCount": int, + "selectedItem": item +}; + +type getA11yStatusMessage = a11yStatusMessageOptions => string; + +type rootPropsOptions = {. "refKey": string}; + +type itemPropsOptions = { + . + "index": Js.Nullable.t(int), + "item": any +}; + +module ControllerStateAndHelpers: { + type t; + [@bs.send] external getRootProps : (t, rootPropsOptions) => any = ""; + [@bs.send] + external getButtonProps : + (t, ~options: ReactDOMRe.reactDOMProps=?, unit) => any = + ""; + [@bs.send] + external getLabelProps : + (t, ~options: ReactDOMRe.reactDOMProps=?, unit) => any = + ""; + [@bs.send] + external getInputProps : + (t, ~options: ReactDOMRe.reactDOMProps=?, unit) => any = + ""; + [@bs.send] external extGetItemProps : (t, itemPropsOptions) => any = "getItemProps"; + [@bs.send] + external itemPropsOptions : (t, ~options: itemPropsOptions) => any = ""; + [@bs.send] external openMenu : (t, ~cb: cb=?, unit) => unit = ""; + [@bs.send] external closeMenu : (t, ~cb: cb=?, unit) => unit = ""; + [@bs.send] + external toggleMenu : + (t, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => unit = + ""; + [@bs.send] + external reset : + (t, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => unit = + ""; + [@bs.send] + external selectItem : + (t, ~item: item, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => + unit = + ""; + [@bs.send] + external selectItemAtIndex : + (t, ~index: int, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => + unit = + ""; + [@bs.send] + external selectHighlightedItem : + (t, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => unit = + ""; + [@bs.send] + external setHighlightedIndex : + (t, ~index: int, ~otherStateToSet: otherStateToSet=?, ~cb: cb=?, unit) => + unit = + ""; + [@bs.send] external clearSelection : (t, ~cb: cb=?, unit) => unit = ""; + [@bs.send] external clearItems : (t, unit) => unit = ""; + [@bs.send] external itemToString : (t, item) => unit = ""; + [@bs.get] external highlightedIndex : t => Js.Nullable.t(int) = ""; + [@bs.get] external inputValue : t => Js.Nullable.t(string) = ""; + [@bs.get] external isOpen : t => bool = ""; + [@bs.get] external selectedItem : t => item = ""; + let getItemProps: (t, ~item: any, ~index: int=?, unit) => any; +}; + +type stateChangeOptions = { + . + "type": string, + "highlightedIndex": int, + "inputValue": string, + "isOpen": bool, + "selectedItem": item +}; + +type onChange = (any, ControllerStateAndHelpers.t) => unit; + +type onSelect = (any, ControllerStateAndHelpers.t) => unit; + +type onStateChange = (stateChangeOptions, ControllerStateAndHelpers.t) => unit; + +type onInputValueChange = (string, ControllerStateAndHelpers.t) => unit; + +type renderFunc = ControllerStateAndHelpers.t => ReasonReact.reactElement; + +let make: + ( + ~defaultSelectedItem: any=?, + ~defaultHighlightedIndex: int=?, + ~defaultInputValue: string=?, + ~defaultIsOpen: bool=?, + ~itemToString: itemToString=?, + ~selectedItemChanged: selectedItemChanged=?, + ~getA11yStatusMessage: getA11yStatusMessage=?, + ~onChange: onChange=?, + ~onSelect: onSelect=?, + ~onStateChange: onStateChange=?, + ~onInputValueChange: onInputValueChange=?, + ~itemCount: int=?, + ~highlightedIndex: int=?, + ~inputValue: string=?, + ~isOpen: bool=?, + ~selectedItem: any=?, + ~render: renderFunc, + ~id: string=?, + ~environment: Dom.window=?, + ~onOuterClick: unit => unit=?, + 'a + ) => + ReasonReact.component( + ReasonReact.stateless, + ReasonReact.noRetainedProps, + ReasonReact.actionless + ); + +[@bs.module "downshift"] +external resetIdCounter : unit => unit = "resetIdCounter"; \ No newline at end of file diff --git a/drafts/bs-downshift/yarn.lock b/drafts/bs-downshift/yarn.lock new file mode 100644 index 0000000..ba62b66 --- /dev/null +++ b/drafts/bs-downshift/yarn.lock @@ -0,0 +1,141 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +bs-platform@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-3.0.0.tgz#38f200730db52fdea37819376b6ac3dfb20244c0" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +downshift@1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/downshift/-/downshift-1.25.0.tgz#7f6e2dda4aa5ddbb2932401bd61e7b741e92c02e" + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + dependencies: + iconv-lite "~0.4.13" + +fbjs@^0.8.16: + version "0.8.16" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.9" + +iconv-lite@~0.4.13: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + +is-stream@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +js-tokens@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +prop-types@^15.6.0: + version "15.6.0" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +prop-types@^15.6.1: + version "15.6.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +"react-dom@>=15.0.0 || >=16.0.0": + version "16.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + +"react@>=15.0.0 || >=16.0.0": + version "16.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + +react@^16.3.2: + version "16.3.2" + resolved "https://registry.yarnpkg.com/react/-/react-16.3.2.tgz#fdc8420398533a1e58872f59091b272ce2f91ea9" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.0" + +reason-react@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/reason-react/-/reason-react-0.4.1.tgz#f1c8bf0d116be6bf43109912ee4d95e58dd7c64f" + dependencies: + react ">=15.0.0 || >=16.0.0" + react-dom ">=15.0.0 || >=16.0.0" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + +ua-parser-js@^0.7.9: + version "0.7.17" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" + +whatwg-fetch@>=0.10.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" diff --git a/drafts/bs-dynamic-import/.babelrc b/drafts/bs-dynamic-import/.babelrc new file mode 100644 index 0000000..b77010f --- /dev/null +++ b/drafts/bs-dynamic-import/.babelrc @@ -0,0 +1,6 @@ +{ + "presets": ["@babel/preset-env"], + "plugins": [ + "dynamic-import-node" + ] +} diff --git a/drafts/bs-dynamic-import/.travis.yml b/drafts/bs-dynamic-import/.travis.yml new file mode 100644 index 0000000..12b7feb --- /dev/null +++ b/drafts/bs-dynamic-import/.travis.yml @@ -0,0 +1,13 @@ +sudo: false + +language: node_js + +node_js: + - 9 + +install: + - npm install + +script: + - npm run make + - npm run test diff --git a/drafts/bs-dynamic-import/CHANGELOG.md b/drafts/bs-dynamic-import/CHANGELOG.md new file mode 100644 index 0000000..d3f26ab --- /dev/null +++ b/drafts/bs-dynamic-import/CHANGELOG.md @@ -0,0 +1,8 @@ +# 0.4.0 + +- Upgrade all dependencies (support bs-platform@5). +- Repository chore (package audit, renovate bot removed, avoid dependency pin, Babel configuration upgrade). + +# 0.3.0 + +- Initial release. diff --git a/drafts/bs-dynamic-import/LICENSE b/drafts/bs-dynamic-import/LICENSE new file mode 100644 index 0000000..e508b6d --- /dev/null +++ b/drafts/bs-dynamic-import/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Meillet Robin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/drafts/bs-dynamic-import/README.md b/drafts/bs-dynamic-import/README.md new file mode 100644 index 0000000..670ee0c --- /dev/null +++ b/drafts/bs-dynamic-import/README.md @@ -0,0 +1,473 @@ +# Summary + +[![Build Status](https://travis-ci.org/kMeillet/bs-dynamic-import.svg?branch=master)](https://travis-ci.org/kMeillet/bs-dynamic-import) +![NPM license](https://img.shields.io/npm/l/bs-dynamic-import.svg?style=flat) + +**Warning :** This package is now in read-only mode, if you want to lazy load React components in a ReasonML application use "[reason-loadable](https://github.com/kMeillet/reason-loadable)". + +If you want to import something else like a JSON document or JavaScript code that isn't a React component (example : Math library), take a look at "[reason-loadable](https://github.com/kMeillet/reason-loadable)" source code and tests, it can do that with some adaptation. + +This package probably doesn't work anymore since BuckleScript changed object representation in JavaScript output in recent version (from array to object). + +------------------------------------- + +📦🚀 BuckleScript dynamic import interop on JavaScript environment. + +Provide a clear path for Reason/Ocaml module to become importable at runtime, preserve type-safety. + +**Note :** This project does not target native compilation but JavaScript compilation. + +* [Installation](#installation) +* [Motivation](#motivation) + * [Common problems](#common-problems) + * [Support](#support) +* [Example](#example) + * [Basic example](#basic-example) + * [Multiple module](#multiple-module) +* [API](#api) + * [DynamicImport](#dynamicimport) + * [Infix](#infix) +* [Common errors](#common-errors) + +# Installation + +```sh +npm install bs-dynamic-import --save +``` + +Then add it to "bsconfig.json" : + +```sh +"bs-dependencies": [ + "bs-dynamic-import" +] +``` + +You can now use **"DynamicImport"** module. + +# Motivation + +I will try to explain my propose and the following pattern for dynamic import API in Reason/Ocaml. + +The existing syntactic forms for JavaScript importing modules are static declarations. They accept a string literal as the module specifier, and introduce bindings into the local scope via a pre-runtime "linking" process. + +This is a great design for the 90% case, and supports important use cases such as static analysis, bundling tools, and tree shaking. + +However, it's also desirable to be able to dynamically load parts of a JavaScript application at runtime. This could be because of factors only known at runtime (such as the user's language), for performance reasons (not loading code until it is likely to be used), or for robustness reasons (surviving failure to load a non-critical module). Such dynamic code-loading has a long history, especially on the web, but also in Node.js (to delay startup costs). The existing import syntax does not support such use cases ... + +Truly dynamic code loading also enables advanced scenarios, such as racing multiple modules against each other and choosing the first to successfully load. + +https://tc39.github.io/proposal-dynamic-import/ + +In Reason/Ocaml, every file is a module : file name map to module name and you can make module into module. With BuckleScript, we can compile Reason/Ocaml module to JavaScript module. + +BuckleScript doesn't provide dynamic import. + +🔥 **"bs-dynamic-import"** let you use dynamic import right now with BuckleScript. + +`When BuckleScript will release dynamic import support, you should drop "bs-dynamic-import" and switch to BuckleScript syntax ; no worries, this project offers a basic API and can be replaced very quickly if needed.` + +## Common problems + +Some of the most common problematic patterns that were covered include : + +* **Commonjs/ESM support**. ✔️ +* **Dynamic import Reason/Ocaml module**. ✔️ +* **Dynamic import multiple module in parallel**. ✔️ +* **Race module against each other**. ❌ + +## Support + +- Server-side (Node.js) : Node.js doesn't support dynamic import, you should use [Babel](https://babeljs.io/) with ["babel-plugin-dynamic-import-node"](https://github.com/airbnb/babel-plugin-dynamic-import-node). [#example](https://github.com/kMeillet/bs-dynamic-import) + +- Client-side (web) : you should use a bundler ([Webpack 4](https://webpack.js.org/) and [Parcel](https://github.com/parcel-bundler/parcel) support dynamic import with zero-configuration, Rollup require experimental flag). [#example](https://github.com/kMeillet/reason-loadable/tree/master/examples) + +# Example + +## Basic example + +Consider a Math module and Main module : + +```reason +/* Math.re */ +let addOne = x => x + 1; +/* ... */ +``` + +```reason +/* Main.re */ +3 |> Math.addOne |> Js.log; /* 4 */ +``` + +**Note :** Pipe operator **"|>"** help chaining function and avoid parenthesis ceremony. + +Module are static (know at compile time). If you want to import Math dynamically (on runtime), use **"DynamicImport"** module. + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.bs.js") + |> resolve + |> Js.Promise.then_(((module AnonymouModule): (module MathType)) => + 3 |> AnonymouModule.addOne |> Js.log |> Js.Promise.resolve /* 4 */ + ) +); +``` + +**Note :** You must always import BuckleScript output (bs.js), don't try to import Reason/Ocaml file (that will not work). + +1) First, we declare a module type who refer to Math module type himself. + +2) We open **"DynamicImport"** module locally to avoid name collision. **"DynamicImport"** module come with multiple functions and infix operator but the most important part of the API are **"import"** and **"resolve"** function. + +3) **"DynamicImport.import"** share signature with dynamic import JavaScript API : take a module path and return a Promise of module. This Promise should be passed to **"DynamicImport.resolve"** when you want to resolve module. + +**Note :** when using **"DynamicImport.import"** you should provide ".bs.js" extension (or configure your bundler to recognize ".bs.js" extension as ".js" extension). + +**Note :** if you import wrong module or a path who doesn't exist, compiler will not complain so be careful about this situation when you move/rename file, like with JavaScript module. + +4) After module is dynamically imported, you can use **"Js.Promise.then_"** and "repack" the anonymous module with correct module type. If you use wrong module type or forgot to provide it, you will face compiler error. + +**Note :** Using **"Js.Promise.then_"** is verbose (you have to wrap result with **"Js.Promise.resolve"** every time), we provide **"<$>"** (map) operator to traverse Promise and apply your function (return value will be wrapped into Promise). + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.bs.js") + |> resolve + <$> ( + ((module AnonymouModule): (module MathType)) => + 3 |> AnonymouModule.addOne |> Js.log /* 4 */ + ) +); +``` + +🔥 Look much better ! + +Finally, you can catch error with **"Js.Promise.catch"** - and of course we provide **"<$!>"** (map catch) operator (return value will be wrapped into Promise). + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.bs.js") + |> resolve + <$> ( + ((module AnonymouModule): (module MathType)) => + 3 |> AnonymouModule.addOne |> Js.log /* 4 */ + ) + <$!> (error => Js.log(error)) +); +``` + +Now, how can we dynamically import JavaScript library ? Write 1:1 binding like normal way and expose what you want. + +```sh +npm install ramda --save +``` + +```reason +/* Ramda.re */ +[@bs.module "ramda"] external inc : int => int = "inc"; + +let inc = inc; +``` + +```reason +/* Main.re */ +module type RamdaType = (module type of Ramda); + +DynamicImport.( + import("./Ramda.bs.js") + |> resolve + <$> ( + ((module Ramda): (module RamdaType)) => + 3 |> Ramda.inc |> Js.log /* 4 */ + ) + <$!> (error => Js.log(error)) +); +``` + +What about default export compatibility ? + +```reason +/* Math.re */ +let addOne = x => x + 1; +/* ... */ +let default = () => "Default export !"; +``` + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.bs.js") + |> resolve + <$> ( + ((module Math): (module MathType)) => + Ramda.default() |> Js.log /* "Default export !" */ + ) + <$!> (error => Js.log(error)) +); +``` + +## Multiple module + +If you want to import multiple module in parallel, there is multiple resolve function who work with tuple : + +- DynamicImport.resolve2 +- DynamicImport.resolve3 +- DynamicImport.resolve4 +- DynamicImport.resolve5 +- DynamicImport.resolve6 + +```reason +/* Main.re */ +module type MathType = (module type of Math); +module type CurrencyType = (module type of Currency); + +DynamicImport.( + resolve2(( + import("./Math.bs.js"), + import("./Currency.bs.js") + )) + <$> ( + ( + ( + (module Math): (module MathType), + (module Currency): (module CurrencyType) + ) + ) => + 3 + |> Math.addOne + |> Currency.toDollar + |> Js.log + ) + <$!> (error => Js.log(error)) +); +``` + +# API + +## DynamicImport + +[![API](http://image.noelshack.com/fichiers/2018/12/2/1521519530-code.png)](http://image.noelshack.com/fichiers/2018/12/2/1521519530-code.png) + +#### type importable('a) + +Dynamic module type. + +#### import: string => Js.Promise.t(importable('a)) + +Import dynamic module. + +#### resolve: Js.Promise.t(importable('a)) => Js.Promise.t('a) + +Resolve dynamic module. + +There is resolve2, resolve3, resolve4, resolve5, resolve6 that do the same thing with tuple for parallel import. + +## Infix + +We expose 6 infix operator for better experience : + +- <$> (Promise map). +- <$!> (Promise map catch). +- \>>= (Promise then). +- =<< (Reverse Promise then). +- \>>=! (Promise catch). +- !=<< (Reverse Promise catch). + +Underlying, these operator work with any **"Js.Promise.t"**. + +# Common errors + +#### "The signature for this packaged module couldn't be inferred." + +This error mean you forgot to provide module type on resolved module. + +❌ Wrong : + +```reason +/* Main.re */ +DynamicImport.( + import("./Math.bs.js") + |> resolve + <$> ( + ((module Math)) => /* Signature missing ! */ + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); +``` + +✔️ Good : + +```reason +/* Main.re */ +module type MathType = (module type of Math); /* Signature */ + +DynamicImport.( + import("./Math.bs.js") + |> resolve + <$> ( + ((module Math): (module MathType)) => /* Provide signature */ + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); +``` + +#### "The value >>= can't be found." + +You should use local or global open to have **"DynamicImport"** module in scope. + +❌ Wrong : + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +/* Where is DynamicImport ? */ +import("./Math.bs.js") +|> resolve +<$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ +); +``` + +✔️ Good : + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +/* Local open */ +DynamicImport.( + import("./Math.bs.js") + |> resolve + <$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); +``` + +```reason +/* Main.re */ +/* Global open */ +open DynamicImport; + +module type MathType = (module type of Math); + +import("./Math.bs.js") +|> resolve +<$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ +); +``` + +#### "JavaScript runtime type error (cannot find length, 0 is not a function)" (nightmare !) + +Compiler can not verify that you have imported the right module or check if module path is correct. + +That's your responsability and you should be cautious about this because it's very error prone. + +Always import file that will be compiled by BuckleScript (".bs.js" file), never import Reason/Ocaml file. + +You can catch any error with **"<$!>"** operator (map catch) and apply custom logic if something fail on runtime. + +❌ Wrong : + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Mat.bs.js") /* Bad path, file is missing */ + |> resolve + <$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); +``` + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.re") /* Can't, Reason file */ + |> resolve + <$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); +``` + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.js") /* Can't, non-BuckleScript output */ + |> resolve + <$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); +``` + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.ml") /* Can't, Ocaml file */ + |> resolve + <$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ + ) +); + +✔️ Good : + +```reason +/* Main.re */ +module type MathType = (module type of Math); + +DynamicImport.( + import("./Math.bs.js") /* Can, BuckleScript output from Reason/Ocaml module */ + |> resolve + <$> ( + ((module Math): (module MathType)) => + 3 |> Math.addOne |> Js.log /* 4 */ + ) + <$!> ((_error) => Js.log("Something goes wrong, reloading ...")) +); +``` + +```reason +/* Main.re */ +module type BsMathType = (module type of BsMath); + +DynamicImport.( + import("bs-math") /* Can, BuckleScript output from Reason/Ocaml module */ + |> resolve + <$> ( + ((module BsMath): (module BsMathType)) => + 3 |> BsMath.sqrt |> Js.log /* 1.73 */ + ) + <$!> ((_error) => Js.log("Something goes wrong, reloading ...")) +); +``` diff --git a/drafts/bs-dynamic-import/__tests__/.gitkeep b/drafts/bs-dynamic-import/__tests__/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/.gitkeep @@ -0,0 +1 @@ + diff --git a/drafts/bs-dynamic-import/__tests__/Importable.re b/drafts/bs-dynamic-import/__tests__/Importable.re new file mode 100644 index 0000000..2c86116 --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Importable.re @@ -0,0 +1,11 @@ +module type ReasonBase = (module type of ReasonBase); + +module type ReasonJsInterop = (module type of ReasonJsInterop); + +module type ReasonDefaultExport = (module type of ReasonDefaultExport); + +module type OcamlBase = (module type of OcamlBase); + +module type OcamlJsInterop = (module type of OcamlJsInterop); + +module type OcamlDefaultExport = (module type of OcamlDefaultExport); diff --git a/drafts/bs-dynamic-import/__tests__/Loader_test.re b/drafts/bs-dynamic-import/__tests__/Loader_test.re new file mode 100644 index 0000000..28ecf0c --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Loader_test.re @@ -0,0 +1,112 @@ +open Jest; + +open Expect; + +open DynamicImport; + +describe("Reason", () => { + testPromise("should work wih basic module export", () => + import("./Mocks/Reason/ReasonBase.bs.js") + |> resolve + <$> ( + (module X: Importable.ReasonBase) => + X.lazyValue() ++ X.value |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should work with BuckleScript interop binding export", () => + import("./Mocks/Reason/ReasonJsInterop.bs.js") + |> resolve + <$> ( + (module X: Importable.ReasonJsInterop) => + X.inc(2) |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should work with default export", () => + import("./Mocks/Reason/ReasonDefaultExport.bs.js") + |> resolve + <$> ( + (module X: Importable.ReasonDefaultExport) => + X.lazyValue() ++ X.value ++ X.default |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should resolve two module in parallel", () => + ( + import("./Mocks/Reason/ReasonBase.bs.js"), + import("./Mocks/Reason/ReasonJsInterop.bs.js"), + ) + |> resolve2 + <$> ( + ( + ( + module X: Importable.ReasonBase, + module Y: Importable.ReasonJsInterop, + ), + ) => + X.lazyValue() ++ X.value |> Y.toUpper |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should fail if at least one module doesn't resolve", () => + ( + import("./Mocks/Reason/ReasonBase.bs.js"), + import("./Mocks/Reason/???.bs.js"), + ) + |> resolve2 + <$> (_ => fail("this case should not happen !")) + <$!> (error => error |> expect |> toMatchSnapshot) + ); +}); + +describe("Ocaml", () => { + testPromise("should work wih basic module export", () => + import("./Mocks/Ocaml/OcamlBase.bs.js") + |> resolve + <$> ( + (module X: Importable.OcamlBase) => + X.lazyValue() ++ X.value |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should work with BuckleScript interop binding export", () => + import("./Mocks/Ocaml/OcamlJsInterop.bs.js") + |> resolve + <$> ( + (module X: Importable.OcamlJsInterop) => + X.inc(2) |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should work with default export", () => + import("./Mocks/Ocaml/OcamlDefaultExport.bs.js") + |> resolve + <$> ( + (module X: Importable.OcamlDefaultExport) => + X.lazyValue() ++ X.value ++ X.default |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should resolve two module in parallel", () => + ( + import("./Mocks/Ocaml/OcamlBase.bs.js"), + import("./Mocks/Ocaml/OcamlJsInterop.bs.js"), + ) + |> resolve2 + <$> ( + ((module X: Importable.OcamlBase, module Y: Importable.OcamlJsInterop)) => + X.lazyValue() ++ X.value |> Y.toUpper |> expect |> toMatchSnapshot + ) + <$!> (_ => fail("this case should not happen !")) + ); + testPromise("should fail if at least one module doesn't resolve", () => + ( + import("./Mocks/Ocaml/OcamlBase.bs.js"), + import("./Mocks/Ocaml/???.bs.js"), + ) + |> resolve2 + <$> (_ => fail("this case should not happen !")) + <$!> (error => error |> expect |> toMatchSnapshot) + ); +}); diff --git a/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlBase.ml b/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlBase.ml new file mode 100644 index 0000000..cc711e7 --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlBase.ml @@ -0,0 +1,2 @@ +let lazyValue () = "a" +let value = "b" \ No newline at end of file diff --git a/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlDefaultExport.ml b/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlDefaultExport.ml new file mode 100644 index 0000000..0669a4b --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlDefaultExport.ml @@ -0,0 +1,3 @@ +let default = "c" +let lazyValue () = "a" +let value = "b" \ No newline at end of file diff --git a/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlJsInterop.ml b/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlJsInterop.ml new file mode 100644 index 0000000..8078340 --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Mocks/Ocaml/OcamlJsInterop.ml @@ -0,0 +1,5 @@ +external inc : int -> int = "inc" [@@bs.module "ramda"] +external toUpper : string -> string = "toUpper" [@@bs.module "ramda"] + +let inc = inc +let toUpper = toUpper diff --git a/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonBase.re b/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonBase.re new file mode 100644 index 0000000..c6fccb4 --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonBase.re @@ -0,0 +1,3 @@ +let lazyValue = () => "a"; + +let value = "b"; diff --git a/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonDefaultExport.re b/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonDefaultExport.re new file mode 100644 index 0000000..bdaeebd --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonDefaultExport.re @@ -0,0 +1,5 @@ +let default = "c"; + +let lazyValue = () => "a"; + +let value = "b"; diff --git a/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonJsInterop.re b/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonJsInterop.re new file mode 100644 index 0000000..bb995dd --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/Mocks/Reason/ReasonJsInterop.re @@ -0,0 +1,7 @@ +[@bs.module "ramda"] external inc: int => int = "inc"; + +[@bs.module "ramda"] external toUpper: string => string = "toUpper"; + +let inc = inc; + +let toUpper = toUpper; diff --git a/drafts/bs-dynamic-import/__tests__/__snapshots__/Loader_test.bs.js.snap b/drafts/bs-dynamic-import/__tests__/__snapshots__/Loader_test.bs.js.snap new file mode 100644 index 0000000..696eff1 --- /dev/null +++ b/drafts/bs-dynamic-import/__tests__/__snapshots__/Loader_test.bs.js.snap @@ -0,0 +1,21 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Ocaml should fail if at least one module doesn't resolve 1`] = `[Error: Cannot find module './Mocks/Ocaml/???.bs.js' from 'Loader_test.bs.js']`; + +exports[`Ocaml should resolve two module in parallel 1`] = `"AB"`; + +exports[`Ocaml should work wih basic module export 1`] = `"ab"`; + +exports[`Ocaml should work with BuckleScript interop binding export 1`] = `3`; + +exports[`Ocaml should work with default export 1`] = `"abc"`; + +exports[`Reason should fail if at least one module doesn't resolve 1`] = `[Error: Cannot find module './Mocks/Reason/???.bs.js' from 'Loader_test.bs.js']`; + +exports[`Reason should resolve two module in parallel 1`] = `"AB"`; + +exports[`Reason should work wih basic module export 1`] = `"ab"`; + +exports[`Reason should work with BuckleScript interop binding export 1`] = `3`; + +exports[`Reason should work with default export 1`] = `"abc"`; diff --git a/drafts/bs-dynamic-import/package.json b/drafts/bs-dynamic-import/package.json new file mode 100644 index 0000000..af3e647 --- /dev/null +++ b/drafts/bs-dynamic-import/package.json @@ -0,0 +1,49 @@ +{ + "name": "bs-dynamic-import", + "version": "0.4.0", + "author": "Robin Meillet ", + "description": "BuckleScript dynamic import interop on JavaScript environment", + "license": "MIT", + "scripts": { + "make": "bsb -make-world", + "makew": "bsb -make-world -w", + "test": "jest", + "testw": "jest --watchAll", + "format": "./refmt.sh", + "interface": "bsc -bs-re-out", + "clean": "bsb -clean-world" + }, + "devDependencies": { + "@babel/core": "^7.5.4", + "@babel/preset-env": "^7.5.4", + "@glennsl/bs-jest": "^0.4.8", + "babel-jest": "^24.8.0", + "babel-plugin-dynamic-import-node": "^2.3.0", + "bs-platform": "^5.0.6", + "jest": "^24.8.0", + "ramda": "^0.26.1" + }, + "dependencies": {}, + "jest": { + "transformIgnorePatterns": [], + "testMatch": [ + "**/__tests__/**/*_test.bs.js" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/kMeillet/bs-dynamic-import.git" + }, + "keywords": [ + "reason", + "bucklescript", + "dynamic", + "module", + "import", + "code-splitting" + ], + "bugs": { + "url": "https://github.com/kMeillet/bs-dynamic-import/issues" + }, + "homepage": "https://github.com/kMeillet/bs-dynamic-import#readme" +} diff --git a/drafts/bs-dynamic-import/refmt.sh b/drafts/bs-dynamic-import/refmt.sh new file mode 100644 index 0000000..bea428c --- /dev/null +++ b/drafts/bs-dynamic-import/refmt.sh @@ -0,0 +1,5 @@ +#!/bin/bash +for i in $(find . -not -path "*node_modules*" -type f \( -name "*.re" -o -name "*.rei" \)) +do + refmt --in-place $i +done \ No newline at end of file diff --git a/drafts/bs-dynamic-import/src/DynamicImport.re b/drafts/bs-dynamic-import/src/DynamicImport.re new file mode 100644 index 0000000..ec9065d --- /dev/null +++ b/drafts/bs-dynamic-import/src/DynamicImport.re @@ -0,0 +1,128 @@ +/* Represent importable module a.k.a JavaScript object. */ +type importable('a) = { + . + "__esModule": bool, + "$$default": bool, + [@bs.meth] "propertyIsEnumerable": string => bool, +}; + +/* Depack module (internal). */ +[@bs.scope "Object"] [@bs.val] +external depack: importable('a) => 'a = "values"; + +/* Import module. */ +[@bs.val] external import: string => Js.Promise.t(importable('a)) = ""; + +/* Pipe (internal). */ +let (||>) = (f, g, x) => g(f(x)); + +/* Map (auto-wrap). */ +let (<$>) = (a, b) => Js.Promise.then_(b ||> Js.Promise.resolve, a); + +/* Map catch (auto-wrap). */ +let (<$!>) = (a, b) => Js.Promise.catch(b ||> Js.Promise.resolve, a); + +/* Then. */ +let (>>=) = (a, b) => Js.Promise.then_(b, a); + +/* Catch. */ +let (>>=!) = (a, b) => Js.Promise.catch(b, a); + +/* Reverse then. */ +let (=<<) = (a, b) => Js.Promise.then_(a, b); + +/* Reverse catch. */ +let (!=<<) = (a, b) => Js.Promise.catch(a, b); + +/** + * Convert regular Common.js/ES module (object) into acceptable module for compiler (array of value). + * We have to care about ordering of value. + * + * When Reason/Ocaml module use a "let default" declaration, that will produce this output : + * + * --> COMMON.JS + * exports.lazyValue = lazyValue; + * exports.value = value; + * exports.$$default = $$default; + * exports.default = $$default; + * exports.__esModule = true; + * + * --> ESM + * export { lazyValue, value, $$default, $$default as default }; + * + * Without default declaration, we get this : + * + * --> COMMON.JS + * exports.lazyValue = lazyValue, + * exports.value = value; + * + * --> ESM + * export { lazyValue, value }; + * + * ----------------------------------------------------------------------- + * => __esModule is provided on Common.js only if default export is used. Enumerable property. + * => __esModule is flagged on ESM if you use compiler like Babel but thanks god, not enumerable property. + * => We should remove "$$default" key to preserve module order on Common.js/ESM, "default" do the same job. + * => We should remove "__esModule" key to preserve module order on Common.js because it's enumerable and that should not. + * See : https://github.com/BuckleScript/bucklescript/issues/1987 + * + * Module order is guaranteed by module interface and compiler inference. +**/ +let depack = x => { + if (x##propertyIsEnumerable("$$default") + && x##propertyIsEnumerable("__esModule") + && + x##__esModule) { + [%raw {| delete x.__esModule |}] |> ignore; + }; + [%raw {| delete x.$$default |}] |> ignore; + depack(x); +}; + +/* Resolve one module. */ +let resolve = fetch => fetch <$> depack; + +/* Resolve two module in parallel (tuple). */ +let resolve2 = fetchs => + fetchs |> Js.Promise.all2 <$> (((a, b)) => (depack(a), depack(b))); + +/* Resolve three module in parallel (tuple). */ +let resolve3 = fetchs => + fetchs + |> Js.Promise.all3 + <$> (((a, b, c)) => (depack(a), depack(b), depack(c))); + +/* Resolve four module in parallel (tuple). */ +let resolve4 = fetchs => + fetchs + |> Js.Promise.all4 + <$> (((a, b, c, d)) => (depack(a), depack(b), depack(c), depack(d))); + +/* Resolve five module in parallel (tuple). */ +let resolve5 = fetchs => + fetchs + |> Js.Promise.all5 + <$> ( + ((a, b, c, d, e)) => ( + depack(a), + depack(b), + depack(c), + depack(d), + depack(e), + ) + ); + +/* Resolve six module in parallel (tuple). */ +let resolve6 = fetchs => + fetchs + |> Js.Promise.all6 + <$> ( + ((a, b, c, d, e, f)) => ( + depack(a), + depack(b), + depack(c), + depack(d), + depack(e), + depack(f), + ) + ); diff --git a/drafts/bs-dynamic-import/src/DynamicImport.rei b/drafts/bs-dynamic-import/src/DynamicImport.rei new file mode 100644 index 0000000..22fb944 --- /dev/null +++ b/drafts/bs-dynamic-import/src/DynamicImport.rei @@ -0,0 +1,71 @@ +type importable('a); + +[@bs.val] external import: string => Js.Promise.t(importable('a)) = ""; + +let (<$>): (Js.Promise.t('a), 'a => 'b) => Js.Promise.t('b); + +let (<$!>): (Js.Promise.t('a), Js.Promise.error => 'a) => Js.Promise.t('a); + +let (>>=): (Js.Promise.t('a), 'a => Js.Promise.t('b)) => Js.Promise.t('b); + +let (>>=!): + (Js.Promise.t('a), Js.Promise.error => Js.Promise.t('a)) => + Js.Promise.t('a); + +let (=<<): ('a => Js.Promise.t('b), Js.Promise.t('a)) => Js.Promise.t('b); + +let (!=<<): + (Js.Promise.error => Js.Promise.t('a), Js.Promise.t('a)) => + Js.Promise.t('a); + +let resolve: Js.Promise.t(importable('a)) => Js.Promise.t('a); + +let resolve2: + ((Js.Promise.t(importable('a)), Js.Promise.t(importable('b)))) => + Js.Promise.t(('a, 'b)); + +let resolve3: + ( + ( + Js.Promise.t(importable('a)), + Js.Promise.t(importable('b)), + Js.Promise.t(importable('c)), + ) + ) => + Js.Promise.t(('a, 'b, 'c)); + +let resolve4: + ( + ( + Js.Promise.t(importable('a)), + Js.Promise.t(importable('b)), + Js.Promise.t(importable('c)), + Js.Promise.t(importable('d)), + ) + ) => + Js.Promise.t(('a, 'b, 'c, 'd)); + +let resolve5: + ( + ( + Js.Promise.t(importable('a)), + Js.Promise.t(importable('b)), + Js.Promise.t(importable('c)), + Js.Promise.t(importable('d)), + Js.Promise.t(importable('e)), + ) + ) => + Js.Promise.t(('a, 'b, 'c, 'd, 'e)); + +let resolve6: + ( + ( + Js.Promise.t(importable('a)), + Js.Promise.t(importable('b)), + Js.Promise.t(importable('c)), + Js.Promise.t(importable('d)), + Js.Promise.t(importable('e)), + Js.Promise.t(importable('f)), + ) + ) => + Js.Promise.t(('a, 'b, 'c, 'd, 'e, 'f)); diff --git a/drafts/bs-dynogels/LICENSE b/drafts/bs-dynogels/LICENSE new file mode 100644 index 0000000..d16f007 --- /dev/null +++ b/drafts/bs-dynogels/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Hashback.io + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-dynogels/README.md b/drafts/bs-dynogels/README.md new file mode 100644 index 0000000..4b2d1be --- /dev/null +++ b/drafts/bs-dynogels/README.md @@ -0,0 +1,18 @@ +# bs-dynogels + +This project provides bindings to the excellent [dynogels](https://github.com/clarkie/dynogels) repo. + +## Build +``` +npm run build +``` + +## Build + Watch + +``` +npm run watch +``` + + +## Editor +If you use `vscode`, Press `Windows + Shift + B` it will build automatically diff --git a/drafts/bs-dynogels/package.json b/drafts/bs-dynogels/package.json new file mode 100644 index 0000000..f8ca177 --- /dev/null +++ b/drafts/bs-dynogels/package.json @@ -0,0 +1,34 @@ +{ + "author": { + "email": "dev@hashback.io", + "name": "Hashback", + "url": "http://twitter.com/hashbackio" + }, + "bugs": "https://github.com/hashbackio/bs-dynogels/issues", + "devDependencies": { + "bs-platform": "^4.0.3" + }, + "homepage": "https://github.com/hashbackio/bs-dynogels#readme", + "license": "MIT", + "keywords": [ + "BuckleScript", + "DynamoDB", + "Dynogels", + "ReasonML", + "Reason", + "Vogels" + ], + "name": "bs-dynogels", + "repository": "hashbackio/bs-dynogels", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "version": "1.0.0", + "peerDependencies": { + "aws-sdk": "^2.213.1", + "dynogels": "^9.0.0" + }, + "dependencies": {} +} diff --git a/drafts/bs-dynogels/src/Core.re b/drafts/bs-dynogels/src/Core.re new file mode 100644 index 0000000..3b6732c --- /dev/null +++ b/drafts/bs-dynogels/src/Core.re @@ -0,0 +1,464 @@ +type callback('a) = (Js.Nullable.t(Js.Exn.t), Js.Nullable.t('a)) => unit; + +module Options = { + type t; + [@bs.set] external setPollingInterval : (t, int) => unit = "pollingInterval"; + [@bs.get] external getPollingInterval : t => int = "pollingInterval"; +}; + +module StreamSpecification = { + type t; + [@bs.set] external setStreamEnabled : (t, bool) => unit = "streamEnabled"; + [@bs.get] external getStreamEnabled : t => bool = "streamEnabled"; + [@bs.set] + external setStreamViewType : (t, string) => unit = "streamViewType"; + [@bs.get] external getStreamViewType : t => string = "streamViewType"; +}; + +module TableOptions = { + type t; + [@bs.set] external setReadCapacity : (t, int) => unit = "readCapacity"; + [@bs.get] external getReadCapacity : t => int = "readCapacity"; + [@bs.set] + external setStreamSpecificationy : (t, StreamSpecification.t) => unit = + "streamSpecification"; + [@bs.get] + external getStreamSpecificationy : t => StreamSpecification.t = + "streamSpecification"; + [@bs.set] external setWriteCapacity : (t, int) => unit = "writeCapacity"; + [@bs.get] external getWriteCapacity : t => int = "writeCapacity"; +}; + +module CreateTableOptions = { + type t; + [@bs.set] external setDynogelsOptions : (t, Options.t) => unit = "$dynogels"; + [@bs.get] external getDynogelsOptions : t => Options.t = "$dynogels"; + [@bs.set_index] + external setTableOption : (t, string, TableOptions.t) => unit = ""; + [@bs.get_index] [@bs.return nullable] + external getTableOption : (t, string) => option(TableOptions.t) = ""; +}; + +type key = [ | `HashKey(string) | `RangeKey(string)]; + +type queryObject = Js.Dict.t(Js.Json.t); + +module ValidatedResult = { + type t; + [@bs.get] [@bs.return nullable] + external getError : t => option(Js.Exn.t) = "error"; + [@bs.get] [@bs.return nullable] + external getValue : t => option(Js.Json.t) = "value"; +}; + +module Schema = { + type t; + [@bs.send] external validate : (t, Js.Json.t) => ValidatedResult.t = ""; +}; + +module TableSchema = { + type t; + [@bs.get] external getSchema : t => Schema.t = "schema"; +}; + +module Item = { + type t; + [@bs.send] external destroy : (t, queryObject, callback(t)) => unit = ""; + [@bs.send] external get : (t, string) => Js.Nullable.t(Js.Json.t) = ""; + [@bs.send] external save : (t, callback(t)) => unit = ""; + [@bs.send] external set : (t, Js.Json.t) => t = ""; + [@bs.send] external toJSON : t => Js.Json.t = ""; + [@bs.send] external toPlainObject : t => Js.Json.t = ""; + [@bs.send] external update : (t, queryObject, callback(t)) => unit = ""; + [@bs.get] external getTable : t => TableSchema.t = "table"; +}; + +module ConsumedCapacity = { + type t; + [@bs.get] external getCapacityUnits : t => int = "CapacityUnits"; + [@bs.get] external getTableName : t => string = "TableName"; +}; + +module PaginatedRequest = { + type t; + [@bs.get] + external getConsumedCapacity : t => ConsumedCapacity.t = "ConsumedCapacity"; + [@bs.get] external getCount : t => int = "Count"; + [@bs.get] external getItems : t => array(Item.t) = "Items"; + [@bs.get] [@bs.return nullable] + external getLastEvaluatedKey : t => option(string) = "LastEvaluatedKey"; + [@bs.get] external getScannedCount : t => int = "ScannedCount"; +}; + +module Condition = { + type t; + [@bs.set] + external setAttributeNames : (t, Js.Dict.t(string)) => unit = + "attributeNames"; + [@bs.get] + external getAttributeNames : t => Js.Dict.t(string) = "attributeNames"; + [@bs.set] + external setAttributeValues : (t, Js.Dict.t(string)) => unit = + "attributeValues"; + [@bs.get] + external getAttributeValues : t => Js.Dict.t(string) = "attributeValues"; + [@bs.set] external setStatement : (t, string) => unit = "statement"; + [@bs.get] external getStatement : t => string = "statement"; +}; + +type query; + +type queryFilter; + +type queryWhere; + +module Query = { + type t = query; + [@bs.send.pipe: t] external addFilterCondition : Condition.t => t = ""; + [@bs.send.pipe: t] external addKeyCondition : Condition.t => t = ""; + [@bs.send.pipe: t] external ascending : unit => t = ""; + [@bs.send.pipe: t] external attribute : string => t = "attributes"; + [@bs.send.pipe: t] external attributes : array(string) => t = ""; + [@bs.send.pipe: t] external buildKey : unit => string = ""; + [@bs.send.pipe: t] external buildRequest : unit => Js.Json.t = ""; + [@bs.send.pipe: t] external consistentRead : bool => t = ""; + [@bs.send.pipe: t] external descending : unit => t = ""; + [@bs.send.pipe: t] + external exec : callback(PaginatedRequest.t) => unit = ""; + [@bs.send.pipe: t] external expressionAttributeNames : Js.Json.t => t = ""; + [@bs.send.pipe: t] external expressionAttributeValues : Js.Json.t => t = ""; + [@bs.send] external filter : string => queryFilter = ""; + [@bs.send.pipe: t] external filterExpression : string => t = ""; + [@bs.send.pipe: t] external limit : int => t = ""; + [@bs.send.pipe: t] external loadAll : unit => t = ""; + [@bs.send.pipe: t] external projectionExpression : string => t = ""; + [@bs.send.pipe: t] external returnConsumedCapacity : unit => t = ""; + [@bs.send.pipe: t] + external returnConsumedCapacity__withValue : string => t = + "returnConsumedCapacity"; + [@bs.send.pipe: t] external segments : (int, int) => t = ""; + [@bs.send.pipe: t] external select : string => t = ""; + [@bs.send.pipe: t] external startKey_ : string => t = "startKey"; + let startKey = (`HashKey(hashKey), query) => startKey_(hashKey, query); + [@bs.send.pipe: t] + external startKey_hashAndRangeKey_ : (string, string) => t = "startKey"; + let startKey_hashAndRangeKey = + (`HashKey(hashKey), `RangeKey(rangeKey), query) => + startKey_hashAndRangeKey_(hashKey, rangeKey, query); + [@bs.send.pipe: t] external usingIndex : string => t = ""; + [@bs.send.pipe: t] external where : string => queryWhere = ""; +}; + +module QueryFilter = { + type t = queryFilter; + [@bs.send] external beginsWith : (t, Js.Json.t) => query = ""; + [@bs.send] external between : (t, Js.Json.t) => query = ""; + [@bs.send] external contains : (t, Js.Json.t) => query = ""; + [@bs.send] external eq : (t, Js.Json.t) => query = ""; + [@bs.send] external equals : (t, Js.Json.t) => query = ""; + [@bs.send] external exists : (t, Js.Json.t) => query = ""; + [@bs.send] external gt : (t, Js.Json.t) => query = ""; + [@bs.send] external gte : (t, Js.Json.t) => query = ""; + [@bs.send] external in_ : (t, Js.Json.t) => query = "in"; + [@bs.send] external lt : (t, Js.Json.t) => query = ""; + [@bs.send] external lte : (t, Js.Json.t) => query = ""; + [@bs.send] external ne : (t, Js.Json.t) => query = ""; + [@bs.send] external notContains : (t, Js.Json.t) => query = ""; + [@bs.send] external null : (t, Js.Json.t) => query = ""; +}; + +module QueryWhere = { + type t = queryWhere; + [@bs.send.pipe: t] external beginsWith : Js.Json.t => query = ""; + [@bs.send.pipe: t] external between : Js.Json.t => query = ""; + [@bs.send.pipe: t] external eq : Js.Json.t => query = ""; + [@bs.send.pipe: t] external equals : Js.Json.t => query = ""; + [@bs.send.pipe: t] external gt : Js.Json.t => query = ""; + [@bs.send.pipe: t] external gte : Js.Json.t => query = ""; + [@bs.send.pipe: t] external lt : Js.Json.t => query = ""; + [@bs.send.pipe: t] external lte : Js.Json.t => query = ""; +}; + +type scan; + +type scanWhere; + +module Scan = { + type t = scan; + [@bs.send.pipe: t] external addFilterCondition : Condition.t => t = ""; + [@bs.send.pipe: t] external attribute : string => t = "attributes"; + [@bs.send.pipe: t] external attributes : array(string) => t = ""; + [@bs.send.pipe: t] external buildRequest : unit => Js.Json.t = ""; + [@bs.send.pipe: t] + external exec : callback(PaginatedRequest.t) => unit = ""; + [@bs.send.pipe: t] external expressionAttributeNames : Js.Json.t => t = ""; + [@bs.send.pipe: t] external expressionAttributeValues : Js.Json.t => t = ""; + [@bs.send.pipe: t] external filterExpression : string => t = ""; + [@bs.send.pipe: t] external limit : int => t = ""; + [@bs.send.pipe: t] external loadAll : unit => t = ""; + [@bs.send.pipe: t] external projectionExpression : string => t = ""; + [@bs.send.pipe: t] external returnConsumedCapacity : unit => t = ""; + [@bs.send.pipe: t] + external returnConsumedCapacity__withValue : string => t = + "returnConsumedCapacity"; + [@bs.send.pipe: t] external segments : (int, int) => t = ""; + [@bs.send.pipe: t] external select : string => t = ""; + [@bs.send.pipe: t] external startKey_ : string => t = "startKey"; + let startKey = (`HashKey(hashKey), scan) => startKey_(hashKey, scan); + [@bs.send.pipe: t] + external startKey__hashAndRangeKey_ : (string, string) => t = "startKey"; + let startKey__hashAndRangeKey = + (`HashKey(hashKey), `RangeKey(rangeKey), scan) => + startKey__hashAndRangeKey_(hashKey, rangeKey, scan); + [@bs.send.pipe: t] external where : string => scanWhere = ""; +}; + +module ScanWhere = { + type t = scanWhere; + [@bs.send.pipe: t] external beginsWith : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external between : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external contains : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external eq : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external equals : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external gt : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external gte : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external in_ : Js.Json.t => scan = "in"; + [@bs.send.pipe: t] external lt : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external lte : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external ne : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external notContains : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external notNull : Js.Json.t => scan = ""; + [@bs.send.pipe: t] external null : Js.Json.t => scan = ""; +}; + +module Model = { + type t; + [@bs.send] external create : (t, Js.Json.t, callback(Item.t)) => unit = ""; + [@bs.send] + external createWithOptions : + (t, Js.Json.t, queryObject, callback(Item.t)) => unit = + "create"; + [@bs.send] + external createItems : (t, array(Js.Json.t), callback(Item.t)) => unit = + "create"; + [@bs.send] + external createItemsWithOptions : + (t, array(Js.Json.t), queryObject, callback(Item.t)) => unit = + "create"; + [@bs.send] external destroy_ : (t, string, callback(Item.t)) => unit = ""; + let destroy = (model, `HashKey(hashKey), callback) => + destroy_(model, hashKey, callback); + [@bs.send] + external destroyWithOptions_ : + (t, string, queryObject, callback(Item.t)) => unit = + "destroy"; + let destroyWithOptions = (model, `HashKey(hashKey), queryObject, callback) => + destroyWithOptions_(model, hashKey, queryObject, callback); + [@bs.send] + external destroyHashAndRangeKey_ : + (t, string, string, callback(Item.t)) => unit = + "destroy"; + let destroyHashAndRangeKey = + (model, `HashKey(hashKey), `RangeKey(rangeKey), callback) => + destroyWithOptions_(model, hashKey, rangeKey, callback); + [@bs.send] + external destroyHashAndRangeKeyWithOptions_ : + (t, string, string, queryObject, callback(Item.t)) => unit = + "destroy"; + let destroyHashAndRangeKeyWithOptions = + (model, `HashKey(hashKey), `RangeKey(rangeKey), queryObject, callback) => + destroyHashAndRangeKeyWithOptions_( + model, + hashKey, + rangeKey, + queryObject, + callback, + ); + [@bs.send] external get_ : (t, string, callback(Item.t)) => unit = ""; + let get = (model, `HashKey(hashKey), callback) => + get_(model, hashKey, callback); + [@bs.send] + external getWithOptions_ : + (t, string, queryObject, callback(Item.t)) => unit = + "get"; + let getWithOptions = (model, `HashKey(hashKey), queryObject, callback) => + getWithOptions_(model, hashKey, queryObject, callback); + [@bs.send] + external getHashAndRangeKey_ : (t, string, string, callback(Item.t)) => unit = + "get"; + let getHashAndRangeKey = + (model, `HashKey(hashKey), `RangeKey(rangeKey), callback) => + getHashAndRangeKey_(model, hashKey, rangeKey, callback); + [@bs.send] + external getHashAndRangeKeyWithOptions_ : + (t, string, string, queryObject, callback(Item.t)) => unit = + "get"; + let getHashAndRangeKeyWithOptions = + (model, `HashKey(hashKey), `RangeKey(rangeKey), queryObject, callback) => + getHashAndRangeKeyWithOptions_( + model, + hashKey, + rangeKey, + queryObject, + callback, + ); + [@bs.send] + external getItems_ : (t, array(string), callback(Item.t)) => unit = + "getItems"; + let getItems = (model, hashKeys, callback) => + hashKeys + |> Js.Array.map((`HashKey(hashKey)) => hashKey) + |> getItems_(model, _, callback); + [@bs.send] + external getItemsWithOptions_ : + (t, array(string), queryObject, callback(Item.t)) => unit = + "getItems"; + let getItemsWithOptions = (model, hashKeys, queryObject, callback) => + hashKeys + |> Js.Array.map((`HashKey(hashKey)) => hashKey) + |> getItemsWithOptions_(model, _, queryObject, callback); + [@bs.send] + external getItemsHashAndRangeKeys_ : + (t, array(Js.Dict.t(string)), callback(Item.t)) => unit = + "getItems"; + [@bs.send] + external getItemsHashAndRangeKeysWithOptions_ : + (t, array(Js.Dict.t(string)), queryObject, callback(Item.t)) => unit = + "getItems"; + [@bs.send] external parallelScan : (t, int) => scan = "parallelScan"; + [@bs.send] external query : (t, string) => query = "query"; + [@bs.send] external scan : t => scan = "scan"; + [@bs.send] external tableName : t => string = "tableName"; + [@bs.send] external update : (t, Js.Json.t, callback(Item.t)) => unit = ""; + [@bs.send] + external update__withOptions : + (t, Js.Json.t, queryObject, callback(Item.t)) => unit = + "update"; +}; + +module SchemaGlobalIndex = { + type t; + let make: (string, string) => t = [%bs.raw + {| function (hashKey, name) { + return { hashKey: hashKey, name: name, type: 'global' }; + } |} + ]; + [@bs.set] external setHashKey : (t, string) => unit = "hashKey"; + [@bs.get] external getHashKey : t => string = "hashKey"; + [@bs.set] external setName : (t, string) => unit = "name"; + [@bs.get] external getName : t => string = "name"; + [@bs.set] + external setProjection : (t, Js.Nullable.t(Js.Json.t)) => unit = + "projection"; + [@bs.get] + external getProjection : t => Js.Nullable.t(Js.Json.t) = "projection"; + [@bs.set] + external setRangeKey : (t, Js.Nullable.t(string)) => unit = "rangeKey"; + [@bs.get] external getRangeKey : t => Js.Nullable.t(string) = "rangeKey"; + [@bs.set] + external setReadCapacity : (t, Js.Nullable.t(int)) => unit = "readCapacity"; + [@bs.get] + external getReadCapacity : t => Js.Nullable.t(int) = "readCapacity"; + [@bs.set] + external setWriteCapacity : (t, Js.Nullable.t(int)) => unit = + "writeCapacity"; + [@bs.get] + external getWriteCapacity : t => Js.Nullable.t(int) = "writeCapacity"; +}; + +module SchemaLocalIndex = { + type t; + let make: string => t = [%bs.raw + {| function (name) { + return { name: name, type: 'local' }; + } |} + ]; + [@bs.set] external setName : (t, string) => unit = "name"; + [@bs.get] external getName : t => string = "name"; + [@bs.set] + external setProjection : (t, Js.Nullable.t(Js.Json.t)) => unit = + "projection"; + [@bs.get] + external getProjection : t => Js.Nullable.t(Js.Json.t) = "projection"; + [@bs.set] + external setRangeKey : (t, Js.Nullable.t(string)) => unit = "rangeKey"; + [@bs.get] external getRangeKey : t => Js.Nullable.t(string) = "rangeKey"; +}; + +module SchemaIndexes = { + type t; + let make: unit => t = [%bs.raw {| function () { + return []; + } |}]; + [@bs.send] + external addGlobalIndex : (t, SchemaGlobalIndex.t) => unit = "push"; + [@bs.send] external addLocalIndex : (t, SchemaLocalIndex.t) => unit = "push"; +}; + +module SchemaConfig = { + /* + TODO: this also has a schema field on it but it _must_ be a Joi schema which + kind of sucks. We should PR Dynogels to allow for just a validation function + to be passed in instead of relying on Joi + */ + type t; + let make: unit => t = [%bs.raw + {| function () { + return { createdAt: true, updatedAt: true }; + } |} + ]; + [@bs.set] external setCreatedAt : (t, string) => unit = "createdAt"; + [@bs.set] external setCreatedAtBoolVal : (t, bool) => unit = "createdAt"; + [@bs.set] + external setHashKey : (t, Js.Nullable.t(string)) => unit = "hashKey"; + [@bs.get] external getHashKey : t => Js.Nullable.t(string) = "hashKey"; + [@bs.set] + external setIndexes : (t, Js.Nullable.t(SchemaIndexes.t)) => unit = + "indexes"; + [@bs.get] + external getIndexes : t => Js.Nullable.t(SchemaIndexes.t) = "indexes"; + [@bs.set] + external setRangeKey : (t, Js.Nullable.t(string)) => unit = "rangeKey"; + [@bs.get] external getRangeKey : t => Js.Nullable.t(string) = "rangeKey"; + [@bs.set] + external setTableName : (t, Js.Nullable.t(string)) => unit = "tableName"; + [@bs.get] external getTableName : t => Js.Nullable.t(string) = "tableName"; + [@bs.set] external setUpdatedAt : (t, string) => unit = "updatedAt"; + [@bs.set] external setUpdatedAtBoolVal : (t, bool) => unit = "updatedAt"; + /* + NOTE: If timestamps is set to true then Joi validation will kick in and you'll + probably see things starting to break since there is no way to add Joi + validation to the schema through this package right now. + */ + [@bs.set] + external setTimestamps : (t, Js.Nullable.t(bool)) => unit = "timestamps"; + [@bs.get] external getTimestamps : t => Js.Nullable.t(bool) = "timestamps"; +}; + +type documentClient; + +[@bs.module "aws-sdk"] [@bs.scope "DynamoDB"] [@bs.new] +external getDefaultDocumentClient : unit => documentClient = "DocumentClient"; + +[@bs.module "aws-sdk"] [@bs.scope "DynamoDB"] [@bs.new] +external getDocumentClient : + { + . + "accessKeyId": string, + "endpoint": string, + "region": string, + "secretAccessKey": string, + } => + documentClient = + "DocumentClient"; + +[@bs.module "dynogels"] +external createTables : (CreateTableOptions.t, callback(unit)) => unit = ""; + +[@bs.module "dynogels"] [@bs.return nullable] +external define : (string, SchemaConfig.t) => option(Model.t) = ""; + +[@bs.module "dynogels"] +external documentClient : documentClient => documentClient = ""; + +[@bs.module "dynogels"] external reset : unit => unit = ""; diff --git a/drafts/bs-dynogels/src/Utils.re b/drafts/bs-dynogels/src/Utils.re new file mode 100644 index 0000000..0d72a2a --- /dev/null +++ b/drafts/bs-dynogels/src/Utils.re @@ -0,0 +1,23 @@ +let dynamoRequestToPromise = dynogelsRequest => + Belt.Result.( + Js.Promise.make((~resolve, ~reject as _) => + dynogelsRequest((maybeExn, maybeItem) => + ( + switch ( + Js.Nullable.toOption(maybeExn), + Js.Nullable.toOption(maybeItem), + ) { + | (None, Some(item)) => Ok(item) + | (Some(exn), None) => + exn + |> Js.Exn.message + |> Js.Option.getWithDefault("An unknown error occurred") + |> (msg => Error(msg)) + | (None, None) => Error("Got neither an error nor a result") + | (Some(_), Some(_)) => Error("Got both an error and a result") + } + ) + |> (a => resolve(. a)) + ) + ) + ); diff --git a/drafts/bs-elm/.gitignore b/drafts/bs-elm/.gitignore new file mode 100644 index 0000000..73c1a0b --- /dev/null +++ b/drafts/bs-elm/.gitignore @@ -0,0 +1,17 @@ +.cache +.DS_Store +node_modules +.merlin +lib +*.log +src/Elm.bs.js + +example/.DS_Store +example/src/elm/Other/Main.js +example/src/reason/Main.bs.js +example/.merlin +example/node_modules +example/elm-stuff +example/html.index +example/src/*.bs.js +example/lib diff --git a/drafts/bs-elm/LICENSE b/drafts/bs-elm/LICENSE new file mode 100644 index 0000000..c3b19a9 --- /dev/null +++ b/drafts/bs-elm/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2018 Jared Ramirez + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/drafts/bs-elm/README.md b/drafts/bs-elm/README.md new file mode 100644 index 0000000..38a3967 --- /dev/null +++ b/drafts/bs-elm/README.md @@ -0,0 +1,100 @@ +## bs-elm + +> Bindings for mounting and interacting with Elm applications in Reason. + +### Motivation + +Writing web applications in Elm is nice. It's type system and enforced architecture +are just a couple of the really cool things that it offers. The Elm ecosystem is +pretty small compared to the Javascript(JS) ecosystem, and this is a draw back +when coming from the world of JS. Interop with JS is possible, but it requires +writing regular JS code, which has none of Elm's safety. This is where Reason +enters the picture. Reason can communicate more direclty with JS with much more +type safety than vanilla JS. The possibility of writing an Elm app and handling +JS interop with Reason is pretty powerful. Having access to the entire JS +ecosytem in a (more) typesafe way is pretty exciting, so `bs-elm` was created. + +### Getting Started + +- Install + - With yarn: `yarn add bs-elm` + - With npm: `npm install --save bs-elm` +- Add `bs-elm` as a dependency in `bsconfig.json` + +``` +{ + ... + "bs-dependencies": ["bs-elm"] +} +``` + +- Use the `Elm` module in reason + +``` +module R = Belt.Result; + +type ports = { + infoForReason: Elm.elmToReasonPort(string), + infoForElm: Elm.reasonToElmPort(string), +}; + +[@bs.val] external elmProgram: Elm.elmProgramWithPorts(ports) = "Elm"; +/* Or if using a bundler. + [@bs.module] + external elmProgram : Elm.elmProgramWithPorts(ports) = "path/to/App.elm"; +*/ + +type flags = {...}; + +let resultRuntime = + Elm.mount( + ~flags={..}, /* Optional, defaults to Nothing */ + ~moduleName="Other.Main", /* Optional, defaults to "Main" */ + elmProgram, + ); + +switch (resultRuntime) { +| R.Ok(runtime) => + runtime.ports.infoForReason.subscribe(info => + runtime.ports.infoForElm.send("You pressed " ++ info) + ) +| R.Error(message) => Js.log(message) +}; +``` + +Checkout the [`example/`](example)! +Checkout this [repo using webpack](https://github.com/jaredramirez/bs-elm-example)! + +### Docs + +Checkout the [rei](src/Elm.rei) file for documenation. + +If you have any suggestions or run into any bugs, please open an issue! + +### Change log + +`v3.0.0` -> + +- Upgrade to bsb 7.3.2 +- Improve interop with new bsb records <-> js object compatability + +`v2.0.0` -> + +- Drop support for 0.18 +- Add support for 0.19 + +`v1.0.2` -> + +- Compile reason modules in-source + +`v1.0.1` -> + +- Upgrade to bs-platform@3.0.0 (No change in the generated code) +- Generate files with the suffix `.bs.js` instead of `.js` +- NOTE: If using webpack this, changes how the project must be built. Please refer to [jaredramirez/bs-elm-example](https://github.com/jaredramirez/bs-elm-example) for an example. + +`v1.0.0` -> + +- Rename project to `bs-elm` +- Changed exported module from `ReasonElm` to `Elm` +- Changed export port types to `elmOutPort` -> `portToElm` and `elmInPort` -> `portFromElm` diff --git a/drafts/bs-elm/bsconfig.json b/drafts/bs-elm/bsconfig.json new file mode 100644 index 0000000..d654c43 --- /dev/null +++ b/drafts/bs-elm/bsconfig.json @@ -0,0 +1,11 @@ +{ + "name": "bs-elm", + "version": "3.0.0", + "refmt": 3, + "suffix": ".bs.js", + "sources": "src", + "package-specs": { + "module": "commonjs", + "in-source": false + } +} diff --git a/drafts/bs-elm/example/.gitignore b/drafts/bs-elm/example/.gitignore new file mode 100644 index 0000000..9c32a28 --- /dev/null +++ b/drafts/bs-elm/example/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.merlin +.bsb.lock +npm-debug.log +/lib/bs/ +/node_modules/ +/bundleOutput/ \ No newline at end of file diff --git a/drafts/bs-elm/example/README.md b/drafts/bs-elm/example/README.md new file mode 100644 index 0000000..43aaa33 --- /dev/null +++ b/drafts/bs-elm/example/README.md @@ -0,0 +1,11 @@ +# bs-elm example + +## Run + +- `yarn` +- `yarn elm:build && yarn re:build` +- `yarn serve` + +## About + +This example is a very minimal approach to building Elm/Bucklescript. In a real application, you'd probably need a more robust way to build & iterate. diff --git a/drafts/bs-elm/example/bsconfig.json b/drafts/bs-elm/example/bsconfig.json new file mode 100644 index 0000000..6f2b49e --- /dev/null +++ b/drafts/bs-elm/example/bsconfig.json @@ -0,0 +1,18 @@ +{ + "name": "bs-elm-example", + "reason": { + "react-jsx": 3 + }, + "sources": ["src/reason", "../src"], + "bsc-flags": ["-bs-super-errors", "-bs-no-version-header"], + "package-specs": [ + { + "module": "commonjs", + "in-source": true + } + ], + "suffix": ".bs.js", + "namespace": true, + "bs-dependencies": [], + "refmt": 3 +} diff --git a/drafts/bs-elm/example/elm.json b/drafts/bs-elm/example/elm.json new file mode 100644 index 0000000..4576ce2 --- /dev/null +++ b/drafts/bs-elm/example/elm.json @@ -0,0 +1,24 @@ +{ + "type": "application", + "source-directories": [ + "src/elm" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/browser": "1.0.2", + "elm/core": "1.0.5", + "elm/html": "1.0.0", + "elm/json": "1.1.3" + }, + "indirect": { + "elm/time": "1.0.0", + "elm/url": "1.0.0", + "elm/virtual-dom": "1.0.2" + } + }, + "test-dependencies": { + "direct": {}, + "indirect": {} + } +} diff --git a/drafts/bs-elm/example/index.html b/drafts/bs-elm/example/index.html new file mode 100644 index 0000000..86af5c9 --- /dev/null +++ b/drafts/bs-elm/example/index.html @@ -0,0 +1,20 @@ + + + + + bs-elm example + + + + + + + + + diff --git a/drafts/bs-elm/example/package.json b/drafts/bs-elm/example/package.json new file mode 100644 index 0000000..2d0cae0 --- /dev/null +++ b/drafts/bs-elm/example/package.json @@ -0,0 +1,19 @@ +{ + "name": "bs-elm-example", + "version": "0.1.0", + "scripts": { + "re:build": "bsb -make-world", + "re:clean": "bsb -clean-world", + "elm:build": "elm make src/elm/Other/Main.elm --output src/elm/Other/Main.js", + "serve": "moduleserve ./ --port 8000" + }, + "keywords": ["BuckleScript", "Elm"], + "author": "", + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "bs-platform": "7.3.2", + "elm": "0.19.1-3", + "moduleserve": "0.9.0" + } +} diff --git a/drafts/bs-elm/example/src/elm/Other/Main.elm b/drafts/bs-elm/example/src/elm/Other/Main.elm new file mode 100644 index 0000000..e66a350 --- /dev/null +++ b/drafts/bs-elm/example/src/elm/Other/Main.elm @@ -0,0 +1,116 @@ +port module Other.Main exposing (Flags, Model, Msg(..), infoForElm, infoForReason, init, main, subscriptions, update, view) + +import Browser +import Html exposing (Html) +import Html.Attributes as Attrs +import Html.Events as Events +import Json.Decode as Decode +import Json.Encode as Encode + + + +-- MODEL + + +type alias Model = + { title : String + , response : Maybe String + } + + +type alias Flags = + { title : String + } + + +init : Flags -> ( Model, Cmd Msg ) +init flags = + ( { title = flags.title + , response = Nothing + } + , Cmd.none + ) + + + +-- MESSAGES + + +type Msg + = SendToReason String + | GetFromReason String + + + +-- VIEW + + +view : Model -> List (Html Msg) +view model = + [ Html.div + [ Attrs.style "display" "flex" + , Attrs.style "flex-direction" "column" + , Attrs.style "width" "500px" + ] + [ Html.h2 [] [ Html.text model.title ] + , Html.button [ Events.onClick <| SendToReason "Button 1" ] + [ Html.text "Button 1" ] + , Html.button [ Events.onClick <| SendToReason "Button 2" ] + [ Html.text "Button 2" ] + , Html.span [] [ Html.text <| Maybe.withDefault "" model.response ] + ] + ] + + + +-- UPDATE + + +update : Msg -> Model -> ( Model, Cmd Msg ) +update msg model = + case msg of + SendToReason message -> + ( model + , infoForReason message + ) + + GetFromReason s -> + ( { model | response = Just s } + , Cmd.none + ) + + + +-- PORTS + + +port infoForReason : String -> Cmd msg + + +port infoForElm : (String -> msg) -> Sub msg + + + +-- SUBSCRIPTIONS + + +subscriptions : Model -> Sub Msg +subscriptions model = + infoForElm GetFromReason + + + +-- MAIN + + +main = + Browser.document + { init = init + , view = + \model -> + { title = "BS Elm Example" + , body = view model + } + , update = update + , subscriptions = subscriptions + } diff --git a/drafts/bs-elm/example/src/reason/Main.re b/drafts/bs-elm/example/src/reason/Main.re new file mode 100644 index 0000000..a8ce74f --- /dev/null +++ b/drafts/bs-elm/example/src/reason/Main.re @@ -0,0 +1,26 @@ +module R = Belt.Result; +module M = Belt.Map.String; + +type ports = { + infoForReason: Elm.elmToReasonPort(string), + infoForElm: Elm.reasonToElmPort(string), +}; + +[@bs.val] external elmProgram: Elm.elmProgramWithPorts(ports) = "Elm"; + +type flags = {title: string}; + +let resultRuntime = + Elm.mount( + ~flags={title: "Text below buttons set in Reason via flags"}, + ~moduleName="Other.Main", + elmProgram, + ); + +switch (resultRuntime) { +| R.Ok(runtime) => + runtime.ports.infoForReason.subscribe(info => + runtime.ports.infoForElm.send("You pressed " ++ info) + ) +| R.Error(message) => Js.log(message) +}; diff --git a/drafts/bs-elm/example/watcher.js b/drafts/bs-elm/example/watcher.js new file mode 100644 index 0000000..26fcd46 --- /dev/null +++ b/drafts/bs-elm/example/watcher.js @@ -0,0 +1,39 @@ +// This is our simple, robust watcher. It hooks into the BuckleScript build +// system to listen for build events. +// See package.json's `start` script and `./node_modules/.bin/bsb --help` + +// Btw, if you change this file and reload the page, your browser cache +// _might_ not pick up the new version. If you're in Chrome, do Force Reload. + +var websocketReloader; +var LAST_SUCCESS_BUILD_STAMP = localStorage.getItem('LAST_SUCCESS_BUILD_STAMP') || 0; +// package.json's `start` script's `bsb -ws _` means it'll pipe build events +// through a websocket connection to a default port of 9999. This is +// configurable, e.g. `-ws 5000` +var webSocketPort = 9999; + +function setUpWebSocket() { + if (websocketReloader == null || websocketReloader.readyState !== 1) { + try { + websocketReloader = new WebSocket(`ws://${window.location.hostname}:${webSocketPort}`); + websocketReloader.onmessage = (message) => { + var newData = JSON.parse(message.data).LAST_SUCCESS_BUILD_STAMP; + if (newData > LAST_SUCCESS_BUILD_STAMP) { + LAST_SUCCESS_BUILD_STAMP = newData; + localStorage.setItem('LAST_SUCCESS_BUILD_STAMP', LAST_SUCCESS_BUILD_STAMP); + // Refresh the page! This will naturally re-run everything, + // including our moduleserve which will re-resolve all the modules. + // No stable build! + location.reload(true); + } + + } + } catch (exn) { + console.error("The watcher tried to connect to web socket, but failed. Here's the message:"); + console.error(exn); + } + } +}; + +setUpWebSocket(); +setInterval(setUpWebSocket, 2000); diff --git a/drafts/bs-elm/example/yarn.lock b/drafts/bs-elm/example/yarn.lock new file mode 100644 index 0000000..0121ea5 --- /dev/null +++ b/drafts/bs-elm/example/yarn.lock @@ -0,0 +1,954 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@zeit/schemas@2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" + integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== + +accepts@~1.3.5: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +ajv@6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" + integrity sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^6.5.5: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" + integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-align@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= + dependencies: + string-width "^2.0.0" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +arch@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.2.tgz#0c52bbe7344bb4fa260c443d2cbad9c00ff2f0bf" + integrity sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ== + +arg@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" + integrity sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w== + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2" + integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +boxen@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" + integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== + dependencies: + ansi-align "^2.0.0" + camelcase "^4.0.0" + chalk "^2.0.1" + cli-boxes "^1.0.0" + string-width "^2.0.0" + term-size "^1.2.0" + widest-line "^2.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +bs-platform@7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.3.2.tgz#301f5c9b4e8cf5713cb60ca22e145e56e793affe" + integrity sha512-seJL5g4anK9la4erv+B2o2sMHQCxDF6OCRl9en3hbaUos/S3JsusQ0sPp4ORsbx5eXfHLYBwPljwKXlgpXtsgQ== + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + +camelcase@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chalk@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^2.0.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +cli-boxes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" + integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= + +clipboardy@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" + integrity sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA== + dependencies: + arch "^2.1.0" + execa "^0.8.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +compressible@~2.0.14: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" + integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.14" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +elm@0.19.1-3: + version "0.19.1-3" + resolved "https://registry.yarnpkg.com/elm/-/elm-0.19.1-3.tgz#2382aa1943bc79974b5d95b0a6acbe010ee16909" + integrity sha512-6y36ewCcVmTOx8lj7cKJs3bhI5qMfoVEigePZ9PhEUNKpwjjML/pU2u2YSpHVAznuCcojoF6KIsrS1Ci7GtVaQ== + dependencies: + request "^2.88.0" + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" + integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-url-parser@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" + integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= + dependencies: + punycode "^1.3.2" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== + +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== + +mime-types@2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== + dependencies: + mime-db "~1.33.0" + +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== + dependencies: + mime-db "1.44.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +minimatch@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +moduleserve@0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/moduleserve/-/moduleserve-0.9.0.tgz#ca63f3b62e6793e584d77806845dae88b991e047" + integrity sha512-nQvrxU4dEa/fFjI5QFUoc2v8wuDyL0DGrilz8PTeixqjO9rIh0kTP82oa9/HRnODLB6JcgMk4+tlgp1H3MWtFg== + dependencies: + send "^0.17.1" + serve-static "^1.14.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-is-inside@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-to-regexp@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" + integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +punycode@^1.3.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +range-parser@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +rc@^1.0.1, rc@^1.1.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +registry-auth-token@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== + dependencies: + rc "^1.1.6" + safe-buffer "^5.0.1" + +registry-url@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" + integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= + dependencies: + rc "^1.0.1" + +request@^2.88.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +safe-buffer@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.2: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +send@0.17.1, send@^0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-handler@6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.2.tgz#f05b0421a313fff2d257838cba00cbcc512cd2b6" + integrity sha512-RFh49wX7zJmmOVDcIjiDSJnMH+ItQEvyuYLYuDBVoA/xmQSCuj+uRmk1cmBB5QQlI3qOiWKp6p4DUGY+Z5AB2A== + dependencies: + bytes "3.0.0" + content-disposition "0.5.2" + fast-url-parser "1.1.3" + mime-types "2.1.18" + minimatch "3.0.4" + path-is-inside "1.0.2" + path-to-regexp "2.2.1" + range-parser "1.2.0" + +serve-static@^1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +serve@^11.3.1: + version "11.3.1" + resolved "https://registry.yarnpkg.com/serve/-/serve-11.3.1.tgz#dc1087ab81f9e84704bd3d9ca459b7b79a739039" + integrity sha512-+tcx5eybTZT0scsp1PCb7HYjzBSfRF9fQIwyEU8ZYLioVuhHwywRYBBTF5WYlTXvC62eumK2bloDXAd7+9blGQ== + dependencies: + "@zeit/schemas" "2.6.0" + ajv "6.5.3" + arg "2.0.0" + boxen "1.3.0" + chalk "2.4.1" + clipboardy "1.2.3" + compression "1.7.3" + serve-handler "6.1.2" + update-check "1.5.2" + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +string-width@^2.0.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +term-size@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= + dependencies: + execa "^0.7.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +update-check@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.2.tgz#2fe09f725c543440b3d7dabe8971f2d5caaedc28" + integrity sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ== + dependencies: + registry-auth-token "3.3.2" + registry-url "3.1.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +widest-line@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" + integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== + dependencies: + string-width "^2.1.1" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= diff --git a/drafts/bs-elm/package.json b/drafts/bs-elm/package.json new file mode 100644 index 0000000..dfa0811 --- /dev/null +++ b/drafts/bs-elm/package.json @@ -0,0 +1,29 @@ +{ + "name": "bs-elm", + "version": "3.0.0", + "description": "Bindings for mounting and interacting with Elm applications in Reason.", + "main": "index.js", + "scripts": { + "re:build": "bsb -make-world", + "re:watch": "bsb -make-world -w", + "re:clean": "bsb -clean-world" + }, + "devDependencies": { + "bs-platform": "7.3.2" + }, + "dependencies": { + "lodash.get": "4.4.2" + }, + "license": "MIT", + "keywords": ["reason", "bucklescript", "elm"], + "author": "Jared Ramirez ", + "homepage": "https://github.com/jaredramirez/bs-elm", + "repository": { + "type": "git", + "url": "git+https://github.com/jaredramirez/bs-elm.git" + }, + "bugs": { + "url": "https://github.com/jaredramirez/bs-elm/issues", + "email": "jaredramirez@me.com" + } +} diff --git a/drafts/bs-elm/src/Elm.re b/drafts/bs-elm/src/Elm.re new file mode 100644 index 0000000..ca54feb --- /dev/null +++ b/drafts/bs-elm/src/Elm.re @@ -0,0 +1,96 @@ +module R = Belt.Result; + +/* Get element by id from DOM */ +[@bs.val] [@bs.return nullable] [@bs.scope "document"] +external getElementById: string => option(Dom.element) = "getElementById"; + +/* Abstract type to represent an Elm module */ +type elmModule('runtime); + +/* Abstract type to represent an Elm program */ +type elmProgramBase('runtime); + +/* Abstract type to represent an Elm program without ports */ +type elmRuntime = unit; +type elmProgram = elmProgramBase(elmRuntime); + +/* Abstract type to represent an Elm program with ports */ +type elmRuntimeWithPorts('ports) = {ports: 'ports}; +type elmProgramWithPorts('ports) = + elmProgramBase(elmRuntimeWithPorts('ports)); + +/* Type to represent a port to recieve data in Reason from Elm */ +type elmToReasonPort('dataForReason) = { + subscribe: ('dataForReason => unit) => unit, + unsubscribe: unit => unit, +}; + +/* Type to represent a port to send data to Elm from Reason */ +type reasonToElmPort('dataForElm) = {send: 'dataForElm => unit}; + +/* Type for init to take */ +type initOptions('flags) = { + [@bs.as "node"] + optNode: option(Dom.element), + [@bs.as "flags"] + optFlags: option('flags), +}; + +/* Function to launch am Elm module */ +[@bs.send] +external init: (elmModule('runtime), initOptions('flags)) => 'runtime = + "init"; + +/* Helper to mounting an Elm program */ +let mountHelper = + ( + ~optFlags: option('flags), + ~optElementId: option(string), + ~module_: elmModule('runtime), + ) + : R.t('runtime, string) => { + let nodeResult = + switch (optElementId) { + | Some(elementId) => + switch (getElementById(elementId)) { + | Some(node) => R.Ok(Some(node)) + | None => R.Error("Element with id '" ++ elementId ++ "' wasn't found.") + } + | None => R.Ok(None) + }; + R.map(nodeResult, optNode => init(module_, {optNode, optFlags})); +}; + +/* Used to get modules from elmProgramBase */ +[@bs.module] [@bs.return nullable] +external lodashGet: + (elmProgramBase('runtime), string) => option(elmModule('runtime)) = + "lodash.get"; + +let getModuleFromPath = + (elmProgram: elmProgramBase('runtime), moduleName: string) + : option(elmModule('runtime)) => + switch (lodashGet(elmProgram, moduleName)) { + | None => + /* If imported via bs.module, we might need to specify "Elm." to get + the module correctly */ + lodashGet(elmProgram, "Elm." ++ moduleName) + | Some(elmModule_) => Some(elmModule_) + }; + +/* Function mount an Elm program */ +let mount = + ( + ~flags: option('flags)=?, + ~elementId: option(string)=?, + ~moduleName: string="Main", + elmProgram: elmProgramBase('runtime), + ) + : R.t('runtime, string) => { + let optModule = getModuleFromPath(elmProgram, moduleName); + switch (optModule) { + | Some(module_) => + mountHelper(~optFlags=flags, ~optElementId=elementId, ~module_) + | None => R.Error("Module '" ++ moduleName ++ "' not found.") + }; +}; diff --git a/drafts/bs-elm/src/Elm.rei b/drafts/bs-elm/src/Elm.rei new file mode 100644 index 0000000..be953d1 --- /dev/null +++ b/drafts/bs-elm/src/Elm.rei @@ -0,0 +1,33 @@ +/* Abstract type to represent an Elm program + This should not be used directly. + Use `elmProgram` or `elmProgramWithPorts` instead. + */ +type elmProgramBase('runtime); + +/* Type to represent an Elm program without ports */ +type elmRuntime = unit; +type elmProgram = elmProgramBase(elmRuntime); + +/* Type to represent an Elm program with ports */ +type elmRuntimeWithPorts('ports) = {ports: 'ports}; +type elmProgramWithPorts('ports) = + elmProgramBase(elmRuntimeWithPorts('ports)); + +/* Type to represent a port to recieve data in Reason from Elm */ +type elmToReasonPort('dataForReason) = { + subscribe: ('dataForReason => unit) => unit, + unsubscribe: unit => unit, +}; + +/* Type to represent a port to send data to Elm from Reason */ +type reasonToElmPort('dataForElm) = {send: 'dataForElm => unit}; + +/* Function to mount elm application */ +let mount: + ( + ~flags: 'flags=?, + ~elementId: string=?, + ~moduleName: string=?, + elmProgramBase('runtime) + ) => + Belt.Result.t('runtime, string); diff --git a/drafts/bs-elm/yarn.lock b/drafts/bs-elm/yarn.lock new file mode 100644 index 0000000..fcaa257 --- /dev/null +++ b/drafts/bs-elm/yarn.lock @@ -0,0 +1,12 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +bs-platform@7.3.2: + version "7.3.2" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-7.3.2.tgz#301f5c9b4e8cf5713cb60ca22e145e56e793affe" + integrity sha512-seJL5g4anK9la4erv+B2o2sMHQCxDF6OCRl9en3hbaUos/S3JsusQ0sPp4ORsbx5eXfHLYBwPljwKXlgpXtsgQ== + +lodash.get@4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" diff --git a/drafts/bs-express/.gitignore b/drafts/bs-express/.gitignore new file mode 100644 index 0000000..314591f --- /dev/null +++ b/drafts/bs-express/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +/node_modules* +.merlin +/lib/ +*.log +.bsb.lock +tests/test.data +package-lock.json +yarn.lock diff --git a/drafts/bs-express/.npmignore b/drafts/bs-express/.npmignore new file mode 100644 index 0000000..7fbfe7d --- /dev/null +++ b/drafts/bs-express/.npmignore @@ -0,0 +1,7 @@ +.DS_Store +/node_modules/ +.merlin +*.log +/tests/ +/static/ +/example/ diff --git a/drafts/bs-express/.travis.yml b/drafts/bs-express/.travis.yml new file mode 100644 index 0000000..d9af2be --- /dev/null +++ b/drafts/bs-express/.travis.yml @@ -0,0 +1,17 @@ +language: node_js +cache: yarn +node_js: + - "9" +script: + - yarn run build + - npm test +deploy: + skip_cleanup: true + provider: npm + email: nick@cuthbert.co.za + api_key: + secure: f1vFPrmISx58292+OUy6j6AZi9yOGIR5RoIJsBQThPnxAVgQQabvRxG0eJixt/1Q9Pl1wbL13xvrcrfbGqFgPZnkDPeY5iesgG3xJ+4TKYzo3jCNfgMQb+VW+oMeGi/DoX8xe81pjaQjYCZJHhy5IQwbfmdnI9VhPdhAhfX61hZFnNsLfDCM1W6mWIDvXXdEIVETybgiw+C5g8TBcV2Lp1i7zJj6UAohxINUyjYfgercHJfePJQwmxe6hJBenVxPA3bCGAVFvMRPSllegopf1v5NtkqJmDENLQ48dvcwTULwc6vAaQIZw87MJ9H0SnXBA512INfdWsZoeG6VjkLx604AQVRlxViGAK0HhKN1ldFsm+H4As1sff/5g/OKKzgBVIkqNa/bpZsjPiZwnbaYa1UmOMkhjjjYSMIJ1lYpW4coQX0OJLhh9YBIoBMw6q6JdnBHq//z0DhfG3H3Jk5jmUNRRkCx1pyBwrXgChi+jnSkEoWLbQ28su4ICyZ138L9OolBoXymzOiU767fzR3xN+omHkhtm///tZFXH1QKW7VTtALWg6wUoVwlj1MI0Lkq8EeMX8VoJlg9OH0aEYgpuRPXWGKmG09nm+zDRSysTrdC46pwJCuxXHFh+t3LUWDgUrVBYPl9RWNB4AyJ3g1vO4RJQIloPNjiuce3q9t6ABo= + on: + tags: true + branch: master + repo: reasonml-community/bs-express diff --git a/drafts/bs-express/LICENSE b/drafts/bs-express/LICENSE new file mode 100644 index 0000000..a24bc7b --- /dev/null +++ b/drafts/bs-express/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Ramana Venkata + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-express/README.md b/drafts/bs-express/README.md new file mode 100644 index 0000000..6d2e7dd --- /dev/null +++ b/drafts/bs-express/README.md @@ -0,0 +1,52 @@ +# bs-express + +Express bindings for [BuckleScript](https://github.com/bloomberg/bucklescript) in [Reason](https://github.com/facebook/reason). + +## Installing + +1. Install `bs-express` using npm: + +``` +npm install --save bs-express +``` + +2. Add bs-express as a dependency to your `bsconfig.json`: + +```json +{ + "name": "your-project", + "bs-dependencies": ["bs-express"] +} +``` + +--- + +Right now the library is somewhat underdocumented, so please view the interface file [`Express.rei`](./src/Express.rei) or the [example folder](./example/) to see library usage. + +--- + +## Contributing + +If you'd like to contribute, you can follow the instructions below to get things working locally. + +### Getting Started + +1. After cloning the repo, install the dependencies + +```shell +npm install +``` + +2. Build and start the example server: + +```shell +npm start +``` + +### Running the tests + +To run tests, run the command: + +```shell +npm test +``` diff --git a/drafts/bs-express/bsconfig.json b/drafts/bs-express/bsconfig.json new file mode 100644 index 0000000..febe772 --- /dev/null +++ b/drafts/bs-express/bsconfig.json @@ -0,0 +1,20 @@ +{ + "name": "bs-express", + "bsc-flags": [ + "-bs-super-errors" + ], + "sources": [ + "src", + { + "dir": "example", + "type": "dev" + } + ], + "bs-dev-dependencies": [ + "@glennsl/bs-json" + ], + "refmt": 3, + "warnings": { + "number": "-105" + } +} diff --git a/drafts/bs-express/example/Index.res b/drafts/bs-express/example/Index.res new file mode 100644 index 0000000..0813fff --- /dev/null +++ b/drafts/bs-express/example/Index.res @@ -0,0 +1,596 @@ +open Express + +/* The tests below relies upon the ability to store in the Request + objects abritrary JSON properties. + + Each middleware will both check that previous middleware + have been called by making properties exists in the Request object and + upon success will themselves adds another property to the Request. + + */ +/* [checkProperty req next property k] makes sure [property] is + present in [req]. If success then [k()] is invoked, otherwise + [Next.route] is called with next */ +let checkProperty = (req, next, property, k, res) => { + let reqData = Request.asJsonObject(req) + switch Js.Dict.get(reqData, property) { + | None => next(Next.route, res) + | Some(x) => + switch Js.Json.decodeBoolean(x) { + | Some(b) when b => k(res) + | _ => next(Next.route, res) + } + } +} + +/* same as [checkProperty] but with a list of properties */ +let checkProperties = (req, next, properties, k, res) => { + let rec aux = properties => + switch properties { + | list{} => k(res) + | list{p, ...tl} => checkProperty(req, next, p, _ => aux(tl), res) + } + aux(properties) +} + +/* [setProperty req property] sets the [property] in the [req] Request + value */ +let setProperty = (req, property, res) => { + let reqData = Request.asJsonObject(req) + Js.Dict.set(reqData, property, Js.Json.boolean(true)) + res +} + +/* return the string value for [key], None if the key is not in [dict] + TODO once BOption.map is released */ +let getDictString = (dict, key) => + switch Js.Dict.get(dict, key) { + | Some(json) => Js.Json.decodeString(json) + | _ => None + } + +/* make a common JSON object representing success */ +let makeSuccessJson = () => { + let json = Js.Dict.empty() + Js.Dict.set(json, "success", Js.Json.boolean(true)) + Js.Json.object_(json) +} + +let app = express() +/* + If you would like to set view engine + App.set(app, "view engine", "pug"); + */ + +App.disable(app, ~name="x-powered-by") + +App.useOnPath( + app, + ~path="/", + Middleware.from((next, req, res) => + res |> setProperty(req, "middleware0") |> next(Next.middleware) + ), +) /* call the next middleware in the processing pipeline */ + +App.useWithMany( + app, + [ + Middleware.from((next, req) => + checkProperty(req, next, "middleware0", res => + res |> setProperty(req, "middleware1") |> next(Next.middleware) + ) + ), + Middleware.from((next, req) => + checkProperties(req, next, list{"middleware0", "middleware1"}, res => + next(Next.middleware, setProperty(req, "middleware2", res)) + ) + ), + ], +) + +App.get( + app, + ~path="/", + Middleware.from((next, req) => { + let previousMiddlewares = list{"middleware0", "middleware1", "middleware2"} + checkProperties(req, next, previousMiddlewares, Response.sendJson(_, makeSuccessJson())) + }), +) + +App.useOnPath( + app, + ~path="/static", + { + let options = Static.defaultOptions() + Static.make("static", options) |> Static.asMiddleware + }, +) + +App.postWithMany( + app, + ~path="/:id/id", + [ + Middleware.from((next, req) => { + let previousMiddlewares = list{"middleware0", "middleware1", "middleware2"} + checkProperties(req, next, previousMiddlewares, res => + switch getDictString(Request.params(req), "id") { + | Some("123") => Response.sendJson(res, makeSuccessJson()) + | _ => next(Next.route, res) + } + ) + }), + ], +) + +App.patchWithMany( + app, + ~path="/:id/id", + [ + Middleware.from((next, req) => { + let previousMiddlewares = list{"middleware0", "middleware1", "middleware2"} + checkProperties(req, next, previousMiddlewares, res => + switch getDictString(Request.params(req), "id") { + | Some("123") => Response.sendJson(res, makeSuccessJson()) + | _ => next(Next.route, res) + } + ) + }), + ], +) + +App.putWithMany( + app, + ~path="/:id/id", + [ + Middleware.from((next, req) => { + let previousMiddlewares = list{"middleware0", "middleware1", "middleware2"} + checkProperties(req, next, previousMiddlewares, res => + switch getDictString(Request.params(req), "id") { + | Some("123") => Response.sendJson(res, makeSuccessJson()) + | _ => next(Next.route, res) + } + ) + }), + ], +) + +App.deleteWithMany( + app, + ~path="/:id/id", + [ + Middleware.from((next, req) => { + let previousMiddlewares = list{"middleware0", "middleware1", "middleware2"} + checkProperties(req, next, previousMiddlewares, res => + switch getDictString(Request.params(req), "id") { + | Some("123") => Response.sendJson(res, makeSuccessJson()) + | _ => next(Next.route, res) + } + ) + }), + ], +) + +/* If you have set up view engine, you can uncomment this "get" +Middleware.from((_, _) =>{ + let dict: Js.Dict.t(string) = Js.Dict.empty(); + Response.render("index", dict, ()); +}); +*/ + +App.get( + app, + ~path="/baseUrl", + Middleware.from((next, req) => + switch Request.baseUrl(req) { + | "" => Response.sendJson(_, makeSuccessJson()) + | _ => next(Next.route) + } + ), +) + +App.get( + app, + ~path="/hostname", + Middleware.from((next, req) => + switch Request.hostname(req) { + | "localhost" => Response.sendJson(_, makeSuccessJson()) + | _ => next(Next.route) + } + ), +) + +App.get( + app, + ~path="/ip", + Middleware.from((next, req) => + switch Request.ip(req) { + | "127.0.0.1" => Response.sendJson(_, makeSuccessJson()) + | s => + Js.log(s) + next(Next.route) + /* TODO why is it printing ::1 */ + } + ), +) + +App.get( + app, + ~path="/method", + Middleware.from((next, req) => + switch Request.httpMethod(req) { + | Request.Get => Response.sendJson(_, makeSuccessJson()) + | s => + Js.log(s) + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/originalUrl", + Middleware.from((next, req) => + switch Request.originalUrl(req) { + | "/originalUrl" => Response.sendJson(_, makeSuccessJson()) + | s => + Js.log(s) + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/path", + Middleware.from((next, req) => + switch Request.path(req) { + | "/path" => Response.sendJson(_, makeSuccessJson()) + | s => + Js.log(s) + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/protocol", + Middleware.from((next, req) => + switch Request.protocol(req) { + | Request.Http => Response.sendJson(_, makeSuccessJson()) + | s => + Js.log(s) + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/query", + Middleware.from((next, req) => + switch getDictString(Request.query(req), "key") { + | Some("value") => Response.sendJson(_, makeSuccessJson()) + | _ => next(Next.route) + } + ), +) + +App.get( + app, + ~path="/not-found", + Middleware.from((_, _) => Response.sendStatus(_, Response.StatusCode.NotFound)), +) + +App.get( + app, + ~path="/error", + Middleware.from((_, _, res) => + res + ->Response.status(Response.StatusCode.InternalServerError) + ->Response.sendJson(makeSuccessJson()) + ), +) + +App.getWithMany( + app, + ~path="/accepts", + [ + Middleware.from((next, req) => + switch Request.accepts(req, ["audio/whatever", "audio/basic"]) { + | Some("audio/basic") => next(Next.middleware) + | _ => next(Next.route) + } + ), + Middleware.from((next, req) => + switch Request.accepts(req, ["text/css"]) { + | None => Response.sendJson(_, makeSuccessJson()) + | _ => next(Next.route) + } + ), + ], +) + +let \">>" = (f, g, x) => x |> f |> g + +App.getWithMany( + app, + ~path="/accepts-charsets", + [ + Middleware.from((next, req) => + switch Request.acceptsCharsets(req, ["UTF-8", "UTF-16"]) { + | Some("UTF-8") => next(Next.middleware) + | _ => next(Next.route) + } + ), + Middleware.from((next, req) => + switch Request.acceptsCharsets(req, ["UTF-16"]) { + | None => Response.sendJson(_, makeSuccessJson()) + | _ => next(Next.route) + } + ), + ], +) + +App.get( + app, + ~path="/get", + Middleware.from((next, req) => + switch Request.get(req, "key") { + | Some("value") => Response.sendJson(_, makeSuccessJson()) + | _ => next(Next.route) + } + ), +) + +App.get( + app, + ~path="/fresh", + Middleware.from((next, req) => + if !Request.fresh(req) { + Response.sendJson(_, makeSuccessJson()) + } else { + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/stale", + Middleware.from((next, req) => + if Request.stale(req) { + Response.sendJson(_, makeSuccessJson()) + } else { + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/secure", + Middleware.from((next, req) => + if !Request.secure(req) { + Response.sendJson(_, makeSuccessJson()) + } else { + next(Next.route) + } + ), +) + +App.get( + app, + ~path="/xhr", + Middleware.from((next, req) => + if !Request.xhr(req) { + Response.sendJson(_, makeSuccessJson()) + } else { + next(Next.route) + } + ), +) + +App.get(app, ~path="/redir", Middleware.from((_, _) => Response.redirect(_, "/redir/target"))) + +App.get( + app, + ~path="/redircode", + Middleware.from((_, _) => Response.redirectCode(_, 301, "/redir/target")), +) + +App.getWithMany( + app, + ~path="/ocaml-exception", + [ + Middleware.from((_, _, _next) => raise(Failure("Elvis has left the building!"))), + Middleware.fromError((_, err, _, res) => + switch err { + | Failure(f) => + res->Response.status(Response.StatusCode.PaymentRequired)->Response.sendString(f) + | _ => res->Response.sendStatus(Response.StatusCode.NotFound) + } + ), + ], +) + +App.get( + app, + ~path="/promise", + PromiseMiddleware.from((_req, _next, res) => + res->Response.sendStatus(Response.StatusCode.NoContent)->Js.Promise.resolve + ), +) + +App.getWithMany( + app, + ~path="/failing-promise", + [ + PromiseMiddleware.from((_, _, _next) => Js.Promise.reject(Not_found)), + PromiseMiddleware.fromError((_, _req, _next, res) => + res + ->Response.status(Response.StatusCode.InternalServerError) + ->Response.sendString("Caught Failing Promise") + ->Js.Promise.resolve + ), + ], +) + +let router1 = router() + +Router.get(router1, ~path="/123", Middleware.from((_, _) => Response.sendStatus(_, Created))) + +App.useRouterOnPath(app, ~path="/testing/testing", router1) + +let router2 = router(~caseSensitive=true, ~strict=true, ()) + +Router.get(router2, ~path="/Case-sensitive", Middleware.from((_, _) => Response.sendStatus(_, Ok))) + +Router.get(router2, ~path="/strict/", Middleware.from((_, _) => Response.sendStatus(_, Ok))) + +App.useRouterOnPath(app, ~path="/router-options", router2) + +App.param( + app, + ~name="identifier", + Middleware.from((_next, _req) => Response.sendStatus(_, Created)), +) + +App.get( + app, + ~path="/param-test/:identifier", + Middleware.from((_next, _req) => Response.sendStatus(_, BadRequest)), +) + +App.get( + app, + ~path="/cookie-set-test", + Middleware.from((_next, _req, res) => + res + ->Response.cookie(~name="test-cookie", Js.Json.string("cool-cookie")) + ->Response.sendStatus(Ok) + ), +) + +App.get( + app, + ~path="/cookie-clear-test", + Middleware.from((_next, _req, res) => + res->Response.clearCookie(~name="test-cookie2", ())->Response.sendStatus(Ok) + ), +) + +App.get( + app, + ~path="/response-set-header", + Middleware.from((_, _, res) => + res->Response.setHeader("X-Test-Header", "Set")->Response.sendStatus(Response.StatusCode.Ok) + ), +) + +let router3 = router(~caseSensitive=true, ~strict=true, ()) + +open ByteLimit + +Router.use(router3, Middleware.json(~limit=5.0 |> mb, ())) + +Router.use(router3, Middleware.urlencoded(~extended=true, ())) + +module Body = { + type payload = {"number": int} + let jsonDecoder = json => { + open Json.Decode + {"number": json |> field("number", int)} + } + let urlEncodedDecoder = dict => + { + "number": Js.Dict.unsafeGet(dict, "number") |> int_of_string, + } + let encoder = body => { + open Json.Encode + object_(list{("number", body["number"] |> int)}) + } +} + +let raiseIfNone = x => + switch x { + | Some(value) => value + | None => Js.Exn.raiseError("Body is none") + } + +Router.post( + router3, + ~path="/json-doubler", + Middleware.from((_next, req, res) => { + let json = req->Request.bodyJSON->raiseIfNone->Body.jsonDecoder + Response.sendJson(res, {"number": json["number"] * 2}->Body.encoder) + }), +) + +Router.post( + router3, + ~path="/urlencoded-doubler", + Middleware.from((_next, req, res) => { + let decoded = req->Request.bodyURLEncoded->raiseIfNone->Body.urlEncodedDecoder + Response.sendJson(res, {"number": decoded["number"] * 2}->Body.encoder) + }), +) + +App.useRouterOnPath(app, ~path="/builtin-middleware", router3) + +let router4 = router(~caseSensitive=true, ~strict=true, ()) + +Router.use(router4, Middleware.text()) + +Router.post( + router4, + ~path="/text-body", + Middleware.from((_next, req, res) => + Response.sendString(res, Request.bodyText(req)->raiseIfNone) + ), +) + +App.useRouterOnPath(app, ~path="/router4", router4) + +let onListen = e => + switch e { + | exception Js.Exn.Error(e) => { + Js.log(e) + Node.Process.exit(1) + } + | _ => Js.log("Listening at http://127.0.0.1:3000") + } + +let server = App.listen(app, ~port=3000, ~onListen, ()) + +let countRequests = server => { + let count = ref(0) + HttpServer.on(server, #request((_, _) => count := count.contents + 1)) + () => { + let result = count.contents + count := -1 + result + } +} + +let getRequestsCount = countRequests(server) + +App.post( + app, + ~path="/get-request-count", + Middleware.from((_, _, res) => + Response.sendString( + res, + "The server has been called " ++ (string_of_int(getRequestsCount()) ++ " times."), + ) + ), +) + +/* Other examples are + App.listen app (); + App.listen app port::1000 (); + App.listen app port::1000 onListen::(fun e => Js.log e) (); + */ +/* -- Test the server -- + npm run start && cd tests && ./test.sh + */ diff --git a/drafts/bs-express/package.json b/drafts/bs-express/package.json new file mode 100644 index 0000000..3a27072 --- /dev/null +++ b/drafts/bs-express/package.json @@ -0,0 +1,44 @@ +{ + "name": "bs-express", + "version": "1.0.2", + "description": "Express bindings in Reason", + "main": "index.js", + "dependencies": { + "body-parser": "^1.19.0", + "express": "^4.17.1" + }, + "devDependencies": { + "@glennsl/bs-json": "^5.0.2", + "bs-platform": "^8.4.2", + "husky": "^1.0.0-rc.13" + }, + "scripts": { + "build": "bsb -make-world", + "start": "npm run-script build && node lib/js/example/Index.js", + "watch-run": "nodemon lib/js/example/", + "watch": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "cd tests && ./test.sh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/reasonml-community/bs-express.git" + }, + "keywords": [ + "reasonml", + "bucklescript", + "expressjs", + "web", + "server", + "nodejs" + ], + "license": "MIT", + "bugs": { + "url": "https://github.com/reasonml-community/bs-express/issues" + }, + "homepage": "https://github.com/reasonml-community/bs-express#readme", + "rebel": {}, + "husky": { + "hooks": {} + } +} diff --git a/drafts/bs-express/src/Express.res b/drafts/bs-express/src/Express.res new file mode 100644 index 0000000..a347146 --- /dev/null +++ b/drafts/bs-express/src/Express.res @@ -0,0 +1,591 @@ +type complete + +module Error = { + type t = exn + + @bs.send @bs.return(null_undefined_to_opt) + external message: Js_exn.t => option = "message" + @bs.send @bs.return(null_undefined_to_opt) + external name: Js_exn.t => option = "name" +} + +module Request = { + type t + type params = Js_dict.t + @bs.get external params: t => params = "params" + + external asJsonObject: t => Js_dict.t = "%identity" + + @bs.get external baseUrl: t => string = "baseUrl" + @bs.get external body_: t => 'a = "body" + + @bs.get @bs.return(null_undefined_to_opt) + external bodyJSON: t => option = "body" + + @bs.get @bs.return(null_undefined_to_opt) + external bodyRaw: t => option = "body" + + let bodyText: t => option = req => { + let body: string = body_(req) + if Js.Json.test(body, Js.Json.String) { + Some(body) + } else { + None + } + } + let decodeStringDict = json => Js.Json.decodeObject(json) |> Js.Option.andThen((. obj) => { + let source: Js.Dict.t = Obj.magic(obj) + let allStrings = + Js.Dict.values(source) |> Array.fold_left( + (prev, value) => prev && Js.Json.test(value, Js.Json.String), + true, + ) + if allStrings { + Some(source) + } else { + None + } + }) + let bodyURLEncoded: t => option> = req => { + let body: Js.Json.t = body_(req) + decodeStringDict(body) + } + + @bs.get @bs.return(null_undefined_to_opt) + external cookies: t => option> = "cookies" + + @bs.get @bs.return(null_undefined_to_opt) + external signedCookies: t => option> = "signedCookies" + + @bs.get external hostname: t => string = "hostname" + + @bs.get external ip: t => string = "ip" + + @bs.get external fresh: t => bool = "fresh" + + @bs.get external stale: t => bool = "stale" + + @bs.get external methodRaw: t => string = "method" + type httpMethod = + | Get + | Post + | Put + | Delete + | Head + | Options + | Trace + | Connect + | Patch + let httpMethod: t => httpMethod = req => + switch methodRaw(req) { + | "GET" => Get + | "POST" => Post + | "PUT" => Put + | "PATCH" => Patch + | "DELETE" => Delete + | "HEAD" => Head + | "OPTIONS" => Options + | "TRACE" => Trace + | "CONNECT" => Connect + | s => failwith("Express.Request.method_ Unexpected method: " ++ s) + } + + @bs.get external originalUrl: t => string = "originalUrl" + + @bs.get external path: t => string = "path" + + type protocol = + | Http + | Https + let protocol: t => protocol = req => { + module Raw = { + @bs.get external protocol: t => string = "protocol" + } + switch Raw.protocol(req) { + | "http" => Http + | "https" => Https + | s => failwith("Express.Request.protocol, Unexpected protocol: " ++ s) + } + } + + @bs.get + external secure: t => bool = "secure" + + @bs.get external query: t => Js.Dict.t = "query" + + let accepts: (t, array) => option = (req, types) => { + module Raw = { + @bs.send + external accepts: (t, array) => Js.Json.t = "accepts" + } + let ret = Raw.accepts(req, types) + let tagged_t = Js_json.classify(ret) + switch tagged_t { + | JSONString(x) => Some(x) + | _ => None + } + } + + let acceptsCharsets: (t, array) => option = (req, types) => { + module Raw = { + @bs.send + external acceptsCharsets: (t, array) => Js.Json.t = "acceptsCharsets" + } + let ret = Raw.acceptsCharsets(req, types) + let tagged_t = Js_json.classify(ret) + switch tagged_t { + | JSONString(x) => Some(x) + | _ => None + } + } + @bs.send @bs.return(null_undefined_to_opt) + external get: (t, string) => option = "get" + + @bs.get + external xhr: t => bool = "xhr" +} + +module Response = { + type t + module StatusCode = { + @bs.deriving(jsConverter) + type t = + | @bs.as(200) Ok + | @bs.as(201) Created + | @bs.as(202) Accepted + | @bs.as(203) NonAuthoritativeInformation + | @bs.as(204) NoContent + | @bs.as(205) ResetContent + | @bs.as(206) PartialContent + | @bs.as(207) MultiStatus + | @bs.as(208) AleadyReported + | @bs.as(226) IMUsed + | @bs.as(300) MultipleChoices + | @bs.as(301) MovedPermanently + | @bs.as(302) Found + | @bs.as(303) SeeOther + | @bs.as(304) NotModified + | @bs.as(305) UseProxy + | @bs.as(306) SwitchProxy + | @bs.as(307) TemporaryRedirect + | @bs.as(308) PermanentRedirect + | @bs.as(400) BadRequest + | @bs.as(401) Unauthorized + | @bs.as(402) PaymentRequired + | @bs.as(403) Forbidden + | @bs.as(404) NotFound + | @bs.as(405) MethodNotAllowed + | @bs.as(406) NotAcceptable + | @bs.as(407) ProxyAuthenticationRequired + | @bs.as(408) RequestTimeout + | @bs.as(409) Conflict + | @bs.as(410) Gone + | @bs.as(411) LengthRequired + | @bs.as(412) PreconditionFailed + | @bs.as(413) PayloadTooLarge + | @bs.as(414) UriTooLong + | @bs.as(415) UnsupportedMediaType + | @bs.as(416) RangeNotSatisfiable + | @bs.as(417) ExpectationFailed + | @bs.as(418) ImATeapot + | @bs.as(421) MisdirectedRequest + | @bs.as(422) UnprocessableEntity + | @bs.as(423) Locked + | @bs.as(424) FailedDependency + | @bs.as(426) UpgradeRequired + | @bs.as(428) PreconditionRequired + | @bs.as(429) TooManyRequests + | @bs.as(431) RequestHeaderFieldsTooLarge + | @bs.as(451) UnavailableForLegalReasons + | @bs.as(500) InternalServerError + | @bs.as(501) NotImplemented + | @bs.as(502) BadGateway + | @bs.as(503) ServiceUnavailable + | @bs.as(504) GatewayTimeout + | @bs.as(505) HttpVersionNotSupported + | @bs.as(506) VariantAlsoNegotiates + | @bs.as(507) InsufficientStorage + | @bs.as(508) LoopDetected + | @bs.as(510) NotExtended + | @bs.as(511) NetworkAuthenticationRequired + let fromInt = tFromJs + let toInt = tToJs + } + @bs.send + external cookie_: (t, string, Js.Json.t, 'a) => unit = "cookie" + @bs.send + external clearCookie_: (t, string, 'a) => unit = "clearCookie" + @bs.deriving(jsConverter) + type sameSite = [@bs.as("lax") #Lax | @bs.as("strict") #Strict | @bs.as("none") #None] + external toDict: 'a => Js.Dict.t> = "%identity" + let filterKeys = obj => { + let result = toDict(obj) + result + |> Js.Dict.entries + |> Js.Array.filter(((_key, value)) => !Js.Nullable.isNullable(value)) + |> Js.Dict.fromArray + } + let cookie = ( + response, + ~name, + ~maxAge=?, + ~expiresGMT=?, + ~httpOnly=?, + ~secure=?, + ~signed=?, + ~path=?, + ~sameSite: option=?, + ~domain=?, + value + ) => { + cookie_( + response, + name, + value, + { + "maxAge": maxAge |> Js.Nullable.fromOption, + "expires": expiresGMT |> Js.Nullable.fromOption, + "path": path |> Js.Nullable.fromOption, + "httpOnly": httpOnly |> Js.Nullable.fromOption, + "secure": secure |> Js.Nullable.fromOption, + "sameSite": sameSite |> Js.Option.map((. x) => sameSiteToJs(x)) |> Js.Nullable.fromOption, + "signed": signed |> Js.Nullable.fromOption, + "domain": domain |> Js.Nullable.fromOption, + } |> filterKeys + ) + response + } + let clearCookie = ( + response, + ~name, + ~httpOnly=?, + ~secure=?, + ~signed=?, + ~path="/", + ~sameSite: option=?, + () + ) => { + clearCookie_( + response, + name, + { + "maxAge": Js.Nullable.undefined, + "expires": Js.Nullable.undefined, + "path": path, + "httpOnly": httpOnly |> Js.Nullable.fromOption, + "secure": secure |> Js.Nullable.fromOption, + "sameSite": sameSite |> Js.Option.map((. x) => sameSiteToJs(x)) |> Js.Nullable.fromOption, + "signed": signed |> Js.Nullable.fromOption, + } |> filterKeys + ) + response + } + @bs.send external sendFile: (t, string, 'a) => complete = "sendFile" + @bs.send external sendString: (t, string) => complete = "send" + @bs.send external sendJson: (t, Js.Json.t) => complete = "json" + @bs.send external sendBuffer: (t, Node.Buffer.t) => complete = "send" + @bs.send external sendArray: (t, array<'a>) => complete = "send" + @bs.send external sendRawStatus: (t, int) => complete = "sendStatus" + let sendStatus = (inst, statusCode) => sendRawStatus(inst, StatusCode.toInt(statusCode)) + @bs.send external rawStatus: (t, int) => t = "status" + let status = (inst, statusCode) => rawStatus(inst, StatusCode.toInt(statusCode)) + @bs.send @ocaml.deprecated("Use sendJson instead`") + external json: (t, Js.Json.t) => complete = "json" + @bs.send + external redirectCode: (t, int, string) => complete = "redirect" + @bs.send external redirect: (t, string) => complete = "redirect" + @bs.send external setHeader: (t, string, string) => t = "set" + @bs.send external setType: (t, string) => t = "type" + @bs.send external setLinks: (t, Js.Dict.t) => t = "links" + @bs.send external end_: t => complete = "end" + @bs.send external render: (t, string, 'v, 'a) => complete = "render" +} + +module Next: { + type content + type t = (Js.undefined, Response.t) => complete + let middleware: Js.undefined + + let route: Js.undefined + + let error: Error.t => Js.undefined +} = { + type content + type t = (Js.undefined, Response.t) => complete + let middleware = Js.undefined + external castToContent: 'a => content = "%identity" + let route = Js.Undefined.return(castToContent("route")) + let error = (e: Error.t) => Js.Undefined.return(castToContent(e)) +} + +module ByteLimit = { + @bs.deriving(accessors) + type t = + | B(int) + | Kb(float) + | Mb(float) + | Gb(float) + let toBytes = x => + switch x { + | Some(B(b)) => Js.Nullable.return(b) + | Some(Kb(kb)) => Js.Nullable.return(int_of_float(1024.0 *. kb)) + | Some(Mb(mb)) => Js.Nullable.return(int_of_float(1024.0 *. 1024.0 *. mb)) + | Some(Gb(gb)) => Js.Nullable.return(int_of_float(1024.0 *. 1024.0 *. 1024.0 *. gb)) + | None => Js.Nullable.undefined + } +} + +module Middleware = { + type next = Next.t + type t + type jsonOptions = {"inflate": bool, "strict": bool, "limit": Js.nullable} + type urlEncodedOptions = { + "extended": bool, + "inflate": bool, + "limit": Js.nullable, + "parameterLimit": Js.nullable, + } + type textOptions = { + "defaultCharset": string, + "inflate": bool, + "type": string, + "limit": Js.Nullable.t, + } + type rawOptions = {"inflate": bool, "type": string, "limit": Js.Nullable.t} + @bs.module("express") @bs.val external json_: jsonOptions => t = "json" + @bs.module("express") @bs.val + external urlencoded_: urlEncodedOptions => t = "urlencoded" + let json = (~inflate=true, ~strict=true, ~limit=?, ()) => + json_({ + "inflate": inflate, + "strict": strict, + "limit": ByteLimit.toBytes(limit), + }) + @bs.module("body-parser") @bs.val + external text_: textOptions => t = "text" + let text = ( + ~defaultCharset="utf-8", + ~fileType="text/plain", + ~inflate=true, + ~limit: option=?, + (), + ) => + text_({ + "defaultCharset": defaultCharset, + "type": fileType, + "limit": ByteLimit.toBytes(limit), + "inflate": inflate, + }) + let urlencoded = (~extended=false, ~inflate=true, ~limit=?, ~parameterLimit=?, ()) => + urlencoded_({ + "inflate": inflate, + "extended": extended, + "parameterLimit": parameterLimit |> Js.Nullable.fromOption, + "limit": ByteLimit.toBytes(limit), + }) + @bs.module("body-parser") @bs.val external raw_: rawOptions => t = "raw" + let raw = ( + ~inflate=true, + ~fileType="application/octet-stream", + ~limit: option=?, + (), + ) => + raw_({ + "type": fileType, + "limit": ByteLimit.toBytes(limit), + "inflate": inflate, + }) + module type S = { + type f + type errorF + let from: f => t + /* Generate the common Middleware binding function for a given + * type. This Functor is used for the Router and App classes. */ + let fromError: errorF => t + } + module type ApplyMiddleware = { + type f + let apply: (f, next, Request.t, Response.t) => unit + type errorF + let applyWithError: (errorF, next, Error.t, Request.t, Response.t) => unit + } + module Make = (A: ApplyMiddleware): (S with type f = A.f and type errorF = A.errorF) => { + type f = A.f + external unsafeFrom: 'a => t = "%identity" + let from = middleware => { + let aux = (next, content, _) => next(content) + unsafeFrom((req, res, next) => A.apply(middleware, aux(next), req, res)) + } + type errorF = A.errorF + let fromError = middleware => { + let aux = (next, content, _) => next(content) + unsafeFrom((err, req, res, next) => A.applyWithError(middleware, aux(next), err, req, res)) + } + } + include Make({ + type f = (next, Request.t, Response.t) => complete + type errorF = (next, Error.t, Request.t, Response.t) => complete + let apply = (f, next, req, res) => + try f(next, req, res) catch { + | e => next(Next.error(e), res) + } |> ignore + let applyWithError = (f, next, err, req, res) => + try f(next, err, req, res) catch { + | e => next(Next.error(e), res) + } |> ignore + }) +} + +module PromiseMiddleware = Middleware.Make({ + type f = (Middleware.next, Request.t, Response.t) => Js.Promise.t + type errorF = (Middleware.next, Error.t, Request.t, Response.t) => Js.Promise.t + external castToErr: Js.Promise.error => Error.t = "%identity" + let apply = (f, next, req, res) => { + let promise: Js.Promise.t = try f(next, req, res) catch { + | e => Js.Promise.resolve(next(Next.error(e), res)) + } + promise |> Js.Promise.catch(err => { + let err = castToErr(err) + Js.Promise.resolve(next(Next.error(err), res)) + }) |> ignore + } + let applyWithError = (f, next, err, req, res) => { + let promise: Js.Promise.t = try f(next, err, req, res) catch { + | e => Js.Promise.resolve(next(Next.error(e), res)) + } + promise |> Js.Promise.catch(err => { + let err = castToErr(err) + Js.Promise.resolve(next(Next.error(err), res)) + }) |> ignore + } +}) + +module type Routable = { + type t + let use: (t, Middleware.t) => unit + let useWithMany: (t, array) => unit + let useOnPath: (t, ~path: string, Middleware.t) => unit + let useOnPathWithMany: (t, ~path: string, array) => unit + let get: (t, ~path: string, Middleware.t) => unit + let getWithMany: (t, ~path: string, array) => unit + let options: (t, ~path: string, Middleware.t) => unit + let optionsWithMany: (t, ~path: string, array) => unit + let param: (t, ~name: string, Middleware.t) => unit + let post: (t, ~path: string, Middleware.t) => unit + let postWithMany: (t, ~path: string, array) => unit + let put: (t, ~path: string, Middleware.t) => unit + let putWithMany: (t, ~path: string, array) => unit + let patch: (t, ~path: string, Middleware.t) => unit + let patchWithMany: (t, ~path: string, array) => unit + let delete: (t, ~path: string, Middleware.t) => unit + let deleteWithMany: (t, ~path: string, array) => unit +} + +module MakeBindFunctions = ( + T: { + type t + }, +): (Routable with type t = T.t) => { + type t = T.t + @bs.send external use: (T.t, Middleware.t) => unit = "use" + @bs.send + external useWithMany: (T.t, array) => unit = "use" + @bs.send + external useOnPath: (T.t, ~path: string, Middleware.t) => unit = "use" + @bs.send + external useOnPathWithMany: (T.t, ~path: string, array) => unit = "use" + @bs.send external get: (T.t, ~path: string, Middleware.t) => unit = "get" + @bs.send + external getWithMany: (T.t, ~path: string, array) => unit = "get" + @bs.send external options: (T.t, ~path: string, Middleware.t) => unit = "options" + @bs.send external optionsWithMany: (T.t, ~path: string, array) => unit = "options" + @bs.send + external param: (T.t, ~name: string, Middleware.t) => unit = "param" + @bs.send external post: (T.t, ~path: string, Middleware.t) => unit = "post" + @bs.send + external postWithMany: (T.t, ~path: string, array) => unit = "post" + @bs.send external put: (T.t, ~path: string, Middleware.t) => unit = "put" + @bs.send + external putWithMany: (T.t, ~path: string, array) => unit = "put" + @bs.send external patch: (T.t, ~path: string, Middleware.t) => unit = "patch" + @bs.send + external patchWithMany: (T.t, ~path: string, array) => unit = "patch" + @bs.send external delete: (T.t, ~path: string, Middleware.t) => unit = "delete" + @bs.send + external deleteWithMany: (T.t, ~path: string, array) => unit = "delete" +} + +module Router = { + include MakeBindFunctions({ + type t + }) + type routerArgs = {"caseSensitive": bool, "mergeParams": bool, "strict": bool} + @bs.module("express") @bs.val external make_: routerArgs => t = "Router" + let make = (~caseSensitive=false, ~mergeParams=false, ~strict=false, ()) => + make_({ + "caseSensitive": caseSensitive, + "mergeParams": mergeParams, + "strict": strict, + }) + external asMiddleware: t => Middleware.t = "%identity" +} + +let router = Router.make + +module HttpServer = { + type t + @bs.send + external on: ( + t, + @bs.string [#request((Request.t, Response.t) => unit) | #close(unit => unit)], + ) => unit = "on" +} + +module App = { + include MakeBindFunctions({ + type t + }) + let useRouter = (app, router) => Router.asMiddleware(router) |> use(app) + let useRouterOnPath = (app, ~path, router) => Router.asMiddleware(router) |> useOnPath(app, ~path) + @bs.module external make: unit => t = "express" + + external asMiddleware: t => Middleware.t = "%identity" + + @bs.send + external listen_: ( + t, + int, + string, + @bs.uncurry (Js.Null_undefined.t => unit), + ) => HttpServer.t = "listen" + let listen = (app, ~port=3000, ~hostname="0.0.0.0", ~onListen=_ => (), ()) => + listen_(app, port, hostname, onListen) + @bs.send external disable: (t, ~name: string) => unit = "disable" + @bs.send external set: (t, string, string) => unit = "set" + @bs.send external engine : (t, string, 'engine) => unit = "engine" +} + +let express = App.make + +module Static = { + type options + type stat + type t + + let defaultOptions: unit => options = (): options => Obj.magic(Js_obj.empty()) + @bs.set external dotfiles: (options, string) => unit = "dotfiles" + @bs.set external etag: (options, bool) => unit = "etag" + @bs.set external extensions: (options, array) => unit = "extensions" + @bs.set external fallthrough: (options, bool) => unit = "fallthrough" + @bs.set external immutable: (options, bool) => unit = "immutable" + @bs.set external indexBool: (options, bool) => unit = "index" + @bs.set external indexString: (options, string) => unit = "index" + @bs.set external lastModified: (options, bool) => unit = "lastModified" + @bs.set external maxAge: (options, int) => unit = "maxAge" + @bs.set external redirect: (options, bool) => unit = "redirect" + @bs.set external setHeaders: (options, (Request.t, string, stat) => unit) => unit = "setHeaders" + + @bs.module("express") external make: (string, options) => t = "static" + + external asMiddleware: t => Middleware.t = "%identity" +} diff --git a/drafts/bs-express/src/Express.resi b/drafts/bs-express/src/Express.resi new file mode 100644 index 0000000..8a2aa90 --- /dev/null +++ b/drafts/bs-express/src/Express.resi @@ -0,0 +1,471 @@ +@ocaml.doc( + "abstract type which ensure middleware function must either + call the [next] function or one of the [send] function on the + response object. + + This should be a great argument for OCaml, the type system + prevents silly error which in this case would make the server hang" +) +type complete + +module Error: { + @ocaml.doc("Error type") + type t = exn + + @bs.send @bs.return(null_undefined_to_opt) + external message: Js_exn.t => option = "message" + @bs.send @bs.return(null_undefined_to_opt) + external name: Js_exn.t => option = "name" +} + +module Request: { + type t + type params = Js.Dict.t + + @ocaml.doc("[params request] return the JSON object filled with the + request parameters") + @bs.get + external params: t => params = "params" + + @ocaml.doc( + "[asJsonObject request] casts a [request] to a JSON object. It is + common in Express application to use the Request object as a + placeholder to maintain state through the various middleware which + are executed." + ) + external asJsonObject: t => Js.Dict.t = "%identity" + + @ocaml.doc("[baseUrl request] returns the 'baseUrl' property") @bs.get + external baseUrl: t => string = "baseUrl" + + @ocaml.doc( + "When using the json body-parser middleware and receiving a request with a + content type of \"application/json\", this property is a Js.Json.t that + contains the body sent by the request." + ) + @bs.get + @bs.return(null_undefined_to_opt) + external bodyJSON: t => option = "body" + + @ocaml.doc( + "When using the raw body-parser middleware and receiving a request with a + content type of \"application/octet-stream\", this property is a + Node_buffer.t that contains the body sent by the request." + ) + @bs.get + @bs.return(null_undefined_to_opt) + external bodyRaw: t => option = "body" + + @ocaml.doc( + "When using the text body-parser middleware and receiving a request with a + content type of \"text/plain\", this property is a string that + contains the body sent by the request." + ) + let bodyText: t => option + + @ocaml.doc( + "When using the urlencoded body-parser middleware and receiving a request + with a content type of \"application/x-www-form-urlencoded\", this property + is a Js.Dict.t string that contains the body sent by the request." + ) + let bodyURLEncoded: t => option> + + @ocaml.doc( + "When using cookie-parser middleware, this property is an object + that contains cookies sent by the request. If the request contains + no cookies, it defaults to {}." + ) + @bs.get + @bs.return(null_undefined_to_opt) + external cookies: t => option> = "cookies" + + @ocaml.doc( + "When using cookie-parser middleware, this property contains signed cookies + sent by the request, unsigned and ready for use. Signed cookies reside in + a different object to show developer intent; otherwise, a malicious attack + could be placed on req.cookie values (which are easy to spoof). + Note that signing a cookie does not make it “hidden” or encrypted; + but simply prevents tampering (because the secret used to + sign is private)." + ) + @bs.get + @bs.return(null_undefined_to_opt) + external signedCookies: t => option> = "signedCookies" + + @ocaml.doc("[hostname request] Contains the hostname derived from the Host HTTP header.") @bs.get + external hostname: t => string = "hostname" + + @ocaml.doc("[ip request] Contains the remote IP address of the request.") @bs.get + external ip: t => string = "ip" + + @ocaml.doc("[fresh request] returns [true] whether the request is \"fresh\"") @bs.get + external fresh: t => bool = "fresh" + + @ocaml.doc("[stale request] returns [true] whether the request is \"stale\"") @bs.get + external stale: t => bool = "stale" + + @ocaml.doc( + "[method_ request] return a string corresponding to the HTTP + method of the request: GET, POST, PUT, and so on" + ) + @bs.get + external methodRaw: t => string = "method" + type httpMethod = + | Get + | Post + | Put + | Delete + | Head + | Options + | Trace + | Connect + | Patch + + @ocaml.doc( + "[method_ request] return a variant corresponding to the HTTP + method of the request: Get, Post, Put, and so on" + ) + let httpMethod: t => httpMethod + + @ocaml.doc( + "[originalUrl request] returns the original url. See + https://expressjs.com/en/4x/api.html#req.originalUrl" + ) + @bs.get + external originalUrl: t => string = "originalUrl" + + @ocaml.doc("[path request] returns the path part of the request URL.") @bs.get + external path: t => string = "path" + type protocol = + | Http + | Https + + @ocaml.doc( + "[protocol request] returns the request protocol string: either http + or (for TLS requests) https." + ) + let protocol: t => protocol + + @ocaml.doc("[secure request] returns [true] if a TLS connection is established") @bs.get + external secure: t => bool = "secure" + + @ocaml.doc( + "[query request] returns an object containing a property for each + query string parameter in the route. If there is no query string, + it returns the empty object, {}" + ) + @bs.get + external query: t => Js.Dict.t = "query" + + @ocaml.doc( + "[acceptsRaw accepts types] checks if the specified content types + are acceptable, based on the request's Accept HTTP header field. + The method returns the best match, or if none of the specified + content types is acceptable, returns [false]" + ) + let accepts: (t, array) => option + let acceptsCharsets: (t, array) => option + + @ocaml.doc( + "[get return field] returns the specified HTTP request header + field (case-insensitive match)" + ) + @bs.send + @bs.return(null_undefined_to_opt) + external get: (t, string) => option = "get" + + @ocaml.doc( + "[xhr request] returns [true] if the request’s X-Requested-With + header field is \"XMLHttpRequest\", indicating that the request was + issued by a client library such as jQuery" + ) + @bs.get + external xhr: t => bool = "xhr" +} + +module Response: { + type t + module StatusCode: { + @bs.deriving(jsConverter) + type t = + | Ok + | Created + | Accepted + | NonAuthoritativeInformation + | NoContent + | ResetContent + | PartialContent + | MultiStatus + | AleadyReported + | IMUsed + | MultipleChoices + | MovedPermanently + | Found + | SeeOther + | NotModified + | UseProxy + | SwitchProxy + | TemporaryRedirect + | PermanentRedirect + | BadRequest + | Unauthorized + | PaymentRequired + | Forbidden + | NotFound + | MethodNotAllowed + | NotAcceptable + | ProxyAuthenticationRequired + | RequestTimeout + | Conflict + | Gone + | LengthRequired + | PreconditionFailed + | PayloadTooLarge + | UriTooLong + | UnsupportedMediaType + | RangeNotSatisfiable + | ExpectationFailed + | ImATeapot + | MisdirectedRequest + | UnprocessableEntity + | Locked + | FailedDependency + | UpgradeRequired + | PreconditionRequired + | TooManyRequests + | RequestHeaderFieldsTooLarge + | UnavailableForLegalReasons + | InternalServerError + | NotImplemented + | BadGateway + | ServiceUnavailable + | GatewayTimeout + | HttpVersionNotSupported + | VariantAlsoNegotiates + | InsufficientStorage + | LoopDetected + | NotExtended + | NetworkAuthenticationRequired + let fromInt: int => option + let toInt: t => int + } + + let cookie: ( + t, + ~name: string, + ~maxAge: int=?, + ~expiresGMT: Js.Date.t=?, + ~httpOnly: bool=?, + ~secure: bool=?, + ~signed: bool=?, + ~path: string=?, + ~sameSite: [#Lax | #Strict | #None]=?, + ~domain: string=?, + Js.Json.t + ) => t + + @ocaml.doc( + "Web browsers and other compliant clients will only clear the cookie if the given options is identical to those given to res.cookie(), excluding expires and maxAge." + ) + let clearCookie: ( + t, + ~name: string, + ~httpOnly: bool=?, + ~secure: bool=?, + ~signed: bool=?, + ~path: string=?, + ~sameSite: [#Lax | #Strict | #None]=?, + () + ) => t + + @bs.send external sendFile: (t, string, 'a) => complete = "sendFile" + @bs.send external sendString: (t, string) => complete = "send" + @bs.send external sendJson: (t, Js.Json.t) => complete = "json" + // not covered in tests + @bs.send external sendBuffer: (t, Node.Buffer.t) => complete = "send" + // not covered in tests + @bs.send external sendArray: (t, array<'a>) => complete = "send" + @bs.send external sendRawStatus: (t, int) => complete = "sendStatus" + let sendStatus: (t, StatusCode.t) => complete + @bs.send external rawStatus: (t, int) => t = "status" + let status: (t, StatusCode.t) => t + + // not covered in tests + @bs.send @ocaml.deprecated("Use sendJson instead`") + external json: (t, Js.Json.t) => complete = "json" + @bs.send + external redirectCode: (t, int, string) => complete = "redirect" + @bs.send external redirect: (t, string) => complete = "redirect" + @bs.send external setHeader: (t, string, string) => t = "set" + // not covered in tests + @bs.send external setType: (t, string) => t = "type" + // not covered in tests + @bs.send external setLinks: (t, Js.Dict.t) => t = "links" + // not covered in tests + @bs.send external end_: t => complete = "end" + // not covered in tests + @bs.send external render: (t, string, 'v, 'a) => complete = "render" +} + +module Next: { + type content + type t = (Js.undefined, Response.t) => complete + + @ocaml.doc("value to use as [next] callback argument to invoke the next middleware") + let middleware: Js.undefined + + @ocaml.doc( + "value to use as [next] callback argument to skip middleware processing for the current route." + ) + let route: Js.undefined + + @ocaml.doc( + "[error e] returns the argument for [next] callback to be propagate + error [e] through the chain of middleware." + ) + let error: Error.t => Js.undefined +} + +module ByteLimit: { + type t = + | B(int) + | Kb(float) + | Mb(float) + | Gb(float) + let b: int => t + let kb: float => t + let mb: float => t + let gb: float => t +} + +module Middleware: { + type t + type next = Next.t + let json: (~inflate: bool=?, ~strict: bool=?, ~limit: ByteLimit.t=?, unit) => t + let text: ( + ~defaultCharset: string=?, + ~fileType: string=?, + ~inflate: bool=?, + ~limit: ByteLimit.t=?, + unit, + ) => t + let raw: (~inflate: bool=?, ~fileType: string=?, ~limit: ByteLimit.t=?, unit) => t + let urlencoded: ( + ~extended: bool=?, + ~inflate: bool=?, + ~limit: ByteLimit.t=?, + ~parameterLimit: int=?, + unit, + ) => t + module type S = { + type f + let from: f => t + type errorF + let fromError: errorF => t + } + module type ApplyMiddleware = { + type f + let apply: (f, next, Request.t, Response.t) => unit + type errorF + let applyWithError: (errorF, next, Error.t, Request.t, Response.t) => unit + } + module Make: (A: ApplyMiddleware) => (S with type f = A.f and type errorF = A.errorF) + include S + with type f = (next, Request.t, Response.t) => complete + and type errorF = (next, Error.t, Request.t, Response.t) => complete +} + +module PromiseMiddleware: Middleware.S + with type f = (Middleware.next, Request.t, Response.t) => Js.Promise.t + and type errorF = (Middleware.next, Error.t, Request.t, Response.t) => Js.Promise.t + +module type Routable = { + type t + let use: (t, Middleware.t) => unit + let useWithMany: (t, array) => unit + let useOnPath: (t, ~path: string, Middleware.t) => unit + let useOnPathWithMany: (t, ~path: string, array) => unit + let get: (t, ~path: string, Middleware.t) => unit + let getWithMany: (t, ~path: string, array) => unit + let options: (t, ~path: string, Middleware.t) => unit + let optionsWithMany: (t, ~path: string, array) => unit + let param: (t, ~name: string, Middleware.t) => unit + let post: (t, ~path: string, Middleware.t) => unit + let postWithMany: (t, ~path: string, array) => unit + let put: (t, ~path: string, Middleware.t) => unit + let putWithMany: (t, ~path: string, array) => unit + let patch: (t, ~path: string, Middleware.t) => unit + let patchWithMany: (t, ~path: string, array) => unit + let delete: (t, ~path: string, Middleware.t) => unit + let deleteWithMany: (t, ~path: string, array) => unit +} + +module MakeBindFunctions: ( + T: { + type t + }, +) => (Routable with type t = T.t) + +module Router: { + include Routable + let make: (~caseSensitive: bool=?, ~mergeParams: bool=?, ~strict: bool=?, unit) => t + external asMiddleware: t => Middleware.t = "%identity" +} + +module HttpServer: { + type t + @bs.send + external on: ( + t, + @bs.string [#request((Request.t, Response.t) => unit) | #close(unit => unit)], + ) => unit = "on" +} + +let router: (~caseSensitive: bool=?, ~mergeParams: bool=?, ~strict: bool=?, unit) => Router.t + +module App: { + include Routable + let useRouter: (t, Router.t) => unit + let useRouterOnPath: (t, ~path: string, Router.t) => unit + @bs.module external make: unit => t = "express" + external asMiddleware: t => Middleware.t = "%identity" + let listen: ( + t, + ~port: int=?, + ~hostname: string=?, + ~onListen: Js.null_undefined => unit=?, + unit, + ) => HttpServer.t + @bs.send external disable: (t, ~name: string) => unit = "disable" + @bs.send external set: (t, string, string) => unit = "set" + @bs.send external engine : (t, string, 'engine) => unit = "engine" +} + +@ocaml.doc("[express ()] creates an instance of the App class. + Alias for [App.make ()]") +let express: unit => App.t + +module Static: { + type options + type stat + type t + + let defaultOptions: unit => options + @bs.set external dotfiles: (options, string) => unit = "dotfiles" + @bs.set external etag: (options, bool) => unit = "etag" + @bs.set external extensions: (options, array) => unit = "extensions" + @bs.set external fallthrough: (options, bool) => unit = "fallthrough" + @bs.set external immutable: (options, bool) => unit = "immutable" + @bs.set external indexBool: (options, bool) => unit = "index" + @bs.set external indexString: (options, string) => unit = "index" + @bs.set external lastModified: (options, bool) => unit = "lastModified" + @bs.set external maxAge: (options, int) => unit = "maxAge" + @bs.set external redirect: (options, bool) => unit = "redirect" + @bs.set external setHeaders: (options, (Request.t, string, stat) => unit) => unit = "setHeaders" + + @ocaml.doc("[make directory] creates a static middleware for [directory]") @bs.module("express") + external make: (string, options) => t = "static" + + @ocaml.doc("[asMiddleware static] casts [static] to a Middleware type") + external asMiddleware: t => Middleware.t = "%identity" +} diff --git a/drafts/bs-express/static/test.data b/drafts/bs-express/static/test.data new file mode 100644 index 0000000..19846d1 --- /dev/null +++ b/drafts/bs-express/static/test.data @@ -0,0 +1 @@ +This is the content of test.data a static file diff --git a/drafts/bs-express/tests/reference.data b/drafts/bs-express/tests/reference.data new file mode 100644 index 0000000..032adb6 --- /dev/null +++ b/drafts/bs-express/tests/reference.data @@ -0,0 +1,230 @@ + +-- Root path-- +{"success":true} +status: 200 + +-- Invalid path-- + + + + +Error + + +
Cannot GET /invalid-path
+ + +status: 404 + +-- Static middleware-- +This is the content of test.data a static file +status: 200 + +-- POST + Query param (valid)-- +{"success":true} +status: 200 + +-- POST + Query param (invalid)-- + + + + +Error + + +
Cannot POST /999/id
+ + +status: 404 + +-- PUT + Query param (valid)-- +{"success":true} +status: 200 + +-- PUT + Query param (invalid)-- + + + + +Error + + +
Cannot PUT /999/id
+ + +status: 404 + +-- PUT + Query param (valid)-- +{"success":true} +status: 200 + +-- PUT + Query param (invalid)-- + + + + +Error + + +
Cannot PATCH /999/id
+ + +status: 404 + +-- DELETE + Query param (valid)-- +{"success":true} +status: 200 + +-- DELETE + Query param (invalid)-- + + + + +Error + + +
Cannot DELETE /999/id
+ + +status: 404 + +-- baseUrl property-- +{"success":true} +status: 200 + +-- hostname property-- +{"success":true} +status: 200 + +-- method property-- +{"success":true} +status: 200 + +-- method originalUrl-- +{"success":true} +status: 200 + +-- method path-- +{"success":true} +status: 200 + +-- method path-- +{"success":true} +status: 200 + +-- Query parameters-- +{"success":true} +status: 200 + +-- Fresh-- +{"success":true} +status: 200 + +-- Stale-- +{"success":true} +status: 200 + +-- Secure-- +{"success":true} +status: 200 + +-- XHR-- +{"success":true} +status: 200 + +-- Redirect-- +Found. Redirecting to /redir/target +status: 302 + +-- Redirect with Code-- +Moved Permanently. Redirecting to /redir/target +status: 301 + +-- Non 200 Http status-- +Not Found +status: 404 + +-- Non 200 Http status-- +{"success":true} +status: 500 + +-- Promise Middleware-- +status: 204 + +-- Failing Promise Middleware-- +Caught Failing Promise +status: 500 + +-- Can catch Ocaml Exception-- +Elvis has left the building! +status: 402 + +-- Can use express router-- +Created +status: 201 + +-- Can specify that a router behaves in a case sensitive manner-- + + + + +Error + + +
Cannot GET /router-options/case-sensitive
+ + +status: 404 + +-- Can specify that a router behaves in a case sensitive manner-- +OK +status: 200 + +-- Can specify that a router behaves in a strict manner-- + + + + +Error + + +
Cannot GET /router-options/strict
+ + +status: 404 + +-- Can specify that a router behaves in a strict manner-- +OK +status: 200 + +-- Can bind middleware to a particular param-- +Created +status: 201 + +-- Can set cookies-- +OK +status: 200# Netscape HTTP Cookie File +localhost FALSE / FALSE 0 test-cookie cool-cookie + +-- Can clear cookies-- +Set-Cookie: test-cookie2=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT + +-- Can accept JSON using builtin middleware-- +{"number":8} +status: 200 +-- Can accept UrlEncoded body using builtin middleware-- +{"number":8} +status: 200 +-- Accepts-- +{"success":true} +-- Accepts Charsets-- +{"success":true} +-- Get-- +{"success":true} +-- Can parse text using bodyparser middleware-- +This is a test body +-- Can set response header via setHeader-- +X-Test-Header: Set + +-- Can the user user the javascipt http object directly-- +The server has been called 44 times. \ No newline at end of file diff --git a/drafts/bs-express/tests/test.sh b/drafts/bs-express/tests/test.sh new file mode 100755 index 0000000..850e1f7 --- /dev/null +++ b/drafts/bs-express/tests/test.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash + +# Unit test to run again an Express server defined in examples/Index.re +# +# This test uses 'curl' to query the web server and output the +# HTTP response in 'test.data'. +# +# It then makes a diff with the expected data stored in 'reference.data' + +TEST_DATA=test.data + +clean_previous_test() { + rm -f $TEST_DATA +} + +function print_test_title() { + echo >> $TEST_DATA + echo "-- $1--" >> $TEST_DATA +} + +print_test_url() { + # --cookie-jar outputs a comment header that differs between curl versions, + # so use grep to filter it out + curl --cookie-jar - -X $1 -w "\nstatus: %{http_code}" http://localhost:3000$2 | grep "^[^#]" 2>&1 >> $TEST_DATA +} + +run_test() { + print_test_title "$1" + print_test_url "$2" "$3" "$4" +} + +# Run test server in background and save PID +cd .. +node lib/js/example/Index.js & +TEST_SERVER_PID=$! +cd tests + +# Ugly hack to wait for the server to start +sleep 2s + +clean_previous_test; + +run_test 'Root path' 'GET' '/' +run_test 'Invalid path' 'GET' '/invalid-path' +run_test 'Static middleware' 'GET' '/static/test.data' +run_test 'POST + Query param (valid)' 'POST' '/123/id' +run_test 'POST + Query param (invalid)' 'POST' '/999/id' +run_test 'PUT + Query param (valid)' 'PUT' '/123/id' +run_test 'PUT + Query param (invalid)' 'PUT' '/999/id' +run_test 'PUT + Query param (valid)' 'PATCH' '/123/id' +run_test 'PUT + Query param (invalid)' 'PATCH' '/999/id' +run_test 'DELETE + Query param (valid)' 'DELETE' '/123/id' +run_test 'DELETE + Query param (invalid)' 'DELETE' '/999/id' +run_test 'baseUrl property' 'GET' '/baseUrl' +run_test 'hostname property' 'GET' '/hostname' +# run_test 'ip property' 'GET' '/ip' +run_test 'method property' 'GET' '/method' +run_test 'method originalUrl' 'GET' '/originalUrl' +run_test 'method path' 'GET' '/path' +run_test 'method path' 'GET' '/protocol' +run_test 'Query parameters' 'GET' '/query?key=value' +run_test 'Fresh' 'GET' '/fresh' +run_test 'Stale' 'GET' '/stale' +run_test 'Secure' 'GET' '/secure' +run_test 'XHR' 'GET' '/xhr' +run_test 'Redirect' 'GET' '/redir' +run_test 'Redirect with Code' 'GET' '/redircode' +run_test 'Non 200 Http status' 'GET' '/not-found' +run_test 'Non 200 Http status' 'GET' '/error' +run_test 'Promise Middleware' 'GET' '/promise' +run_test 'Failing Promise Middleware' 'GET' '/failing-promise' +run_test 'Can catch Ocaml Exception' 'GET' '/ocaml-exception' +run_test 'Can use express router' 'GET' '/testing/testing/123' +run_test 'Can specify that a router behaves in a case sensitive manner' 'GET' '/router-options/case-sensitive' +run_test 'Can specify that a router behaves in a case sensitive manner' 'GET' '/router-options/Case-sensitive' +run_test 'Can specify that a router behaves in a strict manner' 'GET' '/router-options/strict' +run_test 'Can specify that a router behaves in a strict manner' 'GET' '/router-options/strict/' +run_test 'Can bind middleware to a particular param' 'GET' '/param-test/123' +run_test 'Can set cookies' 'GET' '/cookie-set-test' + +run_cookie_clear_test() { + print_test_title "$1" + curl -i -X $2 -w "\nstatus: %{http_code}\n" http://localhost:3000$3 2>&1 | grep -Fi Set-Cookie >> $TEST_DATA + # curl -X $2 -w "\nstatus: %{http_code}\n" http://localhost:3000$3 2>&1 >> $TEST_DATA +} + +run_cookie_clear_test 'Can clear cookies' 'GET' '/cookie-clear-test' + + +run_json_test() { + print_test_title "$1" + curl -X POST -H "Content-Type: application/json" -w "\nstatus: %{http_code}" -d "$3" http://localhost:3000$2 2>&1 >> $TEST_DATA +} + +run_json_test 'Can accept JSON using builtin middleware' '/builtin-middleware/json-doubler' '{ "number": 4 }' + +run_urlencoded_test() { + print_test_title "$1" + curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -w "\nstatus: %{http_code}" -d "$3" http://localhost:3000$2 2>&1 >> $TEST_DATA +} + +run_urlencoded_test 'Can accept UrlEncoded body using builtin middleware' '/builtin-middleware/urlencoded-doubler' 'number=4' + +run_header_test() { + print_test_title "$1" + curl -X "$2" -H "$3" http://localhost:3000$4 2>&1 >> $TEST_DATA +} + +run_header_test 'Accepts' 'GET' 'Accept: audio/*; q=0.2, audio/basic' \ + '/accepts' + +run_header_test 'Accepts Charsets' 'GET' 'Accept-Charset: UTF-8' \ + '/accepts-charsets' + +run_header_test 'Get' 'GET' 'key: value' \ + '/get' + +run_text_test() { + print_test_title "$1" + curl -X POST -H "Content-Type: text/plain" -d "$3" http://localhost:3000$2 2>&1 >> $TEST_DATA +} + +run_text_test "Can parse text using bodyparser middleware" "/router4/text-body" 'This is a test body' + +run_response_header_test() { + print_test_title "$1" + curl -i -X $2 -w "\nstatus: %{http_code}\n" http://localhost:3000$3 2>&1 | grep -Fi X-Test-Header >> $TEST_DATA +} + +run_response_header_test 'Can set response header via setHeader' 'GET' '/response-set-header' + +run_text_test "Can the user user the javascipt http object directly" "/get-request-count" + +# Stop server +kill $TEST_SERVER_PID + +# compare test output to reference data + +REFERENCE_DATA=reference.data +diff $TEST_DATA $REFERENCE_DATA diff --git a/drafts/bs-fastify/Fastify.re b/drafts/bs-fastify/Fastify.re new file mode 100644 index 0000000..82af3ae --- /dev/null +++ b/drafts/bs-fastify/Fastify.re @@ -0,0 +1,155 @@ +open BsNode; +open Belt; +type t; + +module Schema = { + [@bs.deriving abstract] + type property = { + [@bs.as "type"] + type_: string, + }; + + [@bs.deriving abstract] + type bodySchemaConfig = { + [@bs.as "type"] + type_: string, + [@bs.optional] + required: array(string), + properties: Js.Dict.t(property), + }; + + [@bs.deriving abstract] + type schemaType = { + [@bs.optional] + body: bodySchemaConfig, + }; + + [@bs.deriving abstract] + type t = {schema: schemaType}; + + let createBodySchema = + ( + ~required: option(array(string))=?, + ~properties: Js.Dict.t(property), + ) => + t( + ~schema= + schemaType( + ~body= + bodySchemaConfig( + ~type_="object", + ~required=required->Option.getWithDefault([||]), + ~properties, + (), + ), + (), + ), + ); +}; + +module Request = { + type t; + type log; + + module Headers = { + type t; + + [@bs.get] external range: t => Js.Nullable.t(string) = "range"; + }; + + module Log = { + type t; + + [@bs.send] external info: (t, string) => unit = "info"; + }; + + [@bs.get] external body: t => 'a = "body"; + [@bs.get] external params: t => 'a = "params"; + [@bs.get] external log: t => Log.t = "log"; + [@bs.get] external headers: t => Headers.t = "headers"; + + [@bs.send] + external multipart: + ( + t, + (string, Fs.Stream.t, string, string, string) => unit, + Js.Nullable.t(Js.Exn.t) => unit + ) => + unit = + "multipart"; +}; + +module Response = { + type t; + + [@bs.send] external sendString: (t, string) => unit = "send"; + + [@bs.send] external sendObject: (t, Js.t('a)) => unit = "send"; + + [@bs.send] external sendUnit: (t, unit) => unit = "send"; + + [@bs.send] external sendStream: (t, Fs.Stream.t) => unit = "send"; + + [@bs.send] external code: (t, int) => unit = "code"; + + [@bs.send] external header: (t, string, string) => unit = "header"; + + [@bs.send] external getHeader: (t, string) => option(string) = "getHeader"; + + [@bs.send] external hasHeader: (t, string) => bool = "hasHeader"; +}; + +module AppOptions = { + type t; + + [@bs.obj] + external make: + ( + ~logger: bool=?, + ~ignoreTrailingSlash: bool=?, + ~https: bool=?, + ~http2: bool=?, + ~maxParamLength: int=?, + ~bodyLimit: int=?, + ~onProtoPoisoning: [@bs.string] [ | `error | `remove | `ignore]=?, + ~onConstructorPoisoning: [@bs.string] [ | `error | `remove | `ignore]=?, + unit + ) => + t = + ""; +}; + +[@bs.module] external createApp: AppOptions.t => t = "fastify"; + +[@bs.send] external register: (t, 'a) => unit = "register"; + +[@bs.send] external use1: (t, 'a) => unit = "use"; + +[@bs.send] external use2: (t, 'a, 'b) => unit = "use"; + +[@bs.send] +external get: (t, string, (Request.t, Response.t) => unit) => unit = "get"; + +[@bs.send] +external post: (t, string, (Request.t, Response.t) => unit) => unit = "post"; + +[@bs.send] +external put: (t, string, (Request.t, Response.t) => unit) => unit = "put"; + +[@bs.send] +external delete: (t, string, (Request.t, Response.t) => unit) => unit = + "delete"; + +[@bs.send] +external postWithSchema: + (t, string, Schema.t, (Request.t, Response.t) => unit) => unit = + "post"; + +[@bs.send] +external deleteWithSchema: + (t, string, Schema.t, (Request.t, Response.t) => unit) => unit = + "delete"; + +[@bs.send] +external listen: (t, int, (Js.Nullable.t(Js.Exn.t), string) => unit) => unit = + "listen"; diff --git a/drafts/bs-fastify/README.md b/drafts/bs-fastify/README.md new file mode 100644 index 0000000..edd131f --- /dev/null +++ b/drafts/bs-fastify/README.md @@ -0,0 +1,79 @@ +# From https://github.com/DCKT/bs-fastify + +🚧 + +Bucklescript bindings for [fastify](https://www.fastify.io/) (v`2.11.0`) + +## Install + +``` +yarn add @dck/bs-node @dck/bs-fastify +``` + +Add it to `bs-dependencies` in your `bsconfig.json` : + +```json +{ + "bs-dependencies": ["@dck/bs-node", "@dck/bs-fastify"] +} +``` + +## Usage + +### Basic + +```reason +open BsFastify; +open BsNode; + +let app = createApp(AppOptions.make(~logger=true, ())); + +app->get(baseEndpoint, (_req, res) => + res->Response.sendObject({"test": "test"}) +); + + +let schemaProperties = Js.Dict.empty(); +schemaProperties->Js.Dict.set("name", Schema.property(~type_="string")); + +app->postWithSchema( + baseEndpoint, + Schema.createBodySchema( + ~required=[|"name"|], + ~properties=schemaProperties, + ), + (req, res) => { + let name = req->Request.body##name; + res->Response.sendString("Hello "++ name ++ " !"); + } + ); + +app->listen(3333, (err, address) => + switch (Js.Nullable.toOption(err)) { + | None => Js.log("Server listening on " ++ address) + | Some(error) => Js.log(error) + } +); +``` + +### Middleware + +```reason +open BsFastify; +open BsNode; + +let app = createApp(AppOptions.make(~logger=true, ())); + +app->register([%raw "require('fastify-multipart')"]); +``` + +### Usage + +```reason +open BsFastify; +open BsNode; + +let app = createApp(AppOptions.make(~logger=false, ())); + +app->use2("/medias", serveStatic("/assets)); +``` diff --git a/drafts/bs-firebase/.npmrc b/drafts/bs-firebase/.npmrc new file mode 100644 index 0000000..449691b --- /dev/null +++ b/drafts/bs-firebase/.npmrc @@ -0,0 +1 @@ +save-exact=true \ No newline at end of file diff --git a/drafts/bs-firebase/README.md b/drafts/bs-firebase/README.md new file mode 100644 index 0000000..6059edc --- /dev/null +++ b/drafts/bs-firebase/README.md @@ -0,0 +1,131 @@ +# bs-firebase + +## Setup + +Install module +```bash +yarn add @dck/bs-firebase +``` + +Add it to `bsconfig.json` +```bash +{ + "bs-dependencies": [ + ..., + "@dck/bs-firebase" + ] +} +``` + +## Initialize app + +```reason +[@bs.module] +external firebaseConfig: firebaseConfig = "./config/firebase-config.json"; + +firebase->initializeApp(firebaseConfig); +``` + +## Authentication + +```reason +open BsFirebase; + +firebase +->auth() +->Auth.onAuthStateChanged(user => { + switch (user->Js.Nullable.toOption) { + | None => () + | Some(u) => + Js.log3( + u->Auth.User.uid, + u->Auth.User.email, + u->Auth.User.displayName, + ) + } +}); + +let signInWithGoogle = () => firebase->auth()->Auth.signInWithPopup(Auth.Provider.google()); +let signInWithEmailAndPassword = (~email, ~password) => firebase->auth()->Auth.signInWithEmailAndPassword(~email, ~password); +let signOut = () => firebase->auth()->Auth.signOut(); +``` + +## Firestore + +#### Fetch all + +```reason +let fetchAll = () => { + firebase + ->firestore() + ->Firestore.collection("mycollection") + ->Firestore.Collection.get() + |> Js.Promise.then_(querySnapshot => + querySnapshot + ->Firestore.QuerySnapshot.docs + ->Belt.Array.map(snapshot => { + let data = snapshot->Firestore.DocRef.data(); + Js.log(snapshot->Firestore.DocRef.id); + Js.log(data##someAttribute); + + data; + }) + |> Js.Promise.resolve + ); +}; +``` + +#### Fetch by id + +```reason +let fetchItem = (id) => { + firebase + ->firestore() + ->Firestore.collection("mycollection") + ->Firestore.Collection.doc(id) + ->Firestore.Collection.Doc.get() + |> Js.Promise.then_(doc => { + let data = doc->Firestore.DocRef.data(); + Js.log(data); + + data; + }); +} +``` + +#### Create + +```reason +let create = (title, description) => + firebase + ->firestore() + ->Firestore.collection("collection") + ->Firestore.Collection.add({ + "title": title, + "description": description, + }); +``` + +#### Update + +```reason +let update = (id, title) => + firebase + ->firestore() + ->Firestore.collection("collection") + ->Firestore.Collection.doc(id) + ->Firestore.Collection.Doc.set({ + "title": title + }); +``` + +#### Remove + +```reason +let remove = (id: string) => + firebase + ->firestore() + ->Firestore.collection("mycollection") + ->Firestore.Collection.doc(id) + ->Firestore.Collection.Doc.delete(); +``` diff --git a/drafts/bs-firebase/package.json b/drafts/bs-firebase/package.json new file mode 100644 index 0000000..5a1ad32 --- /dev/null +++ b/drafts/bs-firebase/package.json @@ -0,0 +1,20 @@ +{ + "name": "@dck/bs-firebase", + "version": "0.3.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "reasonml", + "firebase", + "bucklescript-bindings" + ], + "author": "Thomas Deconinck", + "license": "MIT", + "devDependencies": { + "bs-platform": "7.2.1" + } +} diff --git a/drafts/bs-firebase/src/BsFirebase.re b/drafts/bs-firebase/src/BsFirebase.re new file mode 100644 index 0000000..c04a925 --- /dev/null +++ b/drafts/bs-firebase/src/BsFirebase.re @@ -0,0 +1,13 @@ +type firebase; +type firebaseConfig; + +module Auth = BsFirebase__Auth; +module Firestore = BsFirebase__Firestore; + +[@bs.module] external firebase: firebase = "firebase"; + +[@bs.send] +external initializeApp: (firebase, firebaseConfig) => unit = "initializeApp"; + +[@bs.send] external auth: (firebase, unit) => Auth.t = "auth"; +[@bs.send] external firestore: (firebase, unit) => Firestore.t = "firestore"; \ No newline at end of file diff --git a/drafts/bs-firebase/src/BsFirebase.rei b/drafts/bs-firebase/src/BsFirebase.rei new file mode 100644 index 0000000..c04a925 --- /dev/null +++ b/drafts/bs-firebase/src/BsFirebase.rei @@ -0,0 +1,13 @@ +type firebase; +type firebaseConfig; + +module Auth = BsFirebase__Auth; +module Firestore = BsFirebase__Firestore; + +[@bs.module] external firebase: firebase = "firebase"; + +[@bs.send] +external initializeApp: (firebase, firebaseConfig) => unit = "initializeApp"; + +[@bs.send] external auth: (firebase, unit) => Auth.t = "auth"; +[@bs.send] external firestore: (firebase, unit) => Firestore.t = "firestore"; \ No newline at end of file diff --git a/drafts/bs-firebase/src/BsFirebase__Auth.re b/drafts/bs-firebase/src/BsFirebase__Auth.re new file mode 100644 index 0000000..5604fa2 --- /dev/null +++ b/drafts/bs-firebase/src/BsFirebase__Auth.re @@ -0,0 +1,81 @@ +type t; + +module User = { + type t; + + [@bs.get] external displayName: t => string = "displayName"; + [@bs.get] external email: t => string = "email"; + [@bs.get] external emailVerified: t => bool = "emailVerified"; + [@bs.get] external isAnonymous: t => bool = "isAnonymous"; + [@bs.get] external photoURL: t => string = "photoURL"; + [@bs.get] external refreshToken: t => string = "refreshToken"; + [@bs.get] external uid: t => string = "uid"; + [@bs.get] external phoneNumber: t => Js.Nullable.t(string) = "phoneNumber"; +}; + +module Result = { + type t; + + module Credentials = { + type t; + + [@bs.get] external accessToken: t => string = "accessToken"; + [@bs.get] external idToken: t => string = "idToken"; + [@bs.get] external providerId: t => string = "providerId"; + [@bs.get] external signInMethod: t => string = "signInMethod"; + }; + + module AdditionalUserInfo = { + type t; + + module Profile = { + type t; + + [@bs.get] external email: t => string = "email"; + [@bs.get] external familyName: t => string = "family_name"; + [@bs.get] external givenName: t => string = "given_name"; + [@bs.get] external grantedScopes: t => string = "granted_scopes"; + [@bs.get] external id: t => string = "id"; + [@bs.get] external locale: t => string = "locale"; + [@bs.get] external name: t => string = "name"; + [@bs.get] external picture: t => string = "picture"; + [@bs.get] external verifiedEmail: t => bool = "verified_email"; + }; + + [@bs.get] external isNewUser: t => bool = "isNewUser"; + [@bs.get] external providerId: t => string = "providerId"; + [@bs.get] external profile: t => Profile.t = "profile"; + }; + + [@bs.get] external user: t => User.t = "user"; + [@bs.get] external credentials: t => Credentials.t = "user"; + [@bs.get] external operationType: t => string = "operationType"; + [@bs.get] + external additionalUserInfo: t => AdditionalUserInfo.t = + "additionalUserInfo"; +}; + +module Provider = { + type t; + + [@bs.new] [@bs.module "firebase"] [@bs.scope "auth"] + external google: unit => t = "GoogleAuthProvider"; + + [@bs.new] [@bs.module "firebase"] [@bs.scope "auth"] + external twitter: unit => t = "TwitterAuthProvider"; +}; + +[@bs.send] +external signInWithEmailAndPassword: + (t, ~email: string, ~password: string) => Js.Promise.t(Result.t) = + "signInWithEmailAndPassword"; + +[@bs.send] +external signInWithPopup: (t, Provider.t) => Js.Promise.t(Result.t) = + "signInWithPopup"; + +[@bs.send] +external onAuthStateChanged: (t, Js.Nullable.t(User.t) => unit) => unit = + "onAuthStateChanged"; + +[@bs.send] external signOut: (t, unit) => unit = "signOut"; \ No newline at end of file diff --git a/drafts/bs-firebase/src/BsFirebase__Firestore.re b/drafts/bs-firebase/src/BsFirebase__Firestore.re new file mode 100644 index 0000000..5a9b2a0 --- /dev/null +++ b/drafts/bs-firebase/src/BsFirebase__Firestore.re @@ -0,0 +1,57 @@ +type t; + +module DocRef = { + type t; + + [@bs.get] external exists: t => bool = "exists"; + [@bs.get] external id: t => string = "id"; + [@bs.send] external data: (t, unit) => 'a = "data"; +}; + +module QuerySnapshot = { + type t; + + [@bs.get] external docs: t => array(DocRef.t) = "docs"; +}; + +module Collection = { + type t; + + module Doc = { + type t; + + [@bs.deriving abstract] + type setOptions = {merge: bool}; + + [@bs.send] external get: (t, unit) => Js.Promise.t(DocRef.t) = "get"; + [@bs.send] external delete: (t, unit) => Js.Promise.t(unit) = "delete"; + [@bs.send] + external set: (t, 'a, ~options: setOptions=?) => Js.Promise.t(unit) = + "set"; + }; + + [@bs.send] external add: (t, 'a) => Js.Promise.t(DocRef.t) = "add"; + [@bs.send] external get: (t, unit) => Js.Promise.t(QuerySnapshot.t) = "get"; + [@bs.send] external doc: (t, string) => Doc.t = "doc"; + [@bs.send] + external where: + ( + t, + string, + [@bs.string] [ + | [@bs.as "=="] `equal + | [@bs.as ">"] `greater + | [@bs.as ">="] `greaterEqual + | [@bs.as "<"] `lower + | [@bs.as "<="] `lowerEqual + | [@bs.as "array-contains"] `arrayContains + ], + string + ) => + t = + "where"; +}; + +[@bs.module] external require: t = "firebase/firestore"; + +[@bs.send] external collection: (t, string) => Collection.t = "collection"; \ No newline at end of file diff --git a/drafts/bs-fluture/.gitignore b/drafts/bs-fluture/.gitignore new file mode 100644 index 0000000..92c3ed3 --- /dev/null +++ b/drafts/bs-fluture/.gitignore @@ -0,0 +1,28 @@ +*.exe +*.obj +*.out +*.compile +*.native +*.byte +*.cmo +*.annot +*.cmi +*.cmx +*.cmt +*.cmti +*.cma +*.a +*.cmxa +*.obj +*~ +*.annot +*.cmj +*.bak +lib/bs +*.mlast +*.mliast +.vscode +.merlin +.bsb.lock +/node_modules +package-lock.json diff --git a/drafts/bs-fluture/README.md b/drafts/bs-fluture/README.md new file mode 100644 index 0000000..afbfdb7 --- /dev/null +++ b/drafts/bs-fluture/README.md @@ -0,0 +1,36 @@ +# bucklescript-fluture + + Bucklescript bindings to [fluture-js/Fluture](https://github.com/fluture-js/Fluture) + + Currently contains only a small part of fluture's API with the rest added as needed. + +## Install + npm instal --save bucklescript-fluture + +## Usage + Examples: + +```OCaml +let () = + Future.( + 10 + |> resolve + |> map (fun x -> x + 1) + |> chain (fun x -> resolve (x + 1)) + |> fork Js.log Js.log + ) +``` + +Node style callback to Future + +```OCaml +module F = Future + +external readFile: string -> string -> F.nodeback -> unit = "readFile"[@@bs.module "fs"] + +let readFileF: string -> string -> (_, string) F.future = F.encaseN2 readFile + +let () = + readFileF "utf-8" "package.json" + |> Future.fork Js.log Js.log +``` \ No newline at end of file diff --git a/drafts/bs-fluture/bsconfig.json b/drafts/bs-fluture/bsconfig.json new file mode 100644 index 0000000..15af7d1 --- /dev/null +++ b/drafts/bs-fluture/bsconfig.json @@ -0,0 +1,19 @@ +{ + "name": "bucklescript-fluture", + "version": "0.1.0", + "sources": { + "dir" : "src", + "subdirs" : true + }, + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "suffix": ".bs.js", + "bs-dependencies": [ + ], + "warnings": { + "error" : "+101" + }, + "refmt": 3 +} diff --git a/drafts/bs-fluture/package.json b/drafts/bs-fluture/package.json new file mode 100644 index 0000000..133829f --- /dev/null +++ b/drafts/bs-fluture/package.json @@ -0,0 +1,33 @@ +{ + "name": "bucklescript-fluture", + "version": "0.1.1", + "description": "BuckleScript bindings for fluture-js/Fluture", + "author": "ryloric ", + "repository": "https://github.com/ryloric/bucklescript-fluture.git", + "homepage": "https://github.com/ryloric/bucklescript-fluture", + "bugs": { + "url": "https://github.com/ryloric/bucklescript-fluture/issues" + }, + "scripts": { + "build": "bsb -make-world", + "watch": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "license": "MIT", + "keywords": [ + "fluture", + "bucklescript", + "reason" + ], + "dependencies": { + "fluture": "^11.0.1" + }, + "files": [ + "src", + "bsconfig.json" + ], + "devDependencies": { + "bs-platform": "^5.0.0" + } +} diff --git a/drafts/bs-fluture/src/future.ml b/drafts/bs-fluture/src/future.ml new file mode 100644 index 0000000..d8913ea --- /dev/null +++ b/drafts/bs-fluture/src/future.ml @@ -0,0 +1,52 @@ +type error = Js.Exn.t +type cancel +type nodeback +type ('e, 'r) future + +(* Creating futures *) +external resolve: 'r -> (error, 'r) future = "resolve"[@@bs.module "fluture"] + +external reject: 'e -> ('e, 'r) future = "reject" [@@bs.module "fluture"] + +external after: int -> 'r -> (error, 'r) future = "after" [@@bs.module "fluture"] + +external reject_after: int -> 'e -> ('e, 'r) future = "rejectAfter" [@@bs.module "fluture"] + +external encase: ('a -> 'r) -> 'a -> (error, 'r) future = "encase" [@@bs.module "fluture"] + +external encaseP: ('a -> 'r Js.Promise.t) -> 'a -> (error, 'r) future = "encaseP" [@@bs.module "fluture"] + +external encaseN: ('a -> nodeback -> unit) -> 'a -> (error, 'r) future = "encaseN"[@@bs.module "fluture"] + +external encaseN2: ('a -> 'b -> nodeback -> unit) -> 'a -> 'b -> (error, 'r) future = "encaseN2"[@@bs.module "fluture"] + +external encaseN3: ('a -> 'b -> 'c -> nodeback -> unit) -> 'a -> 'b -> 'c -> (error, 'r) future = "encaseN3"[@@bs.module "fluture"] + +(* Consuming futures *) +external fork: (error -> unit) -> ('r -> unit) -> cancel = "fork"[@@bs.send.pipe: (error, 'r) future] + +(* Transforming & Combining futures *) + +external map: ('r -> 's) -> ('e, 's) future = "map"[@@bs.send.pipe: ('e, 'r) future] + +external bimap: ('e -> 'f) -> ('r -> 's) -> ('f, 's) future = "bimap"[@@bs.send.pipe: ('e, 'r) future] + +external chain: ('r -> ('e, 's) future) -> ('e, 's) future = "chain" [@@bs.send.pipe: ('e, 'r) future] + +external swap: ('r, 'e) future = "swap"[@@bs.send.pipe: ('e, 'r) future] + +external map_rej: ('e -> 'f) -> ('f, 'r) future = "mapRej"[@@bs.send.pipe: ('e, 'r) future] + +external chain_rej: ('e -> ('f, 'r) future) -> ('f, 'r) future = "chainRej"[@@bs.send.pipe: ('e, 'r) future] + +external fold: ('e -> 'a) -> ('r -> 'a) -> (unit, 'a) future = "fold"[@@bs.send.pipe: ('e, 'r) future] + +external ap: ('e, 'r -> 's) future -> ('e, 's) future = "ap"[@@bs.send.pipe: ('e, 'r) future] + +external and_: ('e, 's) future -> ('e, 's) future = "and"[@@bs.send.pipe: ('e, 'r) future] + +(* Currently can only take in a future which returns 'r *) +external alt: ('e, 'r) future -> ('e, 'r) future = "alt"[@@bs.send.pipe: ('e, 'r) future] + +(* Parallelism *) +external race: ('e, 'r) future -> ('e, 'r) future = "race"[@@bs.send.pipe: ('e, 'r) future] \ No newline at end of file diff --git a/drafts/bs-ganalytics/.gitignore b/drafts/bs-ganalytics/.gitignore new file mode 100644 index 0000000..1e875e7 --- /dev/null +++ b/drafts/bs-ganalytics/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +.merlin +.bsb.lock +npm-debug.log +/lib/bs/ +/node_modules/ +*.bs.js +.vscode \ No newline at end of file diff --git a/drafts/bs-ganalytics/README.md b/drafts/bs-ganalytics/README.md new file mode 100644 index 0000000..5abe0a8 --- /dev/null +++ b/drafts/bs-ganalytics/README.md @@ -0,0 +1,19 @@ +# bs-ganalytics +BuckleScript bindings to [lukeed/ganalytics](https://github.com/lukeed/ganalytics). + +Status: Event and Pageview types are functionally complete. Types could use refinement to enforce API constraints. + +# Build +``` +npm run build +``` + +# Build + Watch + +``` +npm run start +``` + + +# Editor +If you use `vscode`, Press `Windows + Shift + B` it will build automatically diff --git a/drafts/bs-ganalytics/bsconfig.json b/drafts/bs-ganalytics/bsconfig.json new file mode 100644 index 0000000..c727c63 --- /dev/null +++ b/drafts/bs-ganalytics/bsconfig.json @@ -0,0 +1,18 @@ +{ + "name": "bs-ganalytics", + "version": "0.1.0", + "sources": { + "dir": "src", + "subdirs": true + }, + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "suffix": ".bs.js", + "bs-dependencies": [], + "warnings": { + "error": "+101" + }, + "refmt": 3 +} \ No newline at end of file diff --git a/drafts/bs-ganalytics/package-lock.json b/drafts/bs-ganalytics/package-lock.json new file mode 100644 index 0000000..5d239cb --- /dev/null +++ b/drafts/bs-ganalytics/package-lock.json @@ -0,0 +1,20 @@ +{ + "name": "bs-ganalytics", + "version": "0.3.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "bs-platform": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-4.0.14.tgz", + "integrity": "sha512-bxeMwZPnJ90r48SavF60pkzGn7heaoHn7IF7fpPdh5L8WZfCzf76AikH2zWJii4QahUeInvRN1tNPWQt3ckKJQ==", + "dev": true + }, + "ganalytics": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/ganalytics/-/ganalytics-3.1.1.tgz", + "integrity": "sha512-q9wANT5JXn83/lvHS1zXdQkRg2wCt/MMCgIsuMCqwRqRo9+u66VEoETNNn3aVcYA8uBqpL2IjkgkbtMwKxqeEA==", + "dev": true + } + } +} diff --git a/drafts/bs-ganalytics/package.json b/drafts/bs-ganalytics/package.json new file mode 100644 index 0000000..4b342b3 --- /dev/null +++ b/drafts/bs-ganalytics/package.json @@ -0,0 +1,23 @@ +{ + "name": "bs-ganalytics", + "version": "0.3.1", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "GAnalytics", + "analytics" + ], + "author": "", + "license": "MIT", + "peerDependencies": { + "ganalytics": "^3.1.1" + }, + "devDependencies": { + "ganalytics": "^3.1.1", + "bs-platform": "^4.0.14" + } +} diff --git a/drafts/bs-ganalytics/src/GAnalytics.re b/drafts/bs-ganalytics/src/GAnalytics.re new file mode 100644 index 0000000..7aad6fc --- /dev/null +++ b/drafts/bs-ganalytics/src/GAnalytics.re @@ -0,0 +1,55 @@ +type t; + +[@bs.deriving abstract] +type instOptions = { + [@bs.optional] + aip: string, /* anonymize ip */ + [@bs.optional] + an: string, /* application name */ + [@bs.optional] + aid: string, /* application identifier */ + [@bs.optional] + aiid: string, /* application installer identifier */ + [@bs.optional] + av: string, /* application version */ + [@bs.optional] + ds: string /* data source */ +}; + +[@bs.val] [@bs.module "ganalytics"] +external make: (string, Js.Nullable.t(instOptions), bool) => t = "default"; + +[@bs.deriving jsConverter] +type eventType = [ | [@bs.as "event"] `Event | [@bs.as "pageview"] `Pageview]; + +[@bs.deriving abstract] +type eventOptions = { + [@bs.optional] + ec: string, /* event category */ + [@bs.optional] + ea: string, /* event action */ + [@bs.optional] + ev: string, /* event label */ + [@bs.optional] + el: string, /* event value */ + [@bs.optional] + dt: string, /* document title */ + [@bs.optional] + dl: string, /* document url */ + [@bs.optional] + dh: string, /* document host */ + [@bs.optional] + dp: string, /* document path */ + [@bs.optional] + uid: string, /* user id */ + [@bs.optional] + an: string, /* application name */ + [@bs.optional] + aid: string, /* application id */ + [@bs.optional] + av: string /* application version */ +}; + +[@bs.send.pipe: t] external send: (string, eventOptions) => unit = ""; + +let send = (eventType, opts) => send(eventTypeToJs(eventType), opts); diff --git a/drafts/bs-geofire/LICENSE.md b/drafts/bs-geofire/LICENSE.md new file mode 100644 index 0000000..8f74cc3 --- /dev/null +++ b/drafts/bs-geofire/LICENSE.md @@ -0,0 +1,23 @@ +# MIT License + +Copyright © 2017 [Andrew Kvalheim][] + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + [Andrew Kvalheim]: https://andrew.kvalhe.im/contact diff --git a/drafts/bs-geofire/README.md b/drafts/bs-geofire/README.md new file mode 100644 index 0000000..204ac44 --- /dev/null +++ b/drafts/bs-geofire/README.md @@ -0,0 +1,61 @@ +# bs-geofire + +[BuckleScript][] bindings to [GeoFire][], written in [Reason][]. + +## Installation + +Install NPM packages [bs-firebase][] and [bs-geofire][]— + +```shell +yarn add 'bs-firebase' 'https://github.com/AndrewKvalheim/bs-geofire' +``` + +—and register both in [`bsconfig.json`][bs-dependencies]: + +```diff +- "bs-dependencies": [] ++ "bs-dependencies": ["bs-firebase", "bs-geofire"] +``` + +## Usage + +Refer to the [module interface][interface] and [GeoFire API][]. + +### Example + +```reason +/* Initialize GeoFire. */ +let app = ReasonFirebase.initializeApp(~options); +let database = ReasonFirebase.App.database(app); +let reference = ReasonFirebase.Database.ref(database, ~path="example", ()); +let geoFire = GeoFire.make(reference); + +/* Start a query. */ +let geoQuery = GeoFire.query(geoFire, ~center=(49.304, -123.145), ~radius=2.0); + +/* Subscribe to nearby moved locations. */ +let callback = (key, location, distance) => + Js.log({j|$key moved to $location, which is $distance km away.|j}); +let registration = GeoFire.GeoQuery.on(geoQuery, `key_moved(callback)); + +/* Add a location, */ +GeoFire.set(geoFire, "foo", (49.306, -123.156)) +/* then move it, */ +|> Js.Promise.then_(() => GeoFire.set(geoFire, "foo", (49.313, -123.148))) +/* then unsubscribe and stop the query. */ +|> Js.Promise.then_(() => { + GeoFire.GeoCallbackRegistration.cancel(registration); + GeoFire.GeoQuery.cancel(geoQuery); + Js.Promise.resolve() + }) +``` + + + [bs-dependencies]: https://bucklescript.github.io/bucklescript/Manual.html#_build_with_other_bucklescript_dependencies + [bs-firebase]: https://github.com/viskahq/bs-firebase + [bs-geofire]: https://github.com/AndrewKvalheim/bs-geofire + [BuckleScript]: https://bucklescript.github.io/ + [GeoFire]: https://github.com/firebase/geofire-js/ + [GeoFire API]: https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md + [interface]: ./src/GeoFire.rei + [Reason]: https://reasonml.github.io/ diff --git a/drafts/bs-geofire/package.json b/drafts/bs-geofire/package.json new file mode 100644 index 0000000..f144f0d --- /dev/null +++ b/drafts/bs-geofire/package.json @@ -0,0 +1,27 @@ +{ + "name": "bs-geofire", + "version": "0.2.0", + "description": "BuckleScript bindings to GeoFire", + "keywords": ["BuckleScript", "Reason"], + "license": "MIT", + "dependencies": { + "geofire": "^4.1.2" + }, + "peerDependencies": { + "bs-firebase": "^0.1.0" + }, + "devDependencies": { + "bs-firebase": "^0.1.0", + "bs-jest": "^0.2.0", + "bs-platform": "^2.0.0", + "bs-webapi": "https://github.com/viskahq/bs-webapi-incubator.git#8ffd9d8", + "firebase": "^4.6.1" + }, + "scripts": { + "start": "./node_modules/.bin/bsb -clean-world -make-world -w", + "test": "./node_modules/.bin/jest --watchAll" + }, + "jest": { + "testRegex": "/tests/\\w+Spec.js$" + } +} diff --git a/drafts/bs-geofire/src/GeoFire.re b/drafts/bs-geofire/src/GeoFire.re new file mode 100644 index 0000000..b275563 --- /dev/null +++ b/drafts/bs-geofire/src/GeoFire.re @@ -0,0 +1,74 @@ +open BsFirebase; + +type t; + +type location = (float, float); + +module GeoCallbackRegistration = { + type t; + [@bs.send] external cancel : t => unit = ""; +}; + +module GeoQuery = { + type t; + [@bs.send] external center : t => location = ""; + [@bs.send] external radius : t => float = ""; + [@bs.send] external updateCriteria : (t, {. "center": location, "radius": float}) => unit = ""; + let updateCriteria = (geoQuery, ~center, ~radius) => + updateCriteria(geoQuery, {"center": center, "radius": radius}); + [@bs.send] external updateCenter : (t, {. "center": location}) => unit = "updateCriteria"; + let updateCenter = (geoQuery, center) => updateCenter(geoQuery, {"center": center}); + [@bs.send] external updateRadius : (t, {. "radius": float}) => unit = "updateCriteria"; + let updateRadius = (geoQuery, radius) => updateRadius(geoQuery, {"radius": radius}); + [@bs.send] + external on : + ( + t, + [@bs.string] + [ + | `ready(unit => unit) + | `key_entered((string, location, float) => unit) + | `key_exited((string, Js.nullable(location), Js.nullable(float)) => unit) + | `key_moved((string, location, float) => unit) + ] + ) => + GeoCallbackRegistration.t = + ""; + let on = (geoQuery, variant) => + switch variant { + | `ready(callback) => on(geoQuery, `ready(callback)) + | `key_entered(callback) => on(geoQuery, `key_entered(callback)) + | `key_exited(callback) => + on( + geoQuery, + `key_exited( + (key, location, distance) => + callback(key, location |> Js.toOption, distance |> Js.toOption) + ) + ) + | `key_moved(callback) => on(geoQuery, `key_moved(callback)) + }; + [@bs.send] external cancel : t => unit = ""; +}; + +[@bs.new] [@bs.module] external make : ReasonFirebase.Database.Reference.t => t = "geofire"; + +[@bs.send] external ref : t => ReasonFirebase.Database.Reference.t = ""; + +[@bs.send] external get : (t, string) => Js.Promise.t(Js.nullable(location)) = ""; + +let get = (geofire, string) : Js.Promise.t(option(location)) => + get(geofire, string) + |> Js.Promise.then_((nullable) => nullable |> Js.toOption |> Js.Promise.resolve); + +[@bs.send] external set : (t, string, location) => Js.Promise.t(unit) = ""; + +[@bs.send] external setMany : (t, Js.Dict.t(location)) => Js.Promise.t(unit) = "set"; + +[@bs.send] external remove : (t, string) => Js.Promise.t(unit) = ""; + +[@bs.send] external query : (t, {. "center": location, "radius": float}) => GeoQuery.t = ""; + +let query = (geoFire, ~center, ~radius) => query(geoFire, {"center": center, "radius": radius}); + +[@bs.module "geofire"] external distance : (location, location) => float = ""; diff --git a/drafts/bs-geofire/src/GeoFire.rei b/drafts/bs-geofire/src/GeoFire.rei new file mode 100644 index 0000000..61c7da8 --- /dev/null +++ b/drafts/bs-geofire/src/GeoFire.rei @@ -0,0 +1,86 @@ +open BsFirebase; + +type t; + +type location = (float, float); + +module GeoCallbackRegistration: { + type t; + /* GeoCallbackRegistration.cancel() + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geocallbackregistrationcancel */ + let cancel: t => unit; +}; + +module GeoQuery: { + type t; + /* GeoQuery.center() + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geoquerycenter */ + let center: t => location; + /* GeoQuery.radius() + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geoqueryradius */ + let radius: t => float; + /* GeoQuery.updateCriteria(newQueryCriteria) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geoqueryupdatecriterianewquerycriteria */ + let updateCriteria: (t, ~center: location, ~radius: float) => unit; + let updateCenter: (t, location) => unit; + let updateRadius: (t, float) => unit; + /* GeoQuery.on(eventType, callback) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geoqueryoneventtype-callback */ + let on: + ( + t, + [< + | `key_entered((string, location, float) => unit) + | `key_exited((string, option(location), option(float)) => unit) + | `key_moved((string, location, float) => unit) + | `ready(unit => unit) + ] + ) => + GeoCallbackRegistration.t; + /* GeoQuery.cancel() + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geoquerycancel */ + let cancel: t => unit; +}; + +/* new GeoFire(firebaseRef) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#new-geofirefirebaseref */ +let make: ReasonFirebase.Database.Reference.t => t; + +/* GeoFire.ref() + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geofireref */ +let ref: t => ReasonFirebase.Database.Reference.t; + +/* GeoFire.get(key) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geofiregetkey */ +let get: (t, string) => Js.Promise.t(option(location)); + +/* GeoFire.set(keyOrLocations[, location]) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geofiresetkeyorlocations-location */ +let set: (t, string, location) => Js.Promise.t(unit); + +let setMany: (t, Js.Dict.t(location)) => Js.Promise.t(unit); + +/* GeoFire.remove(key) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geofireremovekey */ +let remove: (t, string) => Js.Promise.t(unit); + +/* GeoFire.query(queryCriteria) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geofirequeryquerycriteria */ +let query: (t, ~center: location, ~radius: float) => GeoQuery.t; + +/* GeoFire.distance(location1, location2) + * + * https://github.com/firebase/geofire-js/blob/v4.1.2/docs/reference.md#geofiredistancelocation1-location2 */ +let distance: (location, location) => float; diff --git a/drafts/bs-geofire/tests/GeoFireSpec.re b/drafts/bs-geofire/tests/GeoFireSpec.re new file mode 100644 index 0000000..4aaa609 --- /dev/null +++ b/drafts/bs-geofire/tests/GeoFireSpec.re @@ -0,0 +1,394 @@ +open BsFirebase; + +open Jest; + +open ExpectJs; + +open Utilities; + +open Utilities.Jest; + +let app = + ReasonFirebase.initializeApp( + ~options={ + "apiKey": requiredEnvVar("FIREBASE_API_KEY"), + "authDomain": requiredEnvVar("FIREBASE_AUTH_DOMAIN"), + "databaseURL": requiredEnvVar("FIREBASE_DATABASE_URL"), + "storageBucket": requiredEnvVar("FIREBASE_STORAGE_BUCKET"), + "messagingSenderId": requiredEnvVar("FIREBASE_MESSAGING_SENDER_ID") + } + ); + +let reference: ref(option(ReasonFirebase.Database.Reference.t)) = ref(None); + +let geoFire: ref(option(GeoFire.t)) = ref(None); + +let geoQueries: ref(list(GeoFire.GeoQuery.t)) = ref([]); + +beforeEach( + () => { + let database = ReasonFirebase.App.database(app); + let root_reference = ReasonFirebase.Database.ref(database, ()); + let temporary_reference = ReasonFirebase.Database.Reference.push(root_reference, ()); + reference := Some(temporary_reference); + geoFire := Some(GeoFire.make(temporary_reference)); + geoQueries := [] + } +); + +afterEachPromise( + () => { + geoQueries^ |> List.map(GeoFire.GeoQuery.cancel) |> ignore; + let temporary_reference = reference^ |> Js.Option.getExn; + reference := None; + geoFire := None; + geoQueries := []; + /* TODO: Use ReasonFirebase.Database.Reference.remove */ + ReasonFirebase.Database.Reference.set(temporary_reference, ~value=Js.null, ()) + |> Js.Promise.then_(() => Promise.wait(50)) + } +); + +describe( + "GeoFire", + () => { + test( + "GeoFire.ref() returns the Firebase reference", + () => { + let reference = reference^ |> Js.Option.getExn; + let geoFire = geoFire^ |> Js.Option.getExn; + expect(GeoFire.ref(geoFire)) |> toBe(reference) + } + ); + test( + "GeoFire.get(invalidKey) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + expect(() => GeoFire.get(geoFire, "foo#bar")) |> toThrow + } + ); + testPromise( + "GeoFire.get(nonexistentKey) returns None", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.get(geoFire, "foo") |> Promise.map((location) => expect(location) |> toBe(None)) + } + ); + test( + "GeoFire.set(invalidKey, location) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + expect(() => GeoFire.set(geoFire, "foo/bar", (23.0, 74.0))) |> toThrow + } + ); + test( + "GeoFire.set(key, invalidLocation) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + expect(() => GeoFire.set(geoFire, "foo", (0.0, 181.0))) |> toThrow + } + ); + testPromise( + "GeoFire.get(key) returns location set by GeoFire.set(key, location)", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.set(geoFire, "foo", (47.235124363, 127.2379654226)) + |> Js.Promise.then_(() => GeoFire.get(geoFire, "foo")) + |> Promise.map( + (location) => expect(location) |> toEqual(Some((47.235124363, 127.2379654226))) + ) + } + ); + testPromise( + "GeoFire.get(key)... return locations set by GeoFire.set(keyedLocations)", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let keyedLocations = + [|("foo", (0.0, 0.0)), ("bar", (90.0, (-180.0)))|] |> Js.Dict.fromArray; + GeoFire.setMany(geoFire, keyedLocations) + |> Js.Promise.then_( + () => Js.Promise.all2((GeoFire.get(geoFire, "foo"), GeoFire.get(geoFire, "bar"))) + ) + |> Promise.map( + (locations) => + expect(locations) |> toEqual((Some((0.0, 0.0)), Some((90.0, (-180.0))))) + ) + } + ); + testPromise( + "GeoFire.remove(nonexistentKey) succeeds", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.remove(geoFire, "foo") |> Promise.map(() => pass) + } + ); + testPromise( + "GeoFire.remove(key) removes location set by GeoFire.set(key, location)", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.set(geoFire, "foo", ((-90.0), 180.0)) + |> Js.Promise.then_(() => GeoFire.get(geoFire, "foo")) + |> Js.Promise.then_( + (before) => + GeoFire.remove(geoFire, "foo") + |> Js.Promise.then_(() => GeoFire.get(geoFire, "foo")) + |> Promise.map( + (after) => expect((before, after)) |> toEqual((Some(((-90.0), 180.0)), None)) + ) + ) + } + ); + test( + "GeoFire.query({invalidCenter, radius}) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + expect( + () => { + let geoQuery = GeoFire.query(geoFire, ~center=(91.0, 2.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^] + } + ) + |> toThrow + } + ); + test( + "GeoFire.query({center, invalidRadius}) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + expect( + () => { + let geoQuery = GeoFire.query(geoFire, ~center=(1.0, 2.0), ~radius=(-10.0)); + geoQueries := [geoQuery, ...geoQueries^] + } + ) + |> toThrow + } + ); + test( + "GeoFire.query({center, radius}) succeeds", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(1.0, 2.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + expect(geoQuery) |> toBeTruthy + } + ) + } +); + +describe( + "GeoQuery", + () => { + test( + "GeoQuery.center() returns the center", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + expect(GeoFire.GeoQuery.center(geoQuery)) |> toEqual((2.0, 3.0)) + } + ); + test( + "GeoQuery.radius() returns the radius", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + expect(GeoFire.GeoQuery.radius(geoQuery)) |> toEqual(1000.0) + } + ); + test( + "GeoQuery.updateCriteria({invalidCenter}) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + expect(() => GeoFire.GeoQuery.updateCenter(geoQuery, (1.0, (-181.0)))) |> toThrow + } + ); + test( + "GeoQuery.updateCriteria({invalidRadius}) throws", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + expect(() => GeoFire.GeoQuery.updateRadius(geoQuery, (-1.0))) |> toThrow + } + ); + test( + "GeoQuery.updateCriteria({center}) updates the center", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + let before = GeoFire.GeoQuery.center(geoQuery); + GeoFire.GeoQuery.updateCenter(geoQuery, (0.0, 0.0)); + let after = GeoFire.GeoQuery.center(geoQuery); + expect((before, after)) |> toEqual(((2.0, 3.0), (0.0, 0.0))) + } + ); + test( + "GeoQuery.updateCriteria({radius}) updates the radius", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + let before = GeoFire.GeoQuery.radius(geoQuery); + GeoFire.GeoQuery.updateRadius(geoQuery, 1.78); + let after = GeoFire.GeoQuery.radius(geoQuery); + expect((before, after)) |> toEqual((1000.0, 1.78)) + } + ); + test( + "GeoQuery.updateCriteria({center, radius}) updates the center and radius", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + let before = (GeoFire.GeoQuery.center(geoQuery), GeoFire.GeoQuery.radius(geoQuery)); + GeoFire.GeoQuery.updateCriteria(geoQuery, ~center=(22.22, (-107.77)), ~radius=1.0); + let after = (GeoFire.GeoQuery.center(geoQuery), GeoFire.GeoQuery.radius(geoQuery)); + expect((before, after)) |> toEqual((((2.0, 3.0), 1000.0), ((22.22, (-107.77)), 1.0))) + } + ); + testAsync( + "GeoQuery.on('ready', callback) fires", + (done_) => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(2.0, 3.0), ~radius=1000.0); + geoQueries := [geoQuery, ...geoQueries^]; + GeoFire.GeoQuery.on(geoQuery, `ready(() => done_(pass))) |> ignore + } + ); + testAsync( + "GeoQuery.on('key_entered', callback) fires with location data", + (done_) => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(45.0, (-100.0)), ~radius=100.0); + geoQueries := [geoQuery, ...geoQueries^]; + GeoFire.GeoQuery.on( + geoQuery, + `key_entered( + (key, location, distance) => + done_( + expect((key, location, distance |> int_of_float)) + |> toEqual(("foo", (45.1, (-100.0)), 11)) + ) + ) + ) + |> ignore; + GeoFire.set(geoFire, "foo", (45.1, (-100.0))) |> ignore + } + ); + testAsync( + "GeoQuery.on('key_exited', callback) fires with only the key when a key is removed", + (done_) => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.set(geoFire, "foo", (37.7853074, (-122.4054274))) |> ignore; + let geoQuery = GeoFire.query(geoFire, ~center=(37.8, (-122.4)), ~radius=100.0); + geoQueries := [geoQuery, ...geoQueries^]; + GeoFire.GeoQuery.on( + geoQuery, + `key_exited( + (key, location, distance) => + done_(expect((key, location, distance)) |> toEqual(("foo", None, None))) + ) + ) + |> ignore; + GeoFire.remove(geoFire, "foo") |> ignore + } + ); + testAsync( + "GeoQuery.on('key_exited', callback) fires with location data when a key moves away", + (done_) => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.set(geoFire, "foo", (37.7853074, (-122.4054274))) |> ignore; + let geoQuery = GeoFire.query(geoFire, ~center=(37.8, (-122.4)), ~radius=100.0); + geoQueries := [geoQuery, ...geoQueries^]; + GeoFire.GeoQuery.on( + geoQuery, + `key_exited( + (key, location, distance) => + done_( + expect((key, location, distance |> Option.map(int_of_float))) + |> toEqual(("foo", Some((80.0, 120.0)), Some(6373))) + ) + ) + ) + |> ignore; + GeoFire.set(geoFire, "foo", (80.0, 120.0)) |> ignore + } + ); + testAsync( + "GeoQuery.on('key_moved', callback) fires with data", + (done_) => { + let geoFire = geoFire^ |> Js.Option.getExn; + GeoFire.set(geoFire, "foo", (50.0, 50.0)) |> ignore; + let geoQuery = GeoFire.query(geoFire, ~center=(50.0, 50.0), ~radius=10.0); + geoQueries := [geoQuery, ...geoQueries^]; + GeoFire.GeoQuery.on( + geoQuery, + `key_moved( + (key, location, distance) => + done_( + expect((key, location, distance |> int_of_float)) + |> toEqual(("foo", (50.01, 50.01), 1)) + ) + ) + ) + |> ignore; + GeoFire.set(geoFire, "foo", (50.01, 50.01)) |> ignore + } + ); + testPromise( + "GeoQuery.cancel() prevents further callbacks from firing", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(50.0, 50.0), ~radius=100.0); + geoQueries := [geoQuery, ...geoQueries^]; + let mockFn = JestJs.inferred_fn(); + let fn = MockJs.fn(mockFn); + let key_entered = (key, _location, _distance) => [@bs] fn(key) |> ignore; + GeoFire.GeoQuery.on(geoQuery, `key_entered(key_entered)) |> ignore; + GeoFire.set(geoFire, "foo", (50.02, 50.02)) |> ignore; + GeoFire.GeoQuery.cancel(geoQuery); + GeoFire.set(geoFire, "bar", (50.01, 50.01)) |> ignore; + Promise.wait(1000) + |> Promise.map(() => expect(mockFn |> MockJs.calls) |> toEqual([|"foo"|])) + } + ) + } +); + +describe( + "GeoCallbackRegistration", + () => + testPromise( + "GeoCallbackRegistration.cancel() prevents further callbacks from firing", + () => { + let geoFire = geoFire^ |> Js.Option.getExn; + let geoQuery = GeoFire.query(geoFire, ~center=(50.0, 50.0), ~radius=100.0); + geoQueries := [geoQuery, ...geoQueries^]; + let mockFn = JestJs.inferred_fn(); + let fn = MockJs.fn(mockFn); + let key_entered = (key, _location, _distance) => [@bs] fn(key) |> ignore; + let geoCallbackRegistration = GeoFire.GeoQuery.on(geoQuery, `key_entered(key_entered)); + GeoFire.set(geoFire, "foo", (50.02, 50.02)) |> ignore; + GeoFire.GeoCallbackRegistration.cancel(geoCallbackRegistration); + GeoFire.set(geoFire, "bar", (50.01, 50.01)) |> ignore; + Promise.wait(1000) + |> Promise.map(() => expect(mockFn |> MockJs.calls) |> toEqual([|"foo"|])) + } + ) +); + +describe( + "Helper Methods", + () => + test( + "GeoFire.distance", + () => + expect(GeoFire.distance(((-54.933333), (-67.616667)), ((-54.0), (-67.0)))) + |> toBeSoCloseTo(111.0, ~digits=0) + ) +); diff --git a/drafts/bs-geofire/tests/Utilities.re b/drafts/bs-geofire/tests/Utilities.re new file mode 100644 index 0000000..474571f --- /dev/null +++ b/drafts/bs-geofire/tests/Utilities.re @@ -0,0 +1,41 @@ +module Jest = { + [@bs.val] external afterEachPromise : (unit => Js.Promise.t(unit)) => unit = "afterEach"; + [@bs.val] external beforeEachPromise : (unit => Js.Promise.t(unit)) => unit = "beforeEach"; +}; + +module Node = { + include (Node: (module type of Node) with module Process := Node.Process); + module Process = { + include Node.Process; + let getEnvVar = (key: string) : option(string) => Js.Dict.get(process##env, key); + }; +}; + +module Option = { + let map = (f: 'a => 'b, option: option('a)) : option('b) => + switch option { + | None => None + | Some(value) => Some(f(value)) + }; +}; + +module Promise = { + include Js.Promise; + let map = (f, promise) => promise |> then_((value) => f(value) |> resolve); + let wait = (duration) => + Js.Promise.make( + (~resolve as resolve_, ~reject as _) => { + let unit = (); + let resolve = () => [@bs] resolve_(unit); + Js.Global.setTimeout(resolve, duration) |> ignore + } + ); +}; + +let requiredEnvVar = (key: string) : string => + switch (Node.Process.getEnvVar(key)) { + | None => + Js.log({j|"The environment variable $key is required."|j}); + raise(Not_found) + | Some(value) => value + }; diff --git a/drafts/bs-gestalt/.gitignore b/drafts/bs-gestalt/.gitignore new file mode 100644 index 0000000..fb1b93b --- /dev/null +++ b/drafts/bs-gestalt/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +.merlin +.bsb.lock +npm-debug.log +/lib/bs/ +/lib/ocaml/ +*.log +.bsb.lock +/src/**/*.bs.js +/node_modules/ diff --git a/drafts/bs-gestalt/README.md b/drafts/bs-gestalt/README.md new file mode 100644 index 0000000..99ef011 --- /dev/null +++ b/drafts/bs-gestalt/README.md @@ -0,0 +1,74 @@ +# Reason bindings for [Gestalt](https://github.com/pinterest/gestalt) + +[![npm](https://img.shields.io/npm/v/bs-gestalt.svg)](https://www.npmjs.com/package/bs-gestalt) + +The bindings are a work in progress, I'm adding things on the go. If you miss anything, or want to see something change, feel free to send me a PR. + +## Installation +``` +yarn add bs-gestalt +yarn add gestalt +``` + +Add `bs-gestalt` to your `bs-dependencies` in `bsconfig.json`. + +```json +{ + "bs-dependencies": ["bs-gestalt"] +} +``` + +## Usage + +```reason +open Gestalt; + +[@react.component] +let make = () => + + {React.string("Hello World!")} + ; +``` + +## Components + +* [x] Avatar +* [x] Badge +* [x] Box +* [x] Button +* [x] Card +* [ ] Checkbox +* [ ] Collage +* [x] Column +* [x] Container +* [ ] Divider +* [x] Flyout +* [ ] GroupAvatar +* [x] Heading +* [x] Icon +* [x] IconButton +* [x] Image +* [x] Label +* [ ] Layer +* [ ] Letterbox +* [x] Link +* [x] Mask +* [ ] Masonry +* [x] Modal +* [ ] Pog +* [ ] Pulsar +* [ ] RadioButton +* [ ] SearchField +* [x] SegmentedControl +* [ ] SelectList +* [x] Spinner +* [ ] Sticky +* [ ] Switch +* [x] Tabs +* [x] Text +* [ ] TextArea +* [x] TextField +* [ ] Toast +* [x] Tooltip +* [x] Touchable +* [ ] Video diff --git a/drafts/bs-gestalt/bsconfig.json b/drafts/bs-gestalt/bsconfig.json new file mode 100644 index 0000000..2ffb065 --- /dev/null +++ b/drafts/bs-gestalt/bsconfig.json @@ -0,0 +1,24 @@ +{ + "name": "bs-gestalt", + "reason": { + "react-jsx": 3 + }, + "version": "0.1.0", + "sources": [ + { + "dir": "src", + "public": "all", + "subdirs": true + } + ], + "package-specs": { + "module": "commonjs", + "in-source": true + }, + "suffix": ".bs.js", + "bs-dependencies": ["reason-react"], + "warnings": { + "error": "+101" + }, + "refmt": 3 +} diff --git a/drafts/bs-gestalt/package.json b/drafts/bs-gestalt/package.json new file mode 100644 index 0000000..7d71963 --- /dev/null +++ b/drafts/bs-gestalt/package.json @@ -0,0 +1,32 @@ +{ + "name": "bs-gestalt", + "description": "Reason bindings for Gestalt", + "version": "0.6.0", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "keywords": [ + "BuckleScript", + "Gestalt", + "ReasonReact", + "React" + ], + "author": "Lars Hisken ", + "license": "MIT", + "homepage": "https://github.com/larshisken/bs-gestalt", + "repository": "git@github.com:larshisken/bs-gestalt.git", + "bugs": "https://github.com/larshisken/bs-gestalt/issues", + "devDependencies": { + "bs-platform": "^5.0.2", + "gestalt": "^0.99.0", + "reason-react": "^0.7.0" + }, + "peerDependencies": { + "gestalt": "^0.98.0", + "react": "^16.8.6", + "react-dom": "^16.8.6", + "reason-react": "^0.7.0" + } +} diff --git a/drafts/bs-gestalt/src/Gestalt.re b/drafts/bs-gestalt/src/Gestalt.re new file mode 100644 index 0000000..e885757 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt.re @@ -0,0 +1,27 @@ +module Box = Gestalt__Box; +module Column = Gestalt__Column; +module Container = Gestalt__Container; +module Button = Gestalt__Button; +module Link = Gestalt__Link; +module Card = Gestalt__Card; +module Tabs = Gestalt__Tabs; +module TextField = Gestalt__TextField; +module Touchable = Gestalt__Touchable; +module IconButton = Gestalt__IconButton; +module Heading = Gestalt__Heading; +module Label = Gestalt__Label; +module Mask = Gestalt__Mask; +module Badge = Gestalt__Badge; +module Icon = Gestalt__Icon; +module Image = Gestalt__Image; +module Spinner = Gestalt__Spinner; +module Text = Gestalt__Text; +module Tooltip = Gestalt__Tooltip; +module Avatar = Gestalt__Avatar; +module Flyout = Gestalt__Flyout; +module SegmentedControl = Gestalt__SegmentedControl; +module Modal = Gestalt__Modal; +module Letterbox = Gestalt__Letterbox; + +module Style = Gestalt__Style; +module Event = Gestalt__Event; diff --git a/drafts/bs-gestalt/src/Gestalt__Avatar.re b/drafts/bs-gestalt/src/Gestalt__Avatar.re new file mode 100644 index 0000000..c2f7a8f --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Avatar.re @@ -0,0 +1,14 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~name: string, + ~icon: [@bs.string] [ | [@bs.as "check-circle"] `checkCircle | `pinterest] + =?, + ~outline: bool=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + ~src: string=?, + ~verified: bool=?, + unit + ) => + React.element = + "Avatar"; diff --git a/drafts/bs-gestalt/src/Gestalt__Badge.re b/drafts/bs-gestalt/src/Gestalt__Badge.re new file mode 100644 index 0000000..e658abd --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Badge.re @@ -0,0 +1,5 @@ +[@bs.module "gestalt"] [@react.component] +external make: + (~text: string, ~position: [@bs.string] [ | `middle | `top]=?, unit) => + React.element = + "Badge"; diff --git a/drafts/bs-gestalt/src/Gestalt__Box.re b/drafts/bs-gestalt/src/Gestalt__Box.re new file mode 100644 index 0000000..d0fb486 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Box.re @@ -0,0 +1,182 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~ref: ReactDOMRe.Ref.t=?, + ~alignContent: [@bs.string] [ + | `start + | [@bs.as "end"] `end_ + | `center + | `between + | `around + | `stretch + ] + =?, + ~alignItems: [@bs.string] [ + | `start + | [@bs.as "end"] `end_ + | `center + | `baseline + | `stretch + ] + =?, + ~alignSelf: [@bs.string] [ + | `auto + | `start + | [@bs.as "end"] `end_ + | `center + | `baseline + | `stretch + ] + =?, + ~bottom: bool=?, + ~children: React.element=?, + ~color: [@bs.string] [ + | `blue + | `darkGray + | `darkWash + | `eggplant + | `gray + | `green + | `lightGray + | `lightWash + | `maroon + | `midnight + | `navy + | `olive + | `orange + | `orchid + | `pine + | `purple + | `red + | `transparent + | `transparentDarkGray + | `watermelon + | `white + ] + =?, + ~column: int=?, + ~smColumn: int=?, + ~mdColumn: int=?, + ~lgColumn: int=?, + ~direction: [@bs.string] [ | `row | `column]=?, + ~smDirection: [@bs.string] [ | `row | `column]=?, + ~mdDirection: [@bs.string] [ | `row | `column]=?, + ~lgDirection: [@bs.string] [ | `row | `column]=?, + ~display: [@bs.string] [ + | `none + | `flex + | `block + | `inlineBlock + | `visuallyHidden + ] + =?, + ~smDisplay: [@bs.string] [ + | `none + | `flex + | `block + | `inlineBlock + | `visuallyHidden + ] + =?, + ~mdDisplay: [@bs.string] [ + | `none + | `flex + | `block + | `inlineBlock + | `visuallyHidden + ] + =?, + ~lgDisplay: [@bs.string] [ + | `none + | `flex + | `block + | `inlineBlock + | `visuallyHidden + ] + =?, + ~fit: bool=?, + ~flex: [@bs.string] [ | `grow | `shrink | `none]=?, + ~height: string=?, + ~justifyContent: [@bs.string] [ + | `start + | [@bs.as "end"] `end_ + | `center + | `between + | `around + ] + =?, + ~left: bool=?, + ~margin: int=?, + ~smMargin: bool=?, + ~mdMargin: bool=?, + ~lgMargin: bool=?, + ~marginBottom: int=?, + ~smMarginBottom: int=?, + ~mdMarginBottom: int=?, + ~lgMarginBottom: int=?, + ~marginEnd: int=?, + ~smMarginEnd: int=?, + ~mdMarginEnd: int=?, + ~lgMarginEnd: int=?, + ~marginLeft: int=?, + ~smMarginLeft: int=?, + ~mdMarginLeft: int=?, + ~lgMarginLeft: int=?, + ~marginRight: int=?, + ~smMarginRight: int=?, + ~mdMarginRight: int=?, + ~lgMarginRight: int=?, + ~marginStart: int=?, + ~smMarginStart: int=?, + ~mdMarginStart: int=?, + ~lgMarginStart: int=?, + ~marginTop: int=?, + ~smMarginTop: int=?, + ~mdMarginTop: int=?, + ~lgMarginTop: int=?, + ~maxHeight: string=?, + ~maxWidth: string=?, + ~minHeight: string=?, + ~minWidth: string=?, + ~overflow: [@bs.string] [ + | `visible + | `hidden + | `scroll + | `scrollX + | `scrollY + | `auto + ] + =?, + ~padding: int=?, + ~smPadding: int=?, + ~mdPadding: int=?, + ~lgPadding: int=?, + ~paddingX: int=?, + ~smPaddingX: int=?, + ~mdPaddingX: int=?, + ~lgPaddingX: int=?, + ~paddingY: int=?, + ~smPaddingY: int=?, + ~mdPaddingY: int=?, + ~lgPaddingY: int=?, + ~position: [@bs.string] [ | `static | `absolute | `relative | `fixed]=?, + ~right: bool=?, + ~shape: [@bs.string] [ + | `square + | `rounded + | `pill + | `circle + | `roundedTop + | `roundedBottom + | `roundedLeft + | `roundedRight + ] + =?, + ~top: bool=?, + ~width: string=?, + ~wrap: bool=?, + ~dangerouslySetInlineStyle: Gestalt__Style.inlineStyle=?, + unit + ) => + React.element = + "Box"; diff --git a/drafts/bs-gestalt/src/Gestalt__Button.re b/drafts/bs-gestalt/src/Gestalt__Button.re new file mode 100644 index 0000000..1834a01 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Button.re @@ -0,0 +1,18 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~text: string=?, + ~accessibilityExpanded: bool=?, + ~accessibilityHaspopup: bool=?, + ~accessibilityLabel: string=?, + ~color: [@bs.string] [ | `blue | `gray | `red | `transparent | `white]=?, + ~disabled: bool=?, + ~inline: bool=?, + ~name: string=?, + ~onClick: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + ~_type: [@bs.string] [ | `submit | `button]=?, + unit + ) => + React.element = + "Button"; diff --git a/drafts/bs-gestalt/src/Gestalt__Card.re b/drafts/bs-gestalt/src/Gestalt__Card.re new file mode 100644 index 0000000..f57c18a --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Card.re @@ -0,0 +1,12 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~active: bool=?, + ~children: React.element=?, + ~image: React.element=?, + ~onMouseEnter: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + ~onMouseLeave: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + unit + ) => + React.element = + "Card"; diff --git a/drafts/bs-gestalt/src/Gestalt__Column.re b/drafts/bs-gestalt/src/Gestalt__Column.re new file mode 100644 index 0000000..2aeb363 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Column.re @@ -0,0 +1,12 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~span: int, + ~smSpan: int=?, + ~mdSpan: int=?, + ~lgSpan: int=?, + ~children: React.element=?, + unit + ) => + React.element = + "Column"; diff --git a/drafts/bs-gestalt/src/Gestalt__Container.re b/drafts/bs-gestalt/src/Gestalt__Container.re new file mode 100644 index 0000000..6a7e78a --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Container.re @@ -0,0 +1,3 @@ +[@bs.module "gestalt"] [@react.component] +external make: (~children: React.element=?, unit) => React.element = + "Container"; diff --git a/drafts/bs-gestalt/src/Gestalt__Event.re b/drafts/bs-gestalt/src/Gestalt__Event.re new file mode 100644 index 0000000..d64cb23 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Event.re @@ -0,0 +1,10 @@ +[@bs.deriving abstract] +type t('a) = { + event: 'a, + [@bs.optional] + value: string, + [@bs.optional] + activeTabIndex: int, + [@bs.optional] + activeIndex: int, +}; diff --git a/drafts/bs-gestalt/src/Gestalt__Flyout.re b/drafts/bs-gestalt/src/Gestalt__Flyout.re new file mode 100644 index 0000000..60b841d --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Flyout.re @@ -0,0 +1,15 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~anchor: Js.Nullable.t(Dom.element), + ~onDismiss: unit => unit, + ~children: React.element=?, + ~color: [@bs.string] [ | `blue | `orange | `white | `darkGray]=?, + ~idealDirection: [@bs.string] [ | `up | `right | `down | `left]=?, + ~positionRelativeToAnchor: bool=?, + ~shouldFocus: bool=?, + ~size: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + unit + ) => + React.element = + "Flyout"; diff --git a/drafts/bs-gestalt/src/Gestalt__Heading.re b/drafts/bs-gestalt/src/Gestalt__Heading.re new file mode 100644 index 0000000..742381a --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Heading.re @@ -0,0 +1,40 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~accessibilityLevel: int=?, + ~children: React.element=?, + ~color: [@bs.string] [ + | `blue + | `darkGray + | `darkWash + | `eggplant + | `gray + | `green + | `lightGray + | `lightWash + | `maroon + | `midnight + | `navy + | `olive + | `orange + | `orchid + | `pine + | `purple + | `red + | `transparent + | `transparentDarkGray + | `watermelon + | `white + ] + =?, + ~id: string=?, + ~overflow: [@bs.string] [ | `normal | `breakWord]=?, + ~size: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~smSize: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~mdSize: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~lgSize: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~truncate: bool=?, + unit + ) => + React.element = + "Heading"; diff --git a/drafts/bs-gestalt/src/Gestalt__Icon.re b/drafts/bs-gestalt/src/Gestalt__Icon.re new file mode 100644 index 0000000..665e71f --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Icon.re @@ -0,0 +1,166 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~accessibilityLabel: string, + ~icon: [@bs.string] [ + | `add + | [@bs.as "add-circle"] `addCircle + | [@bs.as "add-pin"] `addPin + | `alert + | [@bs.as "align-bottom-center"] `alignBottomCenter + | [@bs.as "align-bottom-left"] `alignBottomLeft + | [@bs.as "align-bottom-right"] `alignBottomRight + | [@bs.as "align-bottom"] `alignBottom + | [@bs.as "align-middle"] `alignMiddle + | [@bs.as "align-top-center"] `alignTopCenter + | [@bs.as "align-top-left"] `alignTopLeft + | [@bs.as "align-top-right"] `alignTopRight + | [@bs.as "align-top"] `alignTop + | [@bs.as "angled-pin"] `angledPin + | `apps + | [@bs.as "arrow-back"] `arrowBack + | [@bs.as "arrow-circle-down"] `arrowCircleDown + | [@bs.as "arrow-circle-forward"] `arrowCircleForward + | [@bs.as "arrow-circle-up"] `arrowCircleUp + | [@bs.as "arrow-down"] `arrowDown + | [@bs.as "arrow-forward"] `arrowForward + | [@bs.as "arrow-up"] `arrowUp + | [@bs.as "arrop-right"] `arrowUpRight + | `bell + | `camera + | [@bs.as "camera-roll"] `cameraRoll + | `cancel + | [@bs.as "canonical-pin"] `canonicalPin + | [@bs.as "color-picker"] `colorPicker + | `check + | [@bs.as "check-circle"] `checkCircle + | [@bs.as "circle-outline"] `circleOutline + | `clear + | `clock + | `cog + | `compass + | `compose + | `crop + | `dash + | `download + | `edit + | `ellipsis + | [@bs.as "ellipsis-circle-outline"] `ellipsisCircleOutline + | `envelope + | `eye + | `facebook + | [@bs.as "face-happy"] `faceHappy + | [@bs.as "face-sad"] `faceSad + | [@bs.as "face-smiley"] `faceSmiley + | [@bs.as "fill-opaque"] `fillOpaque + | [@bs.as "fill-transparent"] `fillTransparent + | `filter + | `flag + | `flashlight + | [@bs.as "flip-horizontal"] `flipHorizontal + | [@bs.as "flip-vertical"] `flipVertical + | `gif + | `globe + | [@bs.as "globe-checked"] `globeChecked + | `gmail + | [@bs.as "google-plus"] `googlePlus + | [@bs.as "graph-bar"] `graphBar + | `handle + | [@bs.as "hand-pointing"] `handPointing + | `heart + | [@bs.as "heart-broken"] `heartBroken + | `impressum + | `knoop + | `lightbulb + | `link + | `location + | `lock + | [@bs.as "logo-large"] `logoLarge + | [@bs.as "logo-small"] `logoSmall + | `logout + | [@bs.as "margins-large"] `marginsLarge + | [@bs.as "margins-medium"] `marginsMedium + | [@bs.as "margins-small"] `marginsSmall + | `maximize + | `megaphone + | `menu + | `minimize + | `move + | `mute + | [@bs.as "overlay-text"] `overlayText + | `pause + | `people + | `person + | [@bs.as "person-add"] `personAdd + | `pin + | [@bs.as "pin-hide"] `pinHide + | `pinterest + | `play + | [@bs.as "question-mark"] `questionMark + | `remove + | [@bs.as "reorder-images"] `reorderImages + | `report + | `rotate + | `search + | `security + | [@bs.as "shopping-bag"] `shoppingBag + | `smiley + | [@bs.as "smiley-outline"] `smileyOutline + | `send + | `share + | `sound + | `speech + | [@bs.as "speech-ellipsis"] `speechEllipsis + | `star + | [@bs.as "switch-account"] `switchAccount + | `tag + | `terms + | [@bs.as "text-align-left"] `textAlignLeft + | [@bs.as "text-align-center"] `textAlignCenter + | [@bs.as "text-align-right"] `textAlignRight + | [@bs.as "text-all-caps"] `textAllCaps + | [@bs.as "text-extra-small"] `textExtraSmall + | [@bs.as "text-large"] `textLarge + | [@bs.as "text-line-height"] `textLineHeight + | [@bs.as "text-medium"] `textMedium + | [@bs.as "text-sentence-case"] `textSentenceCase + | [@bs.as "text-size"] `textSize + | [@bs.as "text-small"] `textSmall + | [@bs.as "text-spacing"] `textSpacing + | [@bs.as "trash-can"] `trashCan + | `twitter + | [@bs.as "video-camera"] `videoCamera + | [@bs.as "view-type-default"] `viewTypeDefault + | [@bs.as "view-type-dense"] `viewTypeDense + | [@bs.as "view-type-list"] `viewTypeList + ], + ~color: [@bs.string] [ + | `blue + | `darkGray + | `darkWash + | `eggplant + | `gray + | `green + | `lightGray + | `lightWash + | `maroon + | `midnight + | `navy + | `olive + | `orange + | `orchid + | `pine + | `purple + | `red + | `transparent + | `transparentDarkGray + | `watermelon + | `white + ] + =?, + ~inline: bool=?, + ~size: string=?, + unit + ) => + React.element = + "Icon"; diff --git a/drafts/bs-gestalt/src/Gestalt__IconButton.re b/drafts/bs-gestalt/src/Gestalt__IconButton.re new file mode 100644 index 0000000..4b08458 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__IconButton.re @@ -0,0 +1,153 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~accessibilityExpanded: bool=?, + ~icon: [@bs.string] [ + | `add + | [@bs.as "add-circle"] `addCircle + | [@bs.as "add-pin"] `addPin + | `alert + | [@bs.as "align-bottom-center"] `alignBottomCenter + | [@bs.as "align-bottom-left"] `alignBottomLeft + | [@bs.as "align-bottom-right"] `alignBottomRight + | [@bs.as "align-bottom"] `alignBottom + | [@bs.as "align-middle"] `alignMiddle + | [@bs.as "align-top-center"] `alignTopCenter + | [@bs.as "align-top-left"] `alignTopLeft + | [@bs.as "align-top-right"] `alignTopRight + | [@bs.as "align-top"] `alignTop + | [@bs.as "angled-pin"] `angledPin + | `apps + | [@bs.as "arrow-back"] `arrowBack + | [@bs.as "arrow-circle-down"] `arrowCircleDown + | [@bs.as "arrow-circle-forward"] `arrowCircleForward + | [@bs.as "arrow-circle-up"] `arrowCircleUp + | [@bs.as "arrow-down"] `arrowDown + | [@bs.as "arrow-forward"] `arrowForward + | [@bs.as "arrow-up"] `arrowUp + | [@bs.as "arrop-right"] `arrowUpRight + | `bell + | `camera + | [@bs.as "camera-roll"] `cameraRoll + | `cancel + | [@bs.as "canonical-pin"] `canonicalPin + | [@bs.as "color-picker"] `colorPicker + | `check + | [@bs.as "check-circle"] `checkCircle + | [@bs.as "circle-outline"] `circleOutline + | `clear + | `clock + | `cog + | `compass + | `compose + | `crop + | `dash + | `download + | `edit + | `ellipsis + | [@bs.as "ellipsis-circle-outline"] `ellipsisCircleOutline + | `envelope + | `eye + | `facebook + | [@bs.as "face-happy"] `faceHappy + | [@bs.as "face-sad"] `faceSad + | [@bs.as "face-smiley"] `faceSmiley + | [@bs.as "fill-opaque"] `fillOpaque + | [@bs.as "fill-transparent"] `fillTransparent + | `filter + | `flag + | `flashlight + | [@bs.as "flip-horizontal"] `flipHorizontal + | [@bs.as "flip-vertical"] `flipVertical + | `gif + | `globe + | [@bs.as "globe-checked"] `globeChecked + | `gmail + | [@bs.as "google-plus"] `googlePlus + | [@bs.as "graph-bar"] `graphBar + | `handle + | [@bs.as "hand-pointing"] `handPointing + | `heart + | [@bs.as "heart-broken"] `heartBroken + | `impressum + | `knoop + | `lightbulb + | `link + | `location + | `lock + | [@bs.as "logo-large"] `logoLarge + | [@bs.as "logo-small"] `logoSmall + | `logout + | [@bs.as "margins-large"] `marginsLarge + | [@bs.as "margins-medium"] `marginsMedium + | [@bs.as "margins-small"] `marginsSmall + | `maximize + | `megaphone + | `menu + | `minimize + | `move + | `mute + | [@bs.as "overlay-text"] `overlayText + | `pause + | `people + | `person + | [@bs.as "person-add"] `personAdd + | `pin + | [@bs.as "pin-hide"] `pinHide + | `pinterest + | `play + | [@bs.as "question-mark"] `questionMark + | `remove + | [@bs.as "reorder-images"] `reorderImages + | `report + | `rotate + | `search + | `security + | [@bs.as "shopping-bag"] `shoppingBag + | `smiley + | [@bs.as "smiley-outline"] `smileyOutline + | `send + | `share + | `sound + | `speech + | [@bs.as "speech-ellipsis"] `speechEllipsis + | `star + | [@bs.as "switch-account"] `switchAccount + | `tag + | `terms + | [@bs.as "text-align-left"] `textAlignLeft + | [@bs.as "text-align-center"] `textAlignCenter + | [@bs.as "text-align-right"] `textAlignRight + | [@bs.as "text-all-caps"] `textAllCaps + | [@bs.as "text-extra-small"] `textExtraSmall + | [@bs.as "text-large"] `textLarge + | [@bs.as "text-line-height"] `textLineHeight + | [@bs.as "text-medium"] `textMedium + | [@bs.as "text-sentence-case"] `textSentenceCase + | [@bs.as "text-size"] `textSize + | [@bs.as "text-small"] `textSmall + | [@bs.as "text-spacing"] `textSpacing + | [@bs.as "trash-can"] `trashCan + | `twitter + | [@bs.as "video-camera"] `videoCamera + | [@bs.as "view-type-default"] `viewTypeDefault + | [@bs.as "view-type-dense"] `viewTypeDense + | [@bs.as "view-type-list"] `viewTypeList + ], + ~accessibilityHaspopup: bool=?, + ~accessibilityLabel: string, + ~bgColor: [@bs.string] [ + | `transparent + | `transparentDarkGray + | `gray + | `lightGray + | `white + ] + =?, + ~iconColor: [@bs.string] [ | `blue | `darkGray | `gray | `red | `white]=?, + ~onClick: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + ~size: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + unit + ) => + React.element = + "IconButton"; diff --git a/drafts/bs-gestalt/src/Gestalt__Image.re b/drafts/bs-gestalt/src/Gestalt__Image.re new file mode 100644 index 0000000..303486d --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Image.re @@ -0,0 +1,18 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~alt: string, + ~color: string, + ~naturalHeight: int, + ~naturalWidth: int, + ~src: string, + ~children: React.element=?, + ~fit: [@bs.string] [ | `cover | `contain | `none]=?, + ~onError: unit => unit=?, + ~onLoad: unit => unit=?, + ~sizes: string=?, + ~srcSet: string=?, + unit + ) => + React.element = + "Image"; diff --git a/drafts/bs-gestalt/src/Gestalt__Label.re b/drafts/bs-gestalt/src/Gestalt__Label.re new file mode 100644 index 0000000..c0e895c --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Label.re @@ -0,0 +1,4 @@ +[@bs.module "gestalt"] [@react.component] +external make: + (~htmlFor: string, ~children: React.element=?, unit) => React.element = + "Label"; diff --git a/drafts/bs-gestalt/src/Gestalt__Letterbox.re b/drafts/bs-gestalt/src/Gestalt__Letterbox.re new file mode 100644 index 0000000..315d736 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Letterbox.re @@ -0,0 +1,11 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~contentAspectRatio: int, + ~height: int, + ~width: int, + ~children: React.element=?, + unit + ) => + React.element = + "Letterbox"; diff --git a/drafts/bs-gestalt/src/Gestalt__Link.re b/drafts/bs-gestalt/src/Gestalt__Link.re new file mode 100644 index 0000000..60fcafb --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Link.re @@ -0,0 +1,12 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~href: string, + ~children: React.element=?, + ~inline: bool=?, + ~onClick: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + ~target: [@bs.string] [ | `null | `self | `blank]=?, + unit + ) => + React.element = + "Link"; diff --git a/drafts/bs-gestalt/src/Gestalt__Mask.re b/drafts/bs-gestalt/src/Gestalt__Mask.re new file mode 100644 index 0000000..6154faa --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Mask.re @@ -0,0 +1,13 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~children: React.element=?, + ~height: string=?, + ~shape: [@bs.string] [ | `circle | `rounded | `square]=?, + ~wash: bool=?, + ~width: string=?, + ~willChangeTransform: bool=?, + unit + ) => + React.element = + "Mask"; diff --git a/drafts/bs-gestalt/src/Gestalt__Modal.re b/drafts/bs-gestalt/src/Gestalt__Modal.re new file mode 100644 index 0000000..5fa22f7 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Modal.re @@ -0,0 +1,15 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~accessibilityCloseLabel: string, + ~accessibilityModalLabel: string, + ~heading: React.element, + ~onDismiss: unit => unit, + ~children: React.element=?, + ~footer: React.element=?, + ~role: [@bs.string] [ | `alertdialog | `dialog]=?, + ~size: [@bs.string] [ | `sm | `md | `lg]=?, + unit + ) => + React.element = + "Modal"; diff --git a/drafts/bs-gestalt/src/Gestalt__SegmentedControl.re b/drafts/bs-gestalt/src/Gestalt__SegmentedControl.re new file mode 100644 index 0000000..46b535d --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__SegmentedControl.re @@ -0,0 +1,12 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~items: array(React.element), + ~onChange: Gestalt__Event.t(ReactEvent.Mouse.t) => unit, + ~selectedItemIndex: int, + ~responsive: bool=?, + ~size: [@bs.string] [ | `md | `lg]=?, + unit + ) => + React.element = + "SegmentedControl"; diff --git a/drafts/bs-gestalt/src/Gestalt__Spinner.re b/drafts/bs-gestalt/src/Gestalt__Spinner.re new file mode 100644 index 0000000..9d71ed1 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Spinner.re @@ -0,0 +1,4 @@ +[@bs.module "gestalt"] [@react.component] +external make: + (~accessibilityLabel: string, ~show: bool, unit) => React.element = + "Spinner"; diff --git a/drafts/bs-gestalt/src/Gestalt__Style.re b/drafts/bs-gestalt/src/Gestalt__Style.re new file mode 100644 index 0000000..a6161e9 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Style.re @@ -0,0 +1,2 @@ +[@bs.deriving abstract] +type inlineStyle = {__style: ReactDOMRe.Style.t}; diff --git a/drafts/bs-gestalt/src/Gestalt__Tabs.re b/drafts/bs-gestalt/src/Gestalt__Tabs.re new file mode 100644 index 0000000..b4649c5 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Tabs.re @@ -0,0 +1,17 @@ +[@bs.deriving abstract] +type t = { + text: React.element, + href: string, +}; + +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~activeTabIndex: int, + ~onChange: Gestalt__Event.t(ReactEvent.Mouse.t) => unit, + ~tabs: array(t), + ~wrap: bool=?, + unit + ) => + React.element = + "Tabs"; diff --git a/drafts/bs-gestalt/src/Gestalt__Text.re b/drafts/bs-gestalt/src/Gestalt__Text.re new file mode 100644 index 0000000..bbe3d3c --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Text.re @@ -0,0 +1,42 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~align: [@bs.string] [ | `left | `right | `center | `justify]=?, + ~bold: bool=?, + ~children: React.element, + ~color: [@bs.string] [ + | `blue + | `darkGray + | `darkWash + | `eggplant + | `gray + | `green + | `lightGray + | `lightWash + | `maroon + | `midnight + | `navy + | `olive + | `orange + | `orchid + | `pine + | `purple + | `red + | `transparent + | `transparentDarkGray + | `watermelon + | `white + ] + =?, + ~inline: bool=?, + ~italic: bool=?, + ~leading: [@bs.string] [ | `short | `tall]=?, + ~overflow: [@bs.string] [ | `normal | `breakWord]=?, + ~size: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~smSize: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~mdSize: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~lgSize: [@bs.string] [ | `xs | `sm | `md | `lg | `xl]=?, + ~truncate: bool=? + ) => + React.element = + "Text"; diff --git a/drafts/bs-gestalt/src/Gestalt__TextField.re b/drafts/bs-gestalt/src/Gestalt__TextField.re new file mode 100644 index 0000000..df432dd --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__TextField.re @@ -0,0 +1,34 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~autoComplete: [@bs.string] [ + | [@bs.as "current-password"] `currentPassword + | [@bs.as "new-password"] `newPassword + | `on + | `off + | `username + ] + =?, + ~disabled: bool=?, + ~errorMessage: string=?, + ~id: string, + ~name: string=?, + ~onBlur: Gestalt__Event.t(ReactEvent.Focus.t) => unit=?, + ~onChange: Gestalt__Event.t(ReactEvent.Form.t) => unit, + ~onFocus: Gestalt__Event.t(ReactEvent.Focus.t) => unit=?, + ~onKeyDown: Gestalt__Event.t(ReactEvent.Keyboard.t) => unit=?, + ~placeholder: string=?, + ~_type: [@bs.string] [ + | `date + | `email + | `number + | `password + | `text + | `url + ] + =?, + ~value: string=?, + unit + ) => + React.element = + "TextField"; diff --git a/drafts/bs-gestalt/src/Gestalt__Tooltip.re b/drafts/bs-gestalt/src/Gestalt__Tooltip.re new file mode 100644 index 0000000..71383c4 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Tooltip.re @@ -0,0 +1,5 @@ +[@bs.module "gestalt"] [@react.component] +external make: + (~children: React.element, ~text: string, ~inline: bool=?, unit) => + React.element = + "Tooltip"; diff --git a/drafts/bs-gestalt/src/Gestalt__Touchable.re b/drafts/bs-gestalt/src/Gestalt__Touchable.re new file mode 100644 index 0000000..36ac8f5 --- /dev/null +++ b/drafts/bs-gestalt/src/Gestalt__Touchable.re @@ -0,0 +1,35 @@ +[@bs.module "gestalt"] [@react.component] +external make: + ( + ~onTouch: Gestalt__Event.t(ReactEvent.Mouse.t) => unit, + ~children: React.element=?, + ~fullHeight: bool=?, + ~fullWidth: bool=?, + ~mouseCursor: [@bs.string] [ + | `copy + | `grab + | `grabbing + | `move + | `noDrop + | `pointer + | `zoomIn + | `zoomOut + ] + =?, + ~onMouseEnter: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + ~onMouseLeave: Gestalt__Event.t(ReactEvent.Mouse.t) => unit=?, + ~shape: [@bs.string] [ + | `square + | `rounded + | `pill + | `circle + | `roundedTop + | `roundedBottom + | `roundedLeft + | `roundedRight + ] + =?, + unit + ) => + React.element = + "Touchable"; diff --git a/drafts/bs-glamor/.editorconfig b/drafts/bs-glamor/.editorconfig new file mode 100644 index 0000000..78c6dde --- /dev/null +++ b/drafts/bs-glamor/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 diff --git a/drafts/bs-glamor/.gitignore b/drafts/bs-glamor/.gitignore new file mode 100644 index 0000000..4717609 --- /dev/null +++ b/drafts/bs-glamor/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +.idea/ +.vscode/ +/node_modules* +/lib/ +npm-debug.log +finalOutput/*.js +.merlin diff --git a/drafts/bs-glamor/.npmignore b/drafts/bs-glamor/.npmignore new file mode 100644 index 0000000..6e1f873 --- /dev/null +++ b/drafts/bs-glamor/.npmignore @@ -0,0 +1,2 @@ +.merlin +/lib/bs diff --git a/drafts/bs-glamor/README.md b/drafts/bs-glamor/README.md new file mode 100644 index 0000000..cade5f4 --- /dev/null +++ b/drafts/bs-glamor/README.md @@ -0,0 +1,138 @@ +# bs-glamor – [BuckleScript](https://github.com/bucklescript/bucklescript) bindings for [glamor](https://github.com/threepointone/glamor) + +The API is still **experimental**. Only a few functions from glamor such as `css` and `global` are exposed; other functions such as `renderStatic` are not supported yet. + +## Installation + +```sh +npm install --save bs-glamor +``` + +In your `bsconfig.json`, include `"bs-glamor"` in the `bs-dependencies`. + +## Usage + +The following examples (in [Reason](http://reasonml.github.io) syntax) assume that `Glamor` is included in the namespace: + +```reason +open Glamor; +``` + +* Simple styling: + + ```reason + css([ + color("red"), + border("1px solid black") + ]) + ``` + +* Styling with selectors (`@media`, `:hover`, `&`, etc.): + + ```reason + css([ + color("red"), + Selector("@media (min-width: 300px)", [ + color("green") + ]) + ]) + ``` + +* Selectors can be nested: + + ```reason + css([ + color("red"), + Selector("@media (min-width: 300px)", [ + color("green"), + Selector("& .foo", [ + color("blue") + ]) + ]) + ]) + ``` + +You can isolate inclusion of the `Glamor` namespace in the following way: + +```reason +Glamor.(css([color("red")])) +``` + +The result of the `css` function can be assigned to a class name, e.g. in JSX: + +```reason +
+``` + +You can also combine stylings with a class names. For example, if you want to use +some classes from third-party libraries (e.g. Bootstrap), or just to add a class name +for testing purposes along with glamor styles: + +```reason +
+``` + +### Merging CSS rules + +You can merge CSS rules using `merge`: + +```reason +let text_primary = css([color("indigo")]); +let small = css([fontSize("10px")]); + +

+``` + +glamor will make sure that rules are merged in the correct order, managing nesting and precedence for you. + +### Global CSS + + You can define global CSS rules with `global`: + + ```reason + Glamor.(global("body", [margin("0px")])); + Glamor.(global("h1, h2, h3", [color("palegoldenrod")])); + ``` + +### Keyframes + +Define animation keyframes: + +```reason +let bounce = Glamor.keyframes([ + ("0%", [transform("scale(0.1)"), opacity("0")]), + ("60%", [transform("scale(1.2)"), opacity("1")]), + ("100%", [transform("scale(1)")]) +]); +let styles = css([ + animationName(bounce), + animationDuration("2s"), + width("50px"), + height("50px"), + backgroundColor("red") +]); + +

bounce!
+``` + +## Example + +See [reason-react-tictactoe](https://github.com/poeschko/reason-react-tictactoe) for a live example. + +## Development + +```sh +npm run start +``` + +### Tests + +There are some simplistic tests using [bs-jest](https://github.com/BuckleTypes/bs-jest). + +```sh +npm run test +``` + +## Thanks + +Thanks to [reason-react-example](https://github.com/chenglou/reason-react-example), [reason-react](https://github.com/reasonml/reason-react), and [bs-jest](https://github.com/BuckleTypes/bs-jest) for inspiration how to create a Reason library, and of course, thanks to [glamor](https://github.com/threepointone/glamor). diff --git a/drafts/bs-glamor/bsconfig.json b/drafts/bs-glamor/bsconfig.json new file mode 100644 index 0000000..31af96c --- /dev/null +++ b/drafts/bs-glamor/bsconfig.json @@ -0,0 +1,18 @@ +{ + "name": "bs-glamor", + "refmt": 3, + "bs-dev-dependencies": [ + "bs-jest" + ], + "sources": [ + { + "dir": "src", + "subdirs": [ + { + "dir": "__tests__", + "type": "dev" + } + ] + } + ] +} diff --git a/drafts/bs-glamor/package-lock.json b/drafts/bs-glamor/package-lock.json new file mode 100644 index 0000000..7128f66 --- /dev/null +++ b/drafts/bs-glamor/package-lock.json @@ -0,0 +1,3051 @@ +{ + "name": "bs-glamor", + "version": "0.2.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abab": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", + "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", + "dev": true + }, + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", + "dev": true, + "requires": { + "acorn": "4.0.13" + } + }, + "ajv": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.2.3.tgz", + "integrity": "sha1-wG9Zh3jETGsWGrr+NGa4GtGBTtI=", + "dev": true, + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "json-schema-traverse": "0.3.1", + "json-stable-stringify": "1.0.1" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "ansi-escapes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", + "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true, + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "append-transform": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "dev": true, + "requires": { + "default-require-extensions": "1.0.0" + } + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true, + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=", + "dev": true + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", + "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", + "dev": true, + "requires": { + "lodash": "4.17.4" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-generator": "6.26.0", + "babel-helpers": "6.24.1", + "babel-messages": "6.23.0", + "babel-register": "6.26.0", + "babel-runtime": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "convert-source-map": "1.5.0", + "debug": "2.6.9", + "json5": "0.5.1", + "lodash": "4.17.4", + "minimatch": "3.0.4", + "path-is-absolute": "1.0.1", + "private": "0.1.8", + "slash": "1.0.0", + "source-map": "0.5.7" + } + }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true, + "requires": { + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "detect-indent": "4.0.0", + "jsesc": "1.3.0", + "lodash": "4.17.4", + "source-map": "0.5.7", + "trim-right": "1.0.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-template": "6.26.0" + } + }, + "babel-jest": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-19.0.0.tgz", + "integrity": "sha1-WTI87ZmjqE01naIZyogQdP/Gzj8=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-plugin-istanbul": "4.1.5", + "babel-preset-jest": "19.0.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-plugin-istanbul": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz", + "integrity": "sha1-Z2DN2Xf0EdPhdbsGTyvDJ9mbK24=", + "dev": true, + "requires": { + "find-up": "2.1.0", + "istanbul-lib-instrument": "1.8.0", + "test-exclude": "4.1.1" + } + }, + "babel-plugin-jest-hoist": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz", + "integrity": "sha1-SuKgTqYSpuc2UfP95SwXiZEwS+o=", + "dev": true + }, + "babel-preset-jest": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-19.0.0.tgz", + "integrity": "sha1-ItZyAdAjJKGVgRKI6zgpS7PKw5Y=", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "19.0.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-runtime": "6.26.0", + "core-js": "2.5.1", + "home-or-tmp": "2.0.0", + "lodash": "4.17.4", + "mkdirp": "0.5.1", + "source-map-support": "0.4.18" + }, + "dependencies": { + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + } + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, + "requires": { + "core-js": "2.5.1", + "regenerator-runtime": "0.11.0" + }, + "dependencies": { + "core-js": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", + "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=", + "dev": true + } + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "lodash": "4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true, + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.2", + "lodash": "4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true, + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.4", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + }, + "bowser": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-1.8.0.tgz", + "integrity": "sha512-ARpB9VfvItCA47oBk9tVA/L93fU83Q2YwE1yTjhCyr1tu6Zw74mDHdpXNWutl5/tFGYhgCOfBH83WJY4RBGA3A==" + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true, + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browser-resolve": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", + "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", + "dev": true, + "requires": { + "resolve": "1.1.7" + }, + "dependencies": { + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + } + } + }, + "bs-jest": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bs-jest/-/bs-jest-0.1.0.tgz", + "integrity": "sha1-M8OoHUmA7I3el7XIOYxTiN8muFk=", + "dev": true, + "requires": { + "jest": "19.0.2" + } + }, + "bs-platform": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bs-platform/-/bs-platform-3.0.0.tgz", + "integrity": "sha1-OPIAcw21L96jeBk3a2rD37ICRMA=", + "dev": true + }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true, + "optional": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "ci-info": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.1.tgz", + "integrity": "sha512-vHDDF/bP9RYpTWtUhpJRhCFdvvp3iDWvEbuDbWgvjUrNGV1MXJrE0MPcwGtEled04m61iwdBLUIHZtDgzWS4ZQ==", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "optional": true, + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true, + "optional": true + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-convert": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", + "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", + "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "content-type-parser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-type-parser/-/content-type-parser-1.0.1.tgz", + "integrity": "sha1-w+VpiMU8ZRJ/tG1AMqOpACRv3JQ=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz", + "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=", + "dev": true + }, + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "dev": true, + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + } + } + }, + "css-in-js-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-2.0.0.tgz", + "integrity": "sha512-yuWmPMD9FLi50Xf3k8W8oO3WM1eVnxEGCldCLyfusQ+CgivFk0s23yst4ooW6tfxMuSa03S6uUEga9UhX6GRrA==", + "requires": { + "hyphenate-style-name": "1.0.2" + } + }, + "cssom": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.2.tgz", + "integrity": "sha1-uANhcMefB6kP8vFuIihAJ6JDhIs=", + "dev": true + }, + "cssstyle": { + "version": "0.2.37", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", + "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "dev": true, + "requires": { + "cssom": "0.3.2" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "dev": true, + "requires": { + "strip-bom": "2.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true, + "requires": { + "repeating": "2.0.1" + } + }, + "diff": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz", + "integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "0.4.19" + } + }, + "errno": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz", + "integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=", + "dev": true, + "requires": { + "prr": "0.0.0" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true, + "requires": { + "is-arrayish": "0.2.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz", + "integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==", + "dev": true, + "requires": { + "esprima": "3.1.3", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "optionator": "0.8.2", + "source-map": "0.5.7" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "exec-sh": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.1.tgz", + "integrity": "sha512-aLt95pexaugVtQerpmE51+4QfWrNc304uez7jvj6fWnN8GeEHpttB8F36n8N7uVhUMbH/1enbxQ9HImZ4w/9qg==", + "dev": true, + "requires": { + "merge": "1.2.0" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true, + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true, + "requires": { + "fill-range": "2.2.3" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", + "dev": true + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "dev": true, + "requires": { + "bser": "2.0.0" + } + }, + "fbjs": { + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", + "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", + "requires": { + "core-js": "1.2.7", + "isomorphic-fetch": "2.2.1", + "loose-envify": "1.3.1", + "object-assign": "4.1.1", + "promise": "7.3.1", + "setimmediate": "1.0.5", + "ua-parser-js": "0.7.17" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "dev": true, + "requires": { + "glob": "7.1.2", + "minimatch": "3.0.4" + } + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true, + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "dev": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "1.0.0" + } + }, + "glamor": { + "version": "2.20.40", + "resolved": "https://registry.npmjs.org/glamor/-/glamor-2.20.40.tgz", + "integrity": "sha512-DNXCd+c14N9QF8aAKrfl4xakPk5FdcFwmH7sD0qnC0Pr7xoZ5W9yovhUrY/dJc3psfGGXC58vqQyRtuskyUJxA==", + "requires": { + "fbjs": "0.8.16", + "inline-style-prefixer": "3.0.8", + "object-assign": "4.1.1", + "prop-types": "15.6.0", + "through": "2.3.8" + } + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true + }, + "handlebars": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", + "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "dev": true, + "requires": { + "async": "1.5.2", + "optimist": "0.6.1", + "source-map": "0.4.4", + "uglify-js": "2.8.29" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true, + "requires": { + "amdefine": "1.0.1" + } + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "dev": true, + "requires": { + "ajv": "5.2.3", + "har-schema": "2.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "dev": true, + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.0", + "sntp": "2.0.2" + } + }, + "hoek": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz", + "integrity": "sha1-eb96eF6klf5mFl5zQVPzY/9UN9o=", + "dev": true, + "requires": { + "whatwg-encoding": "1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "hyphenate-style-name": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz", + "integrity": "sha1-MRYKNpMK2vH8BMYHT360FGXU7Es=" + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "inline-style-prefixer": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-3.0.8.tgz", + "integrity": "sha1-hVG45bTVcyROZqNLBPfTIHaitTQ=", + "requires": { + "bowser": "1.8.0", + "css-in-js-utils": "2.0.0" + } + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true, + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "1.1.1" + } + }, + "is-ci": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.0.10.tgz", + "integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=", + "dev": true, + "requires": { + "ci-info": "1.1.1" + } + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true, + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "1.7.3", + "whatwg-fetch": "2.0.3" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-api": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.14.tgz", + "integrity": "sha1-JbxXAffGgMD//5E95G42GaOm5oA=", + "dev": true, + "requires": { + "async": "2.5.0", + "fileset": "2.0.3", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-hook": "1.0.7", + "istanbul-lib-instrument": "1.8.0", + "istanbul-lib-report": "1.1.1", + "istanbul-lib-source-maps": "1.2.1", + "istanbul-reports": "1.1.2", + "js-yaml": "3.10.0", + "mkdirp": "0.5.1", + "once": "1.4.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", + "integrity": "sha1-c7+5mIhSmUFck9OKPprfeEp3qdo=", + "dev": true + }, + "istanbul-lib-hook": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz", + "integrity": "sha1-3WYH8DB2V4/n1vKmMM8UO0m6zdw=", + "dev": true, + "requires": { + "append-transform": "0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz", + "integrity": "sha1-ZvbJQhzJ7EcE928tsIS6kHiitTI=", + "dev": true, + "requires": { + "babel-generator": "6.26.0", + "babel-template": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "istanbul-lib-coverage": "1.1.1", + "semver": "5.4.1" + } + }, + "istanbul-lib-report": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", + "integrity": "sha1-8OVfVmVf+jQiIIC3oM1HYOFAX8k=", + "dev": true, + "requires": { + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "path-parse": "1.0.5", + "supports-color": "3.2.3" + }, + "dependencies": { + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz", + "integrity": "sha1-pv4ay6jOCO68Y45XLilNJnAIqgw=", + "dev": true, + "requires": { + "debug": "2.6.9", + "istanbul-lib-coverage": "1.1.1", + "mkdirp": "0.5.1", + "rimraf": "2.6.2", + "source-map": "0.5.7" + } + }, + "istanbul-reports": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.2.tgz", + "integrity": "sha1-D7Lj9qqZIr085F0F2KtNXo4HvU8=", + "dev": true, + "requires": { + "handlebars": "4.0.11" + } + }, + "jest": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-19.0.2.tgz", + "integrity": "sha1-t5T6r4/0Yec4jyi+71WaVPILLBA=", + "dev": true, + "requires": { + "jest-cli": "19.0.2" + }, + "dependencies": { + "jest-cli": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-19.0.2.tgz", + "integrity": "sha1-zDYgtirKxfLZOlSMtu9pfU7IVEM=", + "dev": true, + "requires": { + "ansi-escapes": "1.4.0", + "callsites": "2.0.0", + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "is-ci": "1.0.10", + "istanbul-api": "1.1.14", + "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-instrument": "1.8.0", + "jest-changed-files": "19.0.2", + "jest-config": "19.0.4", + "jest-environment-jsdom": "19.0.2", + "jest-haste-map": "19.0.2", + "jest-jasmine2": "19.0.2", + "jest-message-util": "19.0.0", + "jest-regex-util": "19.0.0", + "jest-resolve-dependencies": "19.0.0", + "jest-runtime": "19.0.4", + "jest-snapshot": "19.0.2", + "jest-util": "19.0.2", + "micromatch": "2.3.11", + "node-notifier": "5.1.2", + "slash": "1.0.0", + "string-length": "1.0.1", + "throat": "3.2.0", + "which": "1.3.0", + "worker-farm": "1.5.0", + "yargs": "6.6.0" + } + } + } + }, + "jest-changed-files": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-19.0.2.tgz", + "integrity": "sha1-FsVMhMMnC+QI4G0uivPz43qIWCQ=", + "dev": true + }, + "jest-config": { + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-19.0.4.tgz", + "integrity": "sha1-QpgCEdRkF+kcp6v/0IbCcCNPc/0=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-environment-jsdom": "19.0.2", + "jest-environment-node": "19.0.2", + "jest-jasmine2": "19.0.2", + "jest-regex-util": "19.0.0", + "jest-resolve": "19.0.2", + "jest-validate": "19.0.2", + "pretty-format": "19.0.0" + } + }, + "jest-diff": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-19.0.0.tgz", + "integrity": "sha1-0VY8/FbItgIymI+8BdTRbtkPBjw=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "diff": "3.4.0", + "jest-matcher-utils": "19.0.0", + "pretty-format": "19.0.0" + } + }, + "jest-environment-jsdom": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-19.0.2.tgz", + "integrity": "sha1-ztqFnEpLlKs15N59q1S5JvKT5KM=", + "dev": true, + "requires": { + "jest-mock": "19.0.0", + "jest-util": "19.0.2", + "jsdom": "9.12.0" + } + }, + "jest-environment-node": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-19.0.2.tgz", + "integrity": "sha1-boQHnbh+0h0MBeH5Zp8gexFv6Zs=", + "dev": true, + "requires": { + "jest-mock": "19.0.0", + "jest-util": "19.0.2" + } + }, + "jest-file-exists": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-file-exists/-/jest-file-exists-19.0.0.tgz", + "integrity": "sha1-zKLlh6EeyS4kz+qz+KlNZX8/zrg=", + "dev": true + }, + "jest-haste-map": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-19.0.2.tgz", + "integrity": "sha1-KGSEw6Fuhtp4crCHfDXc4ww9bwc=", + "dev": true, + "requires": { + "fb-watchman": "2.0.0", + "graceful-fs": "4.1.11", + "micromatch": "2.3.11", + "sane": "1.5.0", + "worker-farm": "1.5.0" + } + }, + "jest-jasmine2": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-19.0.2.tgz", + "integrity": "sha1-FnmRrIJZgfsagArxJug6/MqDLHM=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "jest-matcher-utils": "19.0.0", + "jest-matchers": "19.0.0", + "jest-message-util": "19.0.0", + "jest-snapshot": "19.0.2" + } + }, + "jest-matcher-utils": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz", + "integrity": "sha1-Xs2bY1ZdKwAfYfv37Ex/U3lkVk0=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "pretty-format": "19.0.0" + } + }, + "jest-matchers": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-matchers/-/jest-matchers-19.0.0.tgz", + "integrity": "sha1-x07Mbr/sBvOEdnuk1vpKQtZ1V1Q=", + "dev": true, + "requires": { + "jest-diff": "19.0.0", + "jest-matcher-utils": "19.0.0", + "jest-message-util": "19.0.0", + "jest-regex-util": "19.0.0" + } + }, + "jest-message-util": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-19.0.0.tgz", + "integrity": "sha1-cheWuJwOTXYWBvm6jLgoo7YkZBY=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "micromatch": "2.3.11" + } + }, + "jest-mock": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-19.0.0.tgz", + "integrity": "sha1-ZwOGQelgerLOCOxKjLg6q7yJnQE=", + "dev": true + }, + "jest-regex-util": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-19.0.0.tgz", + "integrity": "sha1-t3VFhxEq7eFFZRC7H2r+dO9ZhpE=", + "dev": true + }, + "jest-resolve": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-19.0.2.tgz", + "integrity": "sha1-V5NXXeTweuwy99f/DGwYGWPu+zw=", + "dev": true, + "requires": { + "browser-resolve": "1.11.2", + "jest-haste-map": "19.0.2", + "resolve": "1.4.0" + } + }, + "jest-resolve-dependencies": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-19.0.0.tgz", + "integrity": "sha1-p0GtH6CUFA5k7PJkKlBPg07OIu4=", + "dev": true, + "requires": { + "jest-file-exists": "19.0.0" + } + }, + "jest-runtime": { + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-19.0.4.tgz", + "integrity": "sha1-8WfZ8TR3UvICc2EGeSZIU0n8wkU=", + "dev": true, + "requires": { + "babel-core": "6.26.0", + "babel-jest": "19.0.0", + "babel-plugin-istanbul": "4.1.5", + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "jest-config": "19.0.4", + "jest-file-exists": "19.0.0", + "jest-haste-map": "19.0.2", + "jest-regex-util": "19.0.0", + "jest-resolve": "19.0.2", + "jest-util": "19.0.2", + "json-stable-stringify": "1.0.1", + "micromatch": "2.3.11", + "strip-bom": "3.0.0", + "yargs": "6.6.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "jest-snapshot": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-19.0.2.tgz", + "integrity": "sha1-nBshYhT3GHw4v9XHCx76sWsP9Qs=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-diff": "19.0.0", + "jest-file-exists": "19.0.0", + "jest-matcher-utils": "19.0.0", + "jest-util": "19.0.2", + "natural-compare": "1.4.0", + "pretty-format": "19.0.0" + } + }, + "jest-util": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-19.0.2.tgz", + "integrity": "sha1-4KAjKiq55rK1Nmi9s1NMK1l37UE=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "graceful-fs": "4.1.11", + "jest-file-exists": "19.0.0", + "jest-message-util": "19.0.0", + "jest-mock": "19.0.0", + "jest-validate": "19.0.2", + "leven": "2.1.0", + "mkdirp": "0.5.1" + } + }, + "jest-validate": { + "version": "19.0.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-19.0.2.tgz", + "integrity": "sha1-3FNN9fEnjVtj3zKxQkHU2/ckTAw=", + "dev": true, + "requires": { + "chalk": "1.1.3", + "jest-matcher-utils": "19.0.0", + "leven": "2.1.0", + "pretty-format": "19.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true, + "requires": { + "argparse": "1.0.9", + "esprima": "4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true, + "optional": true + }, + "jsdom": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-9.12.0.tgz", + "integrity": "sha1-6MVG//ywbADUgzyoRBD+1/igl9Q=", + "dev": true, + "requires": { + "abab": "1.0.4", + "acorn": "4.0.13", + "acorn-globals": "3.1.0", + "array-equal": "1.0.0", + "content-type-parser": "1.0.1", + "cssom": "0.3.2", + "cssstyle": "0.2.37", + "escodegen": "1.9.0", + "html-encoding-sniffer": "1.0.1", + "nwmatcher": "1.4.3", + "parse5": "1.5.1", + "request": "2.83.0", + "sax": "1.2.4", + "symbol-tree": "3.2.2", + "tough-cookie": "2.3.3", + "webidl-conversions": "4.0.2", + "whatwg-encoding": "1.0.1", + "whatwg-url": "4.8.0", + "xml-name-validator": "2.0.1" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "dev": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dev": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true, + "optional": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "1.0.0" + } + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2", + "type-check": "0.3.2" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "2.0.0", + "path-exists": "3.0.0" + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.4" + } + }, + "merge": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", + "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true, + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=", + "dev": true + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "dev": true, + "requires": { + "mime-db": "1.30.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "dev": true, + "requires": { + "brace-expansion": "1.1.8" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "0.1.12", + "is-stream": "1.1.0" + } + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-notifier": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.1.2.tgz", + "integrity": "sha1-L6nhJgX6EACdRFSdb82KY93g5P8=", + "dev": true, + "requires": { + "growly": "1.3.0", + "semver": "5.4.1", + "shellwords": "0.1.1", + "which": "1.3.0" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwmatcher": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.3.tgz", + "integrity": "sha512-IKdSTiDWCarf2JTS5e9e2+5tPZGdkRJ79XjYV0pzK8Q9BpsFyBq1RGKxzs7Q8UBushGw7m6TzVKz6fcY99iSWw==", + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "0.0.8", + "wordwrap": "0.0.3" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "0.1.3", + "fast-levenshtein": "2.0.6", + "levn": "0.3.0", + "prelude-ls": "1.1.2", + "type-check": "0.3.2", + "wordwrap": "1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "1.1.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "1.3.1" + } + }, + "parse5": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", + "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "2.0.4" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "pretty-format": { + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-19.0.0.tgz", + "integrity": "sha1-VlMNMqy5ij+khRxOK503tCBoTIQ=", + "dev": true, + "requires": { + "ansi-styles": "3.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true, + "requires": { + "color-convert": "1.9.0" + } + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "2.0.6" + } + }, + "prop-types": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", + "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", + "requires": { + "fbjs": "0.8.16", + "loose-envify": "1.3.1", + "object-assign": "4.1.1" + } + }, + "prr": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", + "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=", + "dev": true, + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "1.1.5" + } + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "2.0.1" + } + } + } + }, + "regenerator-runtime": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true, + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "1.0.2" + } + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "dev": true, + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.1", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.17", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz", + "integrity": "sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==", + "dev": true, + "requires": { + "path-parse": "1.0.5" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "optional": true, + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, + "sane": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-1.5.0.tgz", + "integrity": "sha1-pK3q52TQSGIeyyfV+ez1ExAZOfM=", + "dev": true, + "requires": { + "anymatch": "1.3.2", + "exec-sh": "0.2.1", + "fb-watchman": "1.9.2", + "minimatch": "3.0.4", + "minimist": "1.2.0", + "walker": "1.0.7", + "watch": "0.10.0" + }, + "dependencies": { + "bser": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-1.0.2.tgz", + "integrity": "sha1-OBEWlwsqbe6lZG3RXdcnhES1YWk=", + "dev": true, + "requires": { + "node-int64": "0.4.0" + } + }, + "fb-watchman": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-1.9.2.tgz", + "integrity": "sha1-okz0eCf4LTj7Waaa1wt247auc4M=", + "dev": true, + "requires": { + "bser": "1.0.2" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "sntp": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.0.2.tgz", + "integrity": "sha1-UGQRDwr4X3z9t9a2ekACjOUrSys=", + "dev": true, + "requires": { + "hoek": "4.2.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true, + "requires": { + "source-map": "0.5.7" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true, + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "dev": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", + "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", + "dev": true, + "requires": { + "strip-ansi": "3.0.1" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "0.2.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "dev": true + }, + "test-exclude": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz", + "integrity": "sha1-TYSWSwlmsAh+zDNKLOAC09k0HiY=", + "dev": true, + "requires": { + "arrify": "1.0.1", + "micromatch": "2.3.11", + "object-assign": "4.1.1", + "read-pkg-up": "1.0.1", + "require-main-filename": "1.0.1" + } + }, + "throat": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-3.2.0.tgz", + "integrity": "sha512-/EY8VpvlqJ+sFtLPeOgc8Pl7kQVOWv0woD87KTXVHPIAE842FGT+rokxIhe8xIUP1cfgrkt0as0vDLjDiMtr8w==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "dev": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "1.1.2" + } + }, + "ua-parser-js": { + "version": "0.7.17", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", + "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==" + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "optional": true, + "requires": { + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + }, + "dependencies": { + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "optional": true, + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uuid": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true, + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.11" + } + }, + "watch": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.10.0.tgz", + "integrity": "sha1-d3mLLaD5kQ1ZXxrOWwwiWFIfIdw=", + "dev": true + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz", + "integrity": "sha1-PGxFGhmO567FWx7GHQkgxngBpfQ=", + "dev": true, + "requires": { + "iconv-lite": "0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.13", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz", + "integrity": "sha1-H4irpKsLFQjoMSrMOTRfNumS4vI=", + "dev": true + } + } + }, + "whatwg-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", + "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" + }, + "whatwg-url": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-4.8.0.tgz", + "integrity": "sha1-0pgaqRSMHgCkHFphMRZqtGg7vMA=", + "dev": true, + "requires": { + "tr46": "0.0.3", + "webidl-conversions": "3.0.1" + }, + "dependencies": { + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + } + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true, + "requires": { + "isexe": "2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true, + "optional": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + }, + "worker-farm": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.0.tgz", + "integrity": "sha512-DHRiUggxtbruaTwnLDm2/BRDKZIoOYvrgYUj5Bam4fU6Gtvc0FaEyoswFPBjMXAweGW2H4BDNIpy//1yXXuaqQ==", + "dev": true, + "requires": { + "errno": "0.1.4", + "xtend": "4.0.1" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml-name-validator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", + "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "dev": true, + "requires": { + "camelcase": "3.0.0", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "y18n": "3.2.1", + "yargs-parser": "4.2.1" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + } + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "dev": true, + "requires": { + "camelcase": "3.0.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + } + } + } + } +} diff --git a/drafts/bs-glamor/package.json b/drafts/bs-glamor/package.json new file mode 100644 index 0000000..e2fe3c2 --- /dev/null +++ b/drafts/bs-glamor/package.json @@ -0,0 +1,36 @@ +{ + "name": "bs-glamor", + "version": "0.2.0", + "description": "BuckleScript bindings for glamor", + "main": "src/glamor.re", + "scripts": { + "jest": "jest", + "test": "bsb -make-world && jest", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world && rm -f finalOutput/*.js" + }, + "keywords": [ + "glamor", + "bucklescript", + "reason", + "css" + ], + "author": "Jan Poeschko ", + "license": "ISC", + "repository": { + "type": "git", + "url": "git+https://github.com/poeschko/bs-glamor.git" + }, + "dependencies": { + "glamor": "^2.0.0" + }, + "devDependencies": { + "bs-jest": "^0.1.0", + "bs-platform": "^3.0.0" + }, + "jest": { + "roots": [ + "lib/js/src" + ] + } +} diff --git a/drafts/bs-glamor/src/__tests__/glamor_test.re b/drafts/bs-glamor/src/__tests__/glamor_test.re new file mode 100644 index 0000000..c67cd17 --- /dev/null +++ b/drafts/bs-glamor/src/__tests__/glamor_test.re @@ -0,0 +1,39 @@ +open Jest; + +open Expect; + +open Glamor; + +/* + We only test that a CSS spec is translated to *something* (not an empty string) without errors. + TODO: Check that it's translated to the correct CSS. + */ +let check = result => expect(result) |> not_ |> toBe(""); + +describe("Glamor", () => { + test("takes a single CSS property", () => + check(css([fontFamily("Arial")])) + ); + test("takes multiple properties", () => + check(css([fontFamily("Arial"), fontSize("12pt")])) + ); + test("takes an empty property list", () => + check(css([])) + ); + test("takes selectors", () => + check(css([Selector("@media (min-width: 300px)", [color("blue")])])) + ); + test("takes nested selectors", () => + check( + css([ + Selector( + "@media (min-width: 300px)", + [ + color("blue"), + Selector("@media (max-width: 500px)", [color("red")]), + ], + ), + ]), + ) + ); +}); diff --git a/drafts/bs-glamor/src/glamor.re b/drafts/bs-glamor/src/glamor.re new file mode 100644 index 0000000..7b02d45 --- /dev/null +++ b/drafts/bs-glamor/src/glamor.re @@ -0,0 +1,737 @@ +type styleObj; + +[@bs.module "glamor"] external makeCSS : styleObj => string = "css"; + +[@bs.module "glamor"] [@bs.scope "css"] +external makeGlobalCSS : (string, styleObj) => unit = "global"; + +[@bs.module "glamor"] [@bs.scope "css"] +external makeKeyFrames : Js.Dict.t(styleObj) => string = "keyframes"; + +let merge: list(string) => string = [%bs.raw + {| + function (styles) { + var glamor = require('glamor'); + return glamor.css.apply(glamor, styles) + } + |} +]; + +let addObjToStyles: (styleObj, string, styleObj) => styleObj = [%bs.raw + {| + function (obj, key, value) { + var newObj = {}; + newObj[key] = value; + return Object.assign({}, obj, newObj); + } + |} +]; + +let addStringToStyles: (styleObj, string, string) => styleObj = [%bs.raw + {| + function (obj, key, value) { + var newObj = {}; + newObj[key] = value; + return Object.assign({}, obj, newObj); + } + |} +]; + +let createEmptyObj: (. unit) => styleObj = [%bs.raw + {| + function () { + return {}; + } + |} +]; + +let emptyObj = createEmptyObj(.); + +type declaration = + | Nothing + | Property(string, string) + | Selector(string, declarations) +and declarations = list(declaration); + +let rec addDeclaration = (obj, decl: declaration) => + switch (decl) { + | Nothing => obj + | Property(name, value) => addStringToStyles(obj, name, value) + | Selector(sel, decls) => + addObjToStyles(obj, sel, declarationsToObj(decls)) + } +and declarationsToObj = decls => + List.fold_left(addDeclaration, emptyObj, decls); + +let css = decls => makeCSS(declarationsToObj(decls)); + +let global = (selector, declarations) => + makeGlobalCSS(selector, declarationsToObj(declarations)); + +let keyframes = frames => + makeKeyFrames( + Js.Dict.fromList( + List.map(((k, v)) => (k, declarationsToObj(v)), frames), + ), + ); + +/* + ============== + CSS properties + ============== + */ +let azimouth = v => Property("azimouth", v); + +let background = v => Property("background", v); + +let backgroundAttachment = v => Property("backgroundAttachment", v); + +let backgroundColor = v => Property("backgroundColor", v); + +let backgroundImage = v => Property("backgroundImage", v); + +let backgroundPosition = v => Property("backgroundPosition", v); + +let backgroundRepeat = v => Property("backgroundRepeat", v); + +let border = v => Property("border", v); + +let borderCollapse = v => Property("borderCollapse", v); + +let borderColor = v => Property("borderColor", v); + +let borderSpacing = v => Property("borderSpacing", v); + +let borderStyle = v => Property("borderStyle", v); + +let borderTop = v => Property("borderTop", v); + +let borderRight = v => Property("borderRight", v); + +let borderBottom = v => Property("borderBottom", v); + +let borderLeft = v => Property("borderLeft", v); + +let borderTopColor = v => Property("borderTopColor", v); + +let borderRightColor = v => Property("borderRightColor", v); + +let borderBottomColor = v => Property("borderBottomColor", v); + +let borderLeftColor = v => Property("borderLeftColor", v); + +let borderTopStyle = v => Property("borderTopStyle", v); + +let borderRightStyle = v => Property("borderRightStyle", v); + +let borderBottomStyle = v => Property("borderBottomStyle", v); + +let borderLeftStyle = v => Property("borderLeftStyle", v); + +let borderTopWidth = v => Property("borderTopWidth", v); + +let borderRightWidth = v => Property("borderRightWidth", v); + +let borderBottomWidth = v => Property("borderBottomWidth", v); + +let borderLeftWidth = v => Property("borderLeftWidth", v); + +let borderWidth = v => Property("borderWidth", v); + +let bottom = v => Property("bottom", v); + +let captionSide = v => Property("captionSide", v); + +let clear = v => Property("clear", v); + +let clip = v => Property("clip", v); + +let color = v => Property("color", v); + +let content = v => Property("content", v); + +let counterIncrement = v => Property("counterIncrement", v); + +let counterReset = v => Property("counterReset", v); + +let cue = v => Property("cue", v); + +let cueAfter = v => Property("cueAfter", v); + +let cueBefore = v => Property("cueBefore", v); + +let cursor = v => Property("cursor", v); + +let direction = v => Property("direction", v); + +let display = v => Property("display", v); + +let elevation = v => Property("elevation", v); + +let emptyCells = v => Property("emptyCells", v); + +let cssFloat = v => Property("float", v); + +let filter = v => Property("filter", v); + +let font = v => Property("font", v); + +let fontFamily = v => Property("fontFamily", v); + +let fontSize = v => Property("fontSize", v); + +let fontSizeAdjust = v => Property("fontSizeAdjust", v); + +let fontStretch = v => Property("fontStretch", v); + +let fontStyle = v => Property("fontStyle", v); + +let fontVariant = v => Property("fontVariant", v); + +let fontWeight = v => Property("fontWeight", v); + +let height = v => Property("height", v); + +let left = v => Property("left", v); + +let letterSpacing = v => Property("letterSpacing", v); + +let lineHeight = v => Property("lineHeight", v); + +let listStyle = v => Property("listStyle", v); + +let listStyleImage = v => Property("listStyleImage", v); + +let listStylePosition = v => Property("listStylePosition", v); + +let listStyleType = v => Property("listStyleType", v); + +let margin = v => Property("margin", v); + +let marginTop = v => Property("marginTop", v); + +let marginRight = v => Property("marginRight", v); + +let marginBottom = v => Property("marginBottom", v); + +let marginLeft = v => Property("marginLeft", v); + +let markerOffset = v => Property("markerOffset", v); + +let marks = v => Property("marks", v); + +let maxHeight = v => Property("maxHeight", v); + +let maxWidth = v => Property("maxWidth", v); + +let minHeight = v => Property("minHeight", v); + +let minWidth = v => Property("minWidth", v); + +let orphans = v => Property("orphans", v); + +let outline = v => Property("outline", v); + +let outlineColor = v => Property("outlineColor", v); + +let outlineStyle = v => Property("outlineStyle", v); + +let outlineWidth = v => Property("outlineWidth", v); + +let overflow = v => Property("overflow", v); + +let padding = v => Property("padding", v); + +let paddingTop = v => Property("paddingTop", v); + +let paddingRight = v => Property("paddingRight", v); + +let paddingBottom = v => Property("paddingBottom", v); + +let paddingLeft = v => Property("paddingLeft", v); + +let page = v => Property("page", v); + +let pageBreakAfter = v => Property("pageBreakAfter", v); + +let pageBreakBefore = v => Property("pageBreakBefore", v); + +let pageBreakInside = v => Property("pageBreakInside", v); + +let pause = v => Property("pause", v); + +let pauseAfter = v => Property("pauseAfter", v); + +let pauseBefore = v => Property("pauseBefore", v); + +let pitch = v => Property("pitch", v); + +let pitchRange = v => Property("pitchRange", v); + +let playDuring = v => Property("playDuring", v); + +let position = v => Property("position", v); + +let quotes = v => Property("quotes", v); + +let richness = v => Property("richness", v); + +let right = v => Property("right", v); + +let size = v => Property("size", v); + +let speak = v => Property("speak", v); + +let speakHeader = v => Property("speakHeader", v); + +let speakNumeral = v => Property("speakNumeral", v); + +let speakPunctuation = v => Property("speakPunctuation", v); + +let speechRate = v => Property("speechRate", v); + +let stress = v => Property("stress", v); + +let tableLayout = v => Property("tableLayout", v); + +let textAlign = v => Property("textAlign", v); + +let textDecoration = v => Property("textDecoration", v); + +let textIndent = v => Property("textIndent", v); + +let textShadow = v => Property("textShadow", v); + +let textTransform = v => Property("textTransform", v); + +let top = v => Property("top", v); + +let unicodeBidi = v => Property("unicodeBidi", v); + +let verticalAlign = v => Property("verticalAlign", v); + +let visibility = v => Property("visibility", v); + +let voiceFamily = v => Property("voiceFamily", v); + +let volume = v => Property("volume", v); + +let whiteSpace = v => Property("whiteSpace", v); + +let widows = v => Property("widows", v); + +let width = v => Property("width", v); + +let wordSpacing = v => Property("wordSpacing", v); + +let zIndex = v => Property("zIndex", v); + +/* Below properties based on https://www.w3.org/Style/CSS/all-properties */ +/* Color Level 3 - REC */ +let opacity = v => Property("opacity", v); + +/* Backgrounds and Borders Level 3 - CR */ +/* backgroundRepeat - already defined by CSS2Properties */ +/* backgroundAttachment - already defined by CSS2Properties */ +let backgroundOrigin = v => Property("backgroundOrigin", v); + +let backgroundSize = v => Property("backgroundSize", v); + +let backgroundClip = v => Property("backgroundClip", v); + +let borderRadius = v => Property("borderRadius", v); + +let borderTopLeftRadius = v => Property("borderTopLeftRadius", v); + +let borderTopRightRadius = v => Property("borderTopRightRadius", v); + +let borderBottomLeftRadius = v => Property("borderBottomLeftRadius", v); + +let borderBottomRightRadius = v => Property("borderBottomRightRadius", v); + +let borderImage = v => Property("borderImage", v); + +let borderImageSource = v => Property("borderImageSource", v); + +let borderImageSlice = v => Property("borderImageSlice", v); + +let borderImageWidth = v => Property("borderImageWidth", v); + +let borderImageOutset = v => Property("borderImageOutset", v); + +let borderImageRepeat = v => Property("borderImageRepeat", v); + +let boxShadow = v => Property("boxShadow", v); + +/* Multi-column Layout - CR */ +let columns = v => Property("columns", v); + +let columnCount = v => Property("columnCount", v); + +let columnFill = v => Property("columnFill", v); + +let columnGap = v => Property("columnGap", v); + +let columnRule = v => Property("columnRule", v); + +let columnRuleColor = v => Property("columnRuleColor", v); + +let columnRuleStyle = v => Property("columnRuleStyle", v); + +let columnRuleWidth = v => Property("columnRuleWidth", v); + +let columnSpan = v => Property("columnSpan", v); + +let columnWidth = v => Property("columnWidth", v); + +let breakAfter = v => Property("breakAfter", v); + +let breakBefore = v => Property("breakBefore", v); + +let breakInside = v => Property("breakInside", v); + +/* Speech - CR */ +let rest = v => Property("rest", v); + +let restAfter = v => Property("restAfter", v); + +let restBefore = v => Property("restBefore", v); + +let speakAs = v => Property("speakAs", v); + +let voiceBalance = v => Property("voiceBalance", v); + +let voiceDuration = v => Property("voiceDuration", v); + +let voicePitch = v => Property("voicePitch", v); + +let voiceRange = v => Property("voiceRange", v); + +let voiceRate = v => Property("voiceRate", v); + +let voiceStress = v => Property("voiceStress", v); + +let voiceVolume = v => Property("voiceVolume", v); + +/* Image Values and Replaced Content Level 3 - CR */ +let objectFit = v => Property("objectFit", v); + +let objectPosition = v => Property("objectPosition", v); + +let imageResolution = v => Property("imageResolution", v); + +let imageOrientation = v => Property("imageOrientation", v); + +/* Flexible Box Layout - CR */ +let alignContent = v => Property("alignContent", v); + +let alignItems = v => Property("alignItems", v); + +let alignSelf = v => Property("alignSelf", v); + +let flex = v => Property("flex", v); + +let flexBasis = v => Property("flexBasis", v); + +let flexDirection = v => Property("flexDirection", v); + +let flexFlow = v => Property("flexFlow", v); + +let flexGrow = v => Property("flexGrow", v); + +let flexShrink = v => Property("flexShrink", v); + +let flexWrap = v => Property("flexWrap", v); + +let justifyContent = v => Property("justifyContent", v); + +let order = v => Property("order", v); + +/* Text Decoration Level 3 - CR */ +/* textDecoration - already defined by CSS2Properties */ +let textDecorationColor = v => Property("textDecorationColor", v); + +let textDecorationLine = v => Property("textDecorationLine", v); + +let textDecorationSkip = v => Property("textDecorationSkip", v); + +let textDecorationStyle = v => Property("textDecorationStyle", v); + +let textEmphasis = v => Property("textEmphasis", v); + +let textEmphasisColor = v => Property("textEmphasisColor", v); + +let textEmphasisPosition = v => Property("textEmphasisPosition", v); + +let textEmphasisStyle = v => Property("textEmphasisStyle", v); + +/* textShadow - already defined by CSS2Properties */ +let textUnderlinePosition = v => Property("textUnderlinePosition", v); + +/* Fonts Level 3 - CR */ +let fontFeatureSettings = v => Property("fontFeatureSettings", v); + +let fontKerning = v => Property("fontKerning", v); + +let fontLanguageOverride = v => Property("fontLanguageOverride", v); + +/* fontSizeAdjust - already defined by CSS2Properties */ +/* fontStretch - already defined by CSS2Properties */ +let fontSynthesis = v => Property("fontSynthesis", v); + +let forntVariantAlternates = v => Property("forntVariantAlternates", v); + +let fontVariantCaps = v => Property("fontVariantCaps", v); + +let fontVariantEastAsian = v => Property("fontVariantEastAsian", v); + +let fontVariantLigatures = v => Property("fontVariantLigatures", v); + +let fontVariantNumeric = v => Property("fontVariantNumeric", v); + +let fontVariantPosition = v => Property("fontVariantPosition", v); + +/* Cascading and Inheritance Level 3 - CR */ +let all = v => Property("all", v); + +/* Writing Modes Level 3 - CR */ +let glyphOrientationVertical = v => Property("glyphOrientationVertical", v); + +let textCombineUpright = v => Property("textCombineUpright", v); + +let textOrientation = v => Property("textOrientation", v); + +let writingMode = v => Property("writingMode", v); + +/* Shapes Level 1 - CR */ +let shapeImageThreshold = v => Property("shapeImageThreshold", v); + +let shapeMargin = v => Property("shapeMargin", v); + +let shapeOutside = v => Property("shapeOutside", v); + +/* Masking Level 1 - CR */ +let clipPath = v => Property("clipPath", v); + +let clipRule = v => Property("clipRule", v); + +let mask = v => Property("mask", v); + +let maskBorder = v => Property("maskBorder", v); + +let maskBorderMode = v => Property("maskBorderMode", v); + +let maskBorderOutset = v => Property("maskBorderOutset", v); + +let maskBorderRepeat = v => Property("maskBorderRepeat", v); + +let maskBorderSlice = v => Property("maskBorderSlice", v); + +let maskBorderSource = v => Property("maskBorderSource", v); + +let maskBorderWidth = v => Property("maskBorderWidth", v); + +let maskClip = v => Property("maskClip", v); + +let maskComposite = v => Property("maskComposite", v); + +let maskImage = v => Property("maskImage", v); + +let maskMode = v => Property("maskMode", v); + +let maskOrigin = v => Property("maskOrigin", v); + +let maskPosition = v => Property("maskPosition", v); + +let maskRepeat = v => Property("maskRepeat", v); + +let maskSize = v => Property("maskSize", v); + +let maskType = v => Property("maskType", v); + +/* Compositing and Blending Level 1 - CR */ +let backgroundBlendMode = v => Property("backgroundBlendMode", v); + +let isolation = v => Property("isolation", v); + +let mixBlendMode = v => Property("mixBlendMode", v); + +/* Fragmentation Level 3 - CR */ +let boxDecorationBreak = v => Property("boxDecorationBreak", v); + +/* breakAfter - already defined by Multi-column Layout */ +/* breakBefore - already defined by Multi-column Layout */ +/* breakInside - already defined by Multi-column Layout */ +/* Basic User Interface Level 3 - CR */ +let boxSizing = v => Property("boxSizing", v); + +let caretColor = v => Property("caretColor", v); + +let navDown = v => Property("navDown", v); + +let navLeft = v => Property("navLeft", v); + +let navRight = v => Property("navRight", v); + +let navUp = v => Property("navUp", v); + +let outlineOffset = v => Property("outlineOffset", v); + +let resize = v => Property("resize", v); + +let textOverflow = v => Property("textOverflow", v); + +/* Grid Layout Level 1 - CR */ +let grid = v => Property("grid", v); + +let gridArea = v => Property("gridArea", v); + +let gridAutoColumns = v => Property("gridAutoColumns", v); + +let gridAutoFlow = v => Property("gridAutoFlow", v); + +let gridAutoRows = v => Property("gridAutoRows", v); + +let gridColumn = v => Property("gridColumn", v); + +let gridColumnEnd = v => Property("gridColumnEnd", v); + +let gridColumnGap = v => Property("gridColumnGap", v); + +let gridColumnStart = v => Property("gridColumnStart", v); + +let gridGap = v => Property("gridGap", v); + +let gridRow = v => Property("gridRow", v); + +let gridRowEnd = v => Property("gridRowEnd", v); + +let gridRowGap = v => Property("gridRowGap", v); + +let gridRowStart = v => Property("gridRowStart", v); + +let gridTemplate = v => Property("gridTemplate", v); + +let gridTemplateAreas = v => Property("gridTemplateAreas", v); + +let gridTemplateColumns = v => Property("gridTemplateColumns", v); + +let gridTemplateRows = v => Property("gridTemplateRows", v); + +/* Will Change Level 1 - CR */ +let willChange = v => Property("willChange", v); + +/* Text Level 3 - LC */ +let hangingPunctuation = v => Property("hangingPunctuation", v); + +let hyphens = v => Property("hyphens", v); + +/* letterSpacing - already defined by CSS2Properties */ +let lineBreak = v => Property("lineBreak", v); + +let overflowWrap = v => Property("overflowWrap", v); + +let tabSize = v => Property("tabSize", v); + +/* textAlign - already defined by CSS2Properties */ +let textAlignLast = v => Property("textAlignLast", v); + +let textJustify = v => Property("textJustify", v); + +let wordBreak = v => Property("wordBreak", v); + +let wordWrap = v => Property("wordWrap", v); + +/* Animations - WD */ +let animation = v => Property("animation", v); + +let animationDelay = v => Property("animationDelay", v); + +let animationDirection = v => Property("animationDirection", v); + +let animationDuration = v => Property("animationDuration", v); + +let animationFillMode = v => Property("animationFillMode", v); + +let animationIterationCount = v => Property("animationIterationCount", v); + +let animationName = v => Property("animationName", v); + +let animationPlayState = v => Property("animationPlayState", v); + +let animationTimingFunction = v => Property("animationTimingFunction", v); + +/* Transitions - WD */ +let transition = v => Property("transition", v); + +let transitionDelay = v => Property("transitionDelay", v); + +let transitionDuration = v => Property("transitionDuration", v); + +let transitionProperty = v => Property("transitionProperty", v); + +let transitionTimingFunction = v => Property("transitionTimingFunction", v); + +/* Transforms Level 1 - WD */ +let backfaceVisibility = v => Property("backfaceVisibility", v); + +let perspective = v => Property("perspective", v); + +let perspectiveOrigin = v => Property("perspectiveOrigin", v); + +let transform = v => Property("transform", v); + +let transformOrigin = v => Property("transformOrigin", v); + +let transformStyle = v => Property("transformStyle", v); + +/* Box Alignment Level 3 - WD */ +/* alignContent - already defined by Flexible Box Layout */ +/* alignItems - already defined by Flexible Box Layout */ +let justifyItems = v => Property("justifyItems", v); + +let justifySelf = v => Property("justifySelf", v); + +let placeContent = v => Property("placeContent", v); + +let placeItems = v => Property("placeItems", v); + +let placeSelf = v => Property("placeSelf", v); + +/* Basic User Interface Level 4 - FPWD */ +let appearance = v => Property("appearance", v); + +let caret = v => Property("caret", v); + +let caretAnimation = v => Property("caretAnimation", v); + +let caretShape = v => Property("caretShape", v); + +let userSelect = v => Property("userSelect", v); + +/* Overflow Level 3 - WD */ +let maxLines = v => Property("maxLines", v); + +/* Basix Box Model - WD */ +let marqueeDirection = v => Property("marqueeDirection", v); + +let marqueeLoop = v => Property("marqueeLoop", v); + +let marqueeSpeed = v => Property("marqueeSpeed", v); + +let marqueeStyle = v => Property("marqueeStyle", v); + +let overflowStyle = v => Property("overflowStyle", v); + +let rotation = v => Property("rotation", v); + +let rotationPoint = v => Property("rotationPoint", v); + +/* svg */ +let fill = v => Property("fill", v); + +let stroke = v => Property("stroke", v); + +let strokeWidth = v => Property("strokeWidth", v); + +let strokeMiterlimit = v => Property("strokeMiterlimit", v); diff --git a/drafts/bs-glob/.gitignore b/drafts/bs-glob/.gitignore new file mode 100644 index 0000000..0a6a0df --- /dev/null +++ b/drafts/bs-glob/.gitignore @@ -0,0 +1,5 @@ +lib/bs +.vscode +node_modules +.merlin +.bsb.lock diff --git a/drafts/bs-glob/LICENSE b/drafts/bs-glob/LICENSE new file mode 100644 index 0000000..8864d4a --- /dev/null +++ b/drafts/bs-glob/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-glob/README.md b/drafts/bs-glob/README.md new file mode 100644 index 0000000..ac70265 --- /dev/null +++ b/drafts/bs-glob/README.md @@ -0,0 +1,25 @@ + +# bs-glob + +BuckleScript bindings to [node-glob](https://github.com/isaacs/node-glob). + +Status: Very basic, but functional + +## Example +```reason +Glob.glob("**/*.js", (_, files) => Array.iter(Js.log, files)); +``` + +## Installation + +```sh +npm install --save reasonml-community/bs-glob +``` + +Then add `bs-glob` to `bs-dependencies` in your `bsconfig.json`: +```js +{ + ... + "bs-dependencies": ["bs-glob"] +} +``` diff --git a/drafts/bs-glob/bsconfig.json b/drafts/bs-glob/bsconfig.json new file mode 100644 index 0000000..b2b3fd1 --- /dev/null +++ b/drafts/bs-glob/bsconfig.json @@ -0,0 +1,5 @@ +{ + "name": "bs-glob", + "bsc-flags": ["-bs-super-errors"], + "sources": ["src"] +} diff --git a/drafts/bs-glob/package.json b/drafts/bs-glob/package.json new file mode 100644 index 0000000..db7ac55 --- /dev/null +++ b/drafts/bs-glob/package.json @@ -0,0 +1,29 @@ +{ + "name": "bs-glob", + "version": "0.1.1", + "description": "BuckleScript bindings to node-glob. Match files using the patterns the shell uses, like stars and stuff.", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "exit 0" + }, + "homepage": "https://github.com/reasonml-community/bs-glob#readme", + "bugs": "https://github.com/reasonml-community/bs-glob/issues", + "repository": { + "type": "git", + "url": "git+https://github.com/reasonml-community/bs-glob.git" + }, + "author": "glennsl", + "keywords": [ + "bucklescript", + "glob" + ], + "license": "MIT", + "devDependencies": { + "bs-platform": "^1.9.0" + }, + "dependencies": { + "glob": "^7.1.2" + } +} diff --git a/drafts/bs-glob/src/glob.ml b/drafts/bs-glob/src/glob.ml new file mode 100644 index 0000000..dec7bca --- /dev/null +++ b/drafts/bs-glob/src/glob.ml @@ -0,0 +1,4 @@ +type error + +external glob : string -> (error Js.nullable -> string array -> unit) -> unit = "" [@@bs.module] +external sync : string -> string array = "" [@@bs.val] [@@bs.module "glob"] diff --git a/drafts/bs-graphql-bindings/.github/ISSUE_TEMPLATE.md b/drafts/bs-graphql-bindings/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..adba597 --- /dev/null +++ b/drafts/bs-graphql-bindings/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +- **Affected package**: +- **Type of issue**: + +## Description + + + +## Reproduction example + + + diff --git a/drafts/bs-graphql-bindings/.github/PULL_REQUEST_TEMPLATE.md b/drafts/bs-graphql-bindings/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..76d7833 --- /dev/null +++ b/drafts/bs-graphql-bindings/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +- **Affected package**: +- **Kind of change**: +- **Fixes**: # + +## Description + + + +## Checklist + +- [ ] Code compiles and tests are still all passing (Circle build is green) +- [ ] Additional tests added to cover the bugfix or the added feature diff --git a/drafts/bs-graphql-bindings/.gitignore b/drafts/bs-graphql-bindings/.gitignore new file mode 100644 index 0000000..a569410 --- /dev/null +++ b/drafts/bs-graphql-bindings/.gitignore @@ -0,0 +1,86 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# OCaml/Reason artifacts +*.exe +*.obj +*.out +*.compile +*.native +*.byte +*.cmo +*.annot +*.cmi +*.cmx +*.cmt +*.cmti +*.cma +*.a +*.cmxa +*.obj +*~ +*.annot +*.cmj +*.bak +lib/bs +*.mlast +*.mliast +.vscode +.merlin +lib diff --git a/drafts/bs-graphql-bindings/CONTRIBUTING.md b/drafts/bs-graphql-bindings/CONTRIBUTING.md new file mode 100644 index 0000000..3b8ca5d --- /dev/null +++ b/drafts/bs-graphql-bindings/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Reporting Issues + +You are encouraged to open issues [here on GitHub](https://github.com/rricard/bs-graphql/issues). Each issue you open should tell which package is affected and if it is a bug or a feature request. Please follow the template to make sure you are not forgetting anything! + +# Working in the repository + +This repository is a [lerna](http://lernajs.io) monorepo. That means a few different things than a normal npm-based repo. + +We require you to use [yarn](https://yarnpkg.com/en/). + +Now you can install lerna and pull the repository: + +```sh +yarn global add lerna +git pull git@github.com:rricard/bs-graphql.git +cd bs-graphql +``` + +From there you will need to install the dev dependencies and bootstrap the packages: + +```sh +yarn install +lerna bootstrap +``` + +Now, you can try to build the packages and run their tests: + +```sh +yarn build +yarn test +``` + +# Submitting a pull-request + +You are encouraged to submit your changes [here on GitHub](https://github.com/rricard/bs-graphql/pulls). Each pull request you create should tell which package is affected and if it solves a bug or adds a new feature. Either way, try to provide tests. Please follow the template to make sure you are not forgetting anything! diff --git a/drafts/bs-graphql-bindings/LICENSE b/drafts/bs-graphql-bindings/LICENSE new file mode 100644 index 0000000..17f85c6 --- /dev/null +++ b/drafts/bs-graphql-bindings/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Robin Ricard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-graphql-bindings/README.md b/drafts/bs-graphql-bindings/README.md new file mode 100644 index 0000000..743b922 --- /dev/null +++ b/drafts/bs-graphql-bindings/README.md @@ -0,0 +1,129 @@ +# BuckleScript GraphQL bindings + +[![CircleCI](https://circleci.com/gh/rricard/bs-graphql-bindings.svg?style=svg)](https://circleci.com/gh/rricard/bs-graphql-bindings) + +This repository stores a collection of [BuckleScript](https://bucklescript.github.io/) bindings for various, widely used, [GraphQL](http://graphql.org/) projects. + +## Packages + +The following packages are contained in this repository and published on npm: + +| Package | Binds to | NPM | Description | +|---------|----------|-----|-------------| +| [`bs-graphql`](./packages/bs-graphql) | [`graphql-js`](https://github.com/graphql/graphql-js/) | [![npm version](https://badge.fury.io/js/bs-graphql.svg)](https://badge.fury.io/js/bs-graphql) | Core GraphQL bindings over the JS reference implementation | +| [`bs-graphql-tools`](./packages/bs-graphql-tools) | [`graphql-tools`](https://github.com/apollographql/graphql-tools/) | [![npm version](https://badge.fury.io/js/bs-graphql-tools.svg)](https://badge.fury.io/js/bs-graphql-tools) | Bindings for the Apollo GraphQL server tools | +| [`bs-apollo-server-express`](./packages/bs-apollo-server-express) | [`apollo-server-express`](https://github.com/apollographql/apollo-server/) | [![npm version](https://badge.fury.io/js/bs-apollo-server-express.svg)](https://badge.fury.io/js/bs-apollo-server-express) | Bindings to mount an apollo server on express | + +> **WARNING**: Most of those bindings are **partial** for now! Please consult each binding's readme for more information. + +## Guides + +### Your first Reason-GraphQL server + +**TL;DR;**: This repo has it all with a few interesting things more (such as snapshot testing with jest): https://github.com/rricard/graphql-reason-server-example. + +This short guide will show you how to setup a GraphQL server fast. + +First, you will need a reason codebase: + +```sh +npm install -g bs-platform +bsb -init my-graphql-server -theme basic-reason +cd my-graphql-server +yarn install || npm install +``` + +Now, you need to install the packages here and graphql as well as express: + +``` +yarn add graphql express body-parser \ + bs-express bs-graphql bs-apollo-server-express bs-graphql-tools || \ +npm install --save graphql express body-parser \ + bs-express bs-graphql bs-apollo-server-express bs-graphql-tools +``` +Add the bindings in `bsconfig.json`: + +```json +{ + "name": "my-graphql-server", + "sources": [ + "src" + ], + "bs-dependencies" : [ + "bs-express", + "bs-graphql", + "bs-graphql-tools", + "bs-apollo-server-express" + ] +} +``` + +We're starting the development, you should run a watch process: `yarn watch || npm run watch`. + +Remove `demo.re` and add the following files: + +First we'll define a Reason type alongside an associated GraphQL schema and resolver functions: `Episode.re`: + +```reason +type t = { + name: string, + number: int +}; +let hope = {name: "A New Hope", number: 4}; +let empire = {name: "The Empire Strikes Back", number: 5}; +let jedi = {name: "The Return of the Jedi", number: 6}; +let getName e => e.name; +let getNumber e => e.number; +let typeDef = "type Episode { name: String!, number: Int! }"; +let resolvers = {"name": getName, "number": getNumber}; +``` + +Then, we'll define the base Query type similarly: `Query.re`: + +```reason +let getEpisodes () => [|Episode.hope, Episode.empire, Episode.jedi|]; +let getFavoriteEpisode () => Episode.empire; +let typeDef = "type Query { episodes: [Episode!]!, favoriteEpisode: Episode! }"; +let resolvers = {"episodes": getEpisodes, "favoriteEpisode": getFavoriteEpisode}; +``` + +We can now put together a schema: `Schema.re`: + +```reason +let typeDefs = Query.typeDef ^ " " ^ Episode.typeDef; +let resolvers = {"Query": Query.resolvers, "Episode": Episode.resolvers}; +let schema = GraphQLTools.makeExecutableSchema {"typeDefs": typeDefs, "resolvers": resolvers}; +``` + +And finally, we can mount a server: `Server.js`: + +```reason +let port = 8080; + +external bodyParserJson : unit => Express.Middleware.t = "json" [@@bs.module "body-parser"]; + +let () = { + let app = Express.App.make (); + Express.App.use app (bodyParserJson ()); + let graphqlMiddleware = ApolloServerExpress.createGraphQLExpressMiddleware Schema.schema; + let graphiqlMiddleware = ApolloServerExpress.createGraphiQLExpressMiddleware "/graphql"; + Express.App.useOnPath app graphqlMiddleware path::"/graphql"; + Express.App.useOnPath app graphiqlMiddleware path::"/graphiql"; + Express.App.listen app ::port; + Js.log ("GraphQL Server listening on http://localhost:" ^ string_of_int port) +}; +``` + +If your watcher worked so far, you can now run the server and run a query against it: + +```sh +node ./lib/js/src/server.js +curl --request POST \ + --url http://localhost:8080/graphql \ + --header 'content-type: application/json' \ + --data '{"query":"{ favoriteEpisode { name, number }}"}' +``` + +## Contributing + +Please read the [CONTRIBUTING](./CONTRIBUTING.md) document if you want to help or report issues. diff --git a/drafts/bs-graphql-bindings/circle.yml b/drafts/bs-graphql-bindings/circle.yml new file mode 100644 index 0000000..8653f8e --- /dev/null +++ b/drafts/bs-graphql-bindings/circle.yml @@ -0,0 +1,28 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:7.10 + working_directory: ~/repo + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + - v1-dependencies- + - run: + name: Install global dev env + command: yarn install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: + name: Bootstrap lerna throughout the packages + command: node_modules/.bin/lerna bootstrap + - run: + name: Build all packages + command: yarn build + - run: + name: Trigger the test suite over all the packages + command: yarn test diff --git a/drafts/bs-graphql-bindings/lerna.json b/drafts/bs-graphql-bindings/lerna.json new file mode 100644 index 0000000..b1262ee --- /dev/null +++ b/drafts/bs-graphql-bindings/lerna.json @@ -0,0 +1,8 @@ +{ + "lerna": "2.0.0", + "packages": [ + "packages/*" + ], + "npmClient": "yarn", + "version": "0.3.1" +} diff --git a/drafts/bs-graphql-bindings/package.json b/drafts/bs-graphql-bindings/package.json new file mode 100644 index 0000000..2e21a02 --- /dev/null +++ b/drafts/bs-graphql-bindings/package.json @@ -0,0 +1,13 @@ +{ + "scripts":{ + "build": "lerna run build", + "test": "lerna run test" + }, + "devDependencies": { + "bs-jest": "^0.1.0", + "bs-platform": "1.8.2", + "graphql": "^0.10.5", + "jest": "^19.0.2", + "lerna": "^2.0.0" + } +} diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/README.md b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/README.md new file mode 100644 index 0000000..cde670d --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/README.md @@ -0,0 +1,44 @@ +# bs-apollo-server-express + +[BuckleScript](https://bucklescript.github.io/) binding for [apollo-server-express](https://github.com/apollographql/apollo-server). + +## Installation + +``` +npm install --save graphql express body-parser bs-express bs-graphql bs-apollo-server-express +# or +yarn add graphql express body-parser bs-express bs-graphql bs-apollo-server-express +``` + +As always, you will need to indicate to BuckleScript that the binding is available. + +`bsconfig.json` +```json +{ + ... + "bs-dependencies": [ + "bs-express", + "bs-graphql", + "bs-apollo-server-express" + ] +} +``` + +## Usage + +You can start a GraphQL server using bs-graphql, bs-express and this binding: + +```reason +let app = Express.App.make (); +let schema = GraphQL.Utilities.buildSchema "type Query { hello: String }"; +let rootValue = {"hello": fun () => "world"}; +external bodyParserJson : unit => Express.Middleware.t = "json" [@@bs.module "body-parser"]; +Express.App.use app (bodyParserJson ()); +let graphqlMiddleware = ApolloServerExpress.createGraphQLExpressMiddleware schema ::rootValue; +let graphiqlMiddleware = ApolloServerExpress.createGraphiQLExpressMiddleware "/graphql"; +Express.App.useOnPath app graphqlMiddleware path::"/graphql"; +Express.App.useOnPath app graphiqlMiddleware path::"/graphiql"; +Express.App.listen app port::8080; +``` + +Now you can make GraphQL queries to `http://localhost:8080`. diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/bsconfig.json b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/bsconfig.json new file mode 100644 index 0000000..c1da8cd --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/bsconfig.json @@ -0,0 +1,17 @@ +{ + "name": "bs-apollo-server-express", + "sources": [ + "src", + { + "dir": "src/__tests__", + "type": "dev" + } + ], + "bs-dependencies": [ + "bs-express", + "bs-graphql" + ], + "bs-dev-dependencies": [ + "bs-jest" + ] +} diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/package.json b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/package.json new file mode 100644 index 0000000..2c9c7ee --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/package.json @@ -0,0 +1,28 @@ +{ + "name": "bs-apollo-server-express", + "version": "0.3.1", + "description": "BuckleScript binding for apollo-server-express", + "keywords": [ + "BuckleScript", + "GraphQL", + "Apollo", + "Express" + ], + "license": "MIT", + "scripts": { + "clean": "bsb -clean-world", + "build": "bsb -make-world", + "watch": "bsb -make-world -w", + "pretest": "npm run build", + "test": "jest" + }, + "dependencies": { + "apollo-server-express": "^1.1.0", + "bs-express": "^0.0.2", + "bs-graphql": "^0.3.1" + }, + "devDependencies": { + "body-parser": "^1.17.2", + "express": "^4.15.4" + } +} diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/ApolloServerCore.re b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/ApolloServerCore.re new file mode 100644 index 0000000..4e5e609 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/ApolloServerCore.re @@ -0,0 +1,40 @@ +/* This one should be moved to its own package once we add the next apollo-server variant */ +type logAction = string; + +type logStep = string; + +type logMessage = + Js.t { + . + action : logAction, + step : logStep, + key : Js.null_undefined string, + data : Js.null_undefined Js.Types.obj_val + }; + +type graphqlOptions 'rootValue 'context 'response = + Js.t { + . + schema : GraphQL.Type.schema, + formatError : Js.null_undefined (Js.Exn.t => GraphQL.Error.error), + rootValue : Js.null_undefined (Js.t 'rootValue), + context : Js.null_undefined (Js.t 'context), + logFunction : Js.null_undefined (logMessage => unit), + formatParams : Js.null_undefined (Js.Types.obj_val => Js.Types.obj_val), + validationRules : Js.null_undefined GraphQL.Validation.validationContext, + formatResponse : + Js.null_undefined (GraphQL.Execution.executionResult Js.Types.obj_val => Js.t 'response), + fieldResolver : + Js.null_undefined (GraphQL.Type.fieldResolver Js.Types.obj_val Js.Types.obj_val), + debug : Js.null_undefined Js.boolean + }; + +type graphiqlData 'variables = + Js.t { + . + endpointURL : string, + query : Js.null_undefined string, + variables : Js.null_undefined (Js.t 'variables), + operationName : Js.null_undefined string, + result : Js.null_undefined string + }; diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/ApolloServerExpress.re b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/ApolloServerExpress.re new file mode 100644 index 0000000..bd36e96 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/ApolloServerExpress.re @@ -0,0 +1,90 @@ +/** + * Represents a function taking express request and response to output a promise for some graphqlOptions + */ +type expressGraphQLOptionsFunction 'rootValue 'context 'response = + Express.Request.t => + Express.Response.t => + Js.Promise.t (ApolloServerCore.graphqlOptions 'rootValue 'context 'response); + + +/** + * Represents a function taking express request to output a promise for some GraphiQL data + */ +type expressGraphiQLOptionsFunction 'variables = + Express.Request.t => Js.Promise.t (ApolloServerCore.graphiqlData 'variables); + + +/** + * Calls the graphqlExpress middleware creation with static options + */ +external graphqlExpress : + ApolloServerCore.graphqlOptions 'rootValue 'context 'response => Express.Middleware.t = + "graphqlExpress" [@@bs.module "apollo-server-express"]; + + +/** + * Calls the graphqlExpress middleware creation with function options + */ +external graphqlExpressAsync : + expressGraphQLOptionsFunction 'rootValue 'context 'response => Express.Middleware.t = + "graphqlExpress" [@@bs.module "apollo-server-express"]; + + +/** + * Calls the graphiqlExpress middleware creation with static options + */ +external graphiqlExpress : ApolloServerCore.graphiqlData 'variables => Express.Middleware.t = + "graphiqlExpress" [@@bs.module "apollo-server-express"]; + + +/** + * Calls the graphiqlExpress middleware creation with function options + */ +external graphiqlExpressAsync : expressGraphiQLOptionsFunction 'variables => Express.Middleware.t = + "graphiqlExpress" [@@bs.module "apollo-server-express"]; + + +/** + * Usability wrapper around the static graphqlExpress function + */ +let createGraphQLExpressMiddleware + ::formatError=? + ::rootValue=? + ::context=? + ::logFunction=? + ::formatParams=? + ::validationRules=? + ::formatResponse=? + ::fieldResolver=? + ::debug=? + schema => + graphqlExpress { + "schema": schema, + "formatError": Js.Null_undefined.from_opt formatError, + "rootValue": Js.Null_undefined.from_opt rootValue, + "context": Js.Null_undefined.from_opt context, + "logFunction": Js.Null_undefined.from_opt logFunction, + "formatParams": Js.Null_undefined.from_opt formatParams, + "validationRules": Js.Null_undefined.from_opt validationRules, + "formatResponse": Js.Null_undefined.from_opt formatResponse, + "fieldResolver": Js.Null_undefined.from_opt fieldResolver, + "debug": Js.Null_undefined.from_opt debug + }; + + +/** + * Usability wrapper around the static graphiqlExpress function + */ +let createGraphiQLExpressMiddleware + ::query=? + ::variables=? + ::operationName=? + ::result=? + endpointURL => + graphiqlExpress { + "endpointURL": endpointURL, + "query": Js.Null_undefined.from_opt query, + "variables": Js.Null_undefined.from_opt variables, + "operationName": Js.Null_undefined.from_opt operationName, + "result": Js.Null_undefined.from_opt result + }; diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/__tests__/ApolloServerExpressTest.re b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/__tests__/ApolloServerExpressTest.re new file mode 100644 index 0000000..fa262fe --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/src/__tests__/ApolloServerExpressTest.re @@ -0,0 +1,36 @@ +open Jest; + +open ExpectJs; + +let () = { + let schema = GraphQL.Utilities.buildSchema "type Query { hello: String }"; + let rootValue = {"hello": fun () => "world"}; + describe + "#createGraphQLExpressMiddleware" + ( + fun () => + test + "creates an express middleware" + ( + fun () => { + let middleware = + ApolloServerExpress.createGraphQLExpressMiddleware schema ::rootValue; + expect middleware |> toBeTruthy + } + ) + ); + describe + "#createGraphiQLExpressMiddleware" + ( + fun () => + test + "creates an express middleware" + ( + fun () => { + let middleware = + ApolloServerExpress.createGraphiQLExpressMiddleware "/graphql" query::"{ hello }"; + expect middleware |> toBeTruthy + } + ) + ) +}; diff --git a/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/yarn.lock b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/yarn.lock new file mode 100644 index 0000000..4887fca --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-apollo-server-express/yarn.lock @@ -0,0 +1,338 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/graphql@^0.9.0": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.9.4.tgz#cdeb6bcbef9b6c584374b81aa7f48ecf3da404fa" + +accepts@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +apollo-server-core@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/apollo-server-core/-/apollo-server-core-1.1.0.tgz#74c3bf4394e14eae7ab60b1d999a3c5b8aa94e9a" + dependencies: + apollo-tracing "^0.0.7" + +apollo-server-express@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/apollo-server-express/-/apollo-server-express-1.1.0.tgz#48d5027b41698c386e415cf182924c2a79da0497" + dependencies: + apollo-server-core "^1.1.0" + apollo-server-module-graphiql "^1.1.0" + +apollo-server-module-graphiql@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/apollo-server-module-graphiql/-/apollo-server-module-graphiql-1.1.0.tgz#f10333e50659d61dc48e2ed6afac6f313b1f418b" + +apollo-tracing@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/apollo-tracing/-/apollo-tracing-0.0.7.tgz#78466cfefdb52a0802a57b488d26a1a67a25909f" + dependencies: + graphql-tools "^1.1.0" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +body-parser@^1.17.2: + version "1.17.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.17.2.tgz#f8892abc8f9e627d42aedafbca66bf5ab99104ee" + dependencies: + bytes "2.4.0" + content-type "~1.0.2" + debug "2.6.7" + depd "~1.1.0" + http-errors "~1.6.1" + iconv-lite "0.4.15" + on-finished "~2.3.0" + qs "6.4.0" + raw-body "~2.2.0" + type-is "~1.6.15" + +bs-express@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/bs-express/-/bs-express-0.0.2.tgz#5ac7ecf342ac97528eba756c23c4e3adb2035936" + dependencies: + express "^4.14.0" + +bytes@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +debug@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" + dependencies: + ms "2.0.0" + +debug@2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +depd@1.1.1, depd@~1.1.0, depd@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359" + +deprecated-decorator@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +etag@~1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" + +express@^4.14.0, express@^4.15.4: + version "4.15.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.15.4.tgz#032e2253489cf8fce02666beca3d11ed7a2daed1" + dependencies: + accepts "~1.3.3" + array-flatten "1.1.1" + content-disposition "0.5.2" + content-type "~1.0.2" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.8" + depd "~1.1.1" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + finalhandler "~1.0.4" + fresh "0.5.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.1" + path-to-regexp "0.1.7" + proxy-addr "~1.1.5" + qs "6.5.0" + range-parser "~1.2.0" + send "0.15.4" + serve-static "1.12.4" + setprototypeof "1.0.3" + statuses "~1.3.1" + type-is "~1.6.15" + utils-merge "1.0.0" + vary "~1.1.1" + +finalhandler@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.4.tgz#18574f2e7c4b98b8ae3b230c21f201f31bdb3fb7" + dependencies: + debug "2.6.8" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +forwarded@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" + +fresh@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" + +graphql-tools@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-1.2.1.tgz#8d462abaa7b0f3bb2aa633df1e7a848720197671" + dependencies: + deprecated-decorator "^0.1.6" + uuid "^3.0.1" + optionalDependencies: + "@types/graphql" "^0.9.0" + +http-errors@~1.6.1, http-errors@~1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736" + dependencies: + depd "1.1.1" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +iconv-lite@0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ipaddr.js@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.4.0.tgz#296aca878a821816e5b85d0a285a99bcff4582f0" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +mime-db@~1.29.0: + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" + +mime-types@~2.1.11, mime-types@~2.1.15: + version "2.1.16" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + dependencies: + mime-db "~1.29.0" + +mime@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +proxy-addr@~1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.5.tgz#71c0ee3b102de3f202f3b64f608d173fcba1a918" + dependencies: + forwarded "~0.1.0" + ipaddr.js "1.4.0" + +qs@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +qs@6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.0.tgz#8d04954d364def3efc55b5a0793e1e2c8b1e6e49" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +raw-body@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.15" + unpipe "1.0.0" + +send@0.15.4: + version "0.15.4" + resolved "https://registry.yarnpkg.com/send/-/send-0.15.4.tgz#985faa3e284b0273c793364a35c6737bd93905b9" + dependencies: + debug "2.6.8" + depd "~1.1.1" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + fresh "0.5.0" + http-errors "~1.6.2" + mime "1.3.4" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serve-static@1.12.4: + version "1.12.4" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.4.tgz#9b6aa98eeb7253c4eedc4c1f6fdbca609901a961" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.1" + send "0.15.4" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +type-is@~1.6.15: + version "1.6.15" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.15" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +vary@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql-tools/README.md b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/README.md new file mode 100644 index 0000000..d5bd4bf --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/README.md @@ -0,0 +1,39 @@ +# bs-graphql-tools + +[![npm version](https://badge.fury.io/js/bs-graphql-tools.svg)](https://badge.fury.io/js/bs-graphql-tools) + +[BuckleScript](https://bucklescript.github.io/) binding for [graphql-tools](https://github.com/apollographql/graphql-tools/). + +## Installation + +``` +npm install --save graphql bs-graphql bs-graphql-tools +# or +yarn add graphql bs-graphql bs-graphql-tools +``` + +As always, you will need to indicate to BuckleScript that the binding is available. + +`bsconfig.json` +```json +{ + ... + "bs-dependencies": [ + "bs-graphql", + "bs-graphql-tools" + ] +} +``` + +## Usage + +> **WARNING**: Only `makeExecutableSchema` is implemented for now. More is coming soon but you can always contribute! + +```reason +let typeDefs = "type Query { me: User } type User { name: String }"; +let queryResolvers = {"me": fun () => {"name": "reason"}}; +let userResolvers = {"name": fun user => user##name}; +let resolvers = {"Query": queryResolvers, "User": userResolvers}; +let schema = GraphQLTools.makeExecutableSchema {"typeDefs": typeDefs, "resolvers": resolvers}; +Js.log (GraphQL.run schema ::rootValue "{ me { name } }"); +``` diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql-tools/bsconfig.json b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/bsconfig.json new file mode 100644 index 0000000..4ecbd9b --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/bsconfig.json @@ -0,0 +1,16 @@ +{ + "name": "bs-graphql-tools", + "sources": [ + "src", + { + "dir": "src/__tests__", + "type": "dev" + } + ], + "bs-dependencies": [ + "bs-graphql" + ], + "bs-dev-dependencies": [ + "bs-jest" + ] +} diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql-tools/package.json b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/package.json new file mode 100644 index 0000000..59df4e3 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/package.json @@ -0,0 +1,25 @@ +{ + "name": "bs-graphql-tools", + "version": "0.3.1", + "description": "BuckleScript binding for graphql-tools", + "keywords": [ + "BuckleScript", + "GraphQL", + "Apollo" + ], + "license": "MIT", + "scripts": { + "clean": "bsb -clean-world", + "build": "bsb -make-world", + "watch": "bsb -make-world -w", + "pretest": "npm run build", + "test": "jest" + }, + "dependencies": { + "bs-graphql": "^0.3.1", + "graphql-tools": "^1.2.1" + }, + "devDependencies": { + "bs-jest": "^0.1.0" + } +} diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql-tools/src/GraphQLTools.re b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/src/GraphQLTools.re new file mode 100644 index 0000000..e3826be --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/src/GraphQLTools.re @@ -0,0 +1,3 @@ +external makeExecutableSchema : + Js.t {. typeDefs : string, resolvers : Js.t 'a} => GraphQL.Type.schema = + "makeExecutableSchema" [@@bs.module "graphql-tools"]; diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql-tools/src/__tests__/GraphQLToolsTest.re b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/src/__tests__/GraphQLToolsTest.re new file mode 100644 index 0000000..f049e9a --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/src/__tests__/GraphQLToolsTest.re @@ -0,0 +1,28 @@ +open Jest; + +open ExpectJs; + +let () = + describe + "#makeExecutableSchema" + ( + fun () => + testPromise + "creates schemas that run correclty" + ( + fun () => { + let typeDefs = "type Query { me: User } type User { name: String }"; + let queryResolvers = {"me": fun () => {"name": "reason"}}; + let userResolvers = {"name": fun user => user##name}; + let resolvers = {"Query": queryResolvers, "User": userResolvers}; + let schema = + GraphQLTools.makeExecutableSchema {"typeDefs": typeDefs, "resolvers": resolvers}; + let source = "{ me { name } }"; + GraphQL.run schema source |> + Js.Promise.then_ ( + fun execResult => + Js.Promise.resolve (expect execResult##data##me##name |> toEqual "reason") + ) + } + ) + ); diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql-tools/yarn.lock b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/yarn.lock new file mode 100644 index 0000000..ea9d6dc --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql-tools/yarn.lock @@ -0,0 +1,2018 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/graphql@^0.9.0": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@types/graphql/-/graphql-0.9.4.tgz#cdeb6bcbef9b6c584374b81aa7f48ecf3da404fa" + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.0, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.6" + trim-right "^1.0.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-19.0.0.tgz#59323ced99a3a84d359da219ca881074ffc6ce3f" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^19.0.0" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" + +babel-plugin-jest-hoist@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz#4ae2a04ea612a6e73651f3fde52c178991304bea" + +babel-preset-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-19.0.0.tgz#22d67201d02324a195811288eb38294bb3cac396" + dependencies: + babel-plugin-jest-hoist "^19.0.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.17.4, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +bs-jest@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bs-jest/-/bs-jest-0.1.0.tgz#33c3a81d4980ec8dde97b5c8398c5388df26b859" + dependencies: + jest "^19.0.2" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +convert-source-map@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +debug@^2.6.3, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +deprecated-decorator@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +errno@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.3.0, extsprintf@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.3, glob@^7.0.5: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graphql-tools@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/graphql-tools/-/graphql-tools-1.2.1.tgz#8d462abaa7b0f3bb2aa633df1e7a848720197671" + dependencies: + deprecated-decorator "^0.1.6" + uuid "^3.0.1" + optionalDependencies: + "@types/graphql" "^0.9.0" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-ci@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.0-alpha.1: + version "1.1.11" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.11.tgz#fcc0b461e2b3bda71e305155138238768257d9de" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.4" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" + +istanbul-lib-hook@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.17.4" + istanbul-lib-coverage "^1.1.1" + semver "^5.3.0" + +istanbul-lib-report@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" + dependencies: + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-19.0.2.tgz#16c54c84c3270be408e06d2e8af3f3e37a885824" + +jest-cli@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-19.0.2.tgz#cc3620b62acac5f2d93a548cb6ef697d4ec85443" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.1" + graceful-fs "^4.1.6" + is-ci "^1.0.9" + istanbul-api "^1.1.0-alpha.1" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-instrument "^1.1.1" + jest-changed-files "^19.0.2" + jest-config "^19.0.2" + jest-environment-jsdom "^19.0.2" + jest-haste-map "^19.0.0" + jest-jasmine2 "^19.0.2" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve-dependencies "^19.0.0" + jest-runtime "^19.0.2" + jest-snapshot "^19.0.2" + jest-util "^19.0.2" + micromatch "^2.3.11" + node-notifier "^5.0.1" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.1.1" + worker-farm "^1.3.1" + yargs "^6.3.0" + +jest-config@^19.0.2: + version "19.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-19.0.4.tgz#42980211d46417e91ca7abffd086c270234f73fd" + dependencies: + chalk "^1.1.1" + jest-environment-jsdom "^19.0.2" + jest-environment-node "^19.0.2" + jest-jasmine2 "^19.0.2" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-validate "^19.0.2" + pretty-format "^19.0.0" + +jest-diff@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-19.0.0.tgz#d1563cfc56c8b60232988fbc05d4d16ed90f063c" + dependencies: + chalk "^1.1.3" + diff "^3.0.0" + jest-matcher-utils "^19.0.0" + pretty-format "^19.0.0" + +jest-environment-jsdom@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-19.0.2.tgz#ceda859c4a4b94ab35e4de7dab54b926f293e4a3" + dependencies: + jest-mock "^19.0.0" + jest-util "^19.0.2" + jsdom "^9.11.0" + +jest-environment-node@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-19.0.2.tgz#6e84079db87ed21d0c05e1f9669f207b116fe99b" + dependencies: + jest-mock "^19.0.0" + jest-util "^19.0.2" + +jest-file-exists@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-19.0.0.tgz#cca2e587a11ec92e24cfeab3f8a94d657f3fceb8" + +jest-haste-map@^19.0.0: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-19.0.2.tgz#286484c3a16e86da7872b0877c35dce30c3d6f07" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.6" + micromatch "^2.3.11" + sane "~1.5.0" + worker-farm "^1.3.1" + +jest-jasmine2@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-19.0.2.tgz#167991ac825981fb1a800af126e83afcca832c73" + dependencies: + graceful-fs "^4.1.6" + jest-matcher-utils "^19.0.0" + jest-matchers "^19.0.0" + jest-message-util "^19.0.0" + jest-snapshot "^19.0.2" + +jest-matcher-utils@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" + dependencies: + chalk "^1.1.3" + pretty-format "^19.0.0" + +jest-matchers@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-19.0.0.tgz#c74ecc6ebfec06f384767ba4d6fa4a42d6755754" + dependencies: + jest-diff "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + +jest-message-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-19.0.0.tgz#721796b89c0e4d761606f9ba8cb828a3b6246416" + dependencies: + chalk "^1.1.1" + micromatch "^2.3.11" + +jest-mock@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-19.0.0.tgz#67038641e9607ab2ce08ec4a8cb83aabbc899d01" + +jest-regex-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-19.0.0.tgz#b7754587112aede1456510bb1f6afe74ef598691" + +jest-resolve-dependencies@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-19.0.0.tgz#a741ad1fa094140e64ecf2642a504f834ece22ee" + dependencies: + jest-file-exists "^19.0.0" + +jest-resolve@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-19.0.2.tgz#5793575de4f07aec32f7d7ff0c6c181963eefb3c" + dependencies: + browser-resolve "^1.11.2" + jest-haste-map "^19.0.0" + resolve "^1.2.0" + +jest-runtime@^19.0.2: + version "19.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-19.0.4.tgz#f167d9f1347752f2027361067926485349fcc245" + dependencies: + babel-core "^6.0.0" + babel-jest "^19.0.0" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.6" + jest-config "^19.0.2" + jest-file-exists "^19.0.0" + jest-haste-map "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-util "^19.0.2" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^6.3.0" + +jest-snapshot@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-19.0.2.tgz#9c1b216214f7187c38bfd5c70b1efab16b0ff50b" + dependencies: + chalk "^1.1.3" + jest-diff "^19.0.0" + jest-file-exists "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-util "^19.0.2" + natural-compare "^1.4.0" + pretty-format "^19.0.0" + +jest-util@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-19.0.2.tgz#e0a0232a2ab9e6b2b53668bdb3534c2b5977ed41" + dependencies: + chalk "^1.1.1" + graceful-fs "^4.1.6" + jest-file-exists "^19.0.0" + jest-message-util "^19.0.0" + jest-mock "^19.0.0" + jest-validate "^19.0.2" + leven "^2.0.0" + mkdirp "^0.5.1" + +jest-validate@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.2.tgz#dc534df5f1278d5b63df32b14241d4dbf7244c0c" + dependencies: + chalk "^1.1.1" + jest-matcher-utils "^19.0.0" + leven "^2.0.0" + pretty-format "^19.0.0" + +jest@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-19.0.2.tgz#b794faaf8ff461e7388f28beef559a54f20b2c10" + dependencies: + jest-cli "^19.0.2" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.7.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsdom@^9.11.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leven@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash@^4.14.0, lodash@^4.17.4: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.29.0: + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.16" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + dependencies: + mime-db "~1.29.0" + +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^5.0.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +normalize-package-data@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.1" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.1.tgz#7ae9b07b0ea804db7e25f05cb5fe4097d4e4949f" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-format@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" + dependencies: + ansi-styles "^3.0.0" + +private@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sane@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.5.0.tgz#a4adeae764d048621ecb27d5f9ecf513101939f3" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +shellwords@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map-support@^0.4.15: + version "0.4.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +throat@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uuid@^3.0.0, uuid@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.1.1, which@^1.2.12: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs@^6.3.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql/README.md b/drafts/bs-graphql-bindings/packages/bs-graphql/README.md new file mode 100644 index 0000000..8bf0ed9 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql/README.md @@ -0,0 +1,39 @@ +# bs-graphql + +[![npm version](https://badge.fury.io/js/bs-graphql.svg)](https://badge.fury.io/js/bs-graphql) + +[BuckleScript](https://bucklescript.github.io/) binding for [graphql-js](http://graphql.org/graphql-js/). + +## Installation + +Since you can only have one instance type of graphql schema in your dependency tree, we leave you the discretion of managing the graphql package yourself. + +``` +npm install --save graphql bs-graphql +# or +yarn add graphql bs-graphql +``` + +As always, you will need to indicate to BuckleScript that the binding is available. + +`bsconfig.json` +```json +{ + ... + "bs-dependencies": [ + "bs-graphql" + ] +} +``` + +## Usage + +> **WARNING:** This package has been published so far with the only goal of being usable for simple graphql server development. For now, you can only count on `graphql` and `buildSchema` functions alongside a sugared call to `graphql`: `run`. You are obviously welcome to contribute any other missing part! + +You can use this binding to build and execute some simple GraphQL schemas: + +```reason +let schema = GraphQL.Utilities.buildSchema "type Query { me: User } type User { name: String }"; +let rootValue = {"me": fun () => {"name": "reason"}}; +Js.log (GraphQL.run schema ::rootValue "{ me { name } }"); +``` diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql/bsconfig.json b/drafts/bs-graphql-bindings/packages/bs-graphql/bsconfig.json new file mode 100644 index 0000000..2f14c62 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql/bsconfig.json @@ -0,0 +1,13 @@ +{ + "name": "bs-graphql", + "sources": [ + "src", + { + "dir": "src/__tests__", + "type": "dev" + } + ], + "bs-dev-dependencies": [ + "bs-jest" + ] +} diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql/package.json b/drafts/bs-graphql-bindings/packages/bs-graphql/package.json new file mode 100644 index 0000000..d48550a --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql/package.json @@ -0,0 +1,23 @@ +{ + "name": "bs-graphql", + "version": "0.3.1", + "description": "BuckleScript binding for graphql-js", + "keywords": [ + "BuckleScript", + "GraphQL" + ], + "license": "MIT", + "scripts": { + "clean": "bsb -clean-world", + "build": "bsb -make-world", + "watch": "bsb -make-world -w", + "pretest": "npm run build", + "test": "jest" + }, + "peerDependencies": { + "graphql": "^0.10.5" + }, + "devDependencies": { + "bs-jest": "^0.1.0" + } +} diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql/src/GraphQL.re b/drafts/bs-graphql-bindings/packages/bs-graphql/src/GraphQL.re new file mode 100644 index 0000000..5ab11fb --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql/src/GraphQL.re @@ -0,0 +1,129 @@ +module Language = { + type location = Js.t {. line : int, column : int}; + type source = Js.t {. body : string, name : string, locationOffset : location}; + type astNode; +}; + +module Error = { + + /** + * Represents a GraphQL Error type + */ + type error = + Js.t { + . + message : string, + locations : Js.null_undefined (Js.Array.t Language.location), + nodes : Js.null_undefined (Js.Array.t Language.astNode), + source : Js.null_undefined Language.source, + positions : Js.null_undefined (Js.Array.t int), + originalError : Js.null_undefined Js.Exn.t + }; +}; + +module Type = { + + /** + * Represents a compiled GraphQL schema + */ + type schema; + type resolveInfo; + type fieldResolver 'source 'context = + Js.t {. source : 'source, args : Js.Types.obj_val, context : 'context, info : resolveInfo} => + Js.Types.obj_val; +}; + +module Execution = { + + /** + * Represents a result from GraphQL, being either a success or a failure + */ + type executionResult 'dataObj = + Js.t {. data : Js.t 'dataObj, errors : Js.Null.t (Js.Array.t Error.error)}; + + /** + * Represents arguments being passed to the execution engine + * + * schema: + * The GraphQL type system to use when validating and executing a query. + * source: + * A GraphQL language formatted string representing the requested operation. + * rootValue: + * The value provided as the first argument to resolver functions on the top + * level type (e.g. the query object type). + * variableCalues: + * A mapping of variable name to runtime value to use for all variables + * defined in the requestString. + * operationName: + * The name of the operation to use if requestString contains multiple + * possible operations. Can be omitted if requestString contains only + * one operation. + * fieldResolver: + * A resolver function to use when one is not provided by the schema. + * If not provided, the default field resolver is used (which looks for a + * value or method on the source value with the field's name). + */ + type executionArgs 'rootObjType 'contextObjType 'variableValuesObjType 'resolverFunc = + Js.t { + . + schema : Type.schema, + source : string, + rootValue : Js.null_undefined (Js.t 'rootObjType), + contextValue : Js.null_undefined (Js.t 'contextObjType), + variableValue : Js.null_undefined (Js.t 'variableValuesObjType), + operationName : Js.null_undefined string, + fieldResolver : Js.null_undefined 'resolverFunc + }; +}; + +module Utilities = { + + /** + * A helper function to build a GraphQLSchema directly from a source + * document. + */ + external buildSchema : string => Type.schema = "buildSchema" [@@bs.module "graphql"]; +}; + +module Validation = { + type validationContext; +}; + + +/** + * This is the primary entry point function for fulfilling GraphQL operations + * by parsing, validating, and executing a GraphQL document along side a + * GraphQL schema. + * + * More sophisticated GraphQL servers, such as those which persist queries, + * may wish to separate the validation and execution phases to a static time + * tooling step, and a server runtime step. + * + * Accepts either an object with named arguments. + */ +external graphql : + Execution.executionArgs 'rootObjType 'contextObjType 'variableValuesObjType 'resolverFunc => + Js.Promise.t (Execution.executionResult 'a) = + "graphql" [@@bs.module "graphql"]; + + +/** + * Easy to use wrapper of the graphql call + */ +let run + ::rootValue=? + ::contextValue=? + ::variableValue=? + ::operationName=? + ::fieldResolver=? + schema + source => + graphql { + "schema": schema, + "source": source, + "rootValue": Js.Null_undefined.from_opt rootValue, + "contextValue": Js.Null_undefined.from_opt contextValue, + "variableValue": Js.Null_undefined.from_opt variableValue, + "operationName": Js.Null_undefined.from_opt operationName, + "fieldResolver": Js.Null_undefined.from_opt fieldResolver + }; diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql/src/__tests__/GraphQLTest.re b/drafts/bs-graphql-bindings/packages/bs-graphql/src/__tests__/GraphQLTest.re new file mode 100644 index 0000000..c0a4656 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql/src/__tests__/GraphQLTest.re @@ -0,0 +1,67 @@ +open Jest; + +open ExpectJs; + +let () = { + let schema = GraphQL.Utilities.buildSchema "type Query { hello: String }"; + let rootValue = {"hello": fun () => "world"}; + let source = "{ hello }"; + describe + "#run" + ( + fun () => + testPromise + "run queries through the function" + ( + fun () => + GraphQL.run schema source ::rootValue |> + Js.Promise.then_ ( + fun execResult => + Js.Promise.resolve (expect execResult##data##hello |> toEqual "world") + ) + ) + ); + describe + "#graphql" + ( + fun () => + testPromise + "run queries through the function" + ( + fun () => + GraphQL.graphql { + "schema": schema, + "source": source, + "rootValue": Js.Null_undefined.return rootValue, + "contextValue": Js.Null_undefined.undefined, + "variableValue": Js.Null_undefined.undefined, + "operationName": Js.Null_undefined.undefined, + "fieldResolver": Js.Null_undefined.undefined + } |> + Js.Promise.then_ ( + fun execResult => + Js.Promise.resolve (expect execResult##data##hello |> toEqual "world") + ) + ) + ); + describe + "Utilities#buildSchema" + ( + fun () => + testPromise + "creates a usable schema with nested types" + ( + fun () => { + let schema = + GraphQL.Utilities.buildSchema "type Query { me: User } type User { name: String }"; + let rootValue = {"me": fun () => {"name": "reason"}}; + let source = "{ me { name } }"; + GraphQL.run schema source ::rootValue |> + Js.Promise.then_ ( + fun execResult => + Js.Promise.resolve (expect execResult##data##me##name |> toEqual "reason") + ) + } + ) + ) +}; diff --git a/drafts/bs-graphql-bindings/packages/bs-graphql/yarn.lock b/drafts/bs-graphql-bindings/packages/bs-graphql/yarn.lock new file mode 100644 index 0000000..4ac6fe7 --- /dev/null +++ b/drafts/bs-graphql-bindings/packages/bs-graphql/yarn.lock @@ -0,0 +1,2001 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.0, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.6" + trim-right "^1.0.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-19.0.0.tgz#59323ced99a3a84d359da219ca881074ffc6ce3f" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^19.0.0" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" + +babel-plugin-jest-hoist@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz#4ae2a04ea612a6e73651f3fde52c178991304bea" + +babel-preset-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-19.0.0.tgz#22d67201d02324a195811288eb38294bb3cac396" + dependencies: + babel-plugin-jest-hoist "^19.0.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.17.4, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +bs-jest@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bs-jest/-/bs-jest-0.1.0.tgz#33c3a81d4980ec8dde97b5c8398c5388df26b859" + dependencies: + jest "^19.0.2" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +convert-source-map@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +debug@^2.6.3, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +errno@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.3.0, extsprintf@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.3, glob@^7.0.5: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-ci@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.0-alpha.1: + version "1.1.11" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.11.tgz#fcc0b461e2b3bda71e305155138238768257d9de" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.4" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" + +istanbul-lib-hook@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.17.4" + istanbul-lib-coverage "^1.1.1" + semver "^5.3.0" + +istanbul-lib-report@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" + dependencies: + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-19.0.2.tgz#16c54c84c3270be408e06d2e8af3f3e37a885824" + +jest-cli@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-19.0.2.tgz#cc3620b62acac5f2d93a548cb6ef697d4ec85443" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.1" + graceful-fs "^4.1.6" + is-ci "^1.0.9" + istanbul-api "^1.1.0-alpha.1" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-instrument "^1.1.1" + jest-changed-files "^19.0.2" + jest-config "^19.0.2" + jest-environment-jsdom "^19.0.2" + jest-haste-map "^19.0.0" + jest-jasmine2 "^19.0.2" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve-dependencies "^19.0.0" + jest-runtime "^19.0.2" + jest-snapshot "^19.0.2" + jest-util "^19.0.2" + micromatch "^2.3.11" + node-notifier "^5.0.1" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.1.1" + worker-farm "^1.3.1" + yargs "^6.3.0" + +jest-config@^19.0.2: + version "19.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-19.0.4.tgz#42980211d46417e91ca7abffd086c270234f73fd" + dependencies: + chalk "^1.1.1" + jest-environment-jsdom "^19.0.2" + jest-environment-node "^19.0.2" + jest-jasmine2 "^19.0.2" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-validate "^19.0.2" + pretty-format "^19.0.0" + +jest-diff@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-19.0.0.tgz#d1563cfc56c8b60232988fbc05d4d16ed90f063c" + dependencies: + chalk "^1.1.3" + diff "^3.0.0" + jest-matcher-utils "^19.0.0" + pretty-format "^19.0.0" + +jest-environment-jsdom@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-19.0.2.tgz#ceda859c4a4b94ab35e4de7dab54b926f293e4a3" + dependencies: + jest-mock "^19.0.0" + jest-util "^19.0.2" + jsdom "^9.11.0" + +jest-environment-node@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-19.0.2.tgz#6e84079db87ed21d0c05e1f9669f207b116fe99b" + dependencies: + jest-mock "^19.0.0" + jest-util "^19.0.2" + +jest-file-exists@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-19.0.0.tgz#cca2e587a11ec92e24cfeab3f8a94d657f3fceb8" + +jest-haste-map@^19.0.0: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-19.0.2.tgz#286484c3a16e86da7872b0877c35dce30c3d6f07" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.6" + micromatch "^2.3.11" + sane "~1.5.0" + worker-farm "^1.3.1" + +jest-jasmine2@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-19.0.2.tgz#167991ac825981fb1a800af126e83afcca832c73" + dependencies: + graceful-fs "^4.1.6" + jest-matcher-utils "^19.0.0" + jest-matchers "^19.0.0" + jest-message-util "^19.0.0" + jest-snapshot "^19.0.2" + +jest-matcher-utils@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" + dependencies: + chalk "^1.1.3" + pretty-format "^19.0.0" + +jest-matchers@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-19.0.0.tgz#c74ecc6ebfec06f384767ba4d6fa4a42d6755754" + dependencies: + jest-diff "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + +jest-message-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-19.0.0.tgz#721796b89c0e4d761606f9ba8cb828a3b6246416" + dependencies: + chalk "^1.1.1" + micromatch "^2.3.11" + +jest-mock@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-19.0.0.tgz#67038641e9607ab2ce08ec4a8cb83aabbc899d01" + +jest-regex-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-19.0.0.tgz#b7754587112aede1456510bb1f6afe74ef598691" + +jest-resolve-dependencies@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-19.0.0.tgz#a741ad1fa094140e64ecf2642a504f834ece22ee" + dependencies: + jest-file-exists "^19.0.0" + +jest-resolve@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-19.0.2.tgz#5793575de4f07aec32f7d7ff0c6c181963eefb3c" + dependencies: + browser-resolve "^1.11.2" + jest-haste-map "^19.0.0" + resolve "^1.2.0" + +jest-runtime@^19.0.2: + version "19.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-19.0.4.tgz#f167d9f1347752f2027361067926485349fcc245" + dependencies: + babel-core "^6.0.0" + babel-jest "^19.0.0" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.6" + jest-config "^19.0.2" + jest-file-exists "^19.0.0" + jest-haste-map "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-util "^19.0.2" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^6.3.0" + +jest-snapshot@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-19.0.2.tgz#9c1b216214f7187c38bfd5c70b1efab16b0ff50b" + dependencies: + chalk "^1.1.3" + jest-diff "^19.0.0" + jest-file-exists "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-util "^19.0.2" + natural-compare "^1.4.0" + pretty-format "^19.0.0" + +jest-util@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-19.0.2.tgz#e0a0232a2ab9e6b2b53668bdb3534c2b5977ed41" + dependencies: + chalk "^1.1.1" + graceful-fs "^4.1.6" + jest-file-exists "^19.0.0" + jest-message-util "^19.0.0" + jest-mock "^19.0.0" + jest-validate "^19.0.2" + leven "^2.0.0" + mkdirp "^0.5.1" + +jest-validate@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.2.tgz#dc534df5f1278d5b63df32b14241d4dbf7244c0c" + dependencies: + chalk "^1.1.1" + jest-matcher-utils "^19.0.0" + leven "^2.0.0" + pretty-format "^19.0.0" + +jest@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-19.0.2.tgz#b794faaf8ff461e7388f28beef559a54f20b2c10" + dependencies: + jest-cli "^19.0.2" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.7.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsdom@^9.11.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leven@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash@^4.14.0, lodash@^4.17.4: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.29.0: + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.16" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + dependencies: + mime-db "~1.29.0" + +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^5.0.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +normalize-package-data@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.1" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.1.tgz#7ae9b07b0ea804db7e25f05cb5fe4097d4e4949f" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-format@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" + dependencies: + ansi-styles "^3.0.0" + +private@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +safe-buffer@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sane@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.5.0.tgz#a4adeae764d048621ecb27d5f9ecf513101939f3" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +shellwords@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map-support@^0.4.15: + version "0.4.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +throat@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uuid@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.1.1, which@^1.2.12: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs@^6.3.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/drafts/bs-graphql-bindings/yarn.lock b/drafts/bs-graphql-bindings/yarn.lock new file mode 100644 index 0000000..ddc99d8 --- /dev/null +++ b/drafts/bs-graphql-bindings/yarn.lock @@ -0,0 +1,3042 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +JSONStream@^1.0.4: + version "1.3.1" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn@^4.0.4: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +add-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" + +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-escapes@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0, ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +aproba@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.2.tgz#45c6629094de4e96f693ef7eab74ae079c240fc1" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-ify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async@^1.4.0, async@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-core@^6.0.0, babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + dependencies: + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" + slash "^1.0.0" + source-map "^0.5.6" + +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.6" + trim-right "^1.0.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-19.0.0.tgz#59323ced99a3a84d359da219ca881074ffc6ce3f" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^19.0.0" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.4" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.4.tgz#18dde84bf3ce329fddf3f4103fae921456d8e587" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.2" + test-exclude "^4.1.1" + +babel-plugin-jest-hoist@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz#4ae2a04ea612a6e73651f3fde52c178991304bea" + +babel-preset-jest@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-19.0.0.tgz#22d67201d02324a195811288eb38294bb3cac396" + dependencies: + babel-plugin-jest-hoist "^19.0.0" + +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + dependencies: + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + home-or-tmp "^2.0.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + source-map-support "^0.4.15" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.17.4, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +bs-jest@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/bs-jest/-/bs-jest-0.1.0.tgz#33c3a81d4980ec8dde97b5c8398c5388df26b859" + dependencies: + jest "^19.0.2" + +bs-platform@1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-1.8.2.tgz#2aba1cfc73e21feaa8902d67b5ddbec975938554" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +byline@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +cmd-shim@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + dependencies: + graceful-fs "^4.1.2" + mkdirp "~0.5.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +columnify@^1.5.4: + version "1.5.4" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + dependencies: + strip-ansi "^3.0.0" + wcwidth "^1.0.0" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +command-join@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" + +compare-func@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + dependencies: + array-ify "^1.0.0" + dot-prop "^3.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.10: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +conventional-changelog-angular@^1.3.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.4.0.tgz#118b9f7d41a3d99500bfb6bea1f3525e055e8b9b" + dependencies: + compare-func "^1.3.1" + github-url-from-git "^1.4.0" + q "^1.4.1" + read-pkg-up "^2.0.0" + +conventional-changelog-atom@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f" + dependencies: + q "^1.4.1" + +conventional-changelog-cli@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.2.tgz#33abf2b5720a9b094df38e81741ccb502e1a4125" + dependencies: + add-stream "^1.0.0" + conventional-changelog "^1.1.4" + lodash "^4.1.0" + meow "^3.7.0" + tempfile "^1.1.1" + +conventional-changelog-codemirror@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.1.0.tgz#7577a591dbf9b538e7a150a7ee62f65a2872b334" + dependencies: + q "^1.4.1" + +conventional-changelog-core@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.0.tgz#de5dfbc091847656508d4a389e35c9a1bc49e7f4" + dependencies: + conventional-changelog-writer "^1.1.0" + conventional-commits-parser "^1.0.0" + dateformat "^1.0.12" + get-pkg-repo "^1.0.0" + git-raw-commits "^1.2.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^1.2.0" + lodash "^4.0.0" + normalize-package-data "^2.3.5" + q "^1.4.1" + read-pkg "^1.1.0" + read-pkg-up "^1.0.1" + through2 "^2.0.0" + +conventional-changelog-ember@^0.2.6: + version "0.2.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.6.tgz#8b7355419f5127493c4c562473ab2fc792f1c2b6" + dependencies: + q "^1.4.1" + +conventional-changelog-eslint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.1.0.tgz#a52411e999e0501ce500b856b0a643d0330907e2" + dependencies: + q "^1.4.1" + +conventional-changelog-express@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.1.0.tgz#55c6c841c811962036c037bdbd964a54ae310fce" + dependencies: + q "^1.4.1" + +conventional-changelog-jquery@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510" + dependencies: + q "^1.4.1" + +conventional-changelog-jscs@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c" + dependencies: + q "^1.4.1" + +conventional-changelog-jshint@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.1.0.tgz#00cab8e9a3317487abd94c4d84671342918d2a07" + dependencies: + compare-func "^1.3.1" + q "^1.4.1" + +conventional-changelog-writer@^1.1.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-1.4.1.tgz#3f4cb4d003ebb56989d30d345893b52a43639c8e" + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^1.0.0" + dateformat "^1.0.11" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.0.0" + meow "^3.3.0" + semver "^5.0.1" + split "^1.0.0" + through2 "^2.0.0" + +conventional-changelog@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.4.tgz#108bc750c2a317e200e2f9b413caaa1f8c7efa3b" + dependencies: + conventional-changelog-angular "^1.3.4" + conventional-changelog-atom "^0.1.0" + conventional-changelog-codemirror "^0.1.0" + conventional-changelog-core "^1.9.0" + conventional-changelog-ember "^0.2.6" + conventional-changelog-eslint "^0.1.0" + conventional-changelog-express "^0.1.0" + conventional-changelog-jquery "^0.1.0" + conventional-changelog-jscs "^0.1.0" + conventional-changelog-jshint "^0.1.0" + +conventional-commits-filter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039" + dependencies: + is-subset "^0.1.1" + modify-values "^1.0.0" + +conventional-commits-parser@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-commits-parser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + +conventional-recommended-bump@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.1.tgz#56b8ae553a8a1152fa069e767599e1f6948bd36c" + dependencies: + concat-stream "^1.4.10" + conventional-commits-filter "^1.0.0" + conventional-commits-parser "^2.0.0" + git-raw-commits "^1.2.0" + git-semver-tags "^1.2.1" + meow "^3.3.0" + object-assign "^4.0.1" + +convert-source-map@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.0.tgz#569c050918be6486b3837552028ae0466b717086" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + dependencies: + number-is-nan "^1.0.0" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +dateformat@^1.0.11, dateformat@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9" + dependencies: + get-stdin "^4.0.1" + meow "^3.3.0" + +debug@^2.6.3, debug@^2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + +diff@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.0.tgz#056695150d7aa93237ca7e378ac3b1682b7963b9" + +dot-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + dependencies: + is-obj "^1.0.0" + +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +errno@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +execa@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.31" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.3.0, extsprintf@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-extra@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-pkg-repo@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" + dependencies: + hosted-git-info "^2.1.4" + meow "^3.3.0" + normalize-package-data "^2.3.0" + parse-github-repo-url "^1.3.0" + through2 "^2.0.0" + +get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +git-raw-commits@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c" + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^3.3.0" + split2 "^2.0.0" + through2 "^2.0.0" + +git-remote-origin-url@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" + dependencies: + gitconfiglocal "^1.0.0" + pify "^2.3.0" + +git-semver-tags@^1.2.0, git-semver-tags@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.1.tgz#6ccd2a52e735b736748dc762444fcd9588e27490" + dependencies: + meow "^3.3.0" + semver "^5.0.1" + +gitconfiglocal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" + dependencies: + ini "^1.3.2" + +github-url-from-git@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/github-url-from-git/-/github-url-from-git-1.5.0.tgz#f985fedcc0a9aa579dc88d7aff068d55cc6251a0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graphql@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.5.tgz#c9be17ca2bdfdbd134077ffd9bbaa48b8becd298" + dependencies: + iterall "^1.1.0" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.2, handlebars@^4.0.3: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +home-or-tmp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +iconv-lite@^0.4.17: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@^1.3.2: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^3.0.6: + version "3.2.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.2.tgz#c2aaede1507cc54d826818737742d621bef2e823" + dependencies: + ansi-escapes "^2.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-ci@^1.0.10, is-ci@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-subset@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + +is-text-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + dependencies: + text-extensions "^1.0.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.0-alpha.1: + version "1.1.11" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.11.tgz#fcc0b461e2b3bda71e305155138238768257d9de" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.1" + istanbul-lib-hook "^1.0.7" + istanbul-lib-instrument "^1.7.4" + istanbul-lib-report "^1.1.1" + istanbul-lib-source-maps "^1.2.1" + istanbul-reports "^1.1.1" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" + +istanbul-lib-hook@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.7.tgz#dd6607f03076578fe7d6f2a630cf143b49bacddc" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.7.2, istanbul-lib-instrument@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.4.tgz#e9fd920e4767f3d19edc765e2d6b3f5ccbd0eea8" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.17.4" + istanbul-lib-coverage "^1.1.1" + semver "^5.3.0" + +istanbul-lib-report@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#f0e55f56655ffa34222080b7a0cd4760e1405fc9" + dependencies: + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.1.tgz#a6fe1acba8ce08eebc638e572e294d267008aa0c" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.1" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.1.tgz#042be5c89e175bc3f86523caab29c014e77fee4e" + dependencies: + handlebars "^4.0.3" + +iterall@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.1.tgz#f7f0af11e9a04ec6426260f5019d9fcca4d50214" + +jest-changed-files@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-19.0.2.tgz#16c54c84c3270be408e06d2e8af3f3e37a885824" + +jest-cli@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-19.0.2.tgz#cc3620b62acac5f2d93a548cb6ef697d4ec85443" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.1" + graceful-fs "^4.1.6" + is-ci "^1.0.9" + istanbul-api "^1.1.0-alpha.1" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-instrument "^1.1.1" + jest-changed-files "^19.0.2" + jest-config "^19.0.2" + jest-environment-jsdom "^19.0.2" + jest-haste-map "^19.0.0" + jest-jasmine2 "^19.0.2" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve-dependencies "^19.0.0" + jest-runtime "^19.0.2" + jest-snapshot "^19.0.2" + jest-util "^19.0.2" + micromatch "^2.3.11" + node-notifier "^5.0.1" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.1.1" + worker-farm "^1.3.1" + yargs "^6.3.0" + +jest-config@^19.0.2: + version "19.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-19.0.4.tgz#42980211d46417e91ca7abffd086c270234f73fd" + dependencies: + chalk "^1.1.1" + jest-environment-jsdom "^19.0.2" + jest-environment-node "^19.0.2" + jest-jasmine2 "^19.0.2" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-validate "^19.0.2" + pretty-format "^19.0.0" + +jest-diff@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-19.0.0.tgz#d1563cfc56c8b60232988fbc05d4d16ed90f063c" + dependencies: + chalk "^1.1.3" + diff "^3.0.0" + jest-matcher-utils "^19.0.0" + pretty-format "^19.0.0" + +jest-environment-jsdom@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-19.0.2.tgz#ceda859c4a4b94ab35e4de7dab54b926f293e4a3" + dependencies: + jest-mock "^19.0.0" + jest-util "^19.0.2" + jsdom "^9.11.0" + +jest-environment-node@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-19.0.2.tgz#6e84079db87ed21d0c05e1f9669f207b116fe99b" + dependencies: + jest-mock "^19.0.0" + jest-util "^19.0.2" + +jest-file-exists@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-19.0.0.tgz#cca2e587a11ec92e24cfeab3f8a94d657f3fceb8" + +jest-haste-map@^19.0.0: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-19.0.2.tgz#286484c3a16e86da7872b0877c35dce30c3d6f07" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.6" + micromatch "^2.3.11" + sane "~1.5.0" + worker-farm "^1.3.1" + +jest-jasmine2@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-19.0.2.tgz#167991ac825981fb1a800af126e83afcca832c73" + dependencies: + graceful-fs "^4.1.6" + jest-matcher-utils "^19.0.0" + jest-matchers "^19.0.0" + jest-message-util "^19.0.0" + jest-snapshot "^19.0.2" + +jest-matcher-utils@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" + dependencies: + chalk "^1.1.3" + pretty-format "^19.0.0" + +jest-matchers@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-19.0.0.tgz#c74ecc6ebfec06f384767ba4d6fa4a42d6755754" + dependencies: + jest-diff "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-message-util "^19.0.0" + jest-regex-util "^19.0.0" + +jest-message-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-19.0.0.tgz#721796b89c0e4d761606f9ba8cb828a3b6246416" + dependencies: + chalk "^1.1.1" + micromatch "^2.3.11" + +jest-mock@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-19.0.0.tgz#67038641e9607ab2ce08ec4a8cb83aabbc899d01" + +jest-regex-util@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-19.0.0.tgz#b7754587112aede1456510bb1f6afe74ef598691" + +jest-resolve-dependencies@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-19.0.0.tgz#a741ad1fa094140e64ecf2642a504f834ece22ee" + dependencies: + jest-file-exists "^19.0.0" + +jest-resolve@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-19.0.2.tgz#5793575de4f07aec32f7d7ff0c6c181963eefb3c" + dependencies: + browser-resolve "^1.11.2" + jest-haste-map "^19.0.0" + resolve "^1.2.0" + +jest-runtime@^19.0.2: + version "19.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-19.0.4.tgz#f167d9f1347752f2027361067926485349fcc245" + dependencies: + babel-core "^6.0.0" + babel-jest "^19.0.0" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.6" + jest-config "^19.0.2" + jest-file-exists "^19.0.0" + jest-haste-map "^19.0.0" + jest-regex-util "^19.0.0" + jest-resolve "^19.0.2" + jest-util "^19.0.2" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^6.3.0" + +jest-snapshot@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-19.0.2.tgz#9c1b216214f7187c38bfd5c70b1efab16b0ff50b" + dependencies: + chalk "^1.1.3" + jest-diff "^19.0.0" + jest-file-exists "^19.0.0" + jest-matcher-utils "^19.0.0" + jest-util "^19.0.2" + natural-compare "^1.4.0" + pretty-format "^19.0.0" + +jest-util@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-19.0.2.tgz#e0a0232a2ab9e6b2b53668bdb3534c2b5977ed41" + dependencies: + chalk "^1.1.1" + graceful-fs "^4.1.6" + jest-file-exists "^19.0.0" + jest-message-util "^19.0.0" + jest-mock "^19.0.0" + jest-validate "^19.0.2" + leven "^2.0.0" + mkdirp "^0.5.1" + +jest-validate@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.2.tgz#dc534df5f1278d5b63df32b14241d4dbf7244c0c" + dependencies: + chalk "^1.1.1" + jest-matcher-utils "^19.0.0" + leven "^2.0.0" + pretty-format "^19.0.0" + +jest@^19.0.2: + version "19.0.2" + resolved "https://registry.yarnpkg.com/jest/-/jest-19.0.2.tgz#b794faaf8ff461e7388f28beef559a54f20b2c10" + dependencies: + jest-cli "^19.0.2" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@^3.7.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.9.1.tgz#08775cebdfdd359209f0d2acd383c8f86a6904a0" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jschardet@^1.4.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9" + +jsdom@^9.11.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +lerna@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0.tgz#49a72fe70e06aebfd7ea23efb2ab41abe60ebeea" + dependencies: + async "^1.5.0" + chalk "^1.1.1" + cmd-shim "^2.0.2" + columnify "^1.5.4" + command-join "^2.0.0" + conventional-changelog-cli "^1.3.1" + conventional-recommended-bump "^1.0.0" + dedent "^0.7.0" + execa "^0.6.3" + find-up "^2.1.0" + fs-extra "^3.0.1" + get-port "^3.1.0" + glob "^7.1.2" + globby "^6.1.0" + graceful-fs "^4.1.11" + inquirer "^3.0.6" + is-ci "^1.0.10" + load-json-file "^2.0.0" + lodash "^4.17.4" + minimatch "^3.0.4" + npmlog "^4.1.0" + p-finally "^1.0.0" + path-exists "^3.0.0" + read-cmd-shim "^1.0.1" + read-pkg "^2.0.0" + rimraf "^2.6.1" + safe-buffer "^5.0.1" + semver "^5.1.0" + signal-exit "^3.0.2" + strong-log-transformer "^1.0.6" + temp-write "^3.3.0" + write-file-atomic "^2.1.0" + write-json-file "^2.1.0" + write-pkg "^3.0.1" + yargs "^8.0.1" + +leven@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash.template@^4.0.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash@^4.0.0, lodash@^4.1.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lru-cache@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +make-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" + dependencies: + pify "^2.3.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + dependencies: + mimic-fn "^1.0.0" + +meow@^3.3.0, meow@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.29.0: + version "1.29.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.29.0.tgz#48d26d235589651704ac5916ca06001914266878" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.16" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.16.tgz#2b858a52e5ecd516db897ac2be87487830698e23" + dependencies: + mime-db "~1.29.0" + +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" + +minimist@^1.1.1, minimist@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@^0.5.1, mkdirp@~0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +modify-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" + +moment@^2.6.0: + version "2.18.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^5.0.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npmlog@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.1" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.1.tgz#7ae9b07b0ea804db7e25f05cb5fe4097d4e4949f" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +parse-github-repo-url@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.0.tgz#286c53e2c9962e0641649ee3ac9508fca4dd959c" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-format@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" + dependencies: + ansi-styles "^3.0.0" + +private@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +q@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +read-cmd-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" + dependencies: + graceful-fs "^4.1.2" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^1.0.0, read-pkg@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + safe-buffer "~5.1.1" + string_decoder "~1.0.3" + util-deprecate "~1.0.1" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + +safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +sane@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.5.0.tgz#a4adeae764d048621ecb27d5f9ecf513101939f3" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +"semver@2 || 3 || 4 || 5", semver@^5.0.1, semver@^5.1.0, semver@^5.3.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shellwords@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sort-keys@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + dependencies: + is-plain-obj "^1.0.0" + +source-map-support@^0.4.15: + version "0.4.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.16.tgz#16fecf98212467d017d586a2af68d628b9421cd8" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +split2@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.1.1.tgz#7a1f551e176a90ecd3345f7246a0cfe175ef4fd0" + dependencies: + through2 "^2.0.2" + +split@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + dependencies: + through "2" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0, string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strong-log-transformer@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-1.0.6.tgz#f7fb93758a69a571140181277eea0c2eb1301fa3" + dependencies: + byline "^5.0.0" + duplexer "^0.1.1" + minimist "^0.1.0" + moment "^2.6.0" + through "^2.3.4" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +supports-color@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.2.1.tgz#65a4bb2631e90e02420dba5554c375a4754bb836" + dependencies: + has-flag "^2.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +temp-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" + +temp-write@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-3.3.0.tgz#c1a96de2b36061342eae81f44ff001aec8f615a9" + dependencies: + graceful-fs "^4.1.2" + is-stream "^1.1.0" + make-dir "^1.0.0" + pify "^2.2.0" + temp-dir "^1.0.0" + uuid "^3.0.1" + +tempfile@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + +test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +text-extensions@^1.0.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.5.0.tgz#d1cb2d14b5d0bc45bfdca8a08a473f68c7eb0cbc" + +throat@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.2.0.tgz#50cb0670edbc40237b9e347d7e1f88e4620af836" + +through2@^2.0.0, through2@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-off-newlines@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +universalify@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +uuid@^3.0.0, uuid@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +wcwidth@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + dependencies: + defaults "^1.0.3" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + +which@^1.1.1, which@^1.2.12, which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.0.tgz#adfdf0cd40581465ed0a1f648f9735722afd5c8d" + dependencies: + errno "^0.1.4" + xtend "^4.0.1" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^2.0.0, write-file-atomic@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + signal-exit "^3.0.2" + +write-json-file@^2.1.0, write-json-file@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-2.2.0.tgz#51862506bbb3b619eefab7859f1fd6c6d0530876" + dependencies: + detect-indent "^5.0.0" + graceful-fs "^4.1.2" + make-dir "^1.0.0" + pify "^2.0.0" + sort-keys "^1.1.1" + write-file-atomic "^2.0.0" + +write-pkg@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-3.1.0.tgz#030a9994cc9993d25b4e75a9f1a1923607291ce9" + dependencies: + sort-keys "^2.0.0" + write-json-file "^2.2.0" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +xtend@^4.0.1, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + +yargs@^6.3.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/drafts/bs-history/.gitignore b/drafts/bs-history/.gitignore new file mode 100644 index 0000000..b554532 --- /dev/null +++ b/drafts/bs-history/.gitignore @@ -0,0 +1,87 @@ +*.annot +*.cmo +*.cma +*.cmi +*.a +*.o +*.cmx +*.cmxs +*.cmxa + +# ocamlbuild working directory +_build/ + +# ocamlbuild targets +*.byte +*.native + +# oasis generated files +setup.data +setup.log + +# Created by https://www.gitignore.io/api/node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + + +# End of https://www.gitignore.io/api/node +lib/ +.merlin diff --git a/drafts/bs-history/LICENSE b/drafts/bs-history/LICENSE new file mode 100644 index 0000000..3424294 --- /dev/null +++ b/drafts/bs-history/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Jiayu Liu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-history/README.md b/drafts/bs-history/README.md new file mode 100644 index 0000000..be49292 --- /dev/null +++ b/drafts/bs-history/README.md @@ -0,0 +1,7 @@ +# bs-history + +[BuckleScript](https://github.com/bloomberg/bucklescript) bindings for [history](https://www.npmjs.com/package/history) + +## 🚧 WIP 🚧 + +Work in progress diff --git a/drafts/bs-history/bsconfig.json b/drafts/bs-history/bsconfig.json new file mode 100644 index 0000000..d49e0a2 --- /dev/null +++ b/drafts/bs-history/bsconfig.json @@ -0,0 +1,5 @@ +{ + "name": "bs-history", + "bsc-flags": ["-bs-super-errors"], + "sources": ["src"] +} diff --git a/drafts/bs-history/package.json b/drafts/bs-history/package.json new file mode 100644 index 0000000..a6b88e4 --- /dev/null +++ b/drafts/bs-history/package.json @@ -0,0 +1,29 @@ +{ + "name": "bs-history", + "version": "0.0.1", + "description": "BuckleScript bindings for History", + "main": "index.js", + "author": "Jiayu Liu ", + "repository": { + "type": "git", + "url": "git+https://github.com/reasonml-community/bs-history.git" + }, + "homepage": "https://github.com/reasonml-community/bs-history#readme", + "bugs": "https://github.com/reasonml-community/bs-history/issues", + "keywords": [ + "bucklescript", + "history", + "location" + ], + "license": "MIT", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "exit 0" + }, + "devDependencies": { + "bs-platform": "^1.9.0", + "history": "^4.6.1" + } +} diff --git a/drafts/bs-history/src/bs_history.re b/drafts/bs-history/src/bs_history.re new file mode 100644 index 0000000..82f62c9 --- /dev/null +++ b/drafts/bs-history/src/bs_history.re @@ -0,0 +1,43 @@ +module History = { + type t; + module Location = { + type t; + external pathname : t => string = "" [@@bs.get]; + external search : t => string = "" [@@bs.get]; + external hash : t => string = "" [@@bs.get]; + external key : t => option string = "" [@@bs.get] [@@bs.return null_undefined_to_opt]; + }; + type action = [ | `PUSH | `REPLACE | `POP] [@@bs.string]; + external length : t => int = "" [@@bs.get]; + external action : t => action = "" [@@bs.get]; + external location : t => string = "" [@@bs.get]; + external listen : t => location::Location.t => action::action => unit => unit = "" [@@bs.send]; + /* TODO: state typing */ + module State = { + type t; + }; + external push : t => url::string => state::list State.t => unit = "" [@@bs.send]; + external replace : t => url::string => state::list State.t => unit = "" [@@bs.send]; + external go : t => jumps::int => unit = "" [@@bs.send]; + external goBack : t => unit = "" [@@bs.send]; + external goForward : t => unit = "" [@@bs.send]; +}; + +type getUserConfirmation = path::string => confirmation::bool => unit; + +type browserHistoryOpt = { + basename: string, + forceRefresh: bool, + keyLength: int, + getUserConfirmation +}; + +external createBrowserHistory : browserHistoryOpt => History.t = "" [@@bs.module]; + +type memoryHistoryOpt = {initialEntries: list string, initialIndex: int, keyLength: int}; + +external createMemoryHistory : memoryHistoryOpt => History.t = "" [@@bs.module]; + +type hashHistoryOpt = {basename: string, hashType: string, getUserConfirmation}; + +external createHashHistory : hashHistoryOpt => History.t = "" [@@bs.module]; diff --git a/drafts/bs-history/yarn.lock b/drafts/bs-history/yarn.lock new file mode 100644 index 0000000..767d51b --- /dev/null +++ b/drafts/bs-history/yarn.lock @@ -0,0 +1,47 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +bs-platform@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/bs-platform/-/bs-platform-1.6.0.tgz#c15900ed04a10c2fa532ade25b0582e4c29aedc9" + +history@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/history/-/history-4.6.1.tgz#911cf8eb65728555a94f2b12780a0c531a14d2fd" + dependencies: + invariant "^2.2.1" + loose-envify "^1.2.0" + resolve-pathname "^2.0.0" + value-equal "^0.2.0" + warning "^3.0.0" + +invariant@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + +loose-envify@^1.0.0, loose-envify@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +resolve-pathname@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.0.2.tgz#e55c016eb2e9df1de98e85002282bfb38c630436" + +value-equal@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.2.0.tgz#4f41c60a3fc011139a2ec3d3340a8998ae8b69c0" + +warning@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" + dependencies: + loose-envify "^1.0.0" diff --git a/drafts/bs-holochain/README.md b/drafts/bs-holochain/README.md new file mode 100644 index 0000000..6eeb06b --- /dev/null +++ b/drafts/bs-holochain/README.md @@ -0,0 +1,106 @@ +[Holochain API](https://developer.holochain.org/) bindings via +[Bucklescript](https://bucklescript.github.io). This library allows +you to write a [holochain](https://holochain.org) application in pure +Ocaml/Reason. + + +# Dependencies + +This project requires npm and bucklescript 4.0.1. To produce a real holochain app +you also need to unify the json into one big zome file. Rollup and babel are typical +choices. + +# Build +``` +make +``` + +# Install as a library + +In your dependent project run + +`npm install ` + + +# How to use + + +## Define your zomes as usual + +Create a dna.json and schema files as you would for any standard holochain app. +See their [DNA](https://developer.holochain.org/DNA) reference documentation +for further details on this step. + + +## Implement your zomes + +For each zome you define a module that instantiates a builder style functor to +accumulate all the entry definitions. + +```OCaml +(** Zome example *) +open Hc + +(* Instantiate a new zome builder with name equal to "myzome" *) +module Builder = Zome.Builder(struct let name = "myzome" end) + +(* Define a named data type "mydata" as an abstract json record. + Your dna.json would require a zome entry defined as well with the same name + and shape. +*) +module MyData = struct + let name = "mydata" + type t = {data:string} [@@bs.deriving abstract] +end + +(* Add the MyData entry type to the zome with validation functions + that simply accepts any input (eg. returns true or Null, + as the callback would require). + + The return moduled is an [Entry.S] signature, giving the developer + specialized commit, update, and get functions over the MyData entry. +*) +module MyDataEntry = Builder.Entry0(MyData)(Validate.Accept_all(MyData)) + + +(** Define input type to a zome function as a zome hash string of [MyData.t] *) +type args = MyData.t HashString.t + +(* Define a public zome function (this was defined in dna.json as + function named "dataExists") +*) +let dataExists args = + match MyDataEntry.get args with None -> false | Some _ -> true + + +(* Define a public zome function to add data to the DHT + (this was defined in dna.json as function named "addData") +*) +let addData data = + MyDataEntry.commit (MyData.t ~data) + +(* This finalizes the zome and includes the validation functions so they now serve + as javascript call back functions. + + Since a zome requires a genesis function and possibly a receiver function, so + does the below functor. In this example builtin modules are used for both. The + [Genesis.Success] module just returns true and does no initialization. Similarly, + the send and receive functions operate on the unit value. +*) +include Builder.Build(Genesis.Success)(SendReceive.Unit) +``` + +# Examples + +See [NewCraigsList, ported to OCaml](https://github.com/struktured/NewCraigsList) +for a more complex implementation. + +# Notes + +This library binds to the javascript api running on a *Go* server via Go's +Otto javascript interpreter. The holochain team is porting their stack from +Go to Rust/Web Assembly. + +Thus, this binding is subject to drastic change in the future. My hope is that +the OCaml/Reason abstraction boundary will ease migration to the new javascript api +(or web assembly directly). diff --git a/drafts/bs-holochain/package.json b/drafts/bs-holochain/package.json new file mode 100644 index 0000000..fdd0b67 --- /dev/null +++ b/drafts/bs-holochain/package.json @@ -0,0 +1,22 @@ +{ + "name": "bs-holochain", + "version": "0.1.0", + "scripts": { + "clean": "bsb -clean-world", + "build": "bsb -make-world", + "watch": "bsb -make-world -w" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/stuktured/bs-holochain.git" + }, + "keywords": [ + "BuckleScript" + ], + "author": "", + "license": "MIT", + "devDependencies": { + "bs-platform": "^4.0.0", + "@glennsl/bs-json": "^3.0.0" + } +} diff --git a/drafts/bs-holochain/src/bridge.ml b/drafts/bs-holochain/src/bridge.ml new file mode 100644 index 0000000..3e06251 --- /dev/null +++ b/drafts/bs-holochain/src/bridge.ml @@ -0,0 +1,10 @@ +open Constants +(** The type of a bridge. If side is [`From] then [toApp] is non empty. + If side is [`To], [token] is non empty. *) +type 'entry t = + { + toApp : 'entry HashString.t; + side:System.Bridge.t; + token:string + } [@@deriving bs.abstract] + diff --git a/drafts/bs-holochain/src/callbacks.ml b/drafts/bs-holochain/src/callbacks.ml new file mode 100644 index 0000000..b9f8db0 --- /dev/null +++ b/drafts/bs-holochain/src/callbacks.ml @@ -0,0 +1,128 @@ +open Constants + +(** Required callback functions *) +module type REQUIRED = sig + + (** Each zome must include this function, which is called during system + * genesis. It executes just after the initial genesis entries are committed + * to your chain (1st - DNA entry, 2nd Identity entry). It enables you + * specify any additional operations you want performed when a node joins + * your holochain, for example, you may want to add some user/address/key + * information to the DHT to announce the presence of this new node. This + * function must return true if it is to succeed, and the application to + * start successfully. *) + include Genesis.S + + (** This function gets called when an entry is about to be committed to a + * source chain. Use this function to describe the agreements about data as + * it should be added to shared Holochain. This function gets called for all + * entry types. For more background, read the Validation Functions section. + * *) + val validateCommit : entryType:string -> entry:Js.Json.t -> + header:Js.Json.t -> package:Js.Json.t -> sources:string array -> bool + + (** This function gets called when an entry is about to be committed to the + * DHT on any node. It is very likely that this validation routine should + * check the same data integrity as validateCommit, but, as it happens during + * a different part of the data life-cycle, it may require additional + * validation steps. This function will only get called on entry types with + * "public" sharing, as they are the only types that get put to the DHT by + * the system. For more background, read the Validation Functions section. *) + val validatePut : + entryType:string -> + entry:Js.Json.t -> + header:Js.Json.t -> + package:Js.Json.t -> + sources:string array -> bool + + (** This function gets called as a consequence of a mod command being issued. + replaces is the hash of the entry being replaced. For more background, + read the Validation Functions section. + *) + val validateMod : + entryType:string (* enum? *) -> + entry:Js.Json.t -> + header:Js.Json.t -> + replaces:string -> + package:Js.Json.t -> + sources:string array -> bool + + (** This function gets called as a consequence of a del command being issued. + * For more background, read the Validation Functions section. *) + val validateDel : + entryType:string (* enum? *) -> + hash:string -> + package:Js.Json.t -> + sources:string array -> bool + + (** This function gets called when ever links are being written to the DHT. + * Links are added for every linking element in the special "links" entry + * type. Note that this is a DHT level validation routine, in that it gets + * called when the Link message is received by a DHT node, not when the + * linking entry is committed. The regular validateCommit routine gets called + * as usual when that linking entry is committed to the source chain. For + * more background, read the Validation Functions section. *) + val validateLink: + entryType:string -> + hash:string -> + links:Js.Json.t array -> + package:Js.Json.t -> + sources:string array -> bool + + (** This function should simply return nil if the data required by its + * corresponding validation function is just the minimum default of the Entry + * and Header of the action. Otherwise this function must return a "Package + * Request" object, which specifies what data to be sent to the validating + * node. For more background, read the Validation Packaging section. + + Note that a commit action will trigger a call to validatePutPkg locally + when committing happens as validateCommit must have the same data + available to it as does validatePut. *) + val validatePutPkg : + entryType:string -> Js.Json.t (* or nil *) + + (** This function should simply return nil if the data required by its + * corresponding validation function is just the minimum default of the Entry + * and Header of the action. Otherwise this function must return a "Package + * Request" object, which specifies what data to be sent to the validating + * node. For more background, read the Validation Packaging section. *) + val validateModPkg : + entryType:string -> Js.Json.t (* or nil *) + + (** This function should simply return nil if the data required by its + * corresponding validation function is just the minimum default of the Entry + * and Header of the action. Otherwise this function must return a "Package + * Request" object, which specifies what data to be sent to the validating + * node. For more background, read the Validation Packaging section. *) + val validateDelPkg: + entryType:string -> Js.Json.t (* or nil *) + + (** This function should simply return nil if the data required by its + * corresponding validation function is just the minimum default of the Entry + * and Header of the action. Otherwise this function must return a "Package + * Request" object, which specifies what data to be sent to the validating + * node. For more background, read the Validation Packaging section. *) + val validateLinkPkg: + entryType:string -> Js.Json.t (* or nil *) + +end + + +(** Optional callbacks *) +module type OPTIONAL = sig + (** All zomes which expose functions for bridging from other applications + * MUST also define a bridgeGenesis function (i.e. the "Bridge-To" side). + * Zomes which want to call functions in other applications MAY define a + * bridgeGenesis function and declare that they do so by setting the + * Zome.BridgeTo value in their DNA. *) + val bridgeGenesis : side:System.Bridge.t -> dna:App0.DNA.hash -> + appData:string -> bool + + (** This function gets called by the system when a message is received by a + * node. The return value of the function will be sent back to the sender and + * will be the result of the send function that sent the message. The value + * you return from this function will be sent back to the node that sent you + * the message. *) + val receive : App0.Agent.hash -> message:Js.Json.t -> options:Js.Json.t -> + Js.Json.t +end diff --git a/drafts/bs-holochain/src/constants.ml b/drafts/bs-holochain/src/constants.ml new file mode 100644 index 0000000..ff0094a --- /dev/null +++ b/drafts/bs-holochain/src/constants.ml @@ -0,0 +1,189 @@ +(** Holochain global constants *) + +(** {2} Holochain system constants *) +module System = struct + let version : + string = [%raw {|HC.Version|}] + let version = version + + let hashNotFound : string = [%raw {|HC.HashNotFound|}] + + type hashNotFound = [`Hash_not_found] HashString.t + + let hashNotFound : hashNotFound = + HashString.create hashNotFound + + module Status : + sig + type t + val live : t + val deleted : t + val modified : t + val rejected : t + val any : t + end = + struct + type t = int + let live : t = [%raw {|HC.Status.Live|}] + let deleted : t = [%raw {|HC.Status.Deleted|}] + let modified : t = [%raw {|HC.Status.Modified|}] + let rejected : t = [%raw {|HC.Status.Rejected|}] + let any : t = [%raw {|HC.Status.Any|}] + end + + module GetMask : + sig + type t + val default : t + val entry : t + val entryType : t + val sources : t + val all : t + end = + struct + type t = int + + let default : t = [%raw {|HC.GetMask.Default|}] + let entry : t = [%raw {|HC.GetMask.Entry|}] + let entryType : t = [%raw {|HC.GetMask.EntryType|}] + let sources : t = [%raw {|HC.GetMask.Sources|}] + let all : t = [%raw {|HC.GetMask.All|}] + end + + module LinkAction : + sig + type t + val add : t + val del : t + end + = struct + type t = int + let add : t = [%raw {|HC.LinkAction.Add|}] + let del : t = [%raw {|HC.LinkAction.Del|}] + end + + module PkgReq : + sig + type t + val chain : t + val chainOpt : t + val entryTypes : t + end = struct + type t = int + let chain : t = [%raw {|HC.PkgReq.Chain|}] + let chainOpt : t = [%raw {|HC.PkgReq.ChainOpt|}] + let entryTypes : t = [%raw {|HC.PkgReq.Entries|}] + end + + module ChainOpt : + sig + type t + val none : t + val headers : t + val entries : t + val full : t + end = struct + type t = int + let none : + t = [%raw {|HC.PkgReq.ChainOpt.None|}] + let headers : + t = [%raw {|HC.PkgReq.ChainOpt.Headers|}] + let entries : + t = [%raw {|HC.PkgReq.ChainOpt.Entries|}] + let full : + t = [%raw {|HC.PkgReq.ChainOpt.Full|}] + end + + + module Bridge : + sig + type t + val from : t + val to_ : t + end = struct + type t = int + let from : t = [%raw {|HC.Bridge.From|}] + let to_ : t = [%raw {|HC.Bridge.To|}] + end + + module SysEntryType : + sig + type t + val dna : t + val agent : t + val key : t + val headers : t + val del : t + end = + struct + type t = int + let dna : t = [%raw {|HC.SysEntryType.DNA|}] + let agent : t = [%raw {|HC.SysEntryType.Agent|}] + let key : t = [%raw {|HC.SysEntryType.Key|}] + let headers : t = [%raw {|HC.SysEntryType.Headers|}] + let del : t = [%raw {|HC.SysEntryType.Del|}] + end + +end + +(** Holochain local application constants *) +module App0 = struct + + (** Holds the Name of this Holochain from the DNA. *) + let name : string = [%raw {|App.Name|}] + let name = name + + (** Holochain's DNA related constants *) + module DNA = struct + (** Holds the unique identifier of this Holochain's DNA. + Nodes must run the same DNA to be on the same Holochain. + * *) + let hash : string = [%raw {|App.DNA.Hash|}] + + type hash = [`DNA] HashString.t + let hash : hash = (HashString.create hash :> hash) + end + + (** Holochain's Agent related constants *) + module Agent = struct + + let hash : string = [%raw {|App.Agent.Hash|}] + + type hash = [`Agent] HashString.t + + (** Holds your peer's identity info on the DHT. This is the hash for the + * second entry (identity info) on your chain. **) + let hash : hash = (HashString.create hash :> hash) + + let topHash : string = [%raw {|App.Agent.TopHash|}] + + (** Holds the most recent agent indentity entry that has been committed to + * the chain. To start with its value is equivalent to App.Agent.Hash after + * a call to updateAgent it will have the value of the newly committed + * agent entry. *) + let topHash : [`Top] HashString.t = HashString.create topHash + + let string : string = [%raw {|App.Agent.String|}] + + (** Holds the identity string used to initialize the holochain software + * with hcadmin init If you used JSON to embed multiple properties (such as + * FirstName, LastName, Email, etc), they can be retrieved here as + * App.Agent.FirstName, etc. *) + let string = string + + end + + (** Holochain's Key related constants *) + module Key = struct + let hash : string = [%raw {|App.Key.Hash|}] + + (* Holds the hash of your public key. This is your node address on the DHT. + * It can be used for node-to-node messaging with send and receive + * functions. *) + type hash = [`Key] HashString.t + let hash : hash = (HashString.create hash :> hash) + end + +end + + diff --git a/drafts/bs-holochain/src/dna.ml b/drafts/bs-holochain/src/dna.ml new file mode 100644 index 0000000..71c37a9 --- /dev/null +++ b/drafts/bs-holochain/src/dna.ml @@ -0,0 +1,48 @@ +(** This module is currently not used but is meant to reflect the dna schema as + usually defined in a dna.json (or yaml,toml) file. + + It could eventually be used to generate the json file with ocaml as a source + definition, or to generate dna files at higher levels of abstraction and + composition in OCaml. +*) + +type properties = + { + description: string; + language: string (* TODO make enum *) + } [@@bs.deriving abstract] + +type dht_config = + {hashType:string (* TODO make enum *) } [@@bs.deriving abstract] + +type zome_function = + {name:string;callingTyping:string} (* TODO make enum *) + [@@bs.deriving abstract] + +type zome_entry = + { + name: string; + dataFormat: string; + sharing: string + } [@@bs.deriving abstract] + +type zome = + { + name: string; + description: string; + codeFile: string; + ribosomeType: string (* TODO make enum *); + entries: zome_entry list; + functions : zome_function list + } [@@bs.deriving abstract] + +type t = + { + version: int; + uuid: string; + name: string; + properties_schema_file: string [@bs.as "PropertiesSchemaFile"]; + requires_version: int [@bs.as "ReuiresVersion"]; + dht_config : dht_config [@bs.as "DHTConfig"]; + zomes: zome list [@bs.as "Zomes"]; + } [@@bs.deriving abstract] diff --git a/drafts/bs-holochain/src/entry.ml b/drafts/bs-holochain/src/entry.ml new file mode 100644 index 0000000..a4cb27d --- /dev/null +++ b/drafts/bs-holochain/src/entry.ml @@ -0,0 +1,145 @@ +open Constants + +module GetOptions = struct + type t = { + statusMask : System.Status.t [@bs.as "StatusMask"] [@bs.optional]; + getMask : System.GetMask.t [@bs.as "GetMask"] [@bs.optional]; + local : bool [@bs.as "Local"] [@bs.optional]; + bundle : bool [@bs.as "Bundle"] [@bs.optional]; + } [@@bs.deriving abstract] + let default = + t () +end +(** + {1} Entry definitions and functors. +*) + +module type S0 = +sig + include Named.S + type t +end + +module type E0 = sig + include S0 + val ofJson : Js.Json.t -> t + val toJson : t -> Js.Json.t +end + + +module type S = sig + include E0 + val get : ?options:GetOptions.t -> t HashString.t -> t option + val commit : t -> t HashString.t + val makeHash : t -> t HashString.t + val hashOfString : string -> t HashString.t + val update : t -> t HashString.t -> t HashString.t + val remove : ?message:string -> t HashString.t -> t HashString.t +end + + +module Identity(E:S0) : E0 with type t = E.t = +struct + include E + external ofJson : Js.Json.t -> t = "%identity" + external toJson : t -> Js.Json.t = "%identity" +end + +module Make_json ( E : E0 ) : S with type t = E.t = struct + include E + external getOpt : t HashString.t -> GetOptions.t -> Js.Json.t = "get" + [@@bs.val] + external get : t HashString.t -> Js.Json.t = "" + [@@bs.val] + external makeHash : entryType:string -> t -> t HashString.t = "" [@@bs.val] + external commit : entryType:string -> t -> t HashString.t = "" [@@bs.val] + external update : + entryType:string -> t -> t HashString.t -> t HashString.t = "" [@@bs.val] + external remove : + t HashString.t -> message:string Js.Null.t -> + t HashString.t = "" [@@bs.val] + + let makeHash t = + Native.debug ("bs-holochain", "makeHash", name, t); + makeHash ~entryType:name t + + let ofJson = ofJson + let get ?options hashString = + let json = match options with + | None -> + get hashString + | Some options -> + getOpt hashString options in + match Js.Json.decodeString json with + | Some s -> + (match (s :> string) = System.hashNotFound with + | true -> + Native.debug + ("bs-holochain: get", hashString, " hashNotFound, returning none"); + None + | false -> + Some (ofJson json) + ) + | None -> + match Js.Json.test json Js.Json.Null with + | true -> + None + | false -> + Some (ofJson json) + + + let commit = commit ~entryType:E.name + let update entry oldHash = + update ~entryType:E.name entry oldHash + let remove ?message h = + remove h ~message:(Js.Null.fromOption message) + let hashOfString (s:string) : t HashString.t = + HashString.create s +end + +(** An extension of an entry type that requires + * serializations from @glennsl/bs-json. *) +module type E_BS = +sig + include S0 + val write_t : t -> Js.Json.t + val read_t : Js.Json.t -> t +end + +module Make_bs(E : E_BS) = +struct + include Make_json( + struct + include E + let ofJson = read_t + let toJson = write_t + end + ) +end + +module Make(E: S0) : + S with type t = E.t = Make_json(Identity(E)) + +(** {1} Functorless entry functions, all which require + first class entry modules of type [S0]. +*) + +let get (type t) (module E : S0 with type t = t) = + let module Entry = Make(E) in + Entry.get + +let makeHash (type t) (module E : S0 with type t = t) = + let module Entry = Make(E) in + Entry.makeHash + +let commit (type t) (module E : S0 with type t = t) = + let module Entry = Make(E) in + Entry.commit + +let hashOfString (type t) (module E : S0 with type t = t) = + let module Entry = Make(E) in + Entry.hashOfString + +let update (type t) (module E: S0 with type t = t) = + let module Entry = Make(E) in + Entry.update diff --git a/drafts/bs-holochain/src/function.ml b/drafts/bs-holochain/src/function.ml new file mode 100644 index 0000000..98b042f --- /dev/null +++ b/drafts/bs-holochain/src/function.ml @@ -0,0 +1,110 @@ +(** A zome function with strict input and output type definitions. + It must be a exported function equal to the [name] field or you + will experience runtime errors. + + Note that at the moment this module is only useful to dependent + client libraries since functions can be invoked locally otherwise. +*) + +module type S0 = +sig + module Zome : Named.S + include Named.S + type input + type output +end + +module type S = sig + include Named.S + type input + type output + + (** Call invokes a public function of zome Zome]. This may + or may not be IO intensive depending on the agent invoking + the call. + *) + val call : input -> output +end + +module type S_EXPORT = sig + include Named.S + type input + type output + + (** Call invokes a public function of zome Zome]. This may + or may not be IO intensive depending on the agent invoking + the call. + *) + val call : input -> output + + (** [export] is a function intended to be exported with a + function alias with symbol equal to [name]. + + Note :This must be done by the user of this library manually. + *) val export : Js.Json.t -> Js.Json.t + + + (** [local input] invokes a function locally without + any marshaling or IO. Useful when you know the + function is hosted locally and want to speed up + the invocations. + *) + val local : input -> output +end + + +module Make (T : S0) : S + with type input = T.input + with type output = T.output = struct + include T + external call : + zomeName:string -> functionName:string -> + input -> output = "" [@@bs.val] + let call args = + call ~zomeName:T.Zome.name ~functionName:T.name args +end + +module type T_BS = +sig + include S0 + val write_input : input -> Js.Json.t + val read_output : Js.Json.t -> output + val read_input : Js.Json.t -> input + val write_output : output -> Js.Json.t + val local : input -> output + +end + +module Make_bs(T : T_BS) : + S_EXPORT with type input = T.input with type output = T.output = +struct + include T + external call : + zomeName:string -> functionName:string -> + Js.Json.t -> Js.Json.t = "" [@@bs.val] + + let call args = + call ~zomeName:T.Zome.name ~functionName:T.name + (write_input args) |> + read_output + + let export args = + local (read_input args) |> write_output + +end + +(** [call (module T) args] calls function [T] with [args] in the zome as + described by [T.Zome]. +*) +let call + (type input) (type output) + (module T:S0 with type input = input and type output = output) = + let module M = Make(T) in + M.call + +let export + (type input) (type output) + (module T:T_BS with type input = input and type output = output) = + let module M = Make_bs(T) in + M.export + diff --git a/drafts/bs-holochain/src/genesis.ml b/drafts/bs-holochain/src/genesis.ml new file mode 100644 index 0000000..9f62bf1 --- /dev/null +++ b/drafts/bs-holochain/src/genesis.ml @@ -0,0 +1,7 @@ +module type S = +sig + val genesis : unit -> bool +end + +module Success : S = struct let genesis () = true end +module Failure : S = struct let genesis () = false end diff --git a/drafts/bs-holochain/src/hashString.ml b/drafts/bs-holochain/src/hashString.ml new file mode 100644 index 0000000..4349e70 --- /dev/null +++ b/drafts/bs-holochain/src/hashString.ml @@ -0,0 +1,18 @@ +module type S = +sig + type 'entry t = string + (** Manually lift a string to a hash string type. Only should be used as + a last resort. Instead, use the entry module level version or + those in the constants module/ + *) + val create : string -> 'entry t + val equals : 'entry t -> 'entry t -> bool + val hashEquals : 'entry t -> 'entry' t -> bool +end + +include (struct + type 'entry t = string + let create s : 'entry t = s + let hashEquals = (=) + let equals = hashEquals +end : S) diff --git a/drafts/bs-holochain/src/hc.ml b/drafts/bs-holochain/src/hc.ml new file mode 100644 index 0000000..92993b4 --- /dev/null +++ b/drafts/bs-holochain/src/hc.ml @@ -0,0 +1,5 @@ +(** Holochain top level module. *) +include Native +include Callbacks +include Constants +module HashString = HashString diff --git a/drafts/bs-holochain/src/links.ml b/drafts/bs-holochain/src/links.ml new file mode 100644 index 0000000..30a76ab --- /dev/null +++ b/drafts/bs-holochain/src/links.ml @@ -0,0 +1,156 @@ +open Constants + +(** Represents a link from an entry at [base] to hash [link]. [tag] is optional + metadata for filtering and finding links. +*) +module Link = struct + type ('base, 'link) t = { + base : 'base HashString.t [@bs.as "Base"]; + link : 'link HashString.t [@bs.as "Link"]; + tag : string [@bs.as "Tag"] [@bs.optional]; + linkAction : System.LinkAction.t + [@bs.as "LinkAction"] [@bs.optional] + } [@@bs.deriving abstract] + + let tag t = tagGet t + + let linkAction t = linkActionGet t + +end + + +(** Special entry type for links *) +type t = + {links:([`Any], [`Any]) Link.t array [@bs.as "Links"]} +[@@bs.deriving abstract] + +let t links : t = + t ~links: + (Belt_Array.map links + (fun (l:('a, 'b) Link.t) -> + Link.t + (* TODO figure out better way to do this *) + ~base:(Link.baseGet l :> [`Any] HashString.t) + ~link:(Link.linkGet l :> [`Any] HashString.t) + ?tag:(Link.tag l) + ?linkAction:(Link.linkAction l) + () + ) + ) + + +(** Options for the getLinks function. If [load] is true + a list of entrys is returned. + + If [load] is false (the default value), + only the hash of the entries are provided in the list. + + [statusMask] allows filtering of entries according to their + status. One of [`Live | `Deleted | `Rejected]. +*) +module Options = +struct + type t = { + load : bool [@bs.as "Load"] [@bs.optional]; + statusMask : System.Status.t [@bs.as "StatusMask"] [@bs.optional] + } [@@bs.deriving abstract] + + let default = + t ~load:false ~statusMask:System.Status.live +end + +external links : + base:'entry HashString.t -> + Js.Json.t array = + "getLinks" [@@bs.val] + +external getTag : + base:'entry HashString.t -> + tag:string -> + Js.Json.t array = + "getLinks" [@@bs.val] + + +external getTagOpt : + base:'entry HashString.t -> + tag:string Js.Null.t -> + options:Options.t -> + Js.Json.t array = + "getLinks" [@@bs.val] + +(** Retrieves a list of links tagged as tag on base from the DHT. If tag is an + empty string it will return all the links on the baseand the list will also + include the Tag property on entries. With options as {Load: false} (which is + the default) returns a list of the form [{Hash:"QmY..."},..] With options as + {Load: true} it will get the entry values of the links and return a list of + the form [{Hash:"QmY...",EntryType:"",Entry:"",Source:""},..]}. Use options.StatusMask to return only + links with a certain status. Default is to return only Live links. You can + use defined constants HC.Status.Live/Deleted/Rejected as the int value. *) +let links ?tag ?options ~base = + match options,tag with + | Some options, tag -> + getTagOpt ~tag:(Js.Null.fromOption tag) + ~options ~base + | None, Some tag -> + getTag ~tag ~base + | None, None -> + links ~base + +type packed = + {hash:string; + entryType:string; + entry:Js.Json.t; + source:App0.Agent.hash + } + +let links + ?(tag:string option) + ?(options:Options.t option) base = + let entries = links ?tag ?options ~base in + Array.map + (fun entryInfo -> + match Js.Json.decodeObject entryInfo with + | None -> + Js.log2 "unexpected link info shape:" entryInfo; + failwith "unexpected link info shape" + | Some dict -> + let hash = + Belt_Option.getExn (Js.Dict.get dict "Hash") |> + Js.Json.decodeString |> Belt_Option.getExn in + (match Belt_Option.flatMap + (Js.Dict.get dict "EntryType") Js.Json.decodeString with + | None -> `Hash hash + | Some entryType -> + let entry = Belt_Option.getExn + (Js.Dict.get dict "Entry") in + let source = + Belt_Option.getExn (Js.Dict.get dict "Source") |> + Js.Json.decodeString |> Belt_Option.getExn |> + HashString.create in + `Packed {hash; entryType; entry; source} + ) + ) + entries + +type 'entry unpacked = + {entry:'entry;source:App0.Agent.hash;hash:'entry HashString.t} + +let unpack + (type entry) + (module E : Entry.S with type t = entry) + links : entry unpacked array = + Belt_Array.keepMap links + (function + | `Hash (_hash:string) -> + Js.log "unpack: just hash"; None + | `Packed {hash;entryType;entry;source} -> + match entryType = E.name with + | true -> + Js.log2 "unpack match:" entryType; + Some {source;entry=E.ofJson entry; + hash=E.hashOfString hash} + | false -> Js.log3 "unpack not match: " entryType E.name; None + ) + + diff --git a/drafts/bs-holochain/src/named.ml b/drafts/bs-holochain/src/named.ml new file mode 100644 index 0000000..f5458fe --- /dev/null +++ b/drafts/bs-holochain/src/named.ml @@ -0,0 +1,2 @@ +(** Module which requires a string name identifier *) +module type S = sig val name : string end diff --git a/drafts/bs-holochain/src/native.ml b/drafts/bs-holochain/src/native.ml new file mode 100644 index 0000000..b51d8f0 --- /dev/null +++ b/drafts/bs-holochain/src/native.ml @@ -0,0 +1,242 @@ +(******************************************************************************) +(** {2 Native Functions} *) +(******************************************************************************) +external property : string -> Js.Json.t (*or_error *) = "property" [@@bs.val] + +(** Returns an application property, which are defined by the app developer. It + * returns values from the DNA file that you set as properties of your + * application (e.g. Name, Language, Description, Author, etc.). *) +let property = property + +external makeHash : + entryType:string -> entry:'entry -> + 'entry HashString.t (*or_error *) = "makeHash" [@@bs.val] + +(** Use this function to make a hash of the given entry data. This is the same + * hash value that would be returned if entryData were passed to commit and by + * which an entry of this type would be retrievable from the DHT using get. The + * type of the entryData parameter depends on the entry format of entry. If + * it's a string entry format then the type must be string. If it's a JSON + * entry format, then it can be any type, and the value will get appropriately + * converted to JSON. If it is a links format entry, then the type must by a + * JSON object. *) +let make = makeHash + +external debug : 'a -> unit = "debug" [@@bs.val] + +(** Sends output to the debugging log. The type of value is arbitrary and will + * get converted to a string according toteh language conversion limitations. + * *) +let debug = debug + +external sign : string -> string = "" (* or_error *) [@@bs.val] + +(** Use the agent's private key to sign some contents *) +let sign = sign + +external verifySignature : + signature:string -> + data:string -> + pubKey:string -> + bool (* or_error *) = + "" [@@bs.val] + +(** Uses the signature, data and signatory's public key to verify the sign in +* contents of data. Result represents whether its a match or not. pubKeyshould +* be a public key. *) +let verifySignature = verifySignature + + +external commit : + entryType:string -> + entry:'entry -> + 'entry HashString.t (*or_error*) = + "" [@@bs.val] + +(** Attempts to commit an entry to your local source chain. It will cause + * callbac to your validaneCommitfunction. Returns either an error or the hash + * of the committed entry upon success. The type of the entryData parameter + * depends on the entry format of entry. If it's a string entry format then the + * type must be string. If it's a JSON entry format, then it can by any type, + * and the value will get appropriately converted to JSON. If it is a links + * format entry, then the type must by a JSON object. + + A links entry object looks like this + + { Links: [ { Base: "2bDja...", Link: "Fb4aXa...", Tag: "links to" } ] } + Base and Linkmust both be type hash. Tagcan be any string, describing the + relationship between Base and Link. Tagwill later be used in getLinks. It + may optionally contain a 4th property LinkAction which should be set to + HC.LinkAction.Del in order to mark the link as deleted. See the examples + below. +*) +let commit = commit + +external call : zomeName:string -> functionName:string -> 'args -> + Js.Json.t = "call" [@@bs.val] + +(** Calls an exposed function from another zome. [arguments] is a string or an + * object depending on the [CallingType] that was specified in the function's + * definition in the DNA. Returns the extern value that's returned by the given + * function *) +let call = call + +external bridge : + appDnaHash:'entry HashString.t -> + zomeName:string -> + functionName:string -> + 'arguments -> + Js.Json.t = "" [@@bs.val] + +(** Calls a bridged function from another app. [app_dna_hash] is the + * application being called. Note that the application must have explicitly + * been bridged. In development use hcdev's -bridgeSpecs and a + * bridge_specs.json file to setup bridging. Just like in send, the arguments + * parameter is a string or an object/hash depending on the CallingType that + * was specified in the function's definition. Returns the external value + * that's returned by the given function on the other side of the bridge. +*) +let bridge = bridge + + +external getBridges : + unit -> 'entry Bridge.t array = "getBridges" [@@bs.val] + +(** This function allows your app to examine which bridges have been put in +* place. *) +let getBridges = getBridges + +external remove : entry:Js.Json.t -> message:string -> 'entry HashString.t = + "" [@@bs.val] + + +(** Commits a DelEntry to the local chain with given delete message, and, if + * the entry type of entry is not private, moves the entry to the Deleted + * status on the DHT. *) +let remove = remove + +external update : entryType:string -> entry:'a -> + Js.Json.t = "" [@@bs.val] + +(** Attempts to commit an entry to your local source chain that "replaces" a + * previous entry. If entryType is not private, update will movereplaces to a + * Modifiedstatus on the DHT. Additionally the modification action will be + * recorded in the entries' header in the local chain, which will be used by + * validation routes. **) +let update = update + +external query : + options:'a -> Js.Json.t (* or error *) array = + "" [@@bs.val] + +(** + * Keep in mind that you will want to retrieve most data from the DHT (shared + * data space), so that you are seeing what the rest of the nodes on your + * Holochain are seeing. However, there are times you will want to query + * private data fields, or package up data from your source chain for sending. + * In those cases you can use this function. query returns a list whose + * contents depend on what was chosen in the Returns option. If a single option + * was chosen, then it will be a bare list consisting of that item type. If + * more than than one return option was chosen, then it will be a list of items + * whose key will be the singular name of that option, i.e. Hash, Entry, or + * Header. See the examples below for reference. + + options: object + options.Return: object + options.Return.Hashes: boolean + options.Return.Entries: boolean (default: true) + options.Return.Hashes: boolean + options.Constrain: object + options.Constrain.EntryTypes: array-of-string + options.Constrain.Contains: string + options.Constrain.Equals: string + options.Constrain.Matches: regex + options.Constrain.Count: int + options.Constrain.Page: int + options.Order.Ascending: boolean (default: false) + options.Bundle: boolean + Returns: array-of-Query-object OR error + settings + expand_less JS examples + // Here is an example of choosing a single Return option: + var result = query({ + Return: { + Hashes: true + }, + Constrain: { + EntryTypes: ["posts"] + } + }) + debug(result) + /* + [ + "QmSwMfay3iCynzBFeq9rPzTMTnnuQSMUSe84whjcC9JPAo", + "QmfMPAEdN1BB9imcz97NsaYYaWEN3baC5aSDXqJSiWt4e6" + ] + */ + + // Here is an example of choosing multiple Return options: + var result = query({ + Return: { + Hashes: true, + Entries: true + }, + Constrain: { + EntryTypes: ["posts"], + Count:1 + } + }) + debug(result) + /* + [ + { + "Entry": {"message":"this is my test post"}, + "Hash": "QmSwMfay3iCynzBFeq9rPzTMTnnuQSMUSe84whjcC9JPAo" + } + ] + */ + **) +let query = query + +external updateAgent : + options: 'a -> 'entry HashString.t (* or-error *) = "" [@@bs.val] + +(** Commits a new agent entry to the chain, with either or both new identity + * information or a new public key, while revoking the old key. If revoking a + * key, also adds that key to the node blockedlist (which is also gossiped), as + * it's no longer a valid peer address. + + options: object + options.Revocation: Revocation-Data-string + options.Identity: Identity-Info-string + Returns: hash-string OR error + settings + expand_less JS example + updateAgent({Identity:"newemail@example.com",Revocation:"sample revocation reason"}) +*) +let updateAgent = updateAgent + +external send : 'entry HashString.t -> message:'a -> options:'a -> + Js.Json.t = "" [@@bs.val] + +(** Sends a message to a node, using the App.Key.Hash of that node, its + * permanent address in the DHT. The return value of this function will be + * whatever is returned by the receive function on the receiving node. + * Alternatively, you can indicate that this call should be made + * asynchronously, and specify the callback function using these properties: + + options.Callback.Function: the name of a function to call back when the + call completes or times out. + + options.Callback.ID: an id that will be passed to your callback function to + identify the particular call + + to: hash-string (see App.Key.Hash) + message: object + options: object + options.Callback: object (optional) + options.Callback.Function: string + options.Callback.ID: string + Returns: any-type +*) +let send = send diff --git a/drafts/bs-holochain/src/sendreceive.ml b/drafts/bs-holochain/src/sendreceive.ml new file mode 100644 index 0000000..7507dc5 --- /dev/null +++ b/drafts/bs-holochain/src/sendreceive.ml @@ -0,0 +1,40 @@ +open Constants +(** Implements a send and receive coupling for some particular + zome and input / output types. +*) + +(** Base signature for send and receive functionality *) +module type S0 = +sig + type input (** the arguments to [send] *) + type output (** the output returned by [receive] *) + + (** Callback to receive a message via the send / receive protocol. + The [hashString] is the sender address. The callback must + implement a value from type [output] derived from type [input]. + + It may use other native holochain functions to accomplish, including + mutating operations. + *) + val receive : App0.Agent.hash -> input -> output +end + +(** A sender and receiver pair. The [input] and [output] types are fixed + and scoped to a particular zome. +*) +module type S = sig + include S0 + val send : App0.Agent.hash -> input -> output +end + +(** Makes a sender and receiver pair given the receiver callback module. *) +module Make (T : S0) : + S with type input = T.input with type output = T.output = +struct + include T + external send : App0.Agent.hash -> input -> output = "" [@@bs.val] +end + +(** A minimal [SendReceive.S] implementation which accepts unit and returns unit. *) +module Unit : S with type input = unit and type output = unit = + Make(struct type input = unit type output = unit let receive _ () = () end) diff --git a/drafts/bs-holochain/src/validate.ml b/drafts/bs-holochain/src/validate.ml new file mode 100644 index 0000000..f81fa50 --- /dev/null +++ b/drafts/bs-holochain/src/validate.ml @@ -0,0 +1,279 @@ +(** Validation callback api, but only for a specific entry type *) + +module type S = + sig + (** The entry type being validated *) + type t + val validateCommit : + header:Js.Json.t -> + package:Js.Json.t -> + sources: string array -> + t -> + bool + val validatePut : + header:Js.Json.t -> + package:Js.Json.t -> + sources:string array -> + t -> + bool + val validateMod : + header:Js.Json.t -> + replaces:t HashString.t -> + package:Js.Json.t -> + sources:string array -> + t -> + bool + val validateDel : + hash:t HashString.t -> + package:Js.Json.t -> + sources:string array -> + bool + val validateLink : + hash:t HashString.t -> + package:Js.Json.t -> + sources:string array -> + links:Js.Json.t array -> + bool + + val validatePutPkg : + unit -> Js.Json.t + val validateModPkg : + unit -> Js.Json.t + val validateDelPkg : + unit -> Js.Json.t + val validateLinkPkg : + unit -> Js.Json.t +end + +class type ['entry] validate = + object + method validateCommit : + header:Js.Json.t -> + package:Js.Json.t -> + sources: string array -> + 'entry -> + bool + method validatePut : + header:Js.Json.t -> + package:Js.Json.t -> + sources:string array -> + 'entry -> + bool + method validateMod : + header:Js.Json.t -> + replaces:'entry HashString.t -> + package:Js.Json.t -> + sources:string array -> + 'entry -> + bool + method validateDel : + hash:'entry HashString.t -> + package:Js.Json.t -> + sources:string array -> + bool + method validateLink : + hash:'entry HashString.t -> + package:Js.Json.t -> + sources:string array -> + links:Js.Json.t array -> + bool + method validatePutPkg : + unit -> Js.Json.t + method validateModPkg : + unit -> Js.Json.t + method validateDelPkg : + unit -> Js.Json.t + method validateLinkPkg : + unit -> Js.Json.t +end + +class ['entry] acceptAll : ['entry] validate = + object + method validateCommit + ~header:_ + ~package:_ + ~sources:_ + _entry = true + + method validatePut + ~header:_ + ~package:_ + ~sources:_ + _entry = + true + + method validateMod + ~header:_ + ~replaces:_ + ~package:_ + ~sources:_ + _entry = + true + + method validateDel + ~hash:_ + ~package:_ + ~sources:_ = + true + + method validateLink + ~hash:_ + ~package:_ + ~sources:_ + ~links:_ = + true + method validatePutPkg () = Js.Json.null + method validateModPkg () = Js.Json.null + method validateDelPkg () = Js.Json.null + method validateLinkPkg () = Js.Json.null +end + +class ['entry] trace : ['entry] validate = + object + method validateCommit + ~header + ~package + ~sources + entry = + Native.debug + ("bs-holochain: validateCommit", + header, + entry, + package, + sources + ); + true + + method validatePut + ~header + ~package + ~sources + entry = + Native.debug + ("bs-holochain: validatePut", + entry, + header, + package, + sources + ); + true + + method validateMod + ~header + ~replaces + ~package + ~sources + entry = + Native.debug + ("bs-holochain: validateMod", + entry, + header, + replaces, + package, + sources + ); + true + + method validateDel + ~hash + ~package + ~sources = + Native.debug + ("bs-holochain: validateDel", + hash, + package, + sources + ); + true + + method validateLink + ~hash + ~package + ~sources + ~links = + Native.debug + ("bs-holochain: validateLink", + hash, + package, + sources, + links + ); + true + method validatePutPkg () = + Native.debug + ("bs-holochain: validatePutPkg"); + Js.Json.null + method validateModPkg () = + Native.debug + ("bs-holochain: validateModPkg"); + Js.Json.null + method validateDelPkg () = + Native.debug + ("bs-holochain: validateDelPkg"); + Js.Json.null + method validateLinkPkg () = + Native.debug + ("bs-holochain: validateLinkPkg"); + Js.Json.null +end + + +let of_object (type entry) (obj:entry validate) = +let module V : S with type t = entry = +struct + type t = entry + + let validateCommit + ~header + ~package + ~sources + entry = + obj#validateCommit ~header ~package ~sources entry + + let validatePut + ~header + ~package + ~sources + entry = + obj#validatePut ~header ~package ~sources entry + + let validateMod + ~header + ~replaces + ~package + ~sources + entry = + obj#validateMod ~header ~replaces ~package ~sources entry + + let validateDel + ~hash + ~package + ~sources = + obj#validateDel ~hash ~package ~sources + + let validateLink + ~hash + ~package + ~sources + ~links = + obj#validateLink ~hash ~package ~sources ~links + + let validatePutPkg () = obj#validatePutPkg () + let validateModPkg () = obj#validateModPkg () + let validateDelPkg () = obj#validateDelPkg () + let validateLinkPkg () = obj#validateLinkPkg () +end in +(module V : S with type t = entry) + + +module Trace(E:Entry.S0) : S with type t = E.t = + struct + let m = of_object (new trace) + include (val m : S with type t = E.t) + end + +module Accept_all(E:Entry.S0) : S with type t = E.t = +struct + let m = of_object (new acceptAll) + include (val m : S with type t = E.t) +end diff --git a/drafts/bs-holochain/src/zome.ml b/drafts/bs-holochain/src/zome.ml new file mode 100644 index 0000000..561c15b --- /dev/null +++ b/drafts/bs-holochain/src/zome.ml @@ -0,0 +1,207 @@ +open Printf +(** + * A minimally defined Zome is just a named entity. +*) +module type S0 = Named.S + + +(** A validation handler for a particular entry module *) +module type HANDLER = +sig + include Entry.S + include Validate.S with type t := t +end + +(** Builder to produce a zome. *) +module Builder (Z:S0) = +struct + + let entries : (module HANDLER) Belt_Map.String.t ref + = ref Belt_Map.String.empty + + module Handler(Handler:HANDLER) = + struct + include (Handler : Entry.S with type t = Handler.t) + let () = entries := + Belt_Map.String.set + (!entries) Handler.name + (module Handler : HANDLER) + end + + (** Add an entry [E] with validator module [V] of + an atd type. The decoders and encoders are + autogenerated and optimized for javascript. + *) + module EntryBs + (E: Entry.E_BS) + (V : Validate.S with type t = E.t) : + Entry.S with type t = E.t = struct + module E = Entry.Make_bs(E) + module H : HANDLER with type t = E.t = + struct + include (E : Entry.S with type t = E.t) + include (V : Validate.S with type t := t) + end + include Handler(H) + end + + (** Add an entry [E0] to the builder with + validator module [V]. + *) + module Entry0 + (E0 : Entry.S0) + (V : Validate.S with type t = E0.t) : + Entry.S with type t = E0.t = struct + module E = Entry.Make(E0) + module H : HANDLER with type t = E.t = + struct + include (E : Entry.S with type t = E.t) + include (V : Validate.S with type t := t) + end + include Handler(H) + end + + module Entry + (E : Entry.S) + (V : Validate.S with type t = E.t) : + Entry.S with type t = E.t = struct + module H : HANDLER with type t = E.t = + struct + include (E : Entry.S with type t = E.t) + include (V : Validate.S with type t := t) + end + include Handler(H) + end + + + (** Defines a zome function. The [name] denotes + the function name. The [input] and [output] types of + the function require json deserialers and + serializers respectively. + *) + module type FUNCTION_ARGS = + sig + val name : string + type input + type output + val local : input -> output + val write_input : input -> Js.Json.t + val read_output : Js.Json.t -> output + val write_output : output -> Js.Json.t + val read_input : Js.Json.t -> input + end + +(** Declare a zome function using [F.name] as + the assumed function name. +*) + module Function_bs(F:FUNCTION_ARGS) = struct + include Function.Make_bs( + struct + module Zome = Z + include F + end + ) + end + + module type S = sig + include S0 + include Sendreceive.S0 + include Callbacks.REQUIRED + end + + module Build + (G : Genesis.S) + (SR : Sendreceive.S0) : + S with type input = SR.input and type output = SR.output = + struct + include Z + include SR + + let moduleOfEntryType (entryType:string) = + Belt_Map.String.get (!entries) entryType + + let moduleOfEntryTypeExn entryType = + match moduleOfEntryType entryType with + | None -> + failwith + (sprintf "no module for entry type: %s" entryType) + | Some m -> m + + module Callback : Callbacks.REQUIRED = struct + include G + + let validateCommit ~entryType ~entry ~header ~package ~sources = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + H.validateCommit + ~header + ~package + ~sources + (H.ofJson (entry : Js.Json.t)) + + let validatePut ~entryType ~entry ~header ~package ~sources = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + H.validatePut + ~header + ~package + ~sources + (H.ofJson entry) + + let validateMod ~entryType ~entry + ~header ~(replaces:string) ~package ~sources = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + let replaces = H.hashOfString replaces in + H.validateMod + ~header + ~replaces + ~package + ~sources + (H.ofJson entry) + + let validateDel ~entryType + ~(hash:string) ~package ~sources = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + let hash = H.hashOfString hash in + H.validateDel + ~hash + ~package + ~sources + + let validateLink ~entryType + ~(hash:string) ~links ~package ~sources = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + let hash = H.hashOfString hash in + H.validateLink + ~hash + ~links + ~package + ~sources + + let validatePutPkg ~entryType = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + H.validatePutPkg () + + let validateModPkg ~entryType = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + H.validateModPkg () + + let validateDelPkg ~entryType = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + H.validateDelPkg () + + let validateLinkPkg ~entryType = + let m = moduleOfEntryTypeExn entryType in + let module H = (val m : HANDLER) in + H.validateLinkPkg () + end + include Callback + + end +end diff --git a/drafts/bs-idb-keyval/LICENSE b/drafts/bs-idb-keyval/LICENSE new file mode 100644 index 0000000..d98865f --- /dev/null +++ b/drafts/bs-idb-keyval/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Corentin Leruth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-idb-keyval/README.md b/drafts/bs-idb-keyval/README.md new file mode 100644 index 0000000..193cd26 --- /dev/null +++ b/drafts/bs-idb-keyval/README.md @@ -0,0 +1,82 @@ +# bs-idb-keyval + +[BuckleScript](https://github.com/bucklescript/bucklescript) bindings for [idb-keyval](https://github.com/jakearchibald/idb-keyval) + +## Installation + +```sh +npm install --save @tatchi/bs-idb-keyval +``` + +Then add `@tatchi/bs-idb-keyval` to `bs-dependencies` in your `bsconfig.json`: +```js +{ + ... + "bs-dependencies": ["@tatchi/bs-idb-keyval"] +} +``` + +## Usage + +### Create store: + +```js +let store = IdbKeyVal.createStore("custom-db-name", "custom-store-name"); +``` + +### set: + +```js +IdbKeyVal.set("key", "value", store) + |> Js.Promise.then_(() => { + Js.log("It worked!"); + Js.Promise.resolve(); + }) + |> Js.Promise.catch(err => { + Js.log2("It failed!!", err); + Js.Promise.resolve(); + }); +``` + +### get: + +```js +IdbKeyVal.get("key", store) +|> Js.Promise.then_(value => { + // logs: "value" + Js.log(value); + Js.Promise.resolve(); + }); +``` + +### keys: + +```js +IdbKeyVal.keys(store) +|> Js.Promise.then_(keys => { + // logs: ["key"] + Js.log(keys); + Js.Promise.resolve(); + }); +``` + +### delete: + +```js +IdbKeyVal.delete("key", store) +|> Js.Promise.then_(keys => { + Js.log("deleted"); + Js.Promise.resolve(); + }); +``` + +### clear: + +```js +IdbKeyVal.clear(store) +|> Js.Promise.then_(keys => { + Js.log("cleared"); + Js.Promise.resolve(); + }); +``` + diff --git a/drafts/bs-idb-keyval/package.json b/drafts/bs-idb-keyval/package.json new file mode 100644 index 0000000..c79b0c0 --- /dev/null +++ b/drafts/bs-idb-keyval/package.json @@ -0,0 +1,40 @@ +{ + "name": "@tatchi/bs-idb-keyval", + "version": "0.2.0", + "description": "BuckleScript bindings for idb-keyval", + "main": "lib/js/src/IdbKeyVal.js", + "files": [ + "src/", + "bsconfig.json" + ], + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tatchi/bs-idb-keyval.git" + }, + "keywords": [ + "reason", + "bucklescript", + "idb-keyval", + "idb", + "indexeddb", + "localstorage", + "storage" + ], + "author": "Corentin Leruth", + "license": "MIT", + "bugs": { + "url": "https://github.com/tatchi/bs-idb-keyval/issues" + }, + "homepage": "https://github.com/tatchi/bs-idb-keyval#readme", + "devDependencies": { + "bs-platform": "^7.2.2" + }, + "peerDependencies": { + "idb-keyval": "^3.0.0" + } +} diff --git a/drafts/bs-idb-keyval/src/IdbKeyVal.js b/drafts/bs-idb-keyval/src/IdbKeyVal.js new file mode 100644 index 0000000..40fed0f --- /dev/null +++ b/drafts/bs-idb-keyval/src/IdbKeyVal.js @@ -0,0 +1,2 @@ +// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE +/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ diff --git a/drafts/bs-idb-keyval/src/IdbKeyVal.re b/drafts/bs-idb-keyval/src/IdbKeyVal.re new file mode 100644 index 0000000..0ebb11d --- /dev/null +++ b/drafts/bs-idb-keyval/src/IdbKeyVal.re @@ -0,0 +1,12 @@ +type t; +[@bs.new] [@bs.module "idb-keyval"] +external createStore: (string, string) => t = "Store"; +[@bs.module "idb-keyval"] +external set: (string, string, t) => Js.Promise.t(unit) = "set"; +[@bs.module "idb-keyval"] +external get: (string, t) => Js.Promise.t(option(string)) = "get"; +[@bs.module "idb-keyval"] +external keys: t => Js.Promise.t(Js.Array.t(string)) = "keys"; +[@bs.module "idb-keyval"] +external delete: (string, t) => Js.Promise.t(unit) = "del"; +[@bs.module "idb-keyval"] external clear: t => Js.Promise.t(unit) = "clear"; \ No newline at end of file diff --git a/drafts/bs-immutablejs/.gitignore b/drafts/bs-immutablejs/.gitignore new file mode 100644 index 0000000..e42c698 --- /dev/null +++ b/drafts/bs-immutablejs/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +/node_modules/ +/lib/ +.merlin +*.cm* +*.js +npm-debug.log diff --git a/drafts/bs-immutablejs/README.md b/drafts/bs-immutablejs/README.md new file mode 100644 index 0000000..98d5c7c --- /dev/null +++ b/drafts/bs-immutablejs/README.md @@ -0,0 +1,60 @@ +# bs-immutablejs + +**Note**: these are **bindings** to the [Immutable.js](https://facebook.github.io/immutable-js/) library. These are only meant to be used to interoperate with existing JavaScript code; In Reason/BS, we have more lightweight immutable (and optionally mutable) data structures by default (list, record, hashmap, set, and upcoming data structures). New Reason/BS projects projects don't need bs-immutablejs. + +## Documentation + +The source is a [single file](https://github.com/reasonml-community/bs-immutablejs/blob/master/src/immJsRe.re) of BuckleScript `external`s. The API corresponds to Immutable.js' API. + +Example usage: + +```reason +let greeting = ImmutableJsRe.List.fromArray([|"hello", "world"|]); + +let extendedGreeting = ImmutableJsRe.List.push(greeting, "how are you"); + +let reallyExtendedGreeting = + ImmutableJsRe.List.( + extendedGreeting + |. push("I'm fine") + |. push("thank you") + |. push("and you?") + ); +``` + +Generated code: + +```js +var greeting = Immutable.List(/* array */[ + "hello", + "world" + ]); +var extendedGreeting = greeting.push("how are you"); +extendedGreeting.push("I'm fine").push("thank you").push("and you?"); +``` + +## Transitioning to Idiomatic Reason/BuckleScript Data Structures + +Here's a table of Immutable.js data structures and their Reason/BuckleScript equivalents. Reason/BS provide the data structures out of the box. + +Immutable.js | Reason/BuckleScript +----|----- +List | List +Map | Map +OrderedMap | [Belt Map](https://bucklescript.github.io/bucklescript/api/Belt.Map.html) +Set | Set +OrderedSet | [Belt Set](https://bucklescript.github.io/bucklescript/api/Belt.Map.html) +Stack | List +Record | Record +Seq | Use `lazy` + +## Contributing + +Prerequisite: `https://github.com/reasonml/reason-cli`. + +``` +git clone https://github.com/BuckleTypes/bs-immutablejs.git +cd bs-immutablejs +npm install +npm start +``` diff --git a/drafts/bs-immutablejs/bsconfig.json b/drafts/bs-immutablejs/bsconfig.json new file mode 100644 index 0000000..29e6d61 --- /dev/null +++ b/drafts/bs-immutablejs/bsconfig.json @@ -0,0 +1,6 @@ +{ + "name": "bs-immutablejs", + "bsc-flags": ["-bs-super-errors"], + "sources": ["src"], + "refmt": 3 +} diff --git a/drafts/bs-immutablejs/package.json b/drafts/bs-immutablejs/package.json new file mode 100644 index 0000000..4086f5c --- /dev/null +++ b/drafts/bs-immutablejs/package.json @@ -0,0 +1,31 @@ +{ + "name": "bs-immutablejs", + "version": "0.1.0", + "description": "Reason + BuckleScript bindings to Immutable.js", + "main": "index.js", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "test": "exit 0" + }, + "repository": { + "type": "git", + "url": "https://github.com/reasonml-community/bs-immutablejs.git" + }, + "homepage": "https://github.com/reasonml-community/bs-immutablejs#readme", + "bugs": "https://github.com/reasonml-community/bs-immutablejs/issues", + "keywords": [ + "reason", + "bucklescript", + "data", + "immutable", + "persistent", + "data structures" + ], + "author": "", + "license": "MIT", + "devDependencies": { + "bs-platform": "^3.0.0" + } +} diff --git a/drafts/bs-immutablejs/src/immJsRe.re b/drafts/bs-immutablejs/src/immJsRe.re new file mode 100644 index 0000000..b41aaab --- /dev/null +++ b/drafts/bs-immutablejs/src/immJsRe.re @@ -0,0 +1,159 @@ +/*** + * Copyright 2004-present Facebook. All Rights Reserved. + */ +module OrderedMap = { + type t('key, 'value); + [@bs.send] [@bs.return nullable] + external get : (t('key, 'value), 'key) => option('value) = ""; + [@bs.send] + external set : (t('key, 'value), 'key, 'value) => t('key, 'value) = ""; + [@bs.send] + external filter : + (t('key, 'value), ('value, 'key, t('key, 'value)) => bool) => + t('key, 'value) = + ""; + [@bs.send] + external map : + (t('key, 'value), ('value, 'key, t('key, 'value)) => 'value2) => + t('key, 'value2) = + ""; + [@bs.send] + external forEach : + (t('key, 'value), ('value, 'key, t('key, 'value)) => unit) => unit = + ""; + [@bs.send] + external sort : + (t('key, 'value), ('value, 'value) => int) => t('key, 'value) = + ""; + [@bs.send] external has : (t('key, 'value), 'key) => bool = ""; + [@bs.send] + external reduce : + ( + t('key, 'value), + ('reduction, 'value, 'key, t('key, 'value)) => 'reduction, + 'reduction + ) => + 'reduction = + ""; + [@bs.send] + external every : + (t('key, 'value), ('value, 'key, t('key, 'value)) => bool) => bool = + ""; + [@bs.send] external toArray : t('key, 'value) => array('value) = ""; + [@bs.module "immutable"] + external fromArray : array(('key, 'value)) => t('key, 'value) = + "OrderedMap"; + [@bs.module "immutable"] + external fromDict : Js.Dict.t('value) => t(string, 'value) = "OrderedMap"; + [@bs.module "immutable"] + external empty : unit => t('key, 'value) = "OrderedMap"; + [@bs.send] [@bs.return nullable] + external first : t('key, 'value) => option('value) = ""; + [@bs.send] external count : t('key, 'value) => int = ""; + [@bs.get] external size : t('key, 'value) => int = ""; + [@bs.send] external isEmpty : t('key, 'value) => bool = ""; +}; + +module Set = { + type t('value); + [@bs.send] external includes : (t('value), 'value) => bool = ""; + [@bs.send] external contains : (t('value), 'value) => bool = ""; + [@bs.module "immutable"] + external fromArray : array('value) => t('value) = "Set"; +}; + +module OrderedSet = { + type t('value); + [@bs.send] + external map : + (t('value), ('value, 'value, t('value)) => 'value2) => t('value2) = + ""; + [@bs.module "immutable"] + external fromArray : array('value) => t('value) = "OrderedSet"; + [@bs.send] external toArray : t('value) => array('value) = ""; + [@bs.send] external add : (t('value), 'value) => t('value) = ""; + [@bs.send] external remove : (t('value), 'value) => t('value) = ""; + [@bs.send] external has : (t('value), 'value) => bool = ""; + [@bs.get] external size : t('value) => int = ""; + [@bs.send] external first : t('value) => 'value = ""; +}; + +module List = { + type t('value); + [@bs.send] external filter : (t('value), 'value => bool) => t('value) = ""; + [@bs.send] + external forEach : (t('value), ('value, int, t('value)) => bool) => int = + ""; + [@bs.send] external toArray : t('value) => array('value) = ""; + [@bs.module "immutable"] + external fromArray : array('value) => t('value) = "List"; + [@bs.send] [@bs.return nullable] + external first : t('value) => option('value) = ""; + [@bs.send] external count : t('value) => int = ""; + [@bs.send] external push : (t('value), 'value) => t('value) = ""; + [@bs.send] external isEmpty : t('value) => bool = ""; + [@bs.send] + external map : + (t('value), ('value, int, t('value)) => 'value2) => t('value2) = + ""; +}; + +module Seq = { + type t('value); + [@bs.send] external filter : (t('value), 'value => bool) => t('value) = ""; + [@bs.send] external toArray : t('value) => array('value) = ""; + [@bs.send] external isEmpty : t('value) => bool = ""; + [@bs.send] external count : t('value) => int = ""; + [@bs.send] + external sort : (t('value), ('value, 'value) => int) => t('value) = ""; + [@bs.module "immutable"] + external fromArray : array('value) => t('value) = "Seq"; + [@bs.module "immutable"] + external fromList : List.t('value) => t('value) = "Seq"; + [@bs.send] + external slice : + (t('value), ~begin_: int=?, ~end_: int=?, unit) => t('value) = + ""; + [@bs.send] external join : (t('value), string) => string = ""; + [@bs.send] external take : (t('value), int) => t('value) = ""; + [@bs.send] + external map : + (t('value1), ('value, int, t('value)) => 'value2) => t('value2) = + ""; +}; + +module Map = { + type t('key, 'value); + [@bs.send] + external forEach : + (t('key, 'value), ('value, 'key, t('key, 'value)) => unit) => unit = + ""; + [@bs.send] [@bs.return nullable] + external get : (t('key, 'value), 'key) => option('value) = ""; + [@bs.send] + external filter : + (t('key, 'value), ('value, 'key, t('key, 'value)) => bool) => + t('key, 'value) = + ""; + [@bs.send] + external map : + (t('key, 'value), ('value, 'key, t('key, 'value)) => 'value2) => + t('key, 'value2) = + ""; + [@bs.send] external count : t('key, 'value) => int = ""; + [@bs.get] external size : t('key, 'value) => int = ""; + [@bs.send] + external reduce : + ( + t('key, 'value), + ('reduction, 'value, 'key, t('key, 'value)) => 'reduction, + 'reduction + ) => + 'reduction = + ""; + [@bs.send] + external sort : + (t('key, 'value), ('value, 'value) => int) => t('key, 'value) = + ""; + [@bs.send] external valueSeq : t('key, 'value) => Seq.t('value) = ""; +}; diff --git a/drafts/bs-intersection-observer/LICENSE b/drafts/bs-intersection-observer/LICENSE new file mode 100644 index 0000000..c59383d --- /dev/null +++ b/drafts/bs-intersection-observer/LICENSE @@ -0,0 +1,8 @@ +Copyright © 26-08-2019, Jules Guesnon +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +The Software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders X be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the Software. + +Except as contained in this notice, the name of the Jules Guesnon shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the . \ No newline at end of file diff --git a/drafts/bs-intersection-observer/README.md b/drafts/bs-intersection-observer/README.md new file mode 100644 index 0000000..295d14e --- /dev/null +++ b/drafts/bs-intersection-observer/README.md @@ -0,0 +1,78 @@ +# Bs-intersection-observer + +this package make the bindings for the IntersectionObserver api. + +## How to install ? + +``` +npm install bs-intersection-observer --save +``` + +```bash +yarn add bs-intersection-observer +``` + +Then add the dependency to you `bsconfig.json` + +```json +"bs-dependencies": [ + "bs-intersection-observer" +], +``` + +## How to use it ? + +### What the package contains ? + +Under the module `BsIntersectionObserver`, you'll find 2 sub module: + +#### Types + +`Types` is pretty obvious, it contains all the types related to the `IntersectionObserver`. You'll notice that under type there's: + +- `JsT` : Javascript types +- `T` : Reason types + +#### Create + +Probably the one you're looking for. `Create` contains two functions: + +- `newIntersectionObserver` : the direct binding from Js +- `intersectionObserver` : the IntersectionObserver adapted to Reason with some nice completion (the one you want to call) + +### Example with reason-react + +```reason +[@bs.val] [@bs.scope "document"] +external querySelector: string => Dom.element = "querySelector"; + +[@react.component] +let make = () => { + let observer = + BsIntersectionObserver.Create.intersectionObserver( + ~cb= + (entries, _) => { + Belt.Array.map(entries, entry => + if (entry.intersectionRatio > 0.) { + Js.log("Visible element"); + } else { + Js.log("Not visible element"); + } + ) + ->ignore; + (); + }, + ~options=None, + ); + React.useEffect1( + () => { + let el = querySelector(".hello"); + observer.observe(el); + Some(() => observer.unobserve(el)); + }, + [||], + ); + +
"Hello world"->ReasonReact.string
; +}; +``` diff --git a/drafts/bs-intersection-observer/package.json b/drafts/bs-intersection-observer/package.json new file mode 100644 index 0000000..430f278 --- /dev/null +++ b/drafts/bs-intersection-observer/package.json @@ -0,0 +1,25 @@ +{ + "name": "bs-intersection-observer", + "version": "0.2.0", + "repository": { + "url": "https://github.com/JulesGuesnon/bs-intersection-observer" + }, + "description": "This package contains the bindings for the IntersectionObserver api", + "scripts": { + "build": "bsb -make-world", + "start": "bsb -make-world -w", + "clean": "bsb -clean-world", + "prepublish": "bsb -make-world" + }, + "keywords": [ + "BuckleScript", + "IntersectionObserver", + "ReasonML", + "Reason" + ], + "author": "Jules Guesnon ", + "license": "MIT", + "devDependencies": { + "bs-platform": "^5.0.6" + } +} diff --git a/drafts/bs-intersection-observer/src/Create.re b/drafts/bs-intersection-observer/src/Create.re new file mode 100644 index 0000000..de2b270 --- /dev/null +++ b/drafts/bs-intersection-observer/src/Create.re @@ -0,0 +1,21 @@ +open Types; + +[@bs.new] +external newIntersectionObserver: + ( + ~cb: (JsT.entries, Js.t(JsT.observer)) => unit, + ~options: JsT.intersectionObserverParam=?, + unit + ) => + Js.t(JsT.observer) = + "IntersectionObserver"; + +let intersectionObserver = (~cb, ~options) => { + let observer = + switch (options) { + | Some(options) => + newIntersectionObserver(~cb=T.cbFromJsCb(cb), ~options, ()) + | None => newIntersectionObserver(~cb=T.cbFromJsCb(cb), ()) + }; + T.observerFromJsObserver(observer); +}; \ No newline at end of file diff --git a/drafts/bs-intersection-observer/src/types.re b/drafts/bs-intersection-observer/src/types.re new file mode 100644 index 0000000..80c2d16 --- /dev/null +++ b/drafts/bs-intersection-observer/src/types.re @@ -0,0 +1,138 @@ +module JsT = { + type boundingClientRect = { + . + "x": float, + "y": float, + "left": float, + "right": float, + "top": float, + "bottom": float, + "width": float, + "height": float, + }; + + type entry = { + . + boundingClientRect: boundingClientRect, + intersectionRect: boundingClientRect, + rootBounds: boundingClientRect, + intersectionRatio: float, + isIntersecting: bool, + isVisible: bool, + target: Dom.element, + time: float, + }; + type entries = array(Js.t(entry)); + + type observer = { + . + [@bs.meth] observe: Dom.element => unit, + [@bs.meth] unobserve: Dom.element => unit, + [@bs.meth] disconnect: unit => unit, + [@bs.meth] takeRecords: unit => entries, + delay: int, + root: option(Dom.element), + rootMargin: string, + thresholds: array(float), + trackVisibility: bool, + }; + + type intersectionObserverParam = { + . + threshold: option(float), + rootMargin: option(string), + root: option(Dom.element), + }; +}; + +module T = { + type boundingClientRect = { + x: float, + y: float, + left: float, + right: float, + top: float, + bottom: float, + width: float, + height: float, + }; + + type entry = { + boundingClientRect, + intersectionRect: boundingClientRect, + rootBounds: boundingClientRect, + intersectionRatio: float, + isIntersecting: bool, + isVisible: bool, + target: Dom.element, + time: float, + }; + type entries = array(entry); + + type intersectionObserverParam = { + threshold: option(float), + rootMargin: option(string), + root: option(Dom.element), + }; + + type observer = { + observe: Dom.element => unit, + unobserve: Dom.element => unit, + disconnect: unit => unit, + takeRecords: unit => entries, + delay: int, + root: option(Dom.element), + rootMargin: string, + thresholds: array(float), + trackVisibility: bool, + }; + + let clientRectFromjsClientRect = boundingClientRect => { + { + x: boundingClientRect##x, + y: boundingClientRect##y, + left: boundingClientRect##left, + right: boundingClientRect##right, + top: boundingClientRect##top, + bottom: boundingClientRect##bottom, + width: boundingClientRect##width, + height: boundingClientRect##height, + }; + }; + + let entriesFromJsEntries = entries => { + Belt.Array.map(entries, entry => + { + boundingClientRect: + clientRectFromjsClientRect(entry##boundingClientRect), + intersectionRect: clientRectFromjsClientRect(entry##intersectionRect), + rootBounds: clientRectFromjsClientRect(entry##rootBounds), + intersectionRatio: entry##intersectionRatio, + isIntersecting: entry##isIntersecting, + isVisible: entry##isVisible, + target: entry##target, + time: entry##time, + } + ); + }; + + let observerFromJsObserver = (observer: Js.t(JsT.observer)) => { + { + observe: el => observer##observe(el), + unobserve: el => observer##unobserve(el), + disconnect: () => observer##disconnect(), + takeRecords: () => observer##takeRecords()->entriesFromJsEntries, + delay: observer##delay, + root: observer##root, + rootMargin: observer##rootMargin, + thresholds: observer##thresholds, + trackVisibility: observer##trackVisibility, + }; + }; + + let cbFromJsCb = (cb, entries: JsT.entries, observer) => { + let formattedEntries = entriesFromJsEntries(entries); + + cb(formattedEntries, observerFromJsObserver(observer)); + }; +}; \ No newline at end of file diff --git a/drafts/bs-intl/LICENSE b/drafts/bs-intl/LICENSE new file mode 100644 index 0000000..5e7c99b --- /dev/null +++ b/drafts/bs-intl/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jim Berlage + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/drafts/bs-intl/README.md b/drafts/bs-intl/README.md new file mode 100644 index 0000000..9486243 --- /dev/null +++ b/drafts/bs-intl/README.md @@ -0,0 +1,74 @@ +# bs-intl + +[![NPM](https://nodei.co/npm/bs-intl.png?compact=true)](https://nodei.co/npm/bs-intl/) +[![CircleCI](https://circleci.com/gh/jimberlage/bs-intl.svg?style=svg)](https://circleci.com/gh/jimberlage/bs-intl) + +A port of the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) utilities of JS to Reason. + +## Documentation + +API docs are hosted at https://jimberlage.github.io/bs-intl/. Documentation comes with examples on how to use each function. + +## Installation + +```bash +yarn add bs-intl +``` + +In your `bsconfig.json` file, add a reference to this library: + +```json +{ + "bs-dependencies": ["bs-intl"] +} +``` + +## Status + +The following pieces of the API are completed: + +### Intl.Collator + +- [ ] [Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator) +- [ ] [supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/supportedLocalesOf) +- [ ] [compare](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/compare) +- [ ] [resolvedOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/resolvedOptions) + +### Intl.DateTimeFormat + +- [x] [Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat) +- [x] [supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/supportedLocalesOf) +- [x] [format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/format) +- [x] [formatToParts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts) +- [x] [resolvedOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions) + +### Intl.ListFormat + +- [ ] [Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ListFormat) +- [ ] [supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ListFormat/supportedLocalesOf) +- [ ] [format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ListFormat/format) +- [ ] [formatToParts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ListFormat/formatToParts) +- [ ] [resolvedOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ListFormat/resolvedOptions) + +### Intl.NumberFormat + +- [x] [Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) +- [x] [supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat/supportedLocalesOf) +- [x] [format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat/format) +- [x] [formatToParts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat/formatToParts) +- [ ] [resolvedOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat/resolvedOptions) + +### Intl.PluralRules + +- [x] [Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules) +- [x] [supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules/supportedLocalesOf) +- [x] [select](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules/select) +- [ ] [resolvedOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules/resolvedOptions) + +### Intl.RelativeTimeFormat + +- [ ] [Constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) +- [ ] [supportedLocalesOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/supportedLocalesOf) +- [ ] [format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/format) +- [ ] [formatToParts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/formatToParts) +- [ ] [resolvedOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat/resolvedOptions) \ No newline at end of file diff --git a/drafts/bs-intl/__tests__/Intl_DateTimeFormat_test.ml b/drafts/bs-intl/__tests__/Intl_DateTimeFormat_test.ml new file mode 100644 index 0000000..3c66b00 --- /dev/null +++ b/drafts/bs-intl/__tests__/Intl_DateTimeFormat_test.ml @@ -0,0 +1,31 @@ +open Jest +open Expect + +let () = + describe "Intl.DateTimeFormat.supportedLocalesOf" (fun () -> + test "it shows all the supported locales for the given list" (fun () -> + expect (Intl.DateTimeFormat.supportedLocalesOf [|"ban"; "id-u-co-pinyin"; "de-ID"|] ()) + |> toEqual [|"id-u-co-pinyin"; "de-ID"|])); + + describe "Intl.DateTimeFormat.resolvedOptions" (fun () -> + test "it shows all the configured options for the given formatter" (fun () -> + let dt = Intl.DateTimeFormat.make ~locales:[|"de-DE"|] ~localeMatcher:BestFit ~weekday:Long () in + match Intl.DateTimeFormat.resolvedOptions dt with + | { calendar = calendar; _ } -> expect calendar |> toEqual (Some "gregory"))); + + describe "Intl.DateTimeFormat.format" (fun () -> + test "it builds a formatted date string" (fun () -> + let dt = Intl.DateTimeFormat.make ~locales:[|"fr"|] ~day:Numeric ~month:Long () in + expect (Intl.DateTimeFormat.format dt (Js.Date.makeWithYMD ~year:2019.0 ~month:6.0 ~date:22.0 ())) + |> toEqual "22 juillet")); + + describe "Intl.DateTimeFormat.formatToParts" (fun () -> + test "it builds an array of parts to make a formatted date string" (fun () -> + let dt = Intl.DateTimeFormat.make ~locales:[|"zh-CN"|] ~era:Long ~year:Numeric () in + let expected: Intl.DateTimeFormat.part array = [| + { type_ = Era; value = {js|公元|js}; }; + { type_ = Year; value = "2019"; }; + { type_ = Literal; value = {js|年|js}; }; + |] in + expect (Intl.DateTimeFormat.formatToParts dt (Js.Date.makeWithYMD ~year:2019.0 ~month:6.0 ~date:22.0 ())) + |> toEqual expected)) \ No newline at end of file diff --git a/drafts/bs-intl/__tests__/Intl_NumberFormat_test.ml b/drafts/bs-intl/__tests__/Intl_NumberFormat_test.ml new file mode 100644 index 0000000..edc1942 --- /dev/null +++ b/drafts/bs-intl/__tests__/Intl_NumberFormat_test.ml @@ -0,0 +1,33 @@ +open Jest +open Expect + +let () = + describe "Intl.NumberFormat.supportedLocalesOf" (fun () -> + test "it shows all the supported locales for the given list" (fun () -> + expect (Intl.NumberFormat.supportedLocalesOf [|"ban"; "id-u-co-pinyin"; "de-ID"|] ()) + |> toEqual [|"id-u-co-pinyin"; "de-ID"|])); + + describe "Intl.NumberFormat.format" (fun () -> + test "it builds a formatted number" (fun () -> + let nf = Intl.NumberFormat.make ~locales:[|"ar"|] ~style:(Currency { isoCode = "EGP"; display = None; }) () in + expect (Intl.NumberFormat.format nf 56.9) |> toEqual {js|٥٦٫٩٠ ج.م.‏|js})); + + describe "Intl.NumberFormat.formatToParts" (fun () -> + test "it builds an array of parts to make a formatted date string" (fun () -> + let nf = Intl.NumberFormat.make + ~locales:[|"es-ES"|] + ~style:(Currency { isoCode = "EUR"; display = Some Symbol; }) + ~digits:(Insignificant({ integer = None; fraction = Some { minimum = Some 2; maximum = None }; })) + () in + let expected: Intl.NumberFormat.part array = [| + { type_ = Integer; value = "2"; }; + { type_ = Group; value = "."; }; + { type_ = Integer; value = "000"; }; + { type_ = Group; value = "."; }; + { type_ = Integer; value = "000"; }; + { type_ = Decimal; value = ","; }; + { type_ = Fraction; value = "00"; }; + { type_ = Literal; value = {js| |js}; }; + { type_ = Currency; value = {js|€|js}; }; + |] in + expect (Intl.NumberFormat.formatToParts nf 2000000.0) |> toEqual expected)) \ No newline at end of file diff --git a/drafts/bs-intl/__tests__/Intl_PluralRules_test.ml b/drafts/bs-intl/__tests__/Intl_PluralRules_test.ml new file mode 100644 index 0000000..38dfe41 --- /dev/null +++ b/drafts/bs-intl/__tests__/Intl_PluralRules_test.ml @@ -0,0 +1,13 @@ +open Jest +open Expect + +let () = + describe "Intl.PluralRules.supportedLocalesOf" (fun () -> + test "it shows all the supported locales for the given list" (fun () -> + expect (Intl.PluralRules.supportedLocalesOf [|"ban"; "id-u-co-pinyin"; "de-ID"|] ()) + |> toEqual [|"id-u-co-pinyin"; "de-ID"|])); + + describe "Intl.PluralRules.select" (fun () -> + test "it builds a formatted number" (fun () -> + let pr = Intl.PluralRules.make ~locales:[|"ar"|] () in + expect (Intl.PluralRules.select pr 5.0) |> toEqual "few")); \ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl/index.html b/drafts/bs-intl/docs/bs-intl/Intl/index.html new file mode 100644 index 0000000..7dcbae3 --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl/index.html @@ -0,0 +1,2 @@ + +Intl (bs-intl.Intl)

Module Intl

Bindings to the Intl object, containing internationalization functions for Javascript.

Note that nodejs does not come with the necessary internationalization files by default. If this library isn't working for you in a nodejs context, that's likely the reason. You'll need to roll your own node, or use something like https://github.com/unicode-org/full-icu-npm

module DateTimeFormat = Intl_DateTimeFormat;

Handles functions related to the Intl.DateTimeFormat object.

module NumberFormat = Intl_NumberFormat;

Handles functions related to the Intl.NumberFormat object.

module PluralRules = Intl_PluralRules;

Handles functions related to the Intl.PluralRules object.

\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl_DateTimeFormat/index.html b/drafts/bs-intl/docs/bs-intl/Intl_DateTimeFormat/index.html new file mode 100644 index 0000000..48c28fb --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl_DateTimeFormat/index.html @@ -0,0 +1,26 @@ + +Intl_DateTimeFormat (bs-intl.Intl_DateTimeFormat)

Module Intl_DateTimeFormat

Provides a shim to the Javascript datetime internationalization APIs.

For a pretty good introduction to the Intl.DateTimeFormat API, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat

Note that nodejs does not come with the necessary internationalization files by default. If this library isn't working for you in a nodejs context, that's likely the reason. You'll need to roll your own node, or use something like https://github.com/unicode-org/full-icu-npm

type t;

The Intl.DateTimeFormat type.

type day =
| Numeric
| TwoDigit
;
type era =
| Long
| Short
| Narrow
;
type formatMatcher =
| Basic
| BestFit
;
type hour =
| Numeric
| TwoDigit
;
type hourCycle =
| H11
| H12
| H23
| H24
;
type localeMatcher =
| Lookup
| BestFit
;
type minute =
| Numeric
| TwoDigit
;
type month =
| Numeric
| TwoDigit
| Long
| Short
| Narrow
;
type second =
| Numeric
| TwoDigit
;
type timeZoneName =
| Long
| Short
;
type weekday =
| Long
| Short
| Narrow
;
type year =
| Numeric
| TwoDigit
;
let make: locales:array(string) => ?⁠day:day => ?⁠era:era => ?⁠formatMatcher:formatMatcher => ?⁠hour:hour => ?⁠hour12:bool => ?⁠hourCycle:hourCycle => ?⁠localeMatcher:localeMatcher => ?⁠minute:minute => ?⁠month:month => ?⁠second:second => ?⁠timeZone:string => ?⁠timeZoneName:timeZoneName => ?⁠weekday:weekday => ?⁠year:year => unit => t;

Create a new Intl.DateTimeFormat object with the specified options.

See here for a description of how the arguments are processed and used: https://www.ecma-international.org/ecma-402/1.0/#sec-12.1.3.1

OCaml:

let formatter = Intl.DateTimeFormat.make ~locales:[|"en-GB"|] ~month:TwoDigit () in
+let dateStr = Intl.DateTimeFormat.format formatter (Js.Date.makeWithYMD ~year:2019.0 ~month:6.0 ~date:22.0 ()) in
+Js.Console.log dateStr

Reason:

let formatter = Intl.DateTimeFormat.make(~locales=[|"en-GB"|], ~month=TwoDigit, ());
+let dateStr = Intl.DateTimeFormat.format(formatter, Js.Date.makeWithYMD(~year=2019.0, ~month=6.0, ~date=22.0, ()));
+Js.Console.log(dateStr);
include { ... };
include module type of { ... };
type rawResolvedOptionsResp;
let rawResolvedOptionsResp: ?⁠locale:string => ?⁠calendar:string => ?⁠numberingSystem:string => ?⁠timeZone:Js.Nullable.t(string) => ?⁠hour12:bool => ?⁠weekday:string => ?⁠era:string => ?⁠year:string => ?⁠month:string => ?⁠day:string => ?⁠hour:string => ?⁠minute:string => ?⁠second:string => ?⁠timeZoneName:string => unit => rawResolvedOptionsResp;
let locale: rawResolvedOptionsResp => option(string);
let localeGet: rawResolvedOptionsResp => option(string);
let calendar: rawResolvedOptionsResp => option(string);
let calendarGet: rawResolvedOptionsResp => option(string);
let numberingSystem: rawResolvedOptionsResp => option(string);
let numberingSystemGet: rawResolvedOptionsResp => option(string);
let timeZone: rawResolvedOptionsResp => option(Js.Nullable.t(string));
let timeZoneGet: rawResolvedOptionsResp => option(Js.Nullable.t(string));
let hour12: rawResolvedOptionsResp => option(bool);
let hour12Get: rawResolvedOptionsResp => option(bool);
let weekday: rawResolvedOptionsResp => option(string);
let weekdayGet: rawResolvedOptionsResp => option(string);
let era: rawResolvedOptionsResp => option(string);
let eraGet: rawResolvedOptionsResp => option(string);
let year: rawResolvedOptionsResp => option(string);
let yearGet: rawResolvedOptionsResp => option(string);
let month: rawResolvedOptionsResp => option(string);
let monthGet: rawResolvedOptionsResp => option(string);
let day: rawResolvedOptionsResp => option(string);
let dayGet: rawResolvedOptionsResp => option(string);
let hour: rawResolvedOptionsResp => option(string);
let hourGet: rawResolvedOptionsResp => option(string);
let minute: rawResolvedOptionsResp => option(string);
let minuteGet: rawResolvedOptionsResp => option(string);
let second: rawResolvedOptionsResp => option(string);
let secondGet: rawResolvedOptionsResp => option(string);
let timeZoneName: rawResolvedOptionsResp => option(string);
let timeZoneNameGet: rawResolvedOptionsResp => option(string);
let rawResolvedOptions: t => rawResolvedOptionsResp;

Get the un-ocaml-ified response from Intl.DateTimeFormat.prototype.resolvedOptions.

Only use if you have reason to believe that your JS environment is returning results from that method that don't conform to the spec here: https://www.ecma-international.org/ecma-402/1.0/#sec-12.3.3

Otherwise, resolvedOptions is preferable.

exception InvalidWeekday(string);
exception InvalidEra(string);
exception InvalidYear(string);
exception InvalidMonth(string);
exception InvalidDay(string);
exception InvalidHour(string);
exception InvalidMinute(string);
exception InvalidSecond(string);
exception InvalidTimeZoneName(string);
type resolvedOptionsResp = {
locale: option(string),
calendar: option(string),
numberingSystem: option(string),
timeZone: option(string),
hour12: option(bool),
weekday: option(weekday),
era: option(era),
year: option(year),
month: option(month),
day: option(day),
hour: option(hour),
minute: option(minute),
second: option(second),
timeZoneName: option(timeZoneName),
};

A type representing a strongly-typed response from Intl.DateTimeFormat.prototype.resolvedOptions.

see https://www.ecma-international.org/ecma-402/1.0/#sec-12.3.3

See the response spec here.

see https://www.ecma-international.org/ecma-402/1.0/#table-3

The table of valid options is also helpful.

let resolvedOptions: t => resolvedOptionsResp;

Calls Intl.DateTimeFormat.prototype.resolvedOptions.

Output is not stringly-typed, like the original.

raises [InvalidWeekday]

if the returned weekday doesn't match a value in the spec

raises [InvalidEra]

if the returned era doesn't match a value in the spec

raises [InvalidYear]

if the returned year doesn't match a value in the spec

raises [InvalidMonth]

if the returned month doesn't match a value in the spec

raises [InvalidDay]

if the returned day doesn't match a value in the spec

raises [InvalidHour]

if the returned hour doesn't match a value in the spec

raises [InvalidMinute]

if the returned minute doesn't match a value in the spec

raises [InvalidSecond]

if the returned second doesn't match a value in the spec

raises [InvalidTimeZoneName]

if the returned time zone name doesn't match a value in the spec

OCaml:

let formatter = Intl.DateTimeFormat.make ~locales:[|"en-GB"|] ~month:TwoDigit () in
+match Intl.DateTimeFormat.resolvedOptions formatter with
+| { category = category; _ } -> Js.Console.log category

Reason:

let formatter = Intl.DateTimeFormat.make(~locales=[|"en-GB"|], ~month=TwoDigit, ());
+switch (Intl.DateTimeFormat.resolvedOptions(formatter)) {
+| {category: category} => Js.Console.log(category)
+}
let format: t => Js.Date.t => string;

Calls Intl.DateTimeFormat.prototype.format.

OCaml:

let formatter = Intl.DateTimeFormat.make ~locales:[|"en-GB"|] ~month:TwoDigit () in
+let dateStr = Intl.DateTimeFormat.format formatter (Js.Date.makeWithYMD ~year:2019.0 ~month:6.0 ~date:22.0 ()) in
+Js.Console.log dateStr

Reason:

let formatter = Intl.DateTimeFormat.make(~locales=[|"en-GB"|], ~month=TwoDigit, ());
+let dateStr = Intl.DateTimeFormat.format(formatter, Js.Date.makeWithYMD(~year=2019.0, ~month=6.0, ~date=22.0, ()));
+Js.Console.log(dateStr);
include { ... };
include module type of { ... };
type rawPart;
let rawPart: type_:string => value:string => rawPart;
let type_: rawPart => string;
let type_Get: rawPart => string;
let value: rawPart => string;
let valueGet: rawPart => string;
type partType =
| Day
| DayPeriod
| Era
| Hour
| Literal
| Minute
| Month
| Second
| TimeZoneName
| Weekday
| Year
;
type part = {
type_: partType,
value: string,
};
exception InvalidPart(rawPart);
let formatToParts: t => Js.Date.t => array(part);

Calls Intl.DateTimeFormat.prototype.formatToParts.

raises [InvalidPart]

if a part type doesn't match the possible types outlined in MDN.

OCaml:

let formatter = Intl.DateTimeFormat.make ~locales:[|"zh-CN"|] ~era:Long ~year:Numeric () in
+let parts = Intl.DateTimeFormat.formatToParts formatter (Js.Date.makeWithYMD ~year:2019.0 ~month:6.0 ~date:22.0 ()) in
+match parts with
+| [||] -> ()
+| { value = value; _ } :: _ -> Js.Console.log value

Reason:

let formatter = Intl.DateTimeFormat.make(~locales=[|"zh-CN"|], ~era=Long, ~year=Numeric, ());
+let parts = Intl.DateTimeFormat.formatToParts(formatter, Js.Date.makeWithYMD(~year=2019.0, ~month=6.0, ~date=22.0, ()));
+switch (parts) {
+| [||] => ()
+| [|{value: value}, ..._|] => Js.Console.log(value)
+};
let supportedLocalesOf: array(string) => ?⁠localeMatcher:localeMatcher => unit => array(string);

Calls Intl.DateTimeFormat.supportedLocalesOf.

OCaml:

let supported = Intl.DateTimeFormat.supportedLocalesOf [|"en-GB"; "ridiculous"|] () in
+Js.Console.log (string_of_int (Belt.Array.length supported))

Reason:

let supported = Intl.DateTimeFormat.supportedLocalesOf([|"en-GB", "ridiculous"|], ());
+Js.Console.log(string_of_int(Belt.Array.length(supported)));
\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl_DateTimeFormat_test/index.html b/drafts/bs-intl/docs/bs-intl/Intl_DateTimeFormat_test/index.html new file mode 100644 index 0000000..9b8af4a --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl_DateTimeFormat_test/index.html @@ -0,0 +1,2 @@ + +Intl_DateTimeFormat_test (bs-intl.Intl_DateTimeFormat_test)

Module Intl_DateTimeFormat_test

\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl_NumberFormat/index.html b/drafts/bs-intl/docs/bs-intl/Intl_NumberFormat/index.html new file mode 100644 index 0000000..7dc027a --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl_NumberFormat/index.html @@ -0,0 +1,45 @@ + +Intl_NumberFormat (bs-intl.Intl_NumberFormat)

Module Intl_NumberFormat

Provides a shim to the Javascript number internationalization APIs.

For a pretty good introduction to the Intl.NumberFormat API, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat

Note that nodejs does not come with the necessary internationalization files by default. If this library isn't working for you in a nodejs context, that's likely the reason. You'll need to roll your own node, or use something like https://github.com/unicode-org/full-icu-npm

type t;

The Intl.NumberFormat type.

type localeMatcher =
| Lookup
| BestFit
;
type currencyDisplay =
| Symbol
| Code
| Name
;
type currency = {
isoCode: string,
display: option(currencyDisplay),
};
type style =
| Decimal
| Percent
| Currency(currency)
;
type significantDigits = {
minimum: option(int),
maximum: option(int),
};
type fractionDigits = {
minimum: option(int),
maximum: option(int),
};
type integerDigits = {
minimum: option(int),
};
type insignificantDigits = {
integer: option(integerDigits),
fraction: option(fractionDigits),
};
type digits =
| Insignificant(insignificantDigits)
| Significant(significantDigits)
;
let make: locales:array(string) => ?⁠localeMatcher:localeMatcher => ?⁠style:style => ?⁠useGrouping:bool => ?⁠digits:digits => unit => t;

Create a new Intl.NumberFormat object with the specified options.

See here for a description of how the arguments are processed and used: https://www.ecma-international.org/ecma-402/1.0/#sec-11.1.3.1

We don't try to match the JS arguments exactly, because OCaml's type system offers some additional safety here.

In particular, since the spec says that if the style option == "currency", then the currency option must be set with an ISO currency code. We use the type system to enforce that a valid program must have an ISO code if it represents a currency.

A similar approach works for the minimumSignificantDigits, minimumIntegerDigits, etc. Since only one set of bounds may be used, the type system forces you to pick.

OCaml:

let formatter = Intl.NumberFormat.make
+  ~locales:[|"fr"|]
+  ~style:Percent
+  ~digits:(Insignificant { integer = None; fraction = Some { maximum = Some 3; minimum = Some 3 } })
+  () in
+let pctStr = Intl.NumberFormat.format formatter 0.984322 in
+Js.Console.log pctStr

Reason:

let formatter = Intl.NumberFormat.make(
+  ~locales=[|"fr"|],
+  ~style=Percent,
+  ~digits=Insignificant({integer: None, fraction: Some({maximum: Some(3), minimum: Some(3)})}),
+  ());
+let pctStr = Intl.NumberFormat.format(formatter, 0.984322);
+Js.Console.log(pctStr);
let format: t => float => string;

Calls Intl.NumberFormat.prototype.format.

OCaml:

let formatter = Intl.NumberFormat.make
+  ~locales:[|"es-ES"|]
+  ~style:(Currency { isoCode = "EUR"; display = Some Symbol })
+  ~digits:(Significant { maximum = Some 2; minimum = Some 2 })
+  () in
+let moneyStr = Intl.NumberFormat.format formatter 56456.897 in
+Js.Console.log moneyStr

Reason:

let formatter = Intl.NumberFormat.make(
+  ~locales=[|"es-ES"|],
+  ~style=Currency({isoCode: "EUR", display: Some(Symbol)}),
+  ~digits=Significant({maximum: Some(2), minimum: Some(2)}),
+  ());
+let moneyStr = Intl.NumberFormat.format(formatter, 56456.897);
+Js.Console.log(moneyStr);
include { ... };
include module type of { ... };
type rawPart;
let rawPart: type_:string => value:string => rawPart;
let type_: rawPart => string;
let type_Get: rawPart => string;
let value: rawPart => string;
let valueGet: rawPart => string;
type partType =
| Currency
| Decimal
| Fraction
| Group
| Infinity
| Integer
| Literal
| MinusSign
| NaN
| PlusSign
| PercentSign
;
type part = {
type_: partType,
value: string,
};
exception InvalidPart(rawPart);
let formatToParts: t => float => array(part);

Calls Intl.NumberFormat.prototype.formatToParts.

raises [InvalidPart]

if a part type doesn't match the possible types outlined in MDN.

OCaml:

let formatter = Intl.NumberFormat.make
+  ~locales:[|"es-ES"|]
+  ~style:(Currency { isoCode = "EUR"; display = Some Symbol })
+  ~digits:(Significant { maximum = Some 2; minimum = Some 2 })
+  () in
+let parts = Intl.NumberFormat.formatToParts formatter 2000000.0 in
+match parts with
+| [||] -> ()
+| { value = value; _ } :: _ -> Js.Console.log value

Reason:

let formatter = Intl.NumberFormat.make(
+  ~locales=[|"es-ES"|],
+  ~style=Currency({isoCode: "EUR", display: Some(Symbol)}),
+  ~digits=Significant({maximum: Some(2), minimum: Some(2)}),
+  ());
+let parts = Intl.NumberFormat.formatToParts(formatter, 2000000.0);
+switch (parts) {
+| [||] => ()
+| [|{value: value}, ..._|] => Js.Console.log(value)
+}
let supportedLocalesOf: array(string) => ?⁠localeMatcher:localeMatcher => unit => array(string);

Calls Intl.NumberFormat.supportedLocalesOf.

OCaml:

let supported = Intl.NumberFormat.supportedLocalesOf [|"en-GB"; "ridiculous"|] () in
+Js.Console.log (string_of_int (Belt.Array.length supported))

Reason:

let supported = Intl.NumberFormat.supportedLocalesOf([|"en-GB", "ridiculous"|], ());
+Js.Console.log(string_of_int(Belt.Array.length(supported)));
\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl_NumberFormat_test/index.html b/drafts/bs-intl/docs/bs-intl/Intl_NumberFormat_test/index.html new file mode 100644 index 0000000..bb57e95 --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl_NumberFormat_test/index.html @@ -0,0 +1,2 @@ + +Intl_NumberFormat_test (bs-intl.Intl_NumberFormat_test)

Module Intl_NumberFormat_test

\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl_PluralRules/index.html b/drafts/bs-intl/docs/bs-intl/Intl_PluralRules/index.html new file mode 100644 index 0000000..cc6e322 --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl_PluralRules/index.html @@ -0,0 +1,12 @@ + +Intl_PluralRules (bs-intl.Intl_PluralRules)

Module Intl_PluralRules

Provides a shim to the Javascript number pluralization internationalization APIs.

For a pretty good introduction to the Intl.PluralRules API, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules

Note that nodejs does not come with the necessary internationalization files by default. If this library isn't working for you in a nodejs context, that's likely the reason. You'll need to roll your own node, or use something like https://github.com/unicode-org/full-icu-npm

type t;

The Intl.PluralRules type.

type localeMatcher =
| Lookup
| BestFit
;
type type_ =
| Cardinal
| Ordinal
;
let make: locales:array(string) => ?⁠localeMatcher:localeMatcher => ?⁠type_:type_ => unit => t;

Create a new Intl.PluralRules object with the specified options.

See here for a description of how the arguments are processed and used: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules

OCaml:

let formatter = Intl.PluralRules.make ~locales:[|"fr"|] ~type_:Ordinal () in
+let asStr = Intl.PluralRules.select formatter 4.0 in
+Js.Console.log asStr

Reason:

let formatter = Intl.PluralRules.make(~locales=[|"fr"|], ~type_=Ordinal, ());
+let asStr = Intl.PluralRules.select(formatter, 4.0);
+Js.Console.log(asStr);
let select: t => float => string;

Calls Intl.PluralRules.prototype.select.

OCaml:

let formatter = Intl.PluralRules.make ~locales:[|"fr"|] ~type_:Ordinal () in
+let asStr = Intl.PluralRules.select formatter 4.0 in
+Js.Console.log asStr

Reason:

let formatter = Intl.PluralRules.make(~locales=[|"fr"|], ~type_=Ordinal, ());
+let asStr = Intl.PluralRules.select(formatter, 4.0);
+Js.Console.log(asStr);
let supportedLocalesOf: array(string) => ?⁠localeMatcher:localeMatcher => unit => array(string);

Calls Intl.PluralRules.supportedLocalesOf.

OCaml:

let supported = Intl.PluralRules.supportedLocalesOf [|"en-GB"; "ridiculous"|] () in
+Js.Console.log (string_of_int (Belt.Array.length supported))

Reason:

let supported = Intl.PluralRules.supportedLocalesOf([|"en-GB", "ridiculous"|], ());
+Js.Console.log(string_of_int(Belt.Array.length(supported)));
\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/Intl_PluralRules_test/index.html b/drafts/bs-intl/docs/bs-intl/Intl_PluralRules_test/index.html new file mode 100644 index 0000000..89d53b6 --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/Intl_PluralRules_test/index.html @@ -0,0 +1,2 @@ + +Intl_PluralRules_test (bs-intl.Intl_PluralRules_test)

Module Intl_PluralRules_test

\ No newline at end of file diff --git a/drafts/bs-intl/docs/bs-intl/index.html b/drafts/bs-intl/docs/bs-intl/index.html new file mode 100644 index 0000000..64f1b17 --- /dev/null +++ b/drafts/bs-intl/docs/bs-intl/index.html @@ -0,0 +1,25 @@ + + + + index + + + + + + + +
+
+

bs-intl - Bucklescript/ReasonML port of the ECMA Internationalization API

+

See the README or look through these docs to see what functionality is supported. The docs contain examples on how to use each function.

+
    +
  1. Intl
  2. +
  3. Intl.DateTimeFormat
  4. +
  5. Intl.NumberFormat
  6. +
  7. Intl.PluralRules
  8. +
+
+
+ + \ No newline at end of file diff --git a/drafts/bs-intl/docs/highlight.pack.js b/drafts/bs-intl/docs/highlight.pack.js new file mode 100644 index 0000000..40370e8 --- /dev/null +++ b/drafts/bs-intl/docs/highlight.pack.js @@ -0,0 +1,2 @@ +/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */ +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("ocaml",function(e){return{aliases:["ml"],k:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:"\\[(\\|\\|)?\\]|\\(\\)",r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*",r:0},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}}); \ No newline at end of file diff --git a/drafts/bs-intl/docs/index.html b/drafts/bs-intl/docs/index.html new file mode 100644 index 0000000..9ad822b --- /dev/null +++ b/drafts/bs-intl/docs/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/drafts/bs-intl/docs/odoc.css b/drafts/bs-intl/docs/odoc.css new file mode 100644 index 0000000..c86c417 --- /dev/null +++ b/drafts/bs-intl/docs/odoc.css @@ -0,0 +1,764 @@ +@charset "UTF-8"; +/* Copyright (c) 2016 The odoc contributors. All rights reserved. + Distributed under the ISC license, see terms at the end of the file. + odoc 1.4.0 */ + +/* Fonts */ +@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); +@import url('https://fonts.googleapis.com/css?family=Noticia+Text:400,400i,700'); +@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,500,500i,600,600i,700,700i'); + + +/* Reset a few things. */ + +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: inherit; + font: inherit; + line-height: inherit; + vertical-align: baseline; + text-align: inherit; + color: inherit; + background: transparent; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +*, *:before, *:after { + box-sizing: border-box; +} + +html { + font-size: 15px; +} + +body { + font-family: "Fira Sans", Helvetica, Arial, sans-serif; + text-align: left; + color: #333; + background: #FFFFFF; +} + +.content { + max-width: 90ex; + margin-left: calc(10vw + 20ex); + margin-right: 4ex; + margin-top: 20px; + margin-bottom: 50px; + font-family: "Noticia Text", Georgia, serif; + line-height: 1.5; +} + +.content>header { + margin-bottom: 30px; +} + +.content>header nav { + font-family: "Fira Sans", Helvetica, Arial, sans-serif; +} + +/* Basic markup elements */ + +b, strong { + font-weight: 500; +} + +i, em { + font-style: italic; +} + +sup { + vertical-align: super; +} + +sub { + vertical-align: sub; +} + +sup, sub { + font-size: 12px; + line-height: 0; + margin-left: 0.2ex; +} + +pre { + margin-top: 0.8em; + margin-bottom: 1.2em; +} + +p, ul, ol { + margin-top: 0.5em; + margin-bottom: 1em; +} +ul, ol { + list-style-position: outside +} + +ul>li { + margin-left: 22px; +} + +ol>li { + margin-left: 27.2px; +} + +li>*:first-child { + margin-top: 0 +} + +/* Text alignements, this should be forbidden. */ + +.left { + text-align: left; +} + +.right { + text-align: right; +} + +.center { + text-align: center; +} + +/* Links and anchors */ + +a { + text-decoration: none; + color: #2C5CBD; +} + +a:hover { + box-shadow: 0 1px 0 0 #2C5CBD; +} + +/* Linked highlight */ +*:target { + background-color: rgba(187,239,253,0.3) !important; + box-shadow: 0 0px 0 1px rgba(187,239,253,0.8) !important; + border-radius: 1px; +} + +*:hover>a.anchor { + visibility: visible; +} + +a.anchor:before { + content: "#" +} + +a.anchor:hover { + box-shadow: none; + text-decoration: none; + color: #555; +} + +a.anchor { + visibility: hidden; + position: absolute; + /* top: 0px; */ + /* margin-left: -3ex; */ + margin-left: -1.3em; + font-weight: normal; + font-style: normal; + padding-right: 0.4em; + padding-left: 0.4em; + /* To remain selectable */ + color: #d5d5d5; +} + +.spec > a.anchor { + margin-left: -2.3em; + padding-right: 0.9em; +} + +.xref-unresolved { + color: #2C5CBD; +} +.xref-unresolved:hover { + box-shadow: 0 1px 0 0 #CC6666; +} + +/* Section and document divisions. + Until at least 4.03 many of the modules of the stdlib start at .h7, + we restart the sequence there like h2 */ + +h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { + font-family: "Fira Sans", Helvetica, Arial, sans-serif; + font-weight: 400; + margin: 0.5em 0 0.5em 0; + padding-top: 0.1em; + line-height: 1.2; + overflow-wrap: break-word; +} + +h1 { + font-weight: 500; + font-size: 2.441em; + margin-top: 1.214em; +} + +h1 { + font-weight: 500; + font-size: 1.953em; + box-shadow: 0 1px 0 0 #ddd; +} + +h2 { + font-size: 1.563em; +} + +h3 { + font-size: 1.25em; +} + +small, .font_small { + font-size: 0.8em; +} + +h1 code, h1 tt { + font-size: inherit; + font-weight: inherit; +} + +h2 code, h2 tt { + font-size: inherit; + font-weight: inherit; +} + +h3 code, h3 tt { + font-size: inherit; + font-weight: inherit; +} + +h3 code, h3 tt { + font-size: inherit; + font-weight: inherit; +} + +h4 { + font-size: 1.12em; +} + + +/* Preformatted and code */ + +tt, code, pre { + font-family: "Fira Mono", courier; + font-weight: 400; +} + +pre { + padding: 0.1em; + border: 1px solid #eee; + border-radius: 5px; + overflow-x: auto; +} + +p code, li code { + background-color: #f6f8fa; + color: #0d2b3e; + border-radius: 3px; + padding: 0 0.3ex; +} + +p a > code { + color: #2C5CBD; +} + +/* Code blocks (e.g. Examples) */ + +pre code { + font-size: 0.893rem; +} + +/* Code lexemes */ + +.keyword { + font-weight: 500; +} + +/* Module member specification */ + +.spec:not(.include), .spec.include details summary { + background-color: #f6f8fa; + border-radius: 3px; + border-left: 4px solid #5c9cf5; + border-right: 5px solid transparent; + padding: 0.35em 0.5em; +} + +.spec.include details summary:hover { + background-color: #ebeff2; +} + +dl, div.spec, .doc, aside { + margin-bottom: 20px; +} + +dl > dd { + padding: 0.5em; +} + +dd> :first-child { + margin-top: 0; +} + +dl:last-child, dd> :last-child, aside:last-child, article:last-child { + margin-bottom: 0; +} + +dt+dt { + margin-top: 15px; +} + +section+section, section > header + dl { + margin-top: 25px; +} + +.spec.type .variant { + margin-left: 2ch; +} +.spec.type .variant p { + margin: 0; + font-style: italic; +} +.spec.type .record { + margin-left: 2ch; +} +.spec.type .record p { + margin: 0; + font-style: italic; +} + +div.def { + margin-top: 0; + text-indent: -2ex; + padding-left: 2ex; +} + +div.def+div.doc { + margin-left: 1ex; + margin-top: 2.5px +} + +div.doc>*:first-child { + margin-top: 0; +} + +/* The elements other than heading should be wrapped in