155 references to Pow
Aspire.Dashboard (1)
ResourceService\DashboardClient.cs (1)
318return TimeSpan.FromSeconds(Math.Min(Math.Pow(2, errorCount - 1), maxSeconds));
CodeGenerator (2)
HttpUtilities\HttpUtilities.cs (2)
58int knownMethodsArrayLength = (int)(Math.Pow(2, maskLength) + 1); 218var mask2 = (ulong)(Math.Pow(2, bitsCount) - 1);
dotnet-svcutil-lib (1)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaExporter.cs (1)
29return isFlags ? (long)Math.Pow(2, index) : index;
InMemory.FunctionalTests (1)
RequestTests.cs (1)
2337var mask = Math.Pow(2, lines.Length) - 1;
LocalizationSample (4)
Startup.cs (4)
100await context.Response.WriteAsync($"<tr><th>{SR["Big number (invariant):"]}</th><td>{(Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.InvariantCulture)}</td></tr>"); 101await context.Response.WriteAsync($"<tr><th>{SR["Big number (request):"]}</th><td>{(Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.CurrentCulture)}</td></tr>"); 102await context.Response.WriteAsync($"<tr><th>{SR["Big number negative (invariant):"]}</th><td>{(-Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.InvariantCulture)}</td></tr>"); 103await context.Response.WriteAsync($"<tr><th>{SR["Big number negative (request):"]}</th><td>{(-Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.CurrentCulture)}</td></tr>");
Microsoft.Arcade.Common (1)
ExponentialRetry.cs (1)
57(Math.Pow(DelayBase, i) + DelayConstant) * randomFactor);
Microsoft.AspNetCore.Components (2)
src\Http\Routing\src\Template\RoutePrecedence.cs (2)
71precedence += decimal.Divide(digit, (decimal)Math.Pow(10, i)); 127precedence += decimal.Divide(digit, (decimal)Math.Pow(10, i));
Microsoft.AspNetCore.Routing (4)
Template\RoutePrecedence.cs (4)
50precedence += decimal.Divide(digit, (decimal)Math.Pow(10, i)); 71precedence += decimal.Divide(digit, (decimal)Math.Pow(10, i)); 104precedence += decimal.Divide(digit, (decimal)Math.Pow(10, i)); 127precedence += decimal.Divide(digit, (decimal)Math.Pow(10, i));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http2\Http2FrameWriterTests.cs (1)
94sut.UpdateMaxFrameSize((int)Math.Pow(2, 24) - 1);
Microsoft.Build.Tasks.UnitTests (6)
XmlPeek_Tests.cs (2)
286for (int i = 0; i < Math.Pow(2, attrs.Length); i++) 291if ((i & (int)Math.Pow(2, k)) != 0)
XmlPoke_Tests.cs (2)
264for (int i = 0; i < Math.Pow(2, attrs.Length); i++) 269if ((i & (int)Math.Pow(2, k)) != 0)
XslTransformation_Tests.cs (2)
442for (int i = 0; i < Math.Pow(2, attrs.Length); i++) 447if ((i & (int)Math.Pow(2, k)) != 0)
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\DiagnosticAnalyzer\PerformanceQueue.cs (1)
120var stddev = Math.Sqrt(data.Select(ms => Math.Pow(ms - average, 2)).Average());
Microsoft.CodeAnalysis.UnitTests (2)
RealParserTests.cs (2)
448f = (float)Math.Pow(2.0, i); 467f = (float)Math.Pow(10.0, i);
Microsoft.CodeAnalysis.Workspaces (1)
Shared\Utilities\BloomFilter.cs (1)
83var denominator = Math.Log(1.0 / Math.Pow(2.0, Math.Log(2.0)));
Microsoft.DotNet.Build.Tasks.Installers (1)
src\ExecWithRetries.cs (1)
99Math.Pow(RetryDelayBase, i) + RetryDelayConstant);
Microsoft.DotNet.Helix.Sdk (2)
AzureDevOpsTask.cs (2)
177var min = (int)(Math.Pow(factor, attempt) * 1000); 178var max = (int)(Math.Pow(factor, attempt + 1) * 1000);
Microsoft.Maui (3)
Animations\Easing.cs (3)
51 public static readonly Easing CubicOut = new(x => Math.Pow(x - 1.0f, 3.0f) + 1.0f); 56 public static readonly Easing CubicInOut = new(x => x < 0.5f ? Math.Pow(x * 2.0f, 3.0f) / 2.0f : (Math.Pow((x - 1) * 2.0f, 3.0f) + 2.0f) / 2.0f);
Microsoft.Maui.Controls (1)
Internals\ImageParser.cs (1)
429 return (short)(Math.Pow(2, (flags & 0x07) + 1));
Microsoft.Maui.Graphics (2)
Point.cs (2)
117 return (double)Math.Sqrt(Math.Pow(X - other.X, 2) + Math.Pow(Y - other.Y, 2));
Microsoft.ML.AutoML (9)
Sweepers\Parameters.cs (8)
229? Math.Pow(1.0 * _args.Max / _args.Min, 1.0 / (_args.NumSteps - 1)) 233val = (long)(_args.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin))); 258var logBase = _args.StepSize ?? Math.Pow(1.0 * _args.Max / _args.Min, 1.0 / (_args.NumSteps - 1)); 313float logBase = (float)(_args.StepSize ?? Math.Pow(1.0 * _args.Max / _args.Min, 1.0 / (_args.NumSteps - 1))); 355? Math.Pow(1.0 * _args.Max / _args.Min, 1.0 / (_args.NumSteps - 1)) 359val = (float)(_args.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin))); 376var logBase = _args.StepSize ?? Math.Pow(1.0 * _args.Max / _args.Min, 1.0 / (_args.NumSteps - 1)); 431float logBase = (float)(_args.StepSize ?? Math.Pow(1.0 * _args.Max / _args.Min, 1.0 / (_args.NumSteps - 1)));
Sweepers\SweeperProbabilityUtils.cs (1)
16return 1 / Math.Sqrt(2 * Math.PI) * Math.Exp(-Math.Pow(x, 2) / 2);
Microsoft.ML.Core (8)
Utilities\MathUtils.cs (3)
47return Math.Pow(x, y).ToFloat(); 468return Math.Pow(x, a) * Math.Pow(1 - x, b) / (a * Beta(a, b)) * Lentz(adel, bdel);
Utilities\Stats.cs (3)
82return SampleFromGamma(r, alpha + 1) * Math.Pow(r.NextDouble(), 1.0 / alpha); 94v = Math.Pow(1.0 + c * x, 3); 291double s = Math.Pow(q, n);
Utilities\SummaryStatistics.cs (2)
218public double Skewness => Math.Sqrt(Count) * _m3 / Math.Pow(M2, 1.5); 280double z2 = (1 - 2 / (9 * a) - Math.Sign(toCubeRoot) * Math.Pow(Math.Abs(toCubeRoot), 1.0 / 3.0)) /
Microsoft.ML.CpuMath.PerformanceTests (1)
PerformanceTests.cs (1)
44double exponent = Math.Pow(2.0, rand.Next(-expRange + 1, expRange + 1));
Microsoft.ML.Data (6)
Utils\LossFunctions.cs (6)
640return Math.Pow(output, _index2) / _index2 - label * Math.Pow(output, _index1) / _index1 641- (Math.Pow(label, _index2) / _index2 - label * Math.Pow(label, _index1) / _index1); 651return (float)(Math.Pow(output, _index2) - label * Math.Pow(output, _index1));
Microsoft.ML.FastTree (4)
GamTrainer.cs (2)
190_gainConfidenceInSquaredStandardDeviations = Math.Pow(ProbabilityFunctions.Probit(1 - (1 - GamTrainerOptions.GainConfidenceLevel) * 0.5), 2); 214_gainConfidenceInSquaredStandardDeviations = Math.Pow(ProbabilityFunctions.Probit(1 - (1 - GamTrainerOptions.GainConfidenceLevel) * 0.5), 2);
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (1)
239double alf = Math.Pow(Math.Max(Epsilon, flmin), 1.0 / (numberOfLambdas - 1));
TreeEnsemble\InternalTreeEnsemble.cs (1)
337fmap.GetName(pair.Key), Math.Pow(pair.Value, power) / normalizingFactor));
Microsoft.ML.IntegrationTests (1)
DataTransformation.cs (1)
214Assert.InRange(row.Features[i], (uint)0, (uint)Math.Pow(2, 31));
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
982foldIdx += (int)(foldIdxExtra * Math.Pow(1000, j));
Microsoft.ML.SearchSpace (1)
Option\UniformNumericOption.cs (1)
84var order = Math.Pow(Max / Min, value);
Microsoft.ML.SearchSpace.Tests (3)
UniformNumericOptionTests.cs (3)
65var sampleInputs = Enumerable.Range(0, 10).Select(i => Parameter.FromInt(Convert.ToInt32(Math.Pow(2, i)))); 95sampleOutputs.Select((x, i) => (x.AsType<double>(), Math.Pow(2, i))) 116var sampleInputs = Enumerable.Range(0, 10).Select(i => Parameter.FromDouble(Math.Pow(2, i)));
Microsoft.ML.StandardTrainers (4)
LdSvm\LdSvmTrainer.cs (1)
246gamma *= (float)Math.Pow(2.0, iter / (_options.NumberOfIterations / 10.0));
Optimizer\LearningRateScheduler.cs (3)
196float decayedLearningRate = LearningRate * (float)Math.Pow(DecayRate, decayPower); 254decayedLearningRate = (LearningRate - EndLearningRate) * ((float)Math.Pow((1 - (float)globalStep / calculatedStep), Power)) + EndLearningRate; 259decayedLearningRate = (LearningRate - EndLearningRate) * ((float)Math.Pow((1 - calculatedStep / (float)decaySteps), Power)) + EndLearningRate;
Microsoft.ML.Sweeper (16)
Algorithms\KdoSweeper.cs (5)
171double rVar = Math.Pow(VectorUtils.GetStandardDeviation(randomVals), 2) + 1e-10; 300double p2 = Math.Pow((4.0 / (d + 2)), p1); 306bandwidthMatrix[i][i] = p2 * stddevs[i] * Math.Pow(n, -p1); 337weights[i] = _args.Simple ? Math.Pow(weights[i], Math.Min(Math.Sqrt(n), 100)) : Math.Pow(weights[i], _args.WeightRescalingPower * currentMaxPerf);
Algorithms\SweeperProbabilityUtils.cs (2)
33return 1 / Math.Sqrt(2 * Math.PI * variance) * Math.Exp(-Math.Pow(x - mean, 2) / (2 * variance)); 46return 1 / Math.Sqrt(2 * Math.PI) * Math.Exp(-Math.Pow(x, 2) / 2);
Parameters.cs (8)
237? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)) 241val = (long)(_options.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin))); 266var logBase = _options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)); 321float logBase = (float)(_options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1))); 369? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)) 373val = (float)(_options.Min * Math.Pow(logBase, normalizedValue * (logMax - logMin))); 390var logBase = _options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)); 445float logBase = (float)(_options.StepSize ?? Math.Pow(1.0 * _options.Max / _options.Min, 1.0 / (_options.NumSteps - 1)));
SynthConfigRunner.cs (1)
90total += Math.Pow(val, 2) - 10 * Math.Cos(2 * Math.PI * val);
Microsoft.ML.TensorFlow (1)
TensorflowTransform.cs (1)
614var d = numOfUnkDim > 0 ? Math.Pow(typeValueCount / valCount, 1.0 / numOfUnkDim) : 0;
Microsoft.ML.TestFramework (2)
BaseTestBaseline.cs (2)
636double allowedVariance = Math.Pow(10, -digitsOfPrecision); 683double scale = Math.Pow(10, integralDigitCount);
Microsoft.ML.Tests (3)
TrainerEstimators\MatrixFactorizationTests.cs (2)
132double windowsAndMacTolerance = Math.Pow(10, -7); 133double linuxTolerance = Math.Pow(10, -5);
Transformers\HashTests.cs (1)
369Assert.Equal(Math.Pow(2, 31), hashedCol.Type.GetItemType().GetKeyCount());
Microsoft.ML.TimeSeries (3)
AdaptiveSingularSpectrumSequenceModeler.cs (1)
44public Double Ratio { get { return Math.Pow(Growth, 1d / TimeSpan); } }
RootCauseAnalyzer.cs (2)
617a = (1 - Math.Pow(2, -surprise)); 622b = (1 - Math.Pow(2, -ep));
Microsoft.ML.TorchSharp (13)
AutoFormerV2\Anchors.cs (10)
46this.strides = strides != null ? strides : this.pyramidLevels.Select(x => (int)Math.Pow(2, x)).ToArray(); 47this.sizes = sizes != null ? sizes : this.pyramidLevels.Select(x => (int)Math.Pow(2, x + 2)).ToArray(); 49this.scales = scales != null ? scales : new double[] { Math.Pow(2, 0), Math.Pow(2, 1.0 / 3.0), Math.Pow(2, 2.0 / 3.0) }; 70var shape = ((imageShape + Math.Pow(2, x) - 1) / Math.Pow(2, x)).to_type(torch.int32); 98scales ??= new double[] { Math.Pow(2, 0), Math.Pow(2, 1.0 / 3.0), Math.Pow(2, 2.0 / 3.0) };
AutoFormerV2\Attention.cs (1)
51this.scale = System.Math.Pow(keyChannels, -0.5);
NasBert\Modules\Embedding\LearnedPositionalEmbedding.cs (1)
28ModelUtils.InitNormal(Embedding.weight, mean: 0, std: Math.Pow(EmbeddingDim, -0.5));
NasBert\Modules\MultiHeadAttention.cs (1)
74_scaling = Math.Pow(_headDim, -0.5);
Microsoft.ML.Transforms (3)
Expression\BuiltinFunctions.cs (1)
509return (R4)Math.Pow(a, b);
Expression\CodeGen.cs (1)
661CallBin<R8>(Math.Pow);
Expression\LambdaBinder.cs (1)
809return Math.Pow(v1, v2);
Microsoft.ML.Vision (1)
DnnRetrainTransform.cs (1)
817var d = numOfUnkDim > 0 ? Math.Pow(typeValueCount / valCount, 1.0 / numOfUnkDim) : 0;
PresentationCore (12)
System\Windows\Input\Stylus\Pointer\PointerFlickEngine.cs (2)
475return Math.Sqrt(Math.Pow((p1.X - p2.X), 2) + Math.Pow((p1.Y - p2.Y), 2));
System\Windows\Input\Stylus\Pointer\PointerStylusPointPropertyInfoHelper.cs (1)
84float exponent = (float)Math.Pow(10, mappedExponent);
System\Windows\Media\Animation\BackEase.cs (1)
45return Math.Pow(normalizedTime, 3.0) - normalizedTime * amp * Math.Sin(Math.PI * normalizedTime);
System\Windows\Media\Animation\BounceEase.cs (4)
92double pow = Math.Pow(bounciness, bounces); 111double startTime = (1.0 - Math.Pow(bounciness, start)) / (oneMinusBounciness * sumOfUnits); 112double endTime = (1.0 - Math.Pow(bounciness, end)) / (oneMinusBounciness * sumOfUnits); 118double amplitude = Math.Pow(1.0 / bounciness, (bounces - start));
System\Windows\Media\Animation\PowerEase.cs (1)
48return Math.Pow(normalizedTime, power);
System\Windows\Media\Color.cs (2)
1047return (float)Math.Pow(((double)val + 0.055) / 1.055, 2.4); 1071return ((byte)((255.0f * ((1.055f * (float)Math.Pow((double)val, (1.0 / 2.4))) - 0.055f)) + 0.5f));
System\Windows\Media3D\Quaternion.cs (1)
561double lengthOut = lengthFrom * Math.Pow(lengthTo/lengthFrom, t);
PresentationFramework (9)
MS\Internal\AnimatedTypeHelpers.cs (4)
87Math.Pow(GetSegmentLengthDouble(from.Left, to.Left), 2.0) 88+ Math.Pow(GetSegmentLengthDouble(from.Top, to.Top), 2.0) 89+ Math.Pow(GetSegmentLengthDouble(from.Right, to.Right), 2.0) 90+ Math.Pow(GetSegmentLengthDouble(from.Bottom, to.Bottom), 2.0);
MS\Internal\Documents\MultiPageTextView.cs (2)
1108textViewProximities[i] = Math.Sqrt(Math.Pow(horz, 2) + Math.Pow(vert, 2));
System\Windows\Controls\Grid.cs (3)
1772scale = Math.Pow(2.0, power - 4.0); // -4 is just for paranoia 2351scale = Math.Pow(2.0, power - 4.0); // -4 is just for paranoia 2790double f = Math.Pow(2.0, Math.Floor((minPower + maxPower) / 2.0));
System.Collections (1)
System\Collections\Generic\PriorityQueue.cs (1)
62Debug.Assert(Log2Arity > 0 && Math.Pow(2, Log2Arity) == Arity);
System.Data.Common (2)
System\Data\SQLTypes\SQLDecimal.cs (2)
1138dRet /= System.Math.Pow(10.0, _bScale); 3261n = new SqlDecimal(Math.Pow(dBaseNum, exp));
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\Double.cs (5)
639public static double Exp2(double x) => Math.Pow(2, x); 642public static double Exp2M1(double x) => Math.Pow(2, x) - 1; 645public static double Exp10(double x) => Math.Pow(10, x); 648public static double Exp10M1(double x) => Math.Pow(10, x) - 1; 1453public static double Pow(double x, double y) => Math.Pow(x, y);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (3)
150return ((Math.Pow(x, 2) / 41048480) - 15) / TimeSpan.SecondsPerDay; 239- (0.5 * Math.Pow(y, 2) * SinOfDegree(4 * lambda)) 240- (1.25 * Math.Pow(eccentricity, 2) * SinOfDegree(2 * anomaly)));
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (1)
301move = Math.Pow(Math.Abs(move), _gainExponent) * (move >= 0.0 ? 1 : -1) * gain;
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\SchemaExporter.cs (1)
459return isFlags ? (long)Math.Pow(2, index) : index;
System.Private.Xml (1)
System\Xml\Xsl\Runtime\NumberFormatter.cs (1)
82Debug.Assert(Math.Pow(totalChars, MaxAlphabeticLength) >= MaxAlphabeticValue);
System.Runtime.Numerics (3)
System\Numerics\BigInteger.cs (2)
1611double significand = (double)highBits * Math.Pow(10, exponentLow - exponent); 1618significand /= Math.Pow(10, Math.Floor(log10));
System\Numerics\Complex.cs (1)
757double t = Math.Pow(rho, powerReal) * Math.Exp(-powerImaginary * theta);
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
959torqueFactor = (float)Math.Min(1.0, Math.Pow(oldVector.Length / settings.Pivot.Radius, singleManipulatorTorqueFactor));