Skip to content

Conversation

@antfu
Copy link
Member

@antfu antfu commented Dec 28, 2019

v0.1.2

Overhauled hanzi2num (PR #413, thanks @statementreply)

  • 塵埃渺漠 are now 10x each
  • The character for 10^28 is changed to (U+7A70).
  • 一百一 = 101 now
  • Multi-character multipliers are no longer supported.
  • Omitting before fractional multipliers is no longer allowed. It's unclear whether 五毫絲 means 0.0051 or 5e-7, so I just disallowed it for now.
  • Allow multiple multipliers: 一萬萬 = 1e+8, 一百絲 = 0.01.
  • Add support for positional notation: 一三三七 = 1337
  • Add digit zero (exactly one digit of zero) and decimal separator ·: 三五〇〇·〇一 = 3500.01
  • "又" can be used at more places: 三十又六 = 36

New Features

Fixes

Examples

@antfu antfu added the release-note Release note for next version label Dec 28, 2019
@antfu antfu self-assigned this Dec 28, 2019
@antfu
Copy link
Member Author

antfu commented Dec 29, 2019

Since we got big updates as #413. I think we are ready for a new version.

@antfu antfu marked this pull request as ready for review December 29, 2019 08:52
@antfu antfu requested a review from LingDong- December 29, 2019 08:52
statementreply and others added 3 commits December 29, 2019 19:41
Robust: 4/4 (Does it work for all input values?)
Accurate: 4/4 (How accurate is the result?)
Well behaved: 4/4 (Does it preserve math properties?)

算經.平方根 should return exactly the same result as Math.sqrt for all
input numbers except -0, for which Math.sqrt(-0) = -0 complying to IEEE
754, but 算經.平方根(-0) = +0.

This will also make the current implementation of hypot a tiny bit more
accurate than before. I'll rate hypot 4/2/3 after this patch (previously
4/2/2) due to the following property being preserved when sqrt is
correctly rounded:

hypot(x, y) >= |x| && hypot(x, y) >= |y|
stdlib: Implement correctly rounded sqrt (4/4/4)
@LingDong- LingDong- merged commit d06c4eb into release Dec 29, 2019
@LingDong-
Copy link
Member

Great, thanks!

LingDong- added a commit that referenced this pull request Dec 29, 2019
Merge pull request #416 from LingDong-/master
LingDong- added a commit that referenced this pull request Jan 20, 2020
LingDong- added a commit that referenced this pull request Jan 20, 2020
Merge pull request #416 from LingDong-/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Release note for next version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants