ORGANIZATION_BLOCK OB 1
BEGIN

	// Truncating or rounding an infinite float shall not crash the core.
	// This used to trigger a Python OverflowError exception.

	__STWRST
	L		DW#16#7F800000
	TRUNC
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	TRUNC
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	__STWRST
	L		DW#16#7F800000
	RND
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	RND
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	__STWRST
	L		DW#16#7F800000
	RND+
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	RND+
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	__STWRST
	L		DW#16#7F800000
	RND-
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#7F800000
	__STWRST
	L		DW#16#FF800000
	RND-
	__ASSERT==	STW,		W#16#0030
	__ASSERT==	__ACCU 1,	DW#16#FF800000


	CALL SFC 46 // STOP CPU
END_ORGANIZATION_BLOCK
