Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal precision
Message
From
23/05/2012 10:17:00
 
 
To
23/05/2012 09:12:48
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01544101
Message ID:
01544141
Views:
75
This message has been marked as the solution to the initial question of the thread.
The only way I see is iteratively
	totalTax  = 74.88
	f = .05
	p = .095
	
	base =  round(totalTax  / (f*p + f + p), 2)
	
	for i = base  - .50 to base + .50 step .01
		fedTax = round(i * f, 2)
		provTax = round((i + fedTax) * p, 2)
		
		if ( fedTax + provTax == totalTax  )
		
			? 'Base ' , i
			? 'fedtax', fedTax 
			? 'provTax ', provTax 
			exit
		endif
	endfor
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform