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

<Math.hypot()> の更新 #742

Open
yabuki opened this issue Feb 12, 2024 · 3 comments
Open

<Math.hypot()> の更新 #742

yabuki opened this issue Feb 12, 2024 · 3 comments
Labels

Comments

@yabuki
Copy link

yabuki commented Feb 12, 2024

原文のURL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot

更新対象ページ (日本語 URL)

https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot

更新内容・備考・ヘルプ

誤訳の可能性がある。

Math.hypot はまた、数値が非常に大きい場合のオーバーフロー/アンダーフローの問題を回避します。 JS で表現できる最大の数は Number.MAX_VALUE で、これは約 10308 です。

コンテキストが悪いのかわからないが、JSで表現できる数はもっと多い。 Number.MAX_SAFE_INTEGER よりも小さい。のに最大数って、どういうコンテキストなのか?

@yabuki yabuki added the MDN label Feb 12, 2024
@kawarimidoll
Copy link

日本語版では 10308 、 10154 となっていますが、原文ではそれぞれ 10 308 、 10 154 となっています。
翻訳ミスというよりはマークアップのミスと思われます。

image

@unarist
Copy link
Contributor

unarist commented Feb 13, 2024

日本語版をHTMLからMarkdownに変換した時にsupタグが落ちたみたいですね。変換スクリプトがsup/subを原則剥がす仕様のようなので、他のページにも同様の問題があるかもしれません。

(もっとも、今の執筆ガイドラインだとべき乗は 2^53 のように書くように指定があるので、原文からしてキャレットを使った記法に直すべきという話もあるかもしれない)

@debiru
Copy link
Member

debiru commented Feb 14, 2024

/content/files/en-us/translated-content/files/jaag '<sup>' -l | sort した結果をそれぞれ en.txt, ja.txt として保存し、comm -2 -3 en.txt ja.txt した結果は以下です。

この結果は、「<sup> を含む英語版ファイルのうち、日本語版に <sup> が含まれていないページ一覧」です。

learn/mathml/first_steps/scripts/index.md
web/accessibility/aria/roles/math_role/index.md
web/accessibility/seizure_disorders/index.md
web/css/exp/index.md
web/css/hypot/index.md
web/css/pow/index.md
web/javascript/guide/numbers_and_dates/index.md
web/javascript/reference/errors/invalid_array_length/index.md
web/javascript/reference/errors/resulting_string_too_large/index.md
web/javascript/reference/errors/unparenthesized_unary_expr_lhs_exponentiation/index.md
web/javascript/reference/global_objects/bigint/asintn/index.md
web/javascript/reference/global_objects/bigint/asuintn/index.md
web/javascript/reference/global_objects/dataview/getbigint64/index.md
web/javascript/reference/global_objects/dataview/getbiguint64/index.md
web/javascript/reference/global_objects/math/clz32/index.md
web/javascript/reference/global_objects/math/exp/index.md
web/javascript/reference/global_objects/math/expm1/index.md
web/javascript/reference/global_objects/math/floor/index.md
web/javascript/reference/global_objects/math/hypot/index.md
web/javascript/reference/global_objects/math/index.md
web/javascript/reference/global_objects/math/random/index.md
web/javascript/reference/global_objects/number/tofixed/index.md
web/javascript/reference/global_objects/parseint/index.md
web/javascript/reference/operators/bitwise_not/index.md
webassembly/reference/numeric/wrap/index.md

このうち、日本語版ファイルが存在するのは以下のみです。/translated-content/files/jacomm -2 -3 en.txt ja.txt | xargs ls -1 した結果です。

web/javascript/guide/numbers_and_dates/index.md
web/javascript/reference/errors/invalid_array_length/index.md
web/javascript/reference/errors/resulting_string_too_large/index.md
web/javascript/reference/global_objects/bigint/asintn/index.md
web/javascript/reference/global_objects/bigint/asuintn/index.md
web/javascript/reference/global_objects/dataview/getbigint64/index.md
web/javascript/reference/global_objects/dataview/getbiguint64/index.md
web/javascript/reference/global_objects/math/clz32/index.md
web/javascript/reference/global_objects/math/exp/index.md
web/javascript/reference/global_objects/math/expm1/index.md
web/javascript/reference/global_objects/math/floor/index.md
web/javascript/reference/global_objects/math/hypot/index.md
web/javascript/reference/global_objects/math/index.md
web/javascript/reference/global_objects/math/random/index.md
web/javascript/reference/global_objects/number/tofixed/index.md
web/javascript/reference/global_objects/parseint/index.md
web/javascript/reference/operators/bitwise_not/index.md

1個目の日本語ファイルを調べてみると、英語版では ^ が使われているが、日本語では <sup>^ も使われておらず意味不明な数値になっている箇所が見つかりました(つまり英語版で <sup> がある箇所だけ追っても対応漏れが生じます)。
https://github.com/mdn/translated-content/blob/main/files/ja/web/javascript/guide/numbers_and_dates/index.md?plain=1#L12

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

No branches or pull requests

4 participants