Skip to content

measure-object -maximum changes the type of its input #12103

@jszabo98

Description

@jszabo98

Here the maximum property is a double, while the input was an int64 or long. A decimal (128-bit) input would also result in the maximum property being a double.

Steps to reproduce

1000000000000000 | measure-object -Maximum

Expected behavior

Count             : 1
Average           :
Sum               :
Maximum           : 1000000000000000
Minimum           :
StandardDeviation :
Property          :

Actual behavior

Count             : 1
Average           :
Sum               :
Maximum           : 1E+15
Minimum           :
StandardDeviation :
Property          :

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Committee-ReviewedPS-Committee has reviewed this and made a decisionHacktoberfestPotential candidate to participate in HacktoberfestIssue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions