PLDB
Languages Features Creators Calendar CSV Resources Blog About Donate Add Language
GitHub icon

Floats

< >
Example from Java, AspectJ, Pizza, Deesel:
// ([0-9][0-9_]*\.([0-9][0-9_]*)?|\.[0-9][0-9_]*)([eE][+\-]?[0-9][0-9_]*)?[fFdD]?|[0-9][eE][+\-]?[0-9][0-9_]*[fFdD]?|[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFdD]|0[xX]([0-9a-fA-F][0-9a-fA-F_]*\.?|([0-9a-fA-F][0-9a-fA-F_]*)?\.[0-9a-fA-F][0-9a-fA-F_]*)[pP][+\-]?[0-9][0-9_]*[fFdD]?
// (\.[0-9]+|[0-9]+\.[0-9]*|[0-9]+)([eE][-+]?[0-9]+)? 80766866.0
Example from Python:
# (\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)([eE][+-]?\d(?:_?\d)*)?
Example from Perl:
# (?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?
Example from MySQL, Transact-SQL:
-- [0-9]+\.[0-9]*(e[+-]?[0-9]+)?
2.3
Example from Go:
// \d+(\.\d+[eE][+\-]?\d+|\.\d*|[eE][+\-]?\d+)
Example from Swift:
// [0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|\.[0-9_]*|[eE][+\-]?[0-9_]+)
Example from Ada:
-- [0-9_]+\.[0-9_]*
Example from Haskell:
-- 0[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*
Example from Prolog, CLPR, GAEA, Progol:
% (\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?
Example from Clojure, Hy, Fennel:
; -?\d+\.\d+
Example from Elixir:
# \d(_?\d)*\.\d(_?\d)*([eE][-+]?\d(_?\d)*)?
Example from Erlang:
% [+-]?\d+.\d+
Example from Julia:
# (\d+((_\d+)+)?\.(?!\.)(\d+((_\d+)+)?)?|\.\d+((_\d+)+)?)([eEf][+-]?[0-9]+)?
Example from Verilog, SystemVerilog:
// (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?
Example from Reason:
// -?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)
Example from awk, CoffeeScript, bawk:
# [0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?
Example from F#:
// -?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)[fFmM]?
Example from Elm:
-- _?\d+\.(?=\d+)
Example from Eiffel:
-- ([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)
Example from D:
// 0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)[pP][+\-]?[0-9_]+[fFL]?[i]?
Example from VHDL:
-- (\d+\.\d*|\.\d+|\d+)E[+-]?\d+
Example from PostScript:
% (\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?(?=[()<>\[\]{}/%\s])
Example from Chapel:
// (\d*\.\d+)([eE][+-]?[0-9]+)?i?
Example from VBScript:
' [0-9]+\.[0-9]*(e[+-]?[0-9]+)?
Example from Applescript:
-- [-+]?(\d+\.\d*|\d*\.\d+)(E[-+][0-9]+)?
Example from Idris, Agda:
-- \d+[eE][+-]?\d+
Example from Protocol Buffers:
// (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*
Example from AMPL:
# (\d+\.(?!\.)\d*|\.(?!.)\d+)([eE][+-]?\d+)?
Example from Monkey:
' [0-9]+\.[0-9]*(?!\.)
Example from AutoIt, AutoHotkey:
; (\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?
Example from GNU Octave:
% (\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?
Example from TOML, GDScript:
# (\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?
Example from Zephir, QML, SuperCollider:
// [0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?
Example from Icon, Unicon:
# [+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?
Example from J:
NB. _?\d+\.(?=\d+)
Example from Scilab:
// (\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?
Example from Io:
// (\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?
Example from Boo:
# (\d+\.\d*|\d*\.\d+)([fF][+-]?[0-9]+)?
Example from Ceylon:
// \d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?
Example from SPARQL:
# [+\-]?(\d+\.\d*[eE][+-]?\d+|\.?\d+[eE][+-]?\d+)
Example from POV-Ray SDL:
// [0-9]*\.[0-9]+
Example from MiniD, Croc:
// ([0-9][0-9_]*)(?=[.eE])(\.[0-9][0-9_]*)?([eE][+\-]?[0-9_]+)?
Example from LiveScript:
# [0-9]+\.[0-9]+([eE][0-9]+)?[fd]?(?:[a-zA-Z_]+)?
Example from Modelica:
// \d+(\.?\d*[eE][-+]?\d+|\.\d*)
Example from Pig Latin:
-- [0-9]*\.[0-9]+(e[0-9]+)?[fd]?
Example from Golo:
# -?[\d_]*\.[\d_]*([eE][+-]?\d[\d_]*)?F?
Example from Ion:
// http://amzn.github.io/ion-docs/docs/spec.html -0.12e4 // Type is float
Example from K:
/ ([0-9]*[.]?[0-9]+|[0-9]+[.]?[0-9]*)[eE][+-]?[0-9]+[ef]?
Example from Koka:
// [0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?
Example from Felix:
// 0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)[pP][+\-]?[0-9_]+[lLfFdD]?
// (\d+\.\d*|\.\d+|\d+)[eE][+-]?\d*
Example from Whiley:
// [0-9]+\.[0-9]+

Languages with Floats include Java, JavaScript, Python, Perl, MySQL, JSON, Go, Swift, Ada, Haskell, TypeScript, Prolog, Clojure, Mathematica, Elixir, Erlang, Julia, ActionScript, Verilog, Reason, awk, CoffeeScript, F#, Elm, OCaml, Eiffel, D, GraphQL, VHDL, XQuery, PostScript, Chapel, WebAssembly, VBScript, Applescript, Idris, Protocol Buffers, AMPL, Monkey, BlitzBasic, Agda, Coq, AutoIt, Zig, GNU Octave, TOML, Hy, Zephir, Icon, J, QML, Scilab, Io, IDL, Pony, Boo, EDN, QBasic, Ceylon, SPARQL, JSON5, Turtle, F*, SystemVerilog, Opa, SuperCollider, Cython, PL/pgSQL, POV-Ray SDL, MiniD, ClojureScript, Puppet, Ioke, LiveScript, Modelica, AutoHotkey, Pig Latin, Thrift, Maxima, Transact-SQL, AspectJ, Croc, Golo, Ion, Fennel, K, SourcePawn, Xtend, janet, Koka, HLSL, Unicon, Gosu, GLSL, LilyPond, progsbase, Felix, Futhark, Jule, Pizza, chaiscript, Cryptol, BlitzMax, Linden Scripting Language, ooc, GDScript, JSONiq, Nit, Whiley, Stan, Fancy, OpenEdge ABL, JSON with Comments, Shen, Superjson, Earl Grey, monte, Hocon, JSLT, Jsonnet, Pawn, JS++, parasail, Kal, BALGOL, Notation3, Easytrieve, FloScript, Urbiscript, CLPR, wah, nimrod, Flatline, AmbientTalk, CBOR data definition language, PromQL, SARL, Deesel, juttle, RAISE Specification Language, SquidConf, GAEA, bawk, Static Typescript, Progol

Read more about Floats on the web: 1. 2.

HTML of this page generated by Features.ts

hasFixedPoint.html 路 hasFloats.html 路 hasFnArguments.html

View source

PLDB - Build the next great programming language Search v2023 Day 157 Docs Acknowledgements Traffic Today Traffic Trends Mirrors GitHub feedback@pldb.com