note
	description: "Access to decimal math constants and shared context"
	library: "Gobo Eiffel Decimal Arithmetic Library"
	copyright: "Copyright (c) 2004-2018, Paul G. Crismer and others"
	license: "MIT License"
	date: "$Date: 2019-02-07 22:54:15 +0000 (Thu, 07 Feb 2019) $"
	revision: "$Revision: 102807 $"

class 
	MA_DECIMAL_CONSTANTS

inherit
	MA_SHARED_DECIMAL_CONTEXT

	KL_SHARED_PLATFORM
		export
			{NONE} all
		end

create 
	default_create

feature -- Access

	Zero: MA_DECIMAL
			-- Neutral element for "+" and "-"
		once
			create Result.make (1)
			Result := Result.zero
		ensure
			instance_free: class
			zero_not_void: Result /= Void
		end

	Negative_zero: MA_DECIMAL
			-- Negative zero
		once
			Result := Zero.Negative_zero
		ensure
			instance_free: class
			negative_zero_not_void: Result /= Void
		end

	One: MA_DECIMAL
			-- Neutral element for "*" and "/"
		once
			Result := Zero.one
		ensure
			instance_free: class
			one_not_void: Result /= Void
		end

	Minus_one: MA_DECIMAL
			-- Minus one
		once
			Result := Zero.Minus_one
		ensure
			instance_free: class
			minus_not_void: Result /= Void
		end

	Infinity: MA_DECIMAL
			-- Infinity
		once
			Result := Zero.Infinity
		ensure
			instance_free: class
			infinity_not_void: Result /= Void
		end

	Negative_infinity: MA_DECIMAL
			-- Negative infinity
		once
			Result := Zero.Negative_infinity
		ensure
			instance_free: class
			negative_infinity_not_void: Result /= Void
		end

	Not_a_number: MA_DECIMAL
			-- Not a Number
		once
			Result := Zero.Nan
		ensure
			instance_free: class
			not_a_number: Result /= Void
		end

	Signaling_not_a_number: MA_DECIMAL
			-- Signaling Not a Number
		once
			Result := Zero.Snan
		ensure
			instance_free: class
			signaling_not_a_number: Result /= Void
		end

	Minimum_integer: MA_DECIMAL
			-- Minimum value convertible to integer
		local
			ctx: MA_DECIMAL_CONTEXT
		once
			create ctx.make_double_extended
			create Result.make_from_string_ctx (Platform.Minimum_integer.out, ctx)
		ensure
			instance_free: class
			minimum_integer_not_void: Result /= Void
		end

	Maximum_integer: MA_DECIMAL
			-- Maximum value convertible to integer
		local
			ctx: MA_DECIMAL_CONTEXT
		once
			create ctx.make_double_extended
			create Result.make_from_string_ctx (Platform.Maximum_integer.out, ctx)
		ensure
			instance_free: class
			maximum_integer_not_void: Result /= Void
		end
	
end -- class MA_DECIMAL_CONSTANTS

Generated by ISE EiffelStudio