[0,1)区間内の実数値の擬似乱数を53-bit resolutionで生成します
Namespace: fvalgcliAssembly: fvalgcli (in fvalgcli.dll) Version: 3.1.0.0 (3.1.0.11)
Syntax
C# |
---|
public static double fnFIE_mtrand_res53(
ref F_RANDDESC r
) |
Visual Basic |
---|
Public Shared Function fnFIE_mtrand_res53 (
ByRef r As F_RANDDESC
) As Double |
Return Value
Type:
Double
擬似乱数:[0,1)区間内(0≦value<1)の実数値(53-bit resolution) を返します。
Examples
C# | Copy |
---|
using System;
using System.Collections.Generic;
using System.Text;
using fvalgcli;
namespace TC
{
public partial class FIE
{
[FvPluginExecute]
public void fnFIE_mtrand_res53()
{
uint seed = 11111;
F_RANDDESC r = new F_RANDDESC();
double random = -1;
api.fnFIE_mtrand_init(seed, ref r);
ConsoleOut.WriteFunctionName(":\n");
for (int i = 0; i < 5; i++)
{
random = api.fnFIE_mtrand_res53(ref r);
Console.WriteLine("random = {0}", random);
}
Console.Write(" ...");
ConsoleOut.IsTrue(random != -1);
}
}
} |
Visual Basic | Copy |
---|
Imports System.Collections.Generic
Imports System.Text
Imports fvalgcli
Public Partial Class FIE
<FvPluginExecute> _
Public Sub fnFIE_mtrand_res53()
Dim seed As UInteger = 11111
Dim r As New F_RANDDESC()
Dim random As Double = -1
api.fnFIE_mtrand_init(seed, r)
ConsoleOut.WriteFunctionName(":" & vbLf)
For i As Integer = 0 To 4
random = api.fnFIE_mtrand_res53(r)
Console.WriteLine("random = {0}", random)
Next
Console.Write(" ...")
ConsoleOut.IsTrue(random <> -1)
End Sub
End Class |
See Also