René's URL Explorer Experiment


Title: Bug with bigint multiplication · Issue #21341 · PowerShell/PowerShell · GitHub

Open Graph Title: Bug with bigint multiplication · Issue #21341 · PowerShell/PowerShell

X Title: Bug with bigint multiplication · Issue #21341 · PowerShell/PowerShell

Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...

Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...

X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/21341

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug with bigint multiplication","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n```\r\nWrite-Host \"int: $([int]5 * [double]1.5)\"\r\nWrite-Host \"bigint: $([bigint]5 * [double]1.5)\"\r\n```\r\nprints\r\n```\r\nint: 7.5\r\nbigint: 5\r\n```\r\n\r\nusing c# directly in PS prints the correct result\r\n```\r\nAdd-Type -TypeDefinition @\"\r\nusing System;\r\nnamespace DemoCode\r\n{\r\n    public class DemoClass\r\n    {\r\n        public static void Test()\r\n        {\r\n            int i = 5;\r\n            System.Numerics.BigInteger bi = 5;\r\n            double d = 1.5;\r\n\r\n            double r = i * d;\r\n            Console.WriteLine(\"bigint c#: \" + r.ToString());\r\n        }\r\n    }\r\n}\r\n\"@\r\n[DemoCode.DemoClass]::Test()\r\n```\r\nprints\r\n```\r\nbigint c#: 7.5\r\n```\r\n\r\nWhy is the multiplication directly in PS truncating the double?\r\nIt doesn't matter if I use 1.1, 1.5 or 1.9, the double gets truncated and then multiplied.\r\n\r\nThis bug happens in PowerShell 74.1 and 5\n\n### Expected behavior\n\n```console\nPS> [bigint]5 * [double]1.5\r\n7.5\n```\n\n\n### Actual behavior\n\n```console\nPS> [bigint]5 * [double]1.5\r\n5\n```\n\n\n### Error details\n\n```console\nThere was no error\n```\n\n\n### Environment data\n\n```powershell\nPS> $PSVersionTable\r\n\r\nName                           Value\r\n----                           -----\r\nPSVersion                      7.4.1\r\nPSEdition                      Core\r\nGitCommitId                    7.4.1\r\nOS                             Microsoft Windows 10.0.22631\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\n```\n\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/Tragen","@type":"Person","name":"Tragen"},"datePublished":"2024-03-13T20:29:06Z","url":"https://github.com/PowerShell/PowerShell/issues/21341"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:513ed2dd-a4c2-d6c2-e7ab-245521eb44d0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE2F0:38CE01:2E0F38:3D5938:6AFD35E8
html-safe-nonce214668e5fcc8640f8418f5639735bace8bf916d018917fdbd168504e6a3a1706
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkYwOjM4Q0UwMToyRTBGMzg6M0Q1OTM4OjZBRkQzNUU4IiwidmlzaXRvcl9pZCI6Ijc0MzEzMDk0Nzk5OTMyMjY3MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac66a41ecb45b03718d18bd360fb14f5d101f986026297acf344b58235b54d81ba
hovercard-subject-tagissue:2184833016
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/21341/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f2f7e6ecf7b9e04faacb98271d68da9851b8555119eccdb1eb98a37663cabb90/PowerShell/PowerShell/issues/21341
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f2f7e6ecf7b9e04faacb98271d68da9851b8555119eccdb1eb98a37663cabb90/PowerShell/PowerShell/issues/21341
og:image:altPrerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTragen
hostnamegithub.com
expected-hostnamegithub.com
None065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release941021edf0c2ec58298f4a2c8f27ae507d129c92
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/21341#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F21341
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F21341
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/21341
Reloadhttps://github.com/PowerShell/PowerShell/issues/21341
Reloadhttps://github.com/PowerShell/PowerShell/issues/21341
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests364 (364)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/21341
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/21341
Bug with bigint multiplicationhttps://github.com/PowerShell/PowerShell/issues/21341#top
Resolution-By DesignThe reported behavior is by design.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-By%20Design%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
WG-ReviewedA Working Group has reviewed this and made a recommendationhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Reviewed%22
https://github.com/Tragen
Tragenhttps://github.com/Tragen
on Mar 13, 2024https://github.com/PowerShell/PowerShell/issues/21341#issue-2184833016
latest released versionhttps://github.com/PowerShell/PowerShell/releases
FAQhttps://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md
Differences between Windows PowerShell 5.1 and PowerShellhttps://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
Tragenhttps://github.com/Tragen
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Mar 13, 2024https://github.com/PowerShell/PowerShell/issues/21341#event-12108827780
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Mar 13, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-1995922270
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Mar 14, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-1996215055
rhubarb-geek-nzhttps://github.com/rhubarb-geek-nz
https://github.com/Tragen
Tragenhttps://github.com/Tragen
on Mar 14, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-1996217483
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Mar 14, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-1996235133
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
on Mar 14, 2024https://github.com/PowerShell/PowerShell/issues/21341#event-12122207178
https://github.com/SeeminglyScience
Patrick Meinecke (SeeminglyScience)https://github.com/SeeminglyScience
on Apr 1, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2030358307
Patrick Meinecke (SeeminglyScience)https://github.com/SeeminglyScience
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Won't%20Fix%22
Resolution-By DesignThe reported behavior is by design.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-By%20Design%22
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Won't%20Fix%22
on Apr 1, 2024https://github.com/PowerShell/PowerShell/issues/21341#event-12314483023
Dongbo Wang (daxian-dbw)https://github.com/daxian-dbw
WG-ReviewedA Working Group has reviewed this and made a recommendationhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Reviewed%22
on Apr 1, 2024https://github.com/PowerShell/PowerShell/issues/21341#event-12314495865
https://github.com/Tragen
Tragenhttps://github.com/Tragen
on Apr 2, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2031428694
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Apr 3, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2033598827
Tragenhttps://github.com/Tragen
Type conversion to accommodate resulthttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_arithmetic_operators?view=powershell-7.4#type-conversion-to-accommodate-result
PSSAhttps://github.com/PowerShell/PSScriptAnalyzer
https://github.com/Tragen
Tragenhttps://github.com/Tragen
on Apr 3, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2034805972
https://github.com/SeeminglyScience
Patrick Meinecke (SeeminglyScience)https://github.com/SeeminglyScience
on Apr 3, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2035207599
https://github.com/Tragen
Tragenhttps://github.com/Tragen
on Apr 3, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2035397783
https://github.com/SeeminglyScience
Patrick Meinecke (SeeminglyScience)https://github.com/SeeminglyScience
on Apr 3, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2035426599
SharpLab.io examplehttps://sharplab.io/#v2:EYLgtghglgdgPgAQEwEYCwAoBAGABAlAOgDkBXMAUwCcoBjAZwG5MEBmfJXAYVwG9Ncg/OwAmAe1LAANhVwBZABQAhKAHMAkjAAuFVdVwyAZloA0ucZJm4aqgBZaAlHwFDXCAOwGKx3ACpravbMGK4AvpihQA===
https://github.com/Tragen
Tragenhttps://github.com/Tragen
on Apr 3, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2035428725
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Apr 4, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2036052536
Tragenhttps://github.com/Tragen
Patrick Meinecke (@SeeminglyScience)https://github.com/SeeminglyScience
bucket 3https://github.com/PowerShell/PowerShell/blob/master/docs/dev-process/breaking-change-contract.md#bucket-3-unlikely-grey-area
Patrick Meinecke (@SeeminglyScience)https://github.com/SeeminglyScience
Number literals: parse integer values too large to fit into Decimal as BigInteger (bigint), not Double #13212https://github.com/PowerShell/PowerShell/issues/13212
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Apr 4, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2037338296
Tragenhttps://github.com/Tragen
Clarify that a [bigint] operand in an arithmetic operation forces the other operand to [bigint] too MicrosoftDocs/PowerShell-Docs#11004https://github.com/MicrosoftDocs/PowerShell-Docs/issues/11004
PSSAhttps://github.com/PowerShell/PSScriptAnalyzer
https://github.com/PowerShell/PSScriptAnalyzer/issues/new/choosehttps://github.com/PowerShell/PSScriptAnalyzer/issues/new/choose
https://camo.githubusercontent.com/08c9fe12729dc72e089ba9e14107c22448379cefb17d130203b45e333a7bb933/68747470733a2f2f6769746875622e6769746875626173736574732e636f6d2f6173736574732f6769746875622d6c6f676f2d3535633562396131666535322e706e67
https://camo.githubusercontent.com/7e41d4698b37a89b2a8c06057583a5f48ce614b0fb7e2b93d27a2ec01c8f024b/68747470733a2f2f6769746875622e6769746875626173736574732e636f6d2f66617669636f6e732f66617669636f6e2e737667
Build software better, togetherhttps://github.com
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Apr 5, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2040665099
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 5, 2024https://github.com/PowerShell/PowerShell/issues/21341#event-12379480307
https://github.com/apps/microsoft-github-policy-service
microsoft-github-policy-servicehttps://github.com/apps/microsoft-github-policy-service
on Apr 5, 2024https://github.com/PowerShell/PowerShell/issues/21341#issuecomment-2040665277
Microsoft GitHub Policy Servicehttps://aka.ms/1es-gitops
Tragenhttps://github.com/Tragen
https://aka.ms/PSRepoFeedbackhttps://aka.ms/PSRepoFeedback
Microsoft Formshttps://aka.ms/PSRepoFeedback
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/21341
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/21341
Resolution-By DesignThe reported behavior is by design.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-By%20Design%22
WG-Enginecore PowerShell engine, interpreter, and runtimehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine%22
WG-ReviewedA Working Group has reviewed this and made a recommendationhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Reviewed%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.