This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a test designed by muller and kahan that demonstrates how | |
// the calculation of a known convergence returns incorrectly because | |
// of the mathematics of floating point numbers | |
const max = 21 | |
let u = 2.0; | |
let v = -4.0; | |
let w; | |
for (let i = 3; i < max; i++) { | |
w = 111.0 - 1130.0/v + 3000.0/(v*u); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias.plog log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=iso --branches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you will want to run the hardhat node in a separate terminal | |
# putting this here as a reminder | |
cd evm-tableland | |
npx hardhat node | |
# Add the following to the `networks` prop in hardhat.config.ts | |
# "local-tableland": { | |
# url: "http://127.0.0.1:8545", | |
# accounts: [ | |
# "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dependencies: @tableland/sdk, @tableland/local | |
// Run `npx local-tableland` and then run this script in another window | |
import { Database, helpers } from "@tableland/sdk"; | |
import { Wallet, getDefaultProvider, utils } from "ethers"; | |
// NOTE: using 34000 here to give a 1000 byte padding for the `insert into table values` and | |
// in case the sql parser increases the size, which is unlikely but possible. | |
// If you wanted to limit for gas you'd have to kinda guess a value here. | |
const BYTES_LIMIT = 34000 |
OlderNewer