Skip to content

float: add page#21168

Open
satteomama wants to merge 1 commit intotldr-pages:mainfrom
satteomama:fix-issue-21002
Open

float: add page#21168
satteomama wants to merge 1 commit intotldr-pages:mainfrom
satteomama:fix-issue-21002

Conversation

@satteomama
Copy link

Checklist

  • [✅ ] The page(s) are in the correct platform directories: common, linux, osx, windows, sunos, android, etc.
  • [ ✅ ] The page description(s) have links to documentation or a homepage.
  • [ ✅ ] The page(s) follow the content guidelines.
  • [✅ ] The page(s) follow the style guide.
  • [ ✅ ] The PR contains at most 5 new pages.
  • [✅ ] The PR is authored by me, or has been human-reviewed if it was created with AI or machine translation software.
  • [ ✅ ] The PR title conforms to the recommended templates.
  • Version of the command being documented (if known): zsh 5.9
  • Reference issue: # 21002

@CLAassistant
Copy link

CLAassistant commented Feb 18, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added new command Issues requesting creation of a new page or PRs adding a new page for a command. review needed Prioritized PRs marked for reviews from maintainers. labels Feb 18, 2026
# float

> Declare floating point variable(s).
> Equivalent to `typeset -E`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Equivalent to `typeset -E`.
> Equivalent to `typeset -E` except that options irrelevant to floating point numbers are not permitted.
> See also: `typeset`, `declare`.


- Declare multiple floating point variables:

`float {{var1}} {{var2}} {{var3}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`float {{var1}} {{var2}} {{var3}}`
`float {{var1=value}} {{var2=value}} {{var3=value}}`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

float {{var1=value1 var2=value2 ...}} is more commonly used in these cases.

https://github.com/tldr-pages/tldr/blob/main/contributing-guides/style-guide.md#grouping-placeholders

@TheRootDaemon
Copy link
Member

Could you test the last example which is Specifies the number of significant digits

I do not know why but it displays the declared variables

 ~: float qq=123.123
 ~: float
qq=1.231230000e+02
 ~: float -E qq
 ~: float -E 3.3
qq=1.231230000e+02

@dmmqz
Copy link
Member

dmmqz commented Feb 18, 2026

I am getting the same behavior for the -E flag as @TheRootDaemon. I don't think this flag is a valid option.

@dmmqz dmmqz mentioned this pull request Feb 18, 2026
100 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new command Issues requesting creation of a new page or PRs adding a new page for a command. review needed Prioritized PRs marked for reviews from maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments