3 overrides of SingleValue
Microsoft.CodeAnalysis (3)
ConstantValueSpecialized.cs (3)
393public override float SingleValue 570public override float SingleValue 960public override float SingleValue
42 references to SingleValue
Microsoft.CodeAnalysis (6)
CodeGen\ILBuilderEmit.cs (1)
605EmitSingleConstant(value.SingleValue);
ConstantValue.cs (4)
529case ConstantValueTypeDiscriminator.Single: return Boxes.Box(SingleValue); 584return SingleValue < 0; 778writer.WriteSingle(this.SingleValue); 825ConstantValueTypeDiscriminator.Single => SingleValue.ToString(provider),
ConstantValueSpecialized.cs (1)
512return this.Discriminator == other.Discriminator && other.SingleValue == 0;
Microsoft.CodeAnalysis.CSharp (26)
Binder\Binder_Conversions.cs (1)
1596return ConstantValue.Create(sourceConstantValue.SingleValue);
Binder\Binder_Operators.cs (22)
1961return valueLeft.SingleValue + valueRight.SingleValue; 1965return valueLeft.SingleValue - valueRight.SingleValue; 1969return valueLeft.SingleValue * valueRight.SingleValue; 1973return valueLeft.SingleValue / valueRight.SingleValue; 1977return valueLeft.SingleValue % valueRight.SingleValue; 2052return valueLeft.SingleValue == valueRight.SingleValue; 2072return valueLeft.SingleValue != valueRight.SingleValue; 2088return valueLeft.SingleValue < valueRight.SingleValue; 2104return valueLeft.SingleValue > valueRight.SingleValue; 2120return valueLeft.SingleValue <= valueRight.SingleValue; 2136return valueLeft.SingleValue >= valueRight.SingleValue;
Binder\PatternExplainer.cs (1)
738return value.SingleValue switch
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
404input.Type.SpecialType == SpecialType.System_Single && float.IsNaN(value.SingleValue))
Utilities\ValueSetFactory.SingleTC.cs (1)
85float INumericTC<float>.FromConstantValue(ConstantValue constantValue) => constantValue.IsBad ? 0.0F : constantValue.SingleValue;
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
105Assert.Throws<InvalidOperationException>(() => { var c = cv1.SingleValue; });
Microsoft.CodeAnalysis.VisualBasic (4)
Semantics\Conversions.vb (1)
832If(sourceValue.Discriminator = ConstantValueTypeDiscriminator.Double, sourceValue.DoubleValue, sourceValue.SingleValue),
Semantics\Operators.vb (3)
760Dim value As Double = If(underlyingResultType.IsSingleType(), operandValue.SingleValue, operandValue.DoubleValue) 1306Dim leftValue As Double = If(operandType.IsSingleType, left.SingleValue, left.DoubleValue) 1307Dim rightValue As Double = If(operandType.IsSingleType, right.SingleValue, right.DoubleValue)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (4)
Semantics\Conversions.vb (4)
688Assert.Equal(resultValue.SingleValue, min) 694Assert.Equal(resultValue.SingleValue, max) 1249Assert.Equal(resultValue.SingleValue, min) 1255Assert.Equal(resultValue.SingleValue, max)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Metadata\PE\LoadingFields.vb (1)
154Assert.Equal(9.0F, SingleField.GetConstantValue(ConstantFieldsInProgress.Empty).SingleValue)