langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
4
Task/Infinity/Nemerle/infinity.nemerle
Normal file
4
Task/Infinity/Nemerle/infinity.nemerle
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
def posinf = double.PositiveInfinity;
|
||||
def a = IsInfinity(posinf); // a = true
|
||||
def b = IsNegativeInfinity(posinf); // b = false
|
||||
def c = IsPositiveInfinity(posinf); // c = true
|
||||
1
Task/Infinity/OCaml/infinity.ocaml
Normal file
1
Task/Infinity/OCaml/infinity.ocaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
infinity
|
||||
5
Task/Infinity/OpenEdge-Progress/infinity.openedge
Normal file
5
Task/Infinity/OpenEdge-Progress/infinity.openedge
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
MESSAGE
|
||||
1.0 / 0.0 SKIP
|
||||
-1.0 / 0.0 SKIP(1)
|
||||
( 1.0 / 0.0 ) = ( -1.0 / 0.0 )
|
||||
VIEW-AS ALERT-BOX.
|
||||
20
Task/Infinity/OxygenBasic/infinity.oxy
Normal file
20
Task/Infinity/OxygenBasic/infinity.oxy
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
print 1.5e-400 '0
|
||||
|
||||
print 1.5e400 '#INF
|
||||
|
||||
print -1.5e400 '#-INF
|
||||
|
||||
print 0/-1.5 '-0
|
||||
|
||||
print 1.5/0 '#INF
|
||||
|
||||
print -1.5/0 '#-INF
|
||||
|
||||
print 0/0 '#qNAN
|
||||
|
||||
|
||||
function f() as double
|
||||
return -1.5/0
|
||||
end function
|
||||
|
||||
print f '#-INF
|
||||
13
Task/Infinity/Oz/infinity.oz
Normal file
13
Task/Infinity/Oz/infinity.oz
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
declare
|
||||
PosInf = 1./0.
|
||||
NegInf = ~1./0.
|
||||
in
|
||||
{Show PosInf}
|
||||
{Show NegInf}
|
||||
|
||||
%% some assertion
|
||||
42. / PosInf = 0.
|
||||
42. / NegInf = 0.
|
||||
PosInf * PosInf = PosInf
|
||||
PosInf * NegInf = NegInf
|
||||
NegInf * NegInf = PosInf
|
||||
3
Task/Infinity/PARI-GP/infinity.pari
Normal file
3
Task/Infinity/PARI-GP/infinity.pari
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
infty()={
|
||||
[1] \\ Used for many functions like intnum
|
||||
};
|
||||
3
Task/Infinity/PL-I/infinity.pli
Normal file
3
Task/Infinity/PL-I/infinity.pli
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
declare x float, y float (15), z float (18);
|
||||
|
||||
put skip list (huge(x), huge(y), huge(z));
|
||||
1
Task/Infinity/PostScript/infinity.ps
Normal file
1
Task/Infinity/PostScript/infinity.ps
Normal file
|
|
@ -0,0 +1 @@
|
|||
/infinity { 9 99 exp } def
|
||||
3
Task/Infinity/PowerShell/infinity.psh
Normal file
3
Task/Infinity/PowerShell/infinity.psh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
function infinity {
|
||||
[double]::PositiveInfinity
|
||||
}
|
||||
19
Task/Infinity/PureBasic/infinity.purebasic
Normal file
19
Task/Infinity/PureBasic/infinity.purebasic
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
If OpenConsole()
|
||||
Define.d a, b
|
||||
b = 0
|
||||
|
||||
;positive infinity
|
||||
PrintN(StrD(Infinity())) ;returns the value for positive infinity from builtin function
|
||||
|
||||
a = 1.0
|
||||
PrintN(StrD(a / b)) ;calculation results in the value of positive infinity
|
||||
|
||||
;negative infinity
|
||||
PrintN(StrD(-Infinity())) ;returns the value for negative infinity from builtin function
|
||||
|
||||
a = -1.0
|
||||
PrintN(StrD(a / b)) ;calculation results in the value of negative infinity
|
||||
|
||||
Print(#crlf$ + #crlf$ + "Press ENTER to exit"): Input()
|
||||
CloseConsole()
|
||||
EndIf
|
||||
8
Task/Infinity/RLaB/infinity.rlab
Normal file
8
Task/Infinity/RLaB/infinity.rlab
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
>> x = inf()
|
||||
inf
|
||||
>> isinf(x)
|
||||
1
|
||||
>> inf() > 10
|
||||
1
|
||||
>> -inf() > 10
|
||||
0
|
||||
1
Task/Infinity/Seed7/infinity.seed7
Normal file
1
Task/Infinity/Seed7/infinity.seed7
Normal file
|
|
@ -0,0 +1 @@
|
|||
const float: Infinity is 1.0 / 0.0;
|
||||
1
Task/Infinity/Slate/infinity.slate
Normal file
1
Task/Infinity/Slate/infinity.slate
Normal file
|
|
@ -0,0 +1 @@
|
|||
PositiveInfinity
|
||||
1
Task/Infinity/Standard-ML/infinity.ml
Normal file
1
Task/Infinity/Standard-ML/infinity.ml
Normal file
|
|
@ -0,0 +1 @@
|
|||
Real.posInf
|
||||
1
Task/Infinity/TI-89-BASIC/infinity.ti-89
Normal file
1
Task/Infinity/TI-89-BASIC/infinity.ti-89
Normal file
|
|
@ -0,0 +1 @@
|
|||
∞
|
||||
4
Task/Infinity/TorqueScript/infinity.torquescript
Normal file
4
Task/Infinity/TorqueScript/infinity.torquescript
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
function infinity()
|
||||
{
|
||||
return 1/0;
|
||||
}
|
||||
3
Task/Infinity/Trith/infinity.trith
Normal file
3
Task/Infinity/Trith/infinity.trith
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
: inf 1.0 0.0 / ;
|
||||
: -inf inf neg ;
|
||||
: inf? abs inf = ;
|
||||
3
Task/Infinity/Ursala/infinity.ursala
Normal file
3
Task/Infinity/Ursala/infinity.ursala
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#import flo
|
||||
|
||||
infinity = inf!
|
||||
7
Task/Infinity/Visual-Basic/infinity.vb
Normal file
7
Task/Infinity/Visual-Basic/infinity.vb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Dim PlusInfinity as Double
|
||||
Dim MinusInfinity as Double
|
||||
Dim IndefiniteNumber as Double
|
||||
On Error Resume Next
|
||||
PlusInfinity = 1 / 0
|
||||
MinusInfinity = -1 / 0
|
||||
IndefiniteNumber = 0 / 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue