home > 比較編 > F#, Scala, Haskell > arithmetic and logic >

ForNext

Only Do What Only You Can Do

035. arithmetic truncation

VBScript

JScript

Perl

PHP

Python

Ruby

PowerShell

Scala

3.14.round
??
3.14.floor returns Double
3.14.ceil returns Double

F#

OCaml

??
truncate 3.14
floor 3.14 returns float
ceil 3.14 returns float
F# has round

Haskell

round 3.14
truncate 3.14
floor 3.14
ceiling 3.14

C

C++

C++Builder

VC++

C#

Java

Objective-C

D

VB

VB.NET

Delphi

Ada

PL/SQL

T-SQL

inserted by FC2 system