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

add ft_atof and convertible_to_float #13

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

kurrrru
Copy link
Owner

@kurrrru kurrrru commented Dec 11, 2024

概要

ft_atofとconvertible_to_floatを追加した

詳細

  • ft_atof
    • [任意の長さのspace][+/-/符号なし][長さ1以上のdigit part]([.][長さ1以上のdigit part])の形式のみ対応した
    • 2e9みたいなケース(これは $2\times 10^9$ として処理される)は考えていない(そのため、オリジナルのatofとは挙動が異なる)
  • convertible_to_float
    • [任意の長さのspace][+/-/符号なし][長さ1以上のdigit part]([.][長さ1以上のdigit part])の形式である場合、trueを返す。
    • そうでない場合、falseを返す
    • convertible: 3.4, 3, +3, -4.2
    • unconvertible 3., .4, +, 3.4 , 2e9, 4.5.6

@kurrrru kurrrru linked an issue Dec 11, 2024 that may be closed by this pull request
@kurrrru kurrrru merged commit fc7057d into master Dec 11, 2024
1 check passed
@kurrrru kurrrru deleted the 12-atofを追加する branch December 15, 2024 13:54
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

Successfully merging this pull request may close these issues.

atofを追加する。
1 participant