Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation - Read.me - weirdy weirdo #137

Open
c0ncentus opened this issue Dec 1, 2022 · 8 comments
Open

Documentation - Read.me - weirdy weirdo #137

c0ncentus opened this issue Dec 1, 2022 · 8 comments

Comments

@c0ncentus
Copy link

Hi, thanks to consider seriously high number issues and make it great !

you may be offense by what i written, but keep in mind that we read as reference youre READ.ME everytime and treat us as well like pig.

My Motivation

I written carefully and take time to suggest swift solution.
Is not insulting because thats no the usage of the platform else i will go to twitter,
What I want is making READ.ME more pretty like a tool that help us, not the opposite lol ^^ .

I read the readme and it's just scares me (being clear).

All drawsback / solution desired / Alternatives

10^^1e308

A Javascript numerical library to represent numbers as large as 10^^1e308

it means dealing with f(x)= 10^x^1e308 ? or else like 10^1e308^1e308 ? Be precise please I dont understand what means "^^".
we need to search in the doc for solving the issue but you need to not being enigmatic or think "it is not enigmatic because I have clear of ideas of how the package works" (extremly BIAS, because dev are not supposed to know deeply, dev are only USE your package)

X^^N === X^X^X^ ... (N X^s) 1

Readers are not telepath so write 10^1e308^1e308 instead of 10^^1e308

Section "Comparaison"

a sequel to break_infinity.js, my other library which maxes out at 1e1e308 ( https://github.com/Patashu/break_infinity.js ) and its C# port ( https://github.com/Razenpok/BreakInfinity.cs ). Despite handling a wider range of numbers, execution time is comparable (within 2x/0.5x as fast as break_infinity.js in testing) and it has the same interface, so it can be used as a drop-in replacement for break_infinity.js and decimal.js.

dont want to read, just ugly ... be serious and learn to make table in markdown (just i'm serious fot the readers and dev)

| break_infinity.js | break_eternity.js | 
| --------------- | --------------- | 
| Row 1 Column 1 | Row 1 Column 2 |
| Row 1 Column 1 | Row 1 Column 2 |
| Row 1 Column 1 | Row 1 Column 2 |
break_infinity.js break_eternity.js
Row 1 Column 1 Row 1 Column 2
Row 1 Column 1 Row 1 Column 2
Row 1 Column 1 Row 1 Column 2

Functionnality

Now with arbitrary real height and base handling in your favourite hyper 4 operators (tetrate, iterated exponentiation, iterated logarithm, super logarithm, super square root) and even in pentate (if you want to do that for some reason)! Using the linear approximation. (Analytical approximation is too hard for me atm.)

The internal representation is as follows: Decimal.fromComponents(sign, layer, mag) === sign10^10^10^ ... (layer times) mag. So a layer 0 number is just signmag, a layer 1 number is sign10^mag, a layer 2 number is sign10^10^mag, and so on. If layer > 0 and mag < 0, then the number's exponent is negative, e.g. sign*10^-10^10^10^ ... mag.

sign is -1, 0 or 1.
layer is a non-negative integer.
mag is a Number, normalized as follows: if it is above 9e15, log10(mag) it and increment layer. If it is below log10(9e15) (about 15.954) and layer > 0, Math.pow(10, mag) it and decrement layer. At layer 0, sign is extracted from negative mags. Zeroes (this.sign === 0 || (this.mag === 0 && this.layer === 0)) become 0, 0, 0 in all fields.

Create a Decimal with new Decimal(String or Number or Decimal) or with Decimal.fromComponents(sign, layer, mag). Use operations

IMPORTANT NOTE TO PEOPLE CONVERTING FROM break_infinity.js: log/log2/log10/ln now return Decimal not Number! You'll also need to reconsider your string parsing/displaying functions and consider moving e/exponent calls to absLog10. Support for very small numbers has finally been added, so things like tickspeed multiplier being 1e-400 will be fine now!

Functions you can call include abs, neg, round, floor, ceil, trunc, add, sub, mul, div, recip, cmp, cmpabs, max, min, maxabs, minabs, log, log10, ln, pow, root, factorial, gamma, exp, sqrt, tetrate, iteratedexp, iteratedlog, layeradd10, layeradd, slog, ssqrt, lambertw, pentate and more! Javascript operators like + and * do not work - you need to call the equivalent functions instead.

Just make it real https://www.pluralsight.com/guides/working-tables-github-markdown

Just i read i dont get the point ... juste make it concise like

method what do the method arguments explaining argument exemple result
Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 1 Column 3 Row 1 Column 3 Row 1 Column 3
Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 1 Column 3 Row 1 Column 3 Row 1 Column 3
Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 1 Column 3 Row 1 Column 3 Row 1 Column 3

and make a list of breaking change ... is like organize your text.

Format

Accepted input formats to new Decimal or Decimal.fromString:
M === M
eX === 10^X
MeX === M10^X
eXeY === 10^(XeY)
MeXeY === M
10^(XeY)
eeX === 10^10^X
eeXeY === 10^10^(XeY)
eeeX === 10^10^10^X
eeeXeY === 10^10^10^(XeY)
eeee... (N es) X === 10^10^10^ ... (N 10^s) X
(e^N)X === 10^10^10^ ... (N 10^s) X
N PT X === 10^10^10^ ... (N 10^s) X
N PT (X) === 10^10^10^ ... (N 10^s) X
NpX === 10^10^10^ ... (N 10^s) X
X^Y === X^Y
X^^N === X^X^X^ ... (N X^s) 1
X^^N;Y === X^X^X^ ... (N X^s) Y
X^^^N === X^^X^^X^^ ... (N X^^s) 1
X^^^N;Y === X^^X^^X^^ ... (N X^^s) Y

I'am not a telepath so

Legend:

Symbols Describing
M ???
e exponential
X a number in string
Y a another number in a string
N ???
P ???
T ???
p ???
string format number Break_eternity Object details
Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 1 Column 3
Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 1 Column 3
Row 1 Column 1 Row 1 Column 2 Row 1 Column 3 Row 1 Column 3

Note

Seriously you can make it better than https://mikemcl.github.io/decimal.js/
.... Auto generated ok but such annoying and no easy to quickly use package
.... With markdown you do 20% of efforts for 99% of usage ...

@c0ncentus c0ncentus changed the title Documentation weirdy weirdo Documentation - Read.me - weirdy weirdo Dec 1, 2022
@jakub791
Copy link

jakub791 commented Dec 6, 2022

10^^1e308 means 1e308 raised to 1e308 1e308 times.

@jakub791
Copy link

jakub791 commented Dec 6, 2022

And regarding the docs about methods, we could use JSDoc comments so that they appear in your IDE as well.

@c0ncentus
Copy link
Author

c0ncentus commented Dec 6, 2022

And regarding the docs about methods, we could use JSDoc comments so that they appear in your IDE as well.

  1. Not every method is documented
  2. Not every method 100% well documented (or I would say not is 30% documented)
  3. you are not supposed to write 10 paragraphs in readme in "I dont't care" mode.
  4. it took someone 10 minutes for write a beautifull Readme and make it 100% usable versus 5% (current state).

I really not enjoy to deal with people thinking we are in their head => If i will be a telepath i don't write that.

The package (break_infinity) is (my intuition) ~10-30% well documented... (use depracated documentation + 1 line or 2).

you could put a minimum effort on doing a beautifull readme and reach ~80% rather than thinking of "writting good documentation" ...

If the maintener cares about documentation:

  • prefer something like typescript (you can add it also) rather say "I use JsDoc but many times dont make JSDoc or 1 line or 2 .... lol".
  • prefer readme rather than writes 1 line or 2 depend of humor. => proof of reliability and engagement.

Jsdoc are good but the uses in break_infity (maybe as well here) is a joke.

So thats why put readme is neccessary: To be forced to be clear but maybe not a skill of the author.
Like in general as we said as dev ... "tests are garbage", that is also "Just an another myth".

@jakub791
Copy link

jakub791 commented Dec 6, 2022

Regarding JSDoc I meant add JSDoc comments as well (and actually for all then methods, not something like how it's now)

@jakub791
Copy link

jakub791 commented Dec 6, 2022

To add something, I like how this example from the readme:

x = new Decimal(123.4567);
y = new Decimal("123456.7e-3");
z = new Decimal(x);
x.equals(y) && y.equals(z) && x.equals(z); // true

uses implicit creation of global variables which is a bad practice

@Patashu
Copy link
Owner

Patashu commented Dec 6, 2022

Yeah the readme is godawful lmao. Writing a better one would take a lot of effort though, not sure I have it in me.

@c0ncentus
Copy link
Author

c0ncentus commented Dec 9, 2022

just do simple is enought. as we said "keep it stupid, simple" ...

is just a system of number with operations ...

it must be simple ... general to deeper mechanisme ...
Lot efforts if you have a tons of things in your head and cannot organized them ...
Take 10 minutes per day or 1 day per week and on february it is done ... (or even if you have clear mind .... you just make it in 10 minutes ...)

@MathCookie17
Copy link
Collaborator

About your first point: 10^^1e308 is an example of tetration, which is pretty much the defining feature of this library - I feel it can be safely assumed that users of break_eternity know what tetration is, as if they don't, break_eternity probably isn't what they're looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants